| | |
| | | shape="circle" |
| | | size="mini" |
| | | v-if="order.orderStatus==='UNDELIVERED'" |
| | | @click="navigationToOrderDetail(order.sn)" |
| | | >发货</view |
| | | > |
| | | <!-- 等待收货 --> |
| | |
| | | <script> |
| | | import '@/components/uview-components/uview-ui'; |
| | | import { getOrderXcxList, cancelOrder, confirmReceipt ,getOrderDetail} from "@/api/order.js"; |
| | | import{supplierOrderList} from '@/api/supplier.js' |
| | | import { getClearReason } from "@/api/after-sale.js"; |
| | | import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js"; |
| | | export default { |
| | |
| | | * 修复app端点击除全部订单外的按钮进入时不加载数据的问题 |
| | | * 替换onLoad下代码即可 |
| | | */ |
| | | if(!options.status){ |
| | | options.status = 0 |
| | | } |
| | | let status = Number(options.status); |
| | | this.status = status; |
| | | |
| | |
| | | }, |
| | | }, |
| | | methods: { |
| | | navigationToOrderDetail(snNo){ |
| | | uni.navigateTo({ |
| | | url:`/pages/supplier/suppler-order/order-detail?order_sn=${snNo}` |
| | | }) |
| | | }, |
| | | async selectPhone(sn){ |
| | | const orderInfo = await getOrderDetail(sn) |
| | | console.log('----------------->',orderInfo) |
| | |
| | | this.userInfo.address = orderInfo.data.result.order.consigneeAddressPath |
| | | |
| | | uni.showModal({ |
| | | title:"用户联系电话", |
| | | content:orderInfo.data.result.order.consigneeMobile |
| | | title:orderInfo.data.result.order.consigneeName + '(先生/女士)', |
| | | content:orderInfo.data.result.order.consigneeMobile, |
| | | success(e) { |
| | | if(e.confirm){ |
| | | uni.makePhoneCall({ |
| | | phoneNumber:orderInfo.data.result.order.consigneeMobile |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | }, |
| | |
| | | loadData(index) { |
| | | this.params.pageNumber = this.navList[index].pageNumber; |
| | | // this.params.tag = this.orderStatus[index].orderStatus; |
| | | getOrderXcxList(this.params).then((res) => { |
| | | supplierOrderList(this.params).then((res) => { |
| | | uni.stopPullDownRefresh(); |
| | | if (!res.data.success) { |
| | | this.navList[index].loadStatus = "noMore"; |
| | |
| | | stateTipColor, |
| | | }; |
| | | }, |
| | | /** |
| | | * 选择取消原因 |
| | | */ |
| | | reasonChange(reason) { |
| | | this.reason = reason; |
| | | }, |
| | | |
| | | /** |
| | | * 提交取消订单(未付款) |
| | | */ |
| | | submitCancel() { |
| | | cancelOrder(this.orderSn, { reason: this.reason }).then((res) => { |
| | | if (res.data.success) { |
| | | uni.showToast({ |
| | | title: "订单已取消", |
| | | duration: 2000, |
| | | icon: "none", |
| | | }); |
| | | this.initData(this.tabCurrentIndex); |
| | | |
| | | this.cancelShow = false; |
| | | } else { |
| | | uni.showToast({ |
| | | title: res.data.message, |
| | | duration: 2000, |
| | | icon: "none", |
| | | }); |
| | | this.cancelShow = false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 确认收货显示 |
| | | */ |
| | | onRog(sn) { |
| | | this.orderSn = sn; |
| | | this.rogShow = true; |
| | | }, |
| | | |
| | | /** |
| | | * 点击确认收货 |
| | | */ |
| | | confirmRog() { |
| | | confirmReceipt(this.orderSn).then((res) => { |
| | | if (res.data.code == 200) { |
| | | uni.showToast({ |
| | | title: "已确认收货", |
| | | duration: 2000, |
| | | icon: "none", |
| | | }); |
| | | this.initData(this.tabCurrentIndex); |
| | | this.rogShow = false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 评价商品 |
| | | */ |
| | | onComment(sn) { |
| | | uni.navigateTo({ |
| | | url: "./evaluate/myEvaluate", |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 重新购买 |
| | | */ |
| | | reBuy(order) { |
| | | console.log(order); |
| | | return; |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/product/goods?id=" + order.id + "&goodsId=" + order.goodsId, |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * 查看物流 |
| | |
| | | navigateToLogistics(order) { |
| | | uni.navigateTo({ |
| | | url: |
| | | "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn, |
| | | `/pages/order/deliverDetail?order_sn=${order.sn}`, |
| | | }); |
| | | }, |
| | | }, |