add cancel fix bug
parent
9e1051e2f2
commit
067e9892be
|
|
@ -173,18 +173,18 @@ export default class TradeItem extends Component {
|
|||
<View className='trade-item__ft-actions'></View>
|
||||
<View className='trade-item__ft-bd'>
|
||||
{/* <Text className='trade-item__status'>{info.status_desc}</Text> */}
|
||||
{false && (info.order_status_des === 'PAYED' || info.order_status_des === 'NOTPAY') &&
|
||||
{(info.order_status_des === 'PAYED' || info.order_status_des === 'NOTPAY') &&
|
||||
info.can_apply_cancel != 0 &&
|
||||
!info.is_logistics &&
|
||||
(info.receipt_type !== 'dada' || (info.dada && info.dada.dada_status === 0)) ? (
|
||||
<Button
|
||||
className='btn-action'
|
||||
style={`box-shadow: 0 0 0 1PX ${colors.data[0].primary}; color: ${colors.data[0].primary}`}
|
||||
// onClick={this.handleClickBtn.bind(this, 'cancel')}
|
||||
onClick={this.clickToEditAddress.bind(this)}
|
||||
onClick={this.handleClickBtn.bind(this, 'cancel')}
|
||||
// onClick={this.clickToEditAddress.bind(this)}
|
||||
>
|
||||
{/* 取消订单 */}
|
||||
修改地址
|
||||
取消订单
|
||||
{/* 修改地址 */}
|
||||
</Button>
|
||||
) : null}
|
||||
{info.pay_status === 'PAYED' &&
|
||||
|
|
|
|||
|
|
@ -304,6 +304,7 @@ export default class TradeDetail extends Component {
|
|||
tradeInfo,
|
||||
distributor: data.distributor
|
||||
})
|
||||
console.log("🚀 ~ file: detail.js:307 ~ TradeDetail ~ info:", info)
|
||||
}
|
||||
|
||||
handleCopy = async () => {
|
||||
|
|
@ -468,8 +469,12 @@ export default class TradeDetail extends Component {
|
|||
// Taro.navigateTo({
|
||||
// url: `/subpage/pages/trade/after-sale-detail?id=${info.tid}`
|
||||
// })
|
||||
let url = `/subpages/trade/after-sale?id=${info.tid}`
|
||||
if (info.status === "WAIT_SELLER_SEND_GOODS") {
|
||||
url += '&type=ONLY_REFUND'
|
||||
}
|
||||
Taro.navigateTo({
|
||||
url: `/subpages/trade/after-sale?id=${info.tid}`
|
||||
url
|
||||
})
|
||||
return
|
||||
}
|
||||
|
|
@ -756,7 +761,7 @@ export default class TradeDetail extends Component {
|
|||
</View>
|
||||
)}
|
||||
|
||||
<ScrollView scroll-y className='scroll-view' style={{ bottom: info.status === 'WAIT_BUYER_PAY' || info.can_apply_aftersales === 1 || info.status === 'WAIT_BUYER_CONFIRM_GOODS' ? '140rpx' : '40rpx' }} scrollIntoView={scrollIntoView}>
|
||||
<ScrollView scroll-y className='scroll-view' style={{ bottom: info.status === 'WAIT_BUYER_PAY' || info.can_apply_aftersales === 1 || info.status === 'WAIT_BUYER_CONFIRM_GOODS' || info.status === "WAIT_SELLER_SEND_GOODS" ? '150rpx' : '40rpx' }} scrollIntoView={scrollIntoView}>
|
||||
{false && <View className='trade-detail-header' id='order-0'>
|
||||
<View className='trade-detail-waitdeliver'>
|
||||
{info.is_logistics && <View className='oneline'>线上订单</View>}
|
||||
|
|
@ -1036,18 +1041,18 @@ export default class TradeDetail extends Component {
|
|||
)}
|
||||
</View> */}
|
||||
{/* {!info.is_logistics &&
|
||||
info.can_apply_cancel != 0 &&
|
||||
(info.status === 'WAIT_BUYER_PAY' ||
|
||||
(info.status === 'WAIT_SELLER_SEND_GOODS' &&
|
||||
info.order_status_des !== 'PAYED_WAIT_PROCESS' &&
|
||||
info.order_status_des !== 'PAYED_PARTAIL')) &&
|
||||
(info.receipt_type !== 'dada' || (info.dada && info.dada.dada_status === 0)) && (
|
||||
<View className='cancel__btn'>
|
||||
<View className='btn' onClick={this.handleClickBtn.bind(this, 'cancel')}>
|
||||
取消订单
|
||||
</View>
|
||||
info.can_apply_cancel != 0 &&
|
||||
(info.status === 'WAIT_BUYER_PAY' ||
|
||||
(info.status === 'WAIT_SELLER_SEND_GOODS' &&
|
||||
info.order_status_des !== 'PAYED_WAIT_PROCESS' &&
|
||||
info.order_status_des !== 'PAYED_PARTAIL')) &&
|
||||
(info.receipt_type !== 'dada' || (info.dada && info.dada.dada_status === 0)) && (
|
||||
<View className='cancel__btn'>
|
||||
<View className='btn' onClick={this.handleClickBtn.bind(this, 'cancel')}>
|
||||
取消订单
|
||||
</View>
|
||||
)} */}
|
||||
</View>
|
||||
)} */}
|
||||
{/* </View> */}
|
||||
{/* {info.remark && (
|
||||
<View className='trade-detail-remark'>
|
||||
|
|
@ -1222,7 +1227,8 @@ export default class TradeDetail extends Component {
|
|||
// !VERSION_IN_PURCHASE &&
|
||||
// !this.isPointitemGood() && (
|
||||
// 先禁止掉!!!
|
||||
info.can_apply_aftersales === 1 && (
|
||||
// info.status === 'WAIT_SELLER_SEND_GOODS' || 未发货的
|
||||
(info.can_apply_aftersales === 1) ? (
|
||||
<View
|
||||
className={`trade-detail__footer__btn ${info.is_logistics &&
|
||||
'trade-detail__footer_active trade-detail__footer_allWidthBtn'
|
||||
|
|
@ -1231,8 +1237,21 @@ export default class TradeDetail extends Component {
|
|||
>
|
||||
申请售后
|
||||
</View>
|
||||
)
|
||||
) : <></>
|
||||
}
|
||||
{!info.is_logistics &&
|
||||
info.can_apply_cancel != 0 &&
|
||||
(info.status === 'WAIT_BUYER_PAY' ||
|
||||
(info.status === 'WAIT_SELLER_SEND_GOODS' &&
|
||||
info.order_status_des !== 'PAYED_WAIT_PROCESS' &&
|
||||
info.order_status_des !== 'PAYED_PARTAIL')) &&
|
||||
(info.receipt_type !== 'dada' || (info.dada && info.dada.dada_status === 0)) && (
|
||||
<View className={`trade-detail__footer__btn ${info.is_logistics &&
|
||||
'trade-detail__footer_active trade-detail__footer_allWidthBtn'
|
||||
}`} onClick={this.handleClickBtn.bind(this, 'cancel')}>
|
||||
取消订单
|
||||
</View>
|
||||
)}
|
||||
{
|
||||
// 继续购物 先禁止掉!!!
|
||||
false && (info.status === 'WAIT_SELLER_SEND_GOODS' ||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ $paddingBottom: 100px;
|
|||
}
|
||||
|
||||
.scroll-view {
|
||||
@include page-scroll(calc(var(--nav-height) + 16px), 140px);
|
||||
@include page-scroll(calc(var(--nav-height) + 16px), 190px);
|
||||
}
|
||||
|
||||
&.has-navbar {
|
||||
|
|
@ -456,13 +456,14 @@ $paddingBottom: 100px;
|
|||
position: fixed;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
height: 150px;
|
||||
// bottom: $edge-margin;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
&__btn {
|
||||
width: 338px;
|
||||
height: 80px;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,12 @@ function TradeAfterSale (props) {
|
|||
refundStore, contact, mobile, afterSaleDesc, offlineAftersalesIsOpen, offlineAftersales, afterSaleTotalNum, allClicked, afterSaleTotalprice, loading, isOpened, isAddrOpened, aftersales, expressList, corpIndex, logi_no } = state
|
||||
|
||||
useEffect(() => {
|
||||
const { id, type } = $instance.router.params
|
||||
if (type) {
|
||||
setState(v => {
|
||||
v.curTabIdx = tabList.findIndex(item => item.type == type)
|
||||
})
|
||||
}
|
||||
fetch()
|
||||
Taro.eventCenter.on('onEventPickerStore', (item) => {
|
||||
console.log('onEventPickerStore:', item)
|
||||
|
|
@ -227,7 +233,7 @@ function TradeAfterSale (props) {
|
|||
}
|
||||
|
||||
const onSubmit = async () => {
|
||||
const { id } = $instance.router.params
|
||||
const { id, type } = $instance.router.params
|
||||
const checkedItems = info?.items.filter(item => !!item.checked)
|
||||
if (checkedItems.length == 0) {
|
||||
return showToast('请选择需要售后的商品')
|
||||
|
|
@ -236,7 +242,7 @@ function TradeAfterSale (props) {
|
|||
if (!reasons?.[reasonIndex]) {
|
||||
return showToast('请选择退货原因')
|
||||
}
|
||||
const aftersales_type = tabList[curTabIdx].type
|
||||
let aftersales_type = tabList[curTabIdx].type
|
||||
const reason = reasons?.[reasonIndex]
|
||||
let params = {
|
||||
detail: checkedItems.map(({ id: _id, refundNum, num }) => {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
}
|
||||
}
|
||||
.btn-wrap {
|
||||
padding: 50px;
|
||||
padding: 20rpx 50px;
|
||||
// margin-bottom: 100px;
|
||||
.at-button__text {
|
||||
font-size: 36px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue