index-0549f520.js 11 KB

1
  1. import{_ as pe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-3e2a4d47.js";import{d as de,af as K,r as v,u as ne,x as me,Q as M,o as p,c as y,i as l,w as a,F as b,a as e,m as u,t as i,j as n,l as m,B as J,k as _,A as S,aY as f,av as ce,q as ye,aj as fe,I as _e,J as ve,E as be,s as ke}from"./index-6d906b8a.js";import{E as Ee,a as Te}from"./el-timeline-item-4d02b36e.js";import{E as Pe}from"./el-link-a9b298fe.js";import{E as Re,a as Se}from"./el-descriptions-item-9d55de2b.js";import{_ as we}from"./DictTag.vue_vue_type_script_lang-afe43767.js";import{m as Ae,g as Ce,p as Ie}from"./index-69b80eed.js";import{f as I}from"./formatTime-b48ce278.js";import{D as k,e as De,b as ge}from"./dict-1d5b7a74.js";import he from"./OrderUpdateRemarkForm-8003fd64.js";import Ne from"./OrderDeliveryForm-28f065b8.js";import{_ as Ue}from"./OrderUpdateAddressForm.vue_vue_type_script_setup_true_lang-c9dce230.js";import{_ as Fe}from"./OrderUpdatePriceForm.vue_vue_type_script_setup_true_lang-9b2f3326.js";import{g as Oe}from"./index-7fec6999.js";import{u as Ye}from"./tagsView-e2746912.js";import{D as E,T as Q}from"./constants-e43f22dd.js";import{a as Le}from"./index-aa0b4bf4.js";import{u as Ve}from"./useMessage-cb0d0c75.js";import{_ as Xe}from"./_plugin-vue_export-helper-1b428a4d.js";import"./el-card-dcb0121c.js";import"./color-6e929987.js";import"./Dialog-7d76582a.js";import"./OrderBaseInfo-8b058126.js";import"./SPuUploadImg-f3405bee.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3a6b66a.js";import"./index-6b24d3ee.js";import"./el-image-viewer-3eb20b9c.js";import"./OrderProduct-c6d319e1.js";import"./el-tree-select-73d9f90b.js";import"./index-c797273f.js";import"./tree-fd3a041e.js";const je={key:0},xe={key:1},Ke={class:"el-timeline-right-content"},Me=Xe(de({name:"TradeOrderDetail",__name:"index",props:{id:K.number.def(void 0),showPickUp:K.bool.def(!0)},setup(g){const C=Ve(),q=d=>{const t=ge(k.USER_TYPE,d);switch(t==null?void 0:t.colorType){case"success":return"#67C23A";case"info":return"#909399";case"warning":return"#E6A23C";case"danger":return"#F56C6C"}return"#409EFF"},r=v({logs:[]}),h=v(),B=()=>{var d;(d=h.value)==null||d.open(r.value)},N=v(),H=()=>{var d;(d=N.value)==null||d.open(r.value)},U=v(),W=()=>{var d;(d=U.value)==null||d.open(r.value)},F=v(),Z=()=>{var d;(d=F.value)==null||d.open(r.value)},$=async()=>{try{await C.confirm("\u786E\u8BA4\u6838\u9500\u8BA2\u5355\u5417\uFF1F"),await Ie(r.value.id),C.success("\u6838\u9500\u6210\u529F"),await T()}catch{}},O=g.id,T=async()=>{if(O){const d=await Ce(O);d||(C.error("\u4EA4\u6613\u8BA2\u5355\u4E0D\u5B58\u5728"),ae()),r.value=d}},{delView:z}=Ye(),{push:G,currentRoute:ee}=ne(),ae=()=>{z(e(ee)),G({name:"TradeOrder"})},le=()=>{C.success("\u590D\u5236\u6210\u529F")},Y=v([]),D=v([]),L=v({});return me(async()=>{await T(),r.value.deliveryType===E.EXPRESS.type?(Y.value=await Oe(),r.value.logisticsId&&(D.value=await Ae(r.value.id))):r.value.deliveryType===E.PICK_UP.type&&(L.value=await Le(r.value.pickUpStoreId))}),(d,t)=>{const s=Re,P=we,R=Se,w=ye,re=fe,A=_e,te=ve,V=be,se=ke,oe=Pe,X=Ee,j=Te,ue=pe,ie=M("hasPermi"),x=M("clipboard");return p(),y(b,null,[l(ue,null,{default:a(()=>[l(R,{title:"\u8BA2\u5355\u4FE1\u606F"},{default:a(()=>[l(s,{label:"\u8BA2\u5355\u53F7: "},{default:a(()=>[u(i(e(r).no),1)]),_:1}),l(s,{label:"\u4E70\u5BB6: "},{default:a(()=>{var o,c;return[u(i((c=(o=e(r))==null?void 0:o.user)==null?void 0:c.nickname),1)]}),_:1}),l(s,{label:"\u8BA2\u5355\u7C7B\u578B: "},{default:a(()=>[l(P,{type:e(k).TRADE_ORDER_TYPE,value:e(r).type},null,8,["type","value"])]),_:1}),l(s,{label:"\u8BA2\u5355\u6765\u6E90: "},{default:a(()=>[l(P,{type:e(k).TERMINAL,value:e(r).terminal},null,8,["type","value"])]),_:1}),l(s,{label:"\u4E70\u5BB6\u7559\u8A00: "},{default:a(()=>[u(i(e(r).userRemark),1)]),_:1}),l(s,{label:"\u5546\u5BB6\u5907\u6CE8: "},{default:a(()=>[u(i(e(r).remark),1)]),_:1}),l(s,{label:"\u652F\u4ED8\u5355\u53F7: "},{default:a(()=>[u(i(e(r).payOrderId),1)]),_:1}),l(s,{label:"\u4ED8\u6B3E\u65B9\u5F0F: "},{default:a(()=>[l(P,{type:e(k).PAY_CHANNEL_CODE,value:e(r).payChannelCode},null,8,["type","value"])]),_:1}),e(r).brokerageUser?(p(),n(s,{key:0,label:"\u63A8\u5E7F\u7528\u6237: "},{default:a(()=>{var o;return[u(i((o=e(r).brokerageUser)==null?void 0:o.nickname),1)]}),_:1})):m("",!0)]),_:1}),l(R,{column:1,title:"\u8BA2\u5355\u72B6\u6001"},{default:a(()=>[l(s,{label:"\u8BA2\u5355\u72B6\u6001: "},{default:a(()=>[l(P,{type:e(k).TRADE_ORDER_STATUS,value:e(r).status},null,8,["type","value"])]),_:1}),J((p(),n(s,{"label-class-name":"no-colon"},{default:a(()=>[e(r).status===e(Q).UNPAID.status?(p(),n(w,{key:0,type:"primary",onClick:Z},{default:a(()=>t[0]||(t[0]=[u(" \u8C03\u6574\u4EF7\u683C ")])),_:1})):m("",!0),l(w,{type:"primary",onClick:B},{default:a(()=>t[1]||(t[1]=[u("\u5907\u6CE8")])),_:1}),e(r).status===e(Q).UNDELIVERED.status?(p(),y(b,{key:1},[e(r).deliveryType===e(E).EXPRESS.type?(p(),n(w,{key:0,type:"primary",onClick:H},{default:a(()=>t[2]||(t[2]=[u(" \u53D1\u8D27 ")])),_:1})):m("",!0),e(r).deliveryType===e(E).EXPRESS.type?(p(),n(w,{key:1,type:"primary",onClick:W},{default:a(()=>t[3]||(t[3]=[u(" \u4FEE\u6539\u5730\u5740 ")])),_:1})):m("",!0),e(r).deliveryType===e(E).PICK_UP.type&&g.showPickUp?(p(),n(w,{key:2,type:"primary",onClick:$},{default:a(()=>t[4]||(t[4]=[u(" \u6838\u9500 ")])),_:1})):m("",!0)],64)):m("",!0)]),_:1})),[[ie,["trade:order:update"]]]),l(s,null,{label:a(()=>t[5]||(t[5]=[_("span",{style:{color:"red"}},"\u63D0\u9192: ",-1)])),default:a(()=>[t[6]||(t[6]=u(" \u4E70\u5BB6\u4ED8\u6B3E\u6210\u529F\u540E\uFF0C\u8D27\u6B3E\u5C06\u76F4\u63A5\u8FDB\u5165\u60A8\u7684\u5546\u6237\u53F7\uFF08\u5FAE\u4FE1\u3001\u652F\u4ED8\u5B9D\uFF09")),t[7]||(t[7]=_("br",null,null,-1)),t[8]||(t[8]=u(" \u8BF7\u53CA\u65F6\u5173\u6CE8\u4F60\u53D1\u51FA\u7684\u5305\u88F9\u72B6\u6001\uFF0C\u786E\u4FDD\u53EF\u4EE5\u914D\u9001\u81F3\u4E70\u5BB6\u624B\u4E2D ")),t[9]||(t[9]=_("br",null,null,-1)),t[10]||(t[10]=u(" \u5982\u679C\u4E70\u5BB6\u8868\u793A\u6CA1\u6536\u5230\u8D27\u6216\u8D27\u7269\u6709\u95EE\u9898\uFF0C\u8BF7\u53CA\u65F6\u8054\u7CFB\u4E70\u5BB6\u5904\u7406\uFF0C\u53CB\u597D\u534F\u5546 "))]),_:1})]),_:1}),l(R,{title:"\u5546\u54C1\u4FE1\u606F"},{default:a(()=>[l(s,{labelClassName:"no-colon"},{default:a(()=>[l(se,{gutter:20},{default:a(()=>[l(V,{span:15},{default:a(()=>[l(te,{data:e(r).items,border:""},{default:a(()=>[l(A,{label:"\u5546\u54C1",prop:"spuName",width:"auto"},{default:a(({row:o})=>[u(i(o.spuName)+" ",1),(p(!0),y(b,null,S(o.properties,c=>(p(),n(re,{key:c.propertyId},{default:a(()=>[u(i(c.propertyName)+": "+i(c.valueName),1)]),_:2},1024))),128))]),_:1}),l(A,{label:"\u5546\u54C1\u539F\u4EF7",prop:"price",width:"150"},{default:a(({row:o})=>[u(i(e(f)(o.price))+"\u5143",1)]),_:1}),l(A,{label:"\u6570\u91CF",prop:"count",width:"100"}),l(A,{label:"\u5408\u8BA1",prop:"payPrice",width:"150"},{default:a(({row:o})=>[u(i(e(f)(o.payPrice))+"\u5143",1)]),_:1}),l(A,{label:"\u552E\u540E\u72B6\u6001",prop:"afterSaleStatus",width:"120"},{default:a(({row:o})=>[l(P,{type:e(k).TRADE_ORDER_ITEM_AFTER_SALE_STATUS,value:o.afterSaleStatus},null,8,["type","value"])]),_:1})]),_:1},8,["data"])]),_:1}),l(V,{span:10})]),_:1})]),_:1})]),_:1}),l(R,{column:4},{default:a(()=>[l(s,{label:"\u5546\u54C1\u603B\u989D: "},{default:a(()=>[u(i(e(f)(e(r).totalPrice))+" \u5143 ",1)]),_:1}),l(s,{label:"\u8FD0\u8D39\u91D1\u989D: "},{default:a(()=>[u(i(e(f)(e(r).deliveryPrice))+" \u5143 ",1)]),_:1}),l(s,{label:"\u8BA2\u5355\u8C03\u4EF7: "},{default:a(()=>[u(i(e(f)(e(r).adjustPrice))+" \u5143 ",1)]),_:1}),(p(),y(b,null,S(1,o=>l(s,{key:o,"label-class-name":"no-colon"})),64)),l(s,null,{label:a(()=>t[11]||(t[11]=[_("span",{style:{color:"red"}},"\u4F18\u60E0\u52B5\u4F18\u60E0: ",-1)])),default:a(()=>[u(" "+i(e(f)(e(r).couponPrice))+" \u5143 ",1)]),_:1}),l(s,null,{label:a(()=>t[12]||(t[12]=[_("span",{style:{color:"red"}},"VIP \u4F18\u60E0: ",-1)])),default:a(()=>[u(" "+i(e(f)(e(r).vipPrice))+" \u5143 ",1)]),_:1}),l(s,null,{label:a(()=>t[13]||(t[13]=[_("span",{style:{color:"red"}},"\u6D3B\u52A8\u4F18\u60E0: ",-1)])),default:a(()=>[u(" "+i(e(f)(e(r).discountPrice))+" \u5143 ",1)]),_:1}),l(s,null,{label:a(()=>t[14]||(t[14]=[_("span",{style:{color:"red"}},"\u4F63\u91D1\u62B5\u6263: ",-1)])),default:a(()=>[u(" "+i(e(f)(e(r).pointPrice))+" \u5143 ",1)]),_:1}),(p(),y(b,null,S(3,o=>l(s,{key:o,"label-class-name":"no-colon"})),64)),l(s,{label:"\u5E94\u4ED8\u91D1\u989D: "},{default:a(()=>[u(i(e(f)(e(r).payPrice))+" \u5143 ",1)]),_:1})]),_:1}),l(R,{column:4,title:"\u6536\u8D27\u4FE1\u606F"},{default:a(()=>[l(s,{label:"\u914D\u9001\u65B9\u5F0F: "},{default:a(()=>[l(P,{type:e(k).TRADE_DELIVERY_TYPE,value:e(r).deliveryType},null,8,["type","value"])]),_:1}),l(s,{label:"\u6536\u8D27\u4EBA: "},{default:a(()=>[u(i(e(r).receiverName),1)]),_:1}),l(s,{label:"\u8054\u7CFB\u7535\u8BDD: "},{default:a(()=>[u(i(e(r).receiverMobile),1)]),_:1}),e(r).deliveryType===e(E).EXPRESS.type?(p(),y("div",je,[e(r).receiverDetailAddress?(p(),n(s,{key:0,label:"\u6536\u8D27\u5730\u5740: "},{default:a(()=>[u(i(e(r).receiverAreaName)+" "+i(e(r).receiverDetailAddress)+" ",1),J(l(oe,{icon:"ep:document-copy",type:"primary"},null,512),[[x,e(r).receiverAreaName+" "+e(r).receiverDetailAddress,"copy"],[x,le,"success"]])]),_:1})):m("",!0),e(r).logisticsId?(p(),n(s,{key:1,label:"\u7269\u6D41\u516C\u53F8: "},{default:a(()=>{var o;return[u(i((o=e(Y).find(c=>c.id===e(r).logisticsId))==null?void 0:o.name),1)]}),_:1})):m("",!0),e(r).logisticsId?(p(),n(s,{key:2,label:"\u8FD0\u5355\u53F7: "},{default:a(()=>[u(i(e(r).logisticsNo),1)]),_:1})):m("",!0),e(I).deliveryTime?(p(),n(s,{key:3,label:"\u53D1\u8D27\u65F6\u95F4: "},{default:a(()=>[u(i(e(I)(e(r).deliveryTime)),1)]),_:1})):m("",!0),(p(),y(b,null,S(2,o=>l(s,{key:o,"label-class-name":"no-colon"})),64)),e(D).length>0?(p(),n(s,{key:4,label:"\u7269\u6D41\u8BE6\u60C5: "},{default:a(()=>[l(j,null,{default:a(()=>[(p(!0),y(b,null,S(e(D),(o,c)=>(p(),n(X,{key:c,timestamp:e(I)(o.time)},{default:a(()=>[u(i(o.content),1)]),_:2},1032,["timestamp"]))),128))]),_:1})]),_:1})):m("",!0)])):m("",!0),e(r).deliveryType===e(E).PICK_UP.type?(p(),y("div",xe,[e(r).pickUpStoreId?(p(),n(s,{key:0,label:"\u81EA\u63D0\u95E8\u5E97: "},{default:a(()=>{var o;return[u(i((o=e(L))==null?void 0:o.name),1)]}),_:1})):m("",!0)])):m("",!0)]),_:1}),l(R,{title:"\u8BA2\u5355\u64CD\u4F5C\u65E5\u5FD7"},{default:a(()=>[l(s,{labelClassName:"no-colon"},{default:a(()=>[l(j,null,{default:a(()=>[(p(!0),y(b,null,S(e(r).logs,(o,c)=>(p(),n(X,{key:c,timestamp:e(I)(o.createTime),placement:"top"},{dot:a(()=>[_("span",{style:ce({backgroundColor:q(o.userType)}),class:"dot-node-style"},i(e(De)(e(k).USER_TYPE,o.userType)[0]),5)]),default:a(()=>[_("div",Ke,i(o.content),1)]),_:2},1032,["timestamp"]))),128))]),_:1})]),_:1})]),_:1})]),_:1}),l(Ne,{ref_key:"deliveryFormRef",ref:N,onSuccess:T},null,512),l(he,{ref_key:"updateRemarkForm",ref:h,onSuccess:T},null,512),l(Ue,{ref_key:"updateAddressFormRef",ref:U,onSuccess:T},null,512),l(Fe,{ref_key:"updatePriceFormRef",ref:F,onSuccess:T},null,512)],64)}}}),[["__scopeId","data-v-d76bd28d"]]);export{Me as default};