You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
14 KiB
2 lines
14 KiB
11 months ago
|
import{E as e,o as a,c as t,w as s,n as l,e as r,i as d,a as o,b as u,F as n,f as i,t as c,d as _,m as f,g as m,l as p,y}from"./index-4ddb689d.js";import{_ as E}from"./u-popup.37b3343e.js";import{r as v}from"./uni-app.es.24af5d4f.js";import{O as g,a as h,D as k,b as C,P as D,R as x}from"./OrderType.16ab6c02.js";import{d as R,c as S,r as T,e as b}from"./order.42b61037.js";import{_ as I,a as O,b as P,c as L,d as N}from"./close.45fd8c32.js";import{_ as w}from"./_plugin-vue_export-helper.1b428a4d.js";import"./u-icon.e981d1c2.js";const A=new e([{key:"MANUAL",name:"手动发货",value:10},{key:"UNWANTED",name:"无需物流",value:20},{key:"EORDER",name:"电子面单",value:30}]);const V=w({data:()=>({OrderTypeEnum:g,DeliveryStatusEnum:h,DeliveryTypeEnum:k,OrderStatusEnum:C,PayStatusEnum:D,ReceiptStatusEnum:x,DeliveryMethodEnum:A,orderId:null,isLoading:!0,order:{},setting:{},showQRCodePopup:!1,qrcodeImage:"",canReset:!1}),onLoad({orderId:e}){this.orderId=e,this.getOrderDetail(),uni.$on("syncRefresh",((e,a)=>{a||(this.canReset=e)}))},onShow(){this.canReset&&this.getOrderDetail(),this.canReset=!1},methods:{getOrderDetail(e=!1){const a=this;a.isLoading=!0,R(a.orderId).then((e=>{a.order=e.data.order,a.setting=e.data.setting,a.isLoading=!1})),e&&uni.$emit("syncRefresh",!0,!0)},handleCopy(e){const a=this;uni.setClipboardData({data:e,success:()=>a.$toast("复制成功"),fail:({errMsg:e})=>a.$toast("复制失败 "+e)})},handleTargetExtract(e){this.$navTo("pages/shop/detail",{shopId:e})},handleTargetExpress(){this.$navTo("pages/order/express/index",{orderId:this.orderId})},handleTargetGoods(e){this.$navTo("pages/goods/detail",{goodsId:e})},handleApplyRefund(e){this.$navTo("pages/refund/apply",{orderGoodsId:e})},onCancel(e){const a=this;uni.showModal({title:"友情提示",content:"确认要取消该订单吗?",success(t){t.confirm&&S(e).then((e=>{a.$toast(e.message),setTimeout((()=>{a.getOrderDetail(!0)}),1500)}))}})},onReceipt(e){const a=this;uni.showModal({title:"友情提示",content:"确认收到商品了吗?",success(t){t.confirm&&T(e).then((e=>{a.$success(e.message),setTimeout((()=>{a.getOrderDetail(!0)}),1500)}))}})},onExtractQRCode(e){const a=this;b(e,{channel:a.platform}).then((e=>{a.qrcodeImage=e.data.qrcode,a.showQRCodePopup=!0}))},onPay(e){this.$navTo("pages/checkout/cashier/index",{orderId:e})},handleTargetComment(e){this.$navTo("pages/order/comment/index",{orderId:e})}}},[["render",function(e,g,h,k,C,D){const x=m,R=d,S=p,T=v(y("u-popup"),E);return C.isLoading?r("",!0):(a(),t(R,{key:0,class:"container",style:l(e.appThemeStyle)},{default:s((()=>[o(R,{class:"header"},{default:s((()=>[o(R,{class:"order-status"},{default:s((()=>[o(R,{class:"status-icon"},{default:s((()=>[C.order.order_status==C.OrderStatusEnum.NORMAL.value?(a(),u(n,{key:0},[C.order.pay_status==C.PayStatusEnum.PENDING.value?(a(),t(x,{key:0,class:"image",src:I,mode:"aspectFit"})):C.order.delivery_status==C.DeliveryStatusEnum.NOT_DELIVERED.value?(a(),t(x,{key:1,class:"image",src:O,mode:"aspectFit"})):C.order.receipt_status==C.ReceiptStatusEnum.NOT_RECEIVED.value?(a(),t(x,{key:2,class:"image",src:P,mode:"aspectFit"})):r("",!0)],64)):r("",!0),C.order.order_status==C.OrderStatusEnum.COMPLETED.value?(a(),t(x,{key:1,class:"image",src:L,mode:"aspectFit"})):r("",!0),C.order.order_status==C.OrderStatusEnum.CANCELLED.value||C.order.order_status==C.OrderStatusEnum.APPLY_CANCEL.value?(a(),t(x,{key:2,class:"image",src:N,mode:"aspectFit"})):r("",!0)])),_:1}),o(R,{class:"status-text"},{default:s((()=>[o(S,null,{default:s((()=>[i(c(C.order.state_text),1)])),_:1})])),_:1})])),_:1}),C.order.order_status==C.OrderStatusEnum.NORMAL.value?(a(),t(R,{key:0,class:"next-action"},{default:s((()=>[C.order.pay_status==C.PayStatusEnum.PENDING.value?(a(),t(R,{key:0,class:"action-btn",onClick:g[0]||(g[0]=e=>D.onPay(C.order.order_id))},{default:s((()=>[i(" 去支付")])),_:1})):r("",!0),C.order.delivery_status==C.DeliveryStatusEnum.DELIVERED.value&&C.order.receipt_status==C.ReceiptStatusEnum.NOT_RECEIVED.value?(a(),t(R,{key:1,class:"action-btn",onClick:g[1]||(g[1]=e=>D.onReceipt(C.order.orde
|