diff --git a/src/subpage/pages/trade/comps/new-item.js b/src/subpage/pages/trade/comps/new-item.js index 95868ec..03835e9 100755 --- a/src/subpage/pages/trade/comps/new-item.js +++ b/src/subpage/pages/trade/comps/new-item.js @@ -173,18 +173,18 @@ export default class TradeItem extends Component { {/* {info.status_desc} */} - {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)) ? ( ) : null} {info.pay_status === 'PAYED' && diff --git a/src/subpage/pages/trade/detail.js b/src/subpage/pages/trade/detail.js index e0bf860..ad8be87 100755 --- a/src/subpage/pages/trade/detail.js +++ b/src/subpage/pages/trade/detail.js @@ -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 { )} - + {false && {info.is_logistics && 线上订单} @@ -1036,18 +1041,18 @@ export default class TradeDetail extends Component { )} */} {/* {!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)) && ( - - - 取消订单 - + 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)) && ( + + + 取消订单 - )} */} + + )} */} {/* */} {/* {info.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) ? ( 申请售后 - ) + ) : <> } + {!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)) && ( + + 取消订单 + + )} { // 继续购物 先禁止掉!!! false && (info.status === 'WAIT_SELLER_SEND_GOODS' || diff --git a/src/subpage/pages/trade/detail.scss b/src/subpage/pages/trade/detail.scss index 313ecae..26a545d 100755 --- a/src/subpage/pages/trade/detail.scss +++ b/src/subpage/pages/trade/detail.scss @@ -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; diff --git a/src/subpages/trade/after-sale.js b/src/subpages/trade/after-sale.js index 77e9f32..83108cf 100755 --- a/src/subpages/trade/after-sale.js +++ b/src/subpages/trade/after-sale.js @@ -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 }) => { diff --git a/src/subpages/trade/after-sale.scss b/src/subpages/trade/after-sale.scss index 6c60048..882925b 100755 --- a/src/subpages/trade/after-sale.scss +++ b/src/subpages/trade/after-sale.scss @@ -51,7 +51,7 @@ } } .btn-wrap { - padding: 50px; + padding: 20rpx 50px; // margin-bottom: 100px; .at-button__text { font-size: 36px;