import{_ as He,__tla as Xe}from"./ContentWrap-694014d4.js";import{_ as Ke,__tla as Be}from"./index-c8f58bd0.js";import{d as Qe,Y as We,K as Ge,r as d,u as Je,e as Ze,l as $e,Q as ea,o as u,c as _,f as r,w as t,g as i,a,v as s,F as p,q as y,P as b,R as aa,dG as Ce,x as z,a4 as O,n as k,t as E,aS as la,at as ta,W as ra,X as oa,j as ua,C as na,V as sa,y as ia,z as da,A as _a,B as ca,E as pa,i as ma,D as ya,aT as va,p as fa,k as ha,_ as ba,__tla as ka}from"./index-11e4820e.js";import{E as ga,__tla as Ia}from"./el-card-919c14be.js";import{E as Va,a as wa,b as Ca,__tla as Ea}from"./el-dropdown-item-61aee45e.js";import xa,{__tla as Ta}from"./OrderDeliveryForm-3306485f.js";import Ua,{__tla as Da}from"./OrderUpdateRemarkForm-3518c4a7.js";import{l as Sa,m as Ra,n as Pa,__tla as Ma}from"./index-85087f4c.js";import{a as Na,__tla as Aa}from"./index-165d5548.js";import{h as qa,__tla as Ya}from"./index-63b1dc70.js";import{e as za,D as P,a as j,c as Fa,__tla as La}from"./dict-4072dcec.js";import{g as Oa,__tla as ja}from"./index-80a7d751.js";import{D as F,T as H}from"./constants-40f13f5e.js";import Ha,{__tla as Xa}from"./OrderIndex-b2b7a826.js";import Ka,{__tla as Ba}from"./OrderUpdateAddressForm-c18720db.js";import{__tla as Qa}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as Wa}from"./index-dd73c59d.js";import{__tla as Ga}from"./Dialog-bbfaf85c.js";import{__tla as Ja}from"./OrderBaseInfo-4751104e.js";import{__tla as Za}from"./SPuUploadImg-7c6bd56b.js";import{__tla as $a}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-8854a0f2.js";import{__tla as el}from"./index-4203485c.js";import{__tla as al}from"./el-image-viewer-c4f5814f.js";import{__tla as ll}from"./useMessage-06ddf735.js";import{__tla as tl}from"./formatTime-f6a2c881.js";import{__tla as rl}from"./OrderProduct-ca51f966.js";import{__tla as ol}from"./el-descriptions-item-4246212b.js";import{__tla as ul}from"./DictTag-e41ec8de.js";import"./color-6e929987.js";import{__tla as nl}from"./OrderComment-3a8c5c60.js";import{__tla as sl}from"./el-image-17e8bc54.js";import{__tla as il}from"./OrderService-ec7e1079.js";import{__tla as dl}from"./AfterSale-0daefdbb.js";import{__tla as _l}from"./OrderLogistics-5af069c2.js";import{__tla as cl}from"./el-timeline-item-52f21599.js";import{__tla as pl}from"./orderPay-c39e916d.js";import{__tla as ml}from"./OrderLogs-c92d5e77.js";import{__tla as yl}from"./el-tree-select-beee4f04.js";import{__tla as vl}from"./index-f6304368.js";import"./tree-0af4953a.js";let Ee,fl=Promise.all([(()=>{try{return Xe}catch{}})(),(()=>{try{return Be}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return $a}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 ul}catch{}})(),(()=>{try{return nl}catch{}})(),(()=>{try{return sl}catch{}})(),(()=>{try{return il}catch{}})(),(()=>{try{return dl}catch{}})(),(()=>{try{return _l}catch{}})(),(()=>{try{return cl}catch{}})(),(()=>{try{return pl}catch{}})(),(()=>{try{return ml}catch{}})(),(()=>{try{return yl}catch{}})(),(()=>{try{return vl}catch{}})()]).then(async()=>{let X,K,B,Q,W,G,J,Z,$,ee,ae,le,te;X={class:"search"},K={style:{"text-align":"right"},class:"search-input"},B={class:"searchMore"},Q={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},W={style:{width:"95%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:""},G={key:0},J={style:{display:"flex","align-items":"center"}},Z={style:{width:"206px",height:"116px","margin-right":"10px",border:"1px solid rgb(220, 223, 231)","border-radius":"5px",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden"}},$=["src"],ee={style:{"line-height":"25px"}},ae={class:"year"},le={key:0},te=[(C=>(fa("data-v-03623e2e"),C=C(),ha(),C))(()=>i("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u8BA2\u5355",-1))],Ee=ba(Qe({name:"TradeOrder",__name:"index",props:{merchantId:{type:Number,default:void 0},isDetail:{type:Boolean,default:!1},userId:{type:Number,default:void 0}},setup(C){const xe=We(),re=Ge(()=>xe.getMobile);function Te(n){var l=new Date(n);return("0"+(l.getMonth()+1)).slice(-2)+"/"+("0"+l.getDate()).slice(-2)+" "+("0"+l.getHours()).slice(-2)+":"+("0"+l.getMinutes()).slice(-2)}const T=d(!1);function oe(n){U.value[n].showSetting=!0}function ue(n){U.value[n].showSetting=!1}const Ue=()=>{T.value=!T.value},De=()=>{T.value=!1},g=C,ne=d(),{currentRoute:hl,push:Se}=Je(),L=d(!0),se=d(2),U=d([]),ie=d(),o=d({pageNo:1,pageSize:10,status:"",payChannelCode:void 0,createTime:void 0,terminal:void 0,type:void 0,deliveryType:void 0,logisticsId:void 0,pickUpStoreId:void 0,pickUpVerifyCode:void 0,shopId:void 0}),D=Ze({queryParam:""}),de=d([{value:"no",label:"\u8BA2\u5355\u53F7"},{value:"userId",label:"\u7528\u6237UID"},{value:"userNickname",label:"\u7528\u6237\u6635\u79F0"},{value:"userMobile",label:"\u7528\u6237\u7535\u8BDD"}]),Re=n=>{var l;(l=de.value.filter(m=>m.value!==n))==null||l.forEach(m=>{o.value.hasOwnProperty(m.value)&&delete o.value[m.value]})},I=async()=>{L.value=!0,g.merchantId&&(o.value.merchantId=g.merchantId),g.userId&&(o.value.userId=g.userId);try{const n=await Sa(a(o));n.list.forEach(l=>{l.showSetting=!1}),U.value=n.list,se.value=n.total}finally{L.value=!1,T.value=!1,me()}},M=async()=>{o.value.pageNo=1,await I()},Pe=()=>{var n;(n=ie.value)==null||n.resetFields(),o.value={pageNo:1,pageSize:10,status:"",payChannelCode:void 0,createTime:void 0,terminal:void 0,type:void 0,deliveryType:void 0,logisticsId:void 0,pickUpStoreId:void 0,pickUpVerifyCode:void 0,shopId:void 0},M()},_e=d(),ce=d(),pe=d(),x=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}]),Me=n=>{o.value.status=n.paneName,I()},me=async()=>{const n=d({...o.value});let l;g.merchantId&&(n.value.merId=g.merchantId),g.userId?(n.value.userId=g.userId,l=await Ra(n.value)):l=await Pa(n.value);for(let m in x.value)for(let N in l)try{x.value[m].type==N&&(x.value[m].count=l[N]),x.value[m].type===""&&(x.value[m].count=l[-1])}finally{continue}};let ye=d([]);const ve=d([]),fe=d([]);return $e(async()=>{await(async()=>{L.value=!0;const n=await qa();ye.value=n})(),await I(),await me(),ve.value=await Na(),fe.value=await Oa()}),(n,l)=>{const m=ra,N=oa,he=ua,A=na,be=sa,V=ia,w=da,v=_a,Ne=ca,ke=pa,ge=ma,Ae=ya,qe=va,q=Va,Ye=wa,ze=Ca,Fe=ga,Le=Ke,Oe=He,je=ea("hasPermi");return u(),_(p,null,[r(Oe,{class:"container"},{default:t(()=>[i("div",X,[a(re)?b("",!0):(u(),s(N,{key:0,modelValue:a(o).status,"onUpdate:modelValue":l[0]||(l[0]=e=>a(o).status=e),onTabClick:Me,class:"parent-tabs"},{default:t(()=>[(u(!0),_(p,null,y(a(x),e=>(u(),s(m,{key:e.type,label:e.name+"("+e.count+")",name:e.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),i("div",K,[r(be,{modelValue:a(o).no,"onUpdate:modelValue":l[1]||(l[1]=e=>a(o).no=e),placeholder:"\u8BA2\u5355\u53F7",onKeyup:aa(M,["enter"])},{suffix:t(()=>[r(he,{class:"mr-5px",icon:"ep:search",onClick:M,style:{cursor:"pointer"}})]),append:t(()=>[r(A,{icon:a(Ce),onClick:Ue},null,8,["icon"])]),_:1},8,["modelValue"])])]),z(i("div",B,[r(Ae,{ref_key:"queryFormRef",ref:ie,inline:!0,model:a(o),class:"-mb-15px","label-width":"68px"},{default:t(()=>[C.merchantId?b("",!0):(u(),s(v,{key:0,label:"\u5E97\u94FA\u540D\u79F0"},{default:t(()=>[r(w,{modelValue:a(o).shopId,"onUpdate:modelValue":l[2]||(l[2]=e=>a(o).shopId=e),placeholder:"\u8BF7\u9009\u62E9",filterable:""},{default:t(()=>[(u(!0),_(p,null,y(a(ye),e=>(u(),s(V,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})),r(v,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"payChannelCode"},{default:t(()=>[r(w,{modelValue:a(o).payChannelCode,"onUpdate:modelValue":l[3]||(l[3]=e=>a(o).payChannelCode=e),clearable:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(za)(a(P).PAY_CHANNEL_CODE),e=>(u(),s(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(v,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:t(()=>[r(Ne,{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}),r(v,{label:"\u8BA2\u5355\u6765\u6E90",prop:"terminal"},{default:t(()=>[r(w,{modelValue:a(o).terminal,"onUpdate:modelValue":l[5]||(l[5]=e=>a(o).terminal=e),clearable:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(j)(a(P).TERMINAL),e=>(u(),s(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(v,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"type"},{default:t(()=>[r(w,{modelValue:a(o).type,"onUpdate:modelValue":l[6]||(l[6]=e=>a(o).type=e),clearable:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(j)(a(P).TRADE_ORDER_TYPE),e=>(u(),s(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(v,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryType"},{default:t(()=>[r(w,{modelValue:a(o).deliveryType,"onUpdate:modelValue":l[7]||(l[7]=e=>a(o).deliveryType=e),clearable:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(j)(a(P).TRADE_DELIVERY_TYPE),e=>(u(),s(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),a(o).deliveryType===a(F).EXPRESS.type?(u(),s(v,{key:1,label:"\u5FEB\u9012\u516C\u53F8",prop:"logisticsId"},{default:t(()=>[r(w,{modelValue:a(o).logisticsId,"onUpdate:modelValue":l[8]||(l[8]=e=>a(o).logisticsId=e),clearable:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(fe),e=>(u(),s(V,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):b("",!0),a(o).deliveryType===a(F).PICK_UP.type?(u(),s(v,{key:2,label:"\u81EA\u63D0\u95E8\u5E97",prop:"pickUpStoreId"},{default:t(()=>[r(w,{modelValue:a(o).pickUpStoreId,"onUpdate:modelValue":l[9]||(l[9]=e=>a(o).pickUpStoreId=e),clearable:"",multiple:"",placeholder:"\u5168\u90E8"},{default:t(()=>[(u(!0),_(p,null,y(a(ve),e=>(u(),s(V,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})):b("",!0),r(v,{label:"\u805A\u5408\u641C\u7D22"},{default:t(()=>[z(r(be,{modelValue:a(o)[a(D).queryParam],"onUpdate:modelValue":l[11]||(l[11]=e=>a(o)[a(D).queryParam]=e),type:a(D).queryParam==="userId"?"number":"text",clearable:"",placeholder:"\u8BF7\u8F93\u5165"},{prepend:t(()=>[r(w,{modelValue:a(D).queryParam,"onUpdate:modelValue":l[10]||(l[10]=e=>a(D).queryParam=e),class:"!w-110px",clearable:"",placeholder:"\u5168\u90E8",onChange:Re},{default:t(()=>[(u(!0),_(p,null,y(a(de),e=>(u(),s(V,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["modelValue","type"]),[[O,!0]])]),_:1}),r(ge,null,{default:t(()=>[r(ke,null,{default:t(()=>[r(v,null,{default:t(()=>[r(A,{onClick:De},{default:t(()=>[k(" \u6536\u8D77 ")]),_:1}),r(A,{onClick:Pe},{default:t(()=>[k(" \u91CD\u7F6E ")]),_:1}),r(A,{onClick:M,plain:"",type:"primary"},{default:t(()=>[r(he,{class:"mr-5px",icon:"ep:search"}),k(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[O,a(T)]]),r(ge,null,{default:t(()=>[(u(!0),_(p,null,y(a(U),(e,S)=>(u(),s(ke,{class:"card",key:S,span:7,xl:7,lg:7,md:24,sm:24,xs:24,onMouseover:R=>oe(S),onMouseout:R=>ue(S)},{default:t(()=>[r(Fe,{onClick:R=>((Y,f,c)=>{const h=f.id;re.value?Se({name:"TradeOrderMobileDetail",params:{id:h}}):ne.value.open(Y,f,c)})("view",e,e.no)},{default:t(()=>{var Y;return[i("div",Q,[i("p",W,[(u(!0),_(p,null,y(e.items,(f,c)=>(u(),_("span",{key:f.id},[k(E(f.spuName),1),c1?(u(),_("span",G,"+")):b("",!0)]))),128))]),C.merchantId?b("",!0):(u(),_("div",{key:0,class:"setting",onClick:l[12]||(l[12]=la(()=>{},["stop"]))},[z((u(),s(ze,null,{dropdown:t(()=>[r(Ye,{onMouseover:f=>oe(S),onMouseout:f=>ue(S)},{default:t(()=>[e.deliveryType===a(F).EXPRESS.type&&e.status===a(H).UNDELIVERED.status?(u(),s(q,{key:0,onClick:f=>{var h;return c=e.id,void((h=_e.value)==null?void 0:h.open("\u8BA2\u5355\u5217\u8868",c));var c}},{default:t(()=>[k("\u53D1\u8D27")]),_:2},1032,["onClick"])):b("",!0),r(q,{onClick:f=>{var h;return c=e.id,e.remark,void((h=ce.value)==null?void 0:h.open(c));var c}},{default:t(()=>[k("\u5907\u6CE8")]),_:2},1032,["onClick"]),e.status===a(H).COMPLETED.status?(u(),s(q,{key:1,onClick:n.handleInvoice},{default:t(()=>[k("\u5F00\u53D1\u7968")]),_:1},8,["onClick"])):b("",!0),e.deliveryType===a(F).EXPRESS.type&&e.status===a(H).UNDELIVERED.status?(u(),s(q,{key:2,onClick:f=>{return c=e.id,h=e.receiverAreaName,Ie=e.receiverMobile,Ve=e.receiverAreaId,we=e.receiverDetailAddress,void pe.value.open(c,h,Ie,Ve,we);var c,h,Ie,Ve,we}},{default:t(()=>[k("\u4FEE\u6539\u5730\u5740")]),_:2},1032,["onClick"])):b("",!0)]),_:2},1032,["onMouseover","onMouseout"])]),default:t(()=>[i("span",null,[z(r(qe,{size:"20",color:"rgb(220 223 231)"},{default:t(()=>[r(a(Ce))]),_:2},1536),[[O,e.showSetting]])])]),_:2},1024)),[[je,["trade:order:update"]]])]))]),i("div",J,[i("div",Z,[i("img",{src:e.items[0].picUrl,style:{width:"100%",height:"100%","object-fit":"cover","object-position":"center"}},null,8,$)]),i("div",ee,[i("p",null,"\xA5"+E(a(ta)(e.payPrice)),1),i("p",null,E(e.no),1),i("p",null,E((Y=a(Fa)(a(P).TRADE_ORDER_STATUS,e.status))==null?void 0:Y.label),1),i("p",null,E(e.user.nickname),1),i("p",null,[i("span",ae,E((R=e.createTime,new Date(R).getFullYear()+"/")),1),k(E(Te(e.createTime)),1)])])])];var R}),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),a(U).length==0?(u(),_("div",le,[...te])):b("",!0),r(Le,{limit:a(o).pageSize,"onUpdate:limit":l[13]||(l[13]=e=>a(o).pageSize=e),page:a(o).pageNo,"onUpdate:page":l[14]||(l[14]=e=>a(o).pageNo=e),total:a(se),onPagination:I},null,8,["limit","page","total"])]),_:1}),r(xa,{ref_key:"deliveryFormRef",ref:_e,onSuccess:I},null,512),r(Ua,{ref_key:"updateRemarkForm",ref:ce,onSuccess:I},null,512),r(Ka,{ref_key:"updateAddressFormRef",ref:pe,onSuccess:I},null,512),r(Ha,{ref_key:"formRef",ref:ne,onSuccess:I},null,512)],64)}}}),[["__scopeId","data-v-03623e2e"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/trade/order/index.vue"]])});export{fl as __tla,Ee as default};