import{$ as e,Z as a,o as s,c as t,w as l,n as d,e as r,i as o,a as u,b as c,F as i,f as n,t as _,d as f,l as m,g as p,k as y}from"./index-ae8bbb19.js";import{a as g,D as E,b as v,P as h,R as x}from"./OrderType.fdcce3af.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("复制成功")}})},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?r("",!0):(s(),t(b,{key:0,class:"container",style:d(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"})):r("",!0)],64)):r("",!0),v.order.order_status==v.OrderStatusEnum.COMPLETED.value?(s(),t(x,{key:1,class:"image",src:D,mode:"aspectFit"})):r("",!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"})):r("",!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})):r("",!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.order.extract_shop.region.province),1)])),_:1}),u(I,{class:"item-text"},{default:l((()=>[n(_(v.order.extract_shop.region.city),1)])),_:1}),u(I,{class:"item-text"},{default:l((()=>[n(_(v.order.extract_shop.region.region),1)])),_:1}),u(I,{class:"item-text"},{default:l((()=>[n(_(v.order.extract_shop.address),1)])),_:1})])),_:1})])),_:1}),u(b,{class:"icon-arrow"},{default:l((()=>[u(I,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1})])),_:1})):r("",!0),v.order.delivery_type==v.DeliveryTypeEnum.EXPRESS.value&&v.order.delivery_status==v.DeliveryStatusEnum.DELIVERED.value&&v.order.express?(s(),t(b,{key:2,class:"express i-card",onClick:a[2]||(a[2]=e=>h.handleTargetExpress())},{default:l((()=>[u(b,{class:"main"},{default:l((()=>[u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("物流公司")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.express.express_name),1)])),_:1})])),_:1})])),_:1}),u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("物流单号")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.express_no),1)])),_:1}),u(b,{class:"act-copy",onClick:a[1]||(a[1]=m((e=>h.handleCopy(v.order.express_no)),["stop"]))},{default:l((()=>[u(I,null,{default:l((()=>[n("复制")])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),u(b,{class:"right-arrow"},{default:l((()=>[u(I,{class:"iconfont icon-arrow-right"})])),_:1})])),_:1})):r("",!0),u(b,{class:"goods-list i-card"},{default:l((()=>[(s(!0),c(i,null,f(v.order.goods,((e,a)=>(s(),t(b,{class:"goods-item",key:a},{default:l((()=>[u(b,{class:"goods-main",onClick:a=>h.handleTargetGoods(e.goods_id)},{default:l((()=>[u(b,{class:"goods-image"},{default:l((()=>[u(x,{class:"image",src:e.goods_image,mode:"scaleToFill"},null,8,["src"])])),_:2},1024),u(b,{class:"goods-content"},{default:l((()=>[u(b,{class:"goods-title"},{default:l((()=>[u(I,{class:"twoline-hide"},{default:l((()=>[n(_(e.goods_name),1)])),_:2},1024)])),_:2},1024),u(b,{class:"goods-props clearfix"},{default:l((()=>[(s(!0),c(i,null,f(e.goods_props,((e,a)=>(s(),t(b,{class:"goods-props-item",key:a},{default:l((()=>[u(I,null,{default:l((()=>[n(_(e.value.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:2},1024)])),_:2},1024),u(b,{class:"goods-trade"},{default:l((()=>[u(b,{class:"goods-price"},{default:l((()=>[u(I,{class:"unit"},{default:l((()=>[n("¥")])),_:1}),u(I,{class:"value"},{default:l((()=>[n(_(e.goods_price),1)])),_:2},1024)])),_:2},1024),u(b,{class:"goods-num"},{default:l((()=>[u(I,null,{default:l((()=>[n("×"+_(e.total_num),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"]),u(b,{class:"goods-refund"},{default:l((()=>[e.refund?(s(),t(I,{key:0,class:"stata-text"},{default:l((()=>[n("已申请售后")])),_:1})):r("",!0)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),u(b,{class:"order-info i-card"},{default:l((()=>[u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("订单编号")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.order_no),1)])),_:1}),u(b,{class:"act-copy",onClick:a[3]||(a[3]=e=>h.handleCopy(v.order.order_no))},{default:l((()=>[u(I,null,{default:l((()=>[n("复制")])),_:1})])),_:1})])),_:1})])),_:1}),u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("下单时间")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.create_time),1)])),_:1})])),_:1})])),_:1}),u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("买家留言")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.buyer_remark?v.order.buyer_remark:"--"),1)])),_:1})])),_:1})])),_:1})])),_:1}),u(b,{class:"trade-info i-card"},{default:l((()=>[u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("订单金额")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n("¥"+_(v.order.total_price),1)])),_:1})])),_:1})])),_:1}),v.order.coupon_money>0?(s(),t(b,{key:0,class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("优惠券抵扣")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n("-¥"+_(v.order.coupon_money),1)])),_:1})])),_:1})])),_:1})):r("",!0),v.order.points_money>0?(s(),t(b,{key:1,class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n(_(v.setting.points_name)+"抵扣",1)])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n("-¥"+_(v.order.points_money),1)])),_:1})])),_:1})])),_:1})):r("",!0),u(b,{class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("运费")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n("+¥"+_(v.order.express_price),1)])),_:1})])),_:1})])),_:1}),"0.00"!=v.order.update_price.value?(s(),t(b,{key:2,class:"info-item"},{default:l((()=>[u(b,{class:"item-lable"},{default:l((()=>[n("后台改价")])),_:1}),u(b,{class:"item-content"},{default:l((()=>[u(I,null,{default:l((()=>[n(_(v.order.update_price.symbol),1)])),_:1}),u(I,null,{default:l((()=>[n("¥"+_(v.order.update_price.value),1)])),_:1})])),_:1})])),_:1})):r("",!0),u(b,{class:"divider"}),u(b,{class:"trade-total"},{default:l((()=>[u(I,{class:"lable"},{default:l((()=>[n("实付款")])),_:1}),u(b,{class:"goods-price"},{default:l((()=>[u(I,{class:"unit"},{default:l((()=>[n("¥")])),_:1}),u(I,{class:"value"},{default:l((()=>[n(_(v.order.pay_price),1)])),_:1})])),_:1})])),_:1})])),_:1}),v.order.order_status!=v.OrderStatusEnum.CANCELLED.value?(s(),t(b,{key:3,class:"footer-fixed"},{default:l((()=>[u(b,{class:"btn-wrapper"},{default:l((()=>[v.order.order_status==v.OrderStatusEnum.APPLY_CANCEL.value?(s(),t(b,{key:0,class:"f-28 col-8"},{default:l((()=>[n("取消申请中")])),_:1})):v.order.pay_status==v.PayStatusEnum.SUCCESS.value&&v.order.delivery_type==v.DeliveryTypeEnum.EXTRACT.value&&v.order.delivery_status==v.DeliveryStatusEnum.NOT_DELIVERED.value?(s(),t(b,{key:1,class:"btn-item active",onClick:a[4]||(a[4]=e=>h.onConfirmExtract())},{default:l((()=>[n("确认核销")])),_:1})):r("",!0)])),_:1})])),_:1})):r("",!0)])),_:1},8,["style"]))}],["__scopeId","data-v-847e875c"]]);export{O as default};