index-f9e2542e.js 14 KB

1
  1. import{_ as Le,__tla as Oe}from"./ContentWrap.vue_vue_type_script_setup_true_lang-cc335a20.js";import{_ as Fe,__tla as He}from"./index.vue_vue_type_script_setup_true_lang-571824c6.js";import{d as qe,N as Xe,b as je,e as Be,r as _,u as Ge,z as Je,S as Ke,o as s,c as p,i as t,w as r,k as d,a,j as i,F as m,C as f,l as g,T as Ze,dz as he,D as P,a6 as be,m as v,t as E,ba as $e,a_ as We,Y as Qe,Z as ea,_ as aa,q as la,X as ta,G as ra,H as oa,I as sa,p as ua,s as na,J as ia,aP as _a,E as pa,v as ca,x as da,__tla as ma}from"./index-1e808f2e.js";import{E as ya,__tla as fa}from"./el-card-03b3588b.js";import{E as va,a as ha,b as ba,__tla as ka}from"./el-dropdown-item-e91442cd.js";import ga,{__tla as Ta}from"./OrderDeliveryForm-c7f6abf5.js";import Ca,{__tla as Ea}from"./OrderUpdateRemarkForm-25c20826.js";import{e as Va,c as Da,f as wa,__tla as Ia}from"./index-b776b94b.js";import{g as Sa,__tla as Ua}from"./index-cbf8a6e1.js";import{a as H,D as I,d as Ra,b as xa,__tla as Ma}from"./dict-a31cb4ba.js";import{g as Na,__tla as Pa}from"./index-57a3dfbf.js";import{D as A,T as Y}from"./constants-e43f22dd.js";import{I as Aa,__tla as Ya}from"./ImageCard-945f8c53.js";import za,{__tla as La}from"./OrderIndex-8f91d163.js";import{_ as Oa,__tla as Fa}from"./OrderUpdateAddressForm.vue_vue_type_script_setup_true_lang-58dc19dd.js";import{d as Ha}from"./download-20922b56.js";import{u as qa,__tla as Xa}from"./useMessage-5f9e8917.js";import{_ as ja}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as Ba}from"./index-73afebcf.js";import{__tla as Ga}from"./Dialog-f44f9d78.js";import{__tla as Ja}from"./SPuUploadImg-f0bd750f.js";import{__tla as Ka}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-b3df4382.js";import{__tla as Za}from"./index-b59955b6.js";import{__tla as $a}from"./el-image-viewer-dddb6285.js";import{__tla as Wa}from"./OrderBaseInfo-2d922922.js";import{__tla as Qa}from"./formatTime-a348c3be.js";import{__tla as el}from"./OrderProduct-23a794a7.js";import{__tla as al}from"./el-descriptions-item-8d4be2e8.js";import{__tla as ll}from"./DictTag.vue_vue_type_script_lang-5c02ebfe.js";import"./color-6e929987.js";import{__tla as tl}from"./OrderComment-8fd64ccb.js";import{__tla as rl}from"./el-image-263fb014.js";import{__tla as ol}from"./OrderService-26b13457.js";import{__tla as sl}from"./AfterSale-023b5def.js";import{__tla as ul}from"./index-732888d2.js";import{__tla as nl}from"./OrderLogistics-874d84ae.js";import{__tla as il}from"./el-timeline-item-cb959fb7.js";import{__tla as _l}from"./orderPay-dbe93168.js";import{__tla as pl}from"./OrderLogs-306d22eb.js";import{__tla as cl}from"./el-tree-select-e8e05888.js";import{__tla as dl}from"./index-f40ed4f7.js";import"./tree-fd3a041e.js";let ke,ml=Promise.all([(()=>{try{return Oe}catch{}})(),(()=>{try{return He}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return el}catch{}})(),(()=>{try{return al}catch{}})(),(()=>{try{return ll}catch{}})(),(()=>{try{return tl}catch{}})(),(()=>{try{return rl}catch{}})(),(()=>{try{return ol}catch{}})(),(()=>{try{return sl}catch{}})(),(()=>{try{return ul}catch{}})(),(()=>{try{return nl}catch{}})(),(()=>{try{return il}catch{}})(),(()=>{try{return _l}catch{}})(),(()=>{try{return pl}catch{}})(),(()=>{try{return cl}catch{}})(),(()=>{try{return dl}catch{}})()]).then(async()=>{let B,G,J,K,Z,$,W,Q,ee;B={class:"search"},G={style:{"text-align":"right"},class:"search-input"},J={class:"searchMore"},K={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},Z={style:{width:"95%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:""},$={key:0},W={class:"year"},Q={key:0},ee=[(S=>(ca("data-v-93f45112"),S=S(),da(),S))(()=>d("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u8BA2\u5355",-1))],ke=ja(qe({name:"TradeOrder",__name:"index",props:{merchantId:{type:Number,default:0},isDetail:{type:Boolean,default:!1},openType:{type:String,default:""}},setup(S){const ae=Xe(),ge=je(),le=Be(()=>ge.getMobile),Te=qa();function Ce(u){var l=new Date(u);return("0"+(l.getMonth()+1)).slice(-2)+"/"+("0"+l.getDate()).slice(-2)+" "+("0"+l.getHours()).slice(-2)+":"+("0"+l.getMinutes()).slice(-2)}const U=_(!1);function te(u){R.value[u].showSetting=!0}function re(u){R.value[u].showSetting=!1}const Ee=()=>{U.value=!U.value},Ve=()=>{U.value=!1},V=S,oe=_(),{push:se}=Ge(),ue=_(!0),q=_(!1),ne=_(2),R=_([]),ie=_(),o=_({pageNo:1,pageSize:10,status:10,payChannelCode:void 0,createTime:void 0,terminal:void 0,type:void 0,deliveryType:void 0,logisticsId:void 0,pickUpStoreId:void 0,pickUpVerifyCode:void 0}),De=async()=>{try{await Te.exportConfirm(),q.value=!0;const u=await Va(a(o));Ha.excel(u,"\u8BA2\u5355\u8BE6\u7EC6.xls")}catch{}finally{q.value=!1}},h=async()=>{ue.value=!0,V.merchantId&&(o.value.merchantId=V.merchantId);try{const u=await Da(a(o));u.list.forEach(l=>{l.showSetting=!1}),R.value=u.list,ne.value=u.total}finally{ue.value=!1,U.value=!1,de()}},z=async()=>{o.value.pageNo=1,await h()},we=()=>{var u;(u=ie.value)==null||u.resetFields(),o.value={pageNo:1,pageSize:10,status:10,payChannelCode:void 0,createTime:void 0,terminal:void 0,type:void 0,deliveryType:void 0,logisticsId:void 0,pickUpStoreId:void 0,pickUpVerifyCode:void 0},z()},_e=_(),pe=_(),ce=_(),D=_([{name:"\u5168\u90E8",type:"",count:0},{name:"\u5F85\u652F\u4ED8",type:0,count:0},{name:"\u5F85\u53D1\u8D27",type:10,count:0},{name:"\u5DF2\u53D1\u8D27",type:20,count:0},{name:"\u5DF2\u5B8C\u6210",type:30,count:0},{name:"\u5DF2\u53D6\u6D88",type:40,count:0},{name:"\u552E\u540E\u9000\u6B3E\u6210\u529F",type:-2,count:0}]),Ie=u=>{o.value.status=u.paneName,h()},de=async()=>{const u=_({...o.value});V.merchantId&&(u.value.merId=V.merchantId);const l=await wa(u.value);for(let w in D.value)for(let L in l)try{D.value[w].type==L&&(D.value[w].count=l[L]),D.value[w].type===""&&(D.value[w].count=l[-1]+l[-2])}finally{continue}},me=_([]),ye=_([]);return Je(async()=>{V.openType=="tobedone"||ae.query.openType=="tobedone"?(o.value.status=10,await h()):await h(),await de(),me.value=await Sa(),ye.value=await Na()}),(u,l)=>{const w=Qe,L=ea,X=aa,x=la,Se=ta,T=ra,C=oa,b=sa,Ue=ua,fe=na,Re=ia,xe=_a,O=va,Me=ha,Ne=ba,Pe=ya,Ae=pa,Ye=Fe,ze=Le,j=Ke("hasPermi");return s(),p(m,null,[t(ze,{class:"container"},{default:r(()=>[d("div",B,[a(le)?g("",!0):(s(),i(L,{key:0,modelValue:a(o).status,"onUpdate:modelValue":l[0]||(l[0]=e=>a(o).status=e),onTabClick:Ie,class:"parent-tabs"},{default:r(()=>[(s(!0),p(m,null,f(a(D),e=>(s(),i(w,{key:e.type,label:e.name+"("+e.count+")",name:e.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),d("div",G,[t(Se,{modelValue:a(o).no,"onUpdate:modelValue":l[1]||(l[1]=e=>a(o).no=e),placeholder:"\u8BA2\u5355\u53F7",onKeyup:Ze(z,["enter"])},{suffix:r(()=>[t(X,{class:"mr-5px",icon:"ep:search",onClick:z,style:{cursor:"pointer"}})]),append:r(()=>[t(x,{icon:a(he),onClick:Ee},null,8,["icon"])]),_:1},8,["modelValue"])])]),P(d("div",J,[t(Re,{ref_key:"queryFormRef",ref:ie,inline:!0,model:a(o),class:"-mb-15px","label-width":"80px"},{default:r(()=>[t(b,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status"},{default:r(()=>[t(C,{modelValue:a(o).status,"onUpdate:modelValue":l[2]||(l[2]=e=>a(o).status=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(H)(a(I).TRADE_ORDER_STATUS),e=>(s(),i(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(b,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"payChannelCode"},{default:r(()=>[t(C,{modelValue:a(o).payChannelCode,"onUpdate:modelValue":l[3]||(l[3]=e=>a(o).payChannelCode=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(Ra)(a(I).PAY_CHANNEL_CODE),e=>(s(),i(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(b,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:r(()=>[t(Ue,{modelValue:a(o).createTime,"onUpdate:modelValue":l[4]||(l[4]=e=>a(o).createTime=e),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],"end-placeholder":"\u81EA\u5B9A\u4E49\u65F6\u95F4","start-placeholder":"\u81EA\u5B9A\u4E49\u65F6\u95F4",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss",style:{width:"auto"}},null,8,["modelValue","default-time"])]),_:1}),t(b,{label:"\u8BA2\u5355\u6765\u6E90",prop:"terminal"},{default:r(()=>[t(C,{modelValue:a(o).terminal,"onUpdate:modelValue":l[5]||(l[5]=e=>a(o).terminal=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(H)(a(I).TERMINAL),e=>(s(),i(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(b,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"type"},{default:r(()=>[t(C,{modelValue:a(o).type,"onUpdate:modelValue":l[6]||(l[6]=e=>a(o).type=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(H)(a(I).TRADE_ORDER_TYPE),e=>(s(),i(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),t(b,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryType"},{default:r(()=>[t(C,{modelValue:a(o).deliveryType,"onUpdate:modelValue":l[7]||(l[7]=e=>a(o).deliveryType=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(H)(a(I).TRADE_DELIVERY_TYPE),e=>(s(),i(T,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(o).deliveryType===a(A).EXPRESS.type?(s(),i(b,{key:0,label:"\u5FEB\u9012\u516C\u53F8",prop:"logisticsId"},{default:r(()=>[t(C,{modelValue:a(o).logisticsId,"onUpdate:modelValue":l[8]||(l[8]=e=>a(o).logisticsId=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(ye),e=>(s(),i(T,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):g("",!0),a(o).deliveryType===a(A).PICK_UP.type?(s(),i(b,{key:1,label:"\u81EA\u63D0\u95E8\u5E97",prop:"pickUpStoreId"},{default:r(()=>[t(C,{modelValue:a(o).pickUpStoreId,"onUpdate:modelValue":l[9]||(l[9]=e=>a(o).pickUpStoreId=e),clearable:"",multiple:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(s(!0),p(m,null,f(a(me),e=>(s(),i(T,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):g("",!0),t(fe,{class:"pb-20px flex justify-end"},{default:r(()=>[P((s(),i(x,{type:"success",plain:"",onClick:De,loading:a(q)},{default:r(()=>[t(X,{icon:"ep:download",class:"mr-5px"}),v(" \u5BFC\u51FA ")]),_:1},8,["loading"])),[[j,["trade:order:export"]]]),t(x,{onClick:Ve},{default:r(()=>[v(" \u6536\u8D77 ")]),_:1}),t(x,{onClick:we},{default:r(()=>[v(" \u91CD\u7F6E ")]),_:1}),t(x,{onClick:z,plain:"",type:"primary"},{default:r(()=>[t(X,{class:"mr-5px",icon:"ep:search"}),v(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1},8,["model"])],512),[[be,a(U)]]),t(fe,null,{default:r(()=>[(s(!0),p(m,null,f(a(R),(e,M)=>(s(),i(Ae,{class:"card",key:M,span:7,xl:7,lg:7,md:24,sm:24,xs:24,onMouseover:N=>te(M),onMouseout:N=>re(M)},{default:r(()=>[t(Pe,{onClick:N=>((c,n,y)=>{const k=n.id,F=n.spuType;le.value?V.openType=="tobedone"||ae.query.openType=="tobedone"||n.status==Y.UNDELIVERED.status?se({name:"OrderMobileDeliveryForm",params:{id:k,spuType:F}}):se({name:"TradeOrderMobileDetail",params:{id:k}}):oe.value.open(c,n,y)})("view",e,e.no)},{default:r(()=>{var N;return[d("div",K,[d("p",Z,[(s(!0),p(m,null,f(e.items,(c,n)=>(s(),p("span",{key:c.id},[v(E(c.spuName),1),n<e.items.length-1&&e.items.length>1?(s(),p("span",$,"+")):g("",!0)]))),128))]),P((s(),p("div",{class:"setting",onClick:l[11]||(l[11]=$e(()=>{},["stop"]))},[P((s(),i(Ne,{onCommand:l[10]||(l[10]=c=>u.handleCommand(c,u.row))},{dropdown:r(()=>[t(Me,{onMouseover:c=>te(M),onMouseout:c=>re(M)},{default:r(()=>[e.deliveryType===a(A).EXPRESS.type&&e.status===a(Y).UNDELIVERED.status||e.deliveryType===a(A).VIRTUAL_PRODUCT.type&&e.status===a(Y).UNDELIVERED.status?(s(),i(O,{key:0,onClick:c=>{var k;return n=e.id,y=e.spuType,void((k=_e.value)==null?void 0:k.open("\u8BA2\u5355\u5217\u8868",n,y));var n,y}},{default:r(()=>[v(" \u53D1\u8D27")]),_:2},1032,["onClick"])):g("",!0),t(O,{onClick:c=>{var y;return n=e.id,e.remark,void((y=pe.value)==null?void 0:y.open(n));var n}},{default:r(()=>[v("\u5907\u6CE8")]),_:2},1032,["onClick"]),e.status===a(Y).COMPLETED.status?(s(),i(O,{key:1,onClick:u.handleInvoice},{default:r(()=>[v("\u5F00\u53D1\u7968")]),_:1},8,["onClick"])):g("",!0),e.deliveryType===a(A).EXPRESS.type&&e.status===a(Y).UNDELIVERED.status?(s(),i(O,{key:2,onClick:c=>{return n=e.id,y=e.receiverAreaName,k=e.receiverMobile,F=e.receiverAreaId,ve=e.receiverDetailAddress,void ce.value.open(n,y,k,F,ve);var n,y,k,F,ve}},{default:r(()=>[v("\u4FEE\u6539\u5730\u5740")]),_:2},1032,["onClick"])):g("",!0)]),_:2},1032,["onMouseover","onMouseout"])]),default:r(()=>[d("span",null,[P(t(xe,{size:"20",color:"rgb(220 223 231)"},{default:r(()=>[t(a(he))]),_:2},1536),[[be,e.showSetting]])])]),_:2},1024)),[[j,["trade:order:update"]]])])),[[j,["trade:order:update"]]])]),t(Aa,{url:e.items&&((N=e.items[0])==null?void 0:N.picUrl),width:206,height:116},{label:r(()=>{var n;return[d("p",null,"\xA5"+E(a(We)(e.totalPrice)),1),d("p",null,E(e.no),1),d("p",null,E((n=a(xa)(a(I).TRADE_ORDER_STATUS,e.status))==null?void 0:n.label),1),d("p",null,E(e.user.nickname),1),d("p",null,[d("span",W,E((c=e.createTime,new Date(c).getFullYear()+"/")),1),v(E(Ce(e.createTime)),1)])];var c}),_:2},1032,["url"])]}),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),a(R).length==0?(s(),p("div",Q,ee)):g("",!0),t(Ye,{limit:a(o).pageSize,"onUpdate:limit":l[12]||(l[12]=e=>a(o).pageSize=e),page:a(o).pageNo,"onUpdate:page":l[13]||(l[13]=e=>a(o).pageNo=e),total:a(ne),onPagination:h},null,8,["limit","page","total"])]),_:1}),t(ga,{ref_key:"deliveryFormRef",ref:_e,onSuccess:h},null,512),t(Ca,{ref_key:"updateRemarkForm",ref:pe,onSuccess:h},null,512),t(Oa,{ref_key:"updateAddressFormRef",ref:ce,onSuccess:h},null,512),t(za,{ref_key:"formRef",ref:oe,onSuccess:h},null,512)],64)}}}),[["__scopeId","data-v-93f45112"]])});export{ml as __tla,ke as default};