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
10 KiB
2 lines
10 KiB
11 months ago
|
import{$ as e,Z as a,o as s,c as t,w as l,n as r,e as d,i as o,a as u,b as c,F as i,f as n,t as _,d as f,m,g as p,l as y}from"./index-4ddb689d.js";import{a as g,D as E,b as v,P as h,R as x}from"./OrderType.16ab6c02.js";import{_ as k,a as C,b as T,c as D,d as S}from"./close.45fd8c32.js";import{_ as b}from"./_plugin-vue_export-helper.1b428a4d.js";const I="shop.order/detail",L="shop.order/extract";const O=b({data:()=>({DeliveryStatusEnum:g,DeliveryTypeEnum:E,OrderStatusEnum:v,PayStatusEnum:h,ReceiptStatusEnum:x,orderId:null,isLoading:!0,order:{},setting:{}}),onLoad(e){this.onRecordQuery(e),this.getOrderDetail()},methods:{onRecordQuery(e){const s=a(e);this.orderId=e.orderId?parseInt(e.orderId):parseInt(s.oid)},getOrderDetail(){const a=this;var s,t;a.isLoading=!0,(s=a.orderId,e.get(I,{orderId:s,...t})).then((e=>{a.order=e.data.order,a.setting=e.data.setting,a.isLoading=!1}))},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})},onConfirmExtract(){const a=this;uni.showModal({title:"友情提示",content:"确认要核销该订单吗?请确认买家已取到货~",success(s){var t,l;s.confirm&&(t=a.orderId,e.post(L,{orderId:t,...l})).then((e=>{a.$success(e.message),setTimeout((()=>{a.getOrderDetail()}),1500)}))}})}}},[["render",function(e,a,g,E,v,h){const x=p,b=o,I=y;return v.isLoading?d("",!0):(s(),t(b,{key:0,class:"container",style:r(e.appThemeStyle)},{default:l((()=>[u(b,{class:"header"},{default:l((()=>[u(b,{class:"order-status"},{default:l((()=>[u(b,{class:"status-icon"},{default:l((()=>[v.order.order_status==v.OrderStatusEnum.NORMAL.value?(s(),c(i,{key:0},[v.order.pay_status==v.PayStatusEnum.PENDING.value?(s(),t(x,{key:0,class:"image",src:k,mode:"aspectFit"})):v.order.delivery_status==v.DeliveryStatusEnum.NOT_DELIVERED.value?(s(),t(x,{key:1,class:"image",src:C,mode:"aspectFit"})):v.order.receipt_status==v.ReceiptStatusEnum.NOT_RECEIVED.value?(s(),t(x,{key:2,class:"image",src:T,mode:"aspectFit"})):d("",!0)],64)):d("",!0),v.order.order_status==v.OrderStatusEnum.COMPLETED.value?(s(),t(x,{key:1,class:"image",src:D,mode:"aspectFit"})):d("",!0),v.order.order_status==v.OrderStatusEnum.CANCELLED.value||v.order.order_status==v.OrderStatusEnum.APPLY_CANCEL.value?(s(),t(x,{key:2,class:"image",src:S,mode:"aspectFit"})):d("",!0)])),_:1}),u(b,{class:"status-text"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.state_text),1)])),_:1})])),_:1})])),_:1})])),_:1}),v.order.delivery_type==v.DeliveryTypeEnum.EXPRESS.value?(s(),t(b,{key:0,class:"delivery-address i-card"},{default:l((()=>[u(b,{class:"link-man"},{default:l((()=>[u(I,{class:"name"},{default:l((()=>[n(_(v.order.address.name),1)])),_:1}),u(I,{class:"phone"},{default:l((()=>[n(_(v.order.address.phone),1)])),_:1})])),_:1}),u(b,{class:"address"},{default:l((()=>[(s(!0),c(i,null,f(v.order.address.region,((e,a)=>(s(),t(I,{class:"region",key:a},{default:l((()=>[n(_(e),1)])),_:2},1024)))),128)),u(I,{class:"detail"},{default:l((()=>[n(_(v.order.address.detail),1)])),_:1})])),_:1})])),_:1})):d("",!0),v.order.delivery_type==v.DeliveryTypeEnum.EXTRACT.value?(s(),t(b,{key:1,class:"delivery-extract i-card",onClick:a[0]||(a[0]=e=>h.handleTargetExtract(v.order.extract_shop.shop_id))},{default:l((()=>[u(b,{class:"extract-top"},{default:l((()=>[u(I,{class:"title"},{default:l((()=>[n("自提门店")])),_:1}),u(I,{class:"subtitle"},{default:l((()=>[n("您须到该自提点取货")])),_:1})])),_:1}),u(b,{class:"shop-info"},{default:l((()=>[u(b,{class:"icon-location"},{default:l((()=>[u(I,{class:"iconfont icon-dingwei"})])),_:1}),u(b,{class:"shop-content"},{default:l((()=>[u(b,{class:"shop-name"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.extract_shop.shop_name),1)])),_:1})])),_:1}),u(b,{class:"shop-describe"},{default:l((()=>[u(I,{class:"item-text"},{default:l((()=>[n(_(v.o
|