1 |
- import{_ as _e}from"./ContentWrap.vue_vue_type_script_setup_true_lang-f3ab50e7.js";import{_ as be}from"./index.vue_vue_type_script_setup_true_lang-24521fcb.js";import{d as ge,y as ke,e as Ve,r as n,u as we,x as Ie,b as xe,a1 as Te,o as i,c as u,f as o,B as r,C as p,a as l,A as m,F as c,P as f,E as V,a2 as Q,aA as Ce,l as G,G as w,v as De,D as b,dD as Ue,a7 as Re,a8 as Se,_ as Ee,L as Ne,a6 as Me,Q as Ae,R as Ye,S as Pe,K as Fe,M as ze,U as He,J as Oe}from"./index-39d329c4.js";import{E as Ke}from"./el-card-5cc80b8a.js";import Le from"./OrderDeliveryForm-c646a1e5.js";import Be from"./OrderUpdateRemarkForm-a99004b1.js";import{m as je,l as qe,n as Qe,o as Ge}from"./index-d1c9b307.js";import{a as Je}from"./index-84cf70f4.js";import{g as $e}from"./index-256096f6.js";import{I as We}from"./ImageCard-f40b19b2.js";import{e as Xe,D as S,a as Y,c as Ze}from"./dict-0856c143.js";import{g as ea}from"./index-ca4ae7bf.js";import aa from"./OrderIndex-5c61b84c.js";import{_ as la}from"./OrderUpdateAddressForm.vue_vue_type_script_setup_true_lang-3c093785.js";import{d as ta}from"./download-20922b56.js";import{u as oa}from"./useMessage-47346882.js";import{_ as ra}from"./_plugin-vue_export-helper-1b428a4d.js";import"./index-e66b1f22.js";import"./Dialog-6a91c005.js";import"./OrderBaseInfo-da5ce895.js";import"./SPuUploadImg-9f0e4322.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-94e6c5c2.js";import"./index-0c406c8d.js";import"./el-image-viewer-b66eac2e.js";import"./formatTime-4c4af720.js";import"./OrderProduct-a45d81df.js";import"./el-descriptions-item-a2a4aeac.js";import"./DictTag.vue_vue_type_script_lang-b95bb985.js";import"./color-6e929987.js";import"./OrderComment-521dcc1b.js";import"./el-image-7f18c10a.js";import"./OrderService-5090050c.js";import"./AfterSale-90d6e284.js";import"./OrderLogistics-f6a26c50.js";import"./el-timeline-item-548c5a43.js";import"./orderPay-5ab514d7.js";import"./OrderLogs-e8637347.js";import"./el-tree-select-2af4c3cc.js";import"./index-7e0ef0d5.js";import"./tree-fd3a041e.js";const ia={class:"search"},sa={style:{"text-align":"right"},class:"search-input"},na={class:"searchMore"},ua={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},pa={style:{width:"95%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:""},da={key:0},ma={class:"flex items-center"},ca={key:0,class:"points-red"},va={key:1,class:"points-green"},ya={class:"ml-3px"},fa={class:"year"},ha={key:0},_a=ra(ge({name:"TradeOrder",__name:"index",props:{merchantId:{type:Number,default:void 0},isDetail:{type:Boolean,default:!1},userId:{type:Number,default:void 0}},setup(P){const J=oa(),$=ke(),F=Ve(()=>$.getMobile);function W(s){var a=new Date(s);return("0"+(a.getMonth()+1)).slice(-2)+"/"+("0"+a.getDate()).slice(-2)+" "+("0"+a.getHours()).slice(-2)+":"+("0"+a.getMinutes()).slice(-2)}const I=n(!1),X=()=>{I.value=!I.value},Z=()=>{I.value=!1},v=P,z=n(),{currentRoute:ba,push:ee}=we(),N=n(!0),M=n(!1),H=n(2),x=n([]),O=n(),t=n({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,shopId:void 0});Ie({queryParam:""}),n([{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"}]);const ae=async()=>{try{await J.exportConfirm(),M.value=!0;const s=await je(l(t));ta.excel(s,"\u8BA2\u5355\u8BE6\u7EC6.xls")}catch{}finally{M.value=!1}},y=async()=>{N.value=!0,v.merchantId&&(t.value.merchantId=v.merchantId),v.userId&&(t.value.userId=v.userId);try{const s=await qe(l(t));s.list.forEach(a=>{a.showSetting=!1}),x.value=s.list,H.value=s.total}finally{N.value=!1,I.value=!1,K()}},T=async()=>{t.value.pageNo=1,await y()},le=()=>{var s;(s=O.value)==null||s.resetFields(),t.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,shopId:void 0},T()},te=n(),oe=n(),re=n(),g=n([{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=s=>{t.value.status=s.paneName,y()},K=async()=>{const s=n({...t.value});let a;v.merchantId&&(s.value.merId=v.merchantId),v.userId?(s.value.userId=v.userId,a=await Qe(s.value)):a=await Ge(s.value);for(let k in g.value)for(let E in a)try{g.value[k].type==E&&(g.value[k].count=a[E]),g.value[k].type===""&&(g.value[k].count=a[-1]+a[-2])}finally{continue}};let L=n([]);const se=n([]),ne=n([]);return xe(async()=>{await(async()=>{N.value=!0;const s=await $e();L.value=s})(),await y(),await K(),se.value=await Je(),ne.value=await ea()}),(s,a)=>{const k=Re,E=Se,B=Ee,C=Ne,j=Me,D=Ae,U=Ye,h=Pe,ue=Fe,q=ze,pe=He,de=Ke,me=Oe,ce=be,ve=_e,ye=Te("hasPermi");return i(),u(c,null,[o(ve,{class:"container"},{default:r(()=>[p("div",ia,[l(F)?V("",!0):(i(),m(E,{key:0,modelValue:l(t).status,"onUpdate:modelValue":a[0]||(a[0]=e=>l(t).status=e),onTabClick:ie,class:"parent-tabs"},{default:r(()=>[(i(!0),u(c,null,f(l(g),e=>(i(),m(k,{key:e.type,label:e.name+"("+e.count+")",name:e.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),p("div",sa,[o(j,{modelValue:l(t).no,"onUpdate:modelValue":a[1]||(a[1]=e=>l(t).no=e),placeholder:"\u8BA2\u5355\u53F7",onKeyup:Q(T,["enter"])},{suffix:r(()=>[o(B,{class:"mr-5px",icon:"ep:search",onClick:T,style:{cursor:"pointer"}})]),append:r(()=>[o(C,{icon:l(Ce),onClick:X},null,8,["icon"])]),_:1},8,["modelValue"])])]),G(p("div",na,[o(pe,{ref_key:"queryFormRef",ref:O,inline:!0,model:l(t),class:"-mb-15px","label-width":"80px"},{default:r(()=>[P.merchantId?V("",!0):(i(),m(h,{key:0,label:"\u5E97\u94FA\u540D\u79F0"},{default:r(()=>[o(U,{modelValue:l(t).shopId,"onUpdate:modelValue":a[2]||(a[2]=e=>l(t).shopId=e),placeholder:"\u8BF7\u9009\u62E9",filterable:""},{default:r(()=>[(i(!0),u(c,null,f(l(L),e=>(i(),m(D,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})),o(h,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"payChannelCode"},{default:r(()=>[o(U,{modelValue:l(t).payChannelCode,"onUpdate:modelValue":a[3]||(a[3]=e=>l(t).payChannelCode=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(i(!0),u(c,null,f(l(Xe)(l(S).PAY_CHANNEL_CODE),e=>(i(),m(D,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(h,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:r(()=>[o(ue,{modelValue:l(t).createTime,"onUpdate:modelValue":a[4]||(a[4]=e=>l(t).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}),o(h,{label:"\u8BA2\u5355\u6765\u6E90",prop:"terminal"},{default:r(()=>[o(U,{modelValue:l(t).terminal,"onUpdate:modelValue":a[5]||(a[5]=e=>l(t).terminal=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(i(!0),u(c,null,f(l(Y)(l(S).TERMINAL),e=>(i(),m(D,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(h,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"type"},{default:r(()=>[o(U,{modelValue:l(t).type,"onUpdate:modelValue":a[6]||(a[6]=e=>l(t).type=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(i(!0),u(c,null,f(l(Y)(l(S).TRADE_ORDER_TYPE),e=>(i(),m(D,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(h,{label:"\u914D\u9001\u65B9\u5F0F",prop:"deliveryType"},{default:r(()=>[o(U,{modelValue:l(t).deliveryType,"onUpdate:modelValue":a[7]||(a[7]=e=>l(t).deliveryType=e),clearable:"",placeholder:"\u5168\u90E8"},{default:r(()=>[(i(!0),u(c,null,f(l(Y)(l(S).TRADE_DELIVERY_TYPE),e=>(i(),m(D,{key:e.value,label:e.label,value:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(h,{label:"\u7528\u6237\u540D\u79F0",prop:"deliveryType"},{default:r(()=>[o(j,{modelValue:l(t).userNickname,"onUpdate:modelValue":a[8]||(a[8]=e=>l(t).userNickname=e),placeholder:"\u8BF7\u8F93\u5165",onKeyup:Q(T,["enter"])},null,8,["modelValue"])]),_:1}),o(q,{class:"pb-20px flex justify-end"},{default:r(()=>[G((i(),m(C,{type:"success",plain:"",onClick:ae,loading:l(M)},{default:r(()=>a[11]||(a[11]=[w(" \u5BFC\u51FA ")])),_:1},8,["loading"])),[[ye,["trade:order:export"]]]),o(C,{onClick:Z},{default:r(()=>a[12]||(a[12]=[w(" \u6536\u8D77 ")])),_:1}),o(C,{onClick:le},{default:r(()=>a[13]||(a[13]=[w(" \u91CD\u7F6E ")])),_:1}),o(C,{onClick:T,plain:"",type:"primary"},{default:r(()=>[o(B,{class:"mr-5px",icon:"ep:search"}),a[14]||(a[14]=w(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1},8,["model"])],512),[[De,l(I)]]),o(q,null,{default:r(()=>[(i(!0),u(c,null,f(l(x),(e,A)=>(i(),m(me,{class:"card",key:A,span:7,xl:7,lg:7,md:24,sm:24,xs:24,onMouseover:R=>function(d){x.value[d].showSetting=!0}(A),onMouseout:R=>function(d){x.value[d].showSetting=!1}(A)},{default:r(()=>[o(de,{onClick:R=>((d,_,fe)=>{const he=_.id;F.value?ee({name:"TradeOrderMobileDetail",params:{id:he}}):z.value.open(d,_,fe)})("view",e,e.no)},{default:r(()=>{var R;return[p("div",ua,[p("p",pa,[(i(!0),u(c,null,f(e.items,(d,_)=>(i(),u("span",{key:d.id},[w(b(d.spuName),1),_<e.items.length-1&&e.items.length>1?(i(),u("span",da,"+")):V("",!0)]))),128))])]),o(We,{url:e.items&&((R=e.items[0])==null?void 0:R.picUrl),width:206,height:116},{label:r(()=>{var _;return[p("div",ma,[e.integralType===1?(i(),u("div",ca)):V("",!0),e.integralType===3?(i(),u("div",va)):V("",!0),p("span",ya,b(l(Ue)(e.totalPrice)),1)]),p("p",null,b(e.no),1),p("p",null,b((_=l(Ze)(l(S).TRADE_ORDER_STATUS,e.status))==null?void 0:_.label),1),p("p",null,b(e.user.username),1),p("p",null,[p("span",fa,b((d=e.createTime,new Date(d).getFullYear()+"/")),1),w(b(W(e.createTime)),1)])];var d}),_:2},1032,["url"])]}),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),l(x).length==0?(i(),u("div",ha,a[15]||(a[15]=[p("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u8BA2\u5355",-1)]))):V("",!0),o(ce,{limit:l(t).pageSize,"onUpdate:limit":a[9]||(a[9]=e=>l(t).pageSize=e),page:l(t).pageNo,"onUpdate:page":a[10]||(a[10]=e=>l(t).pageNo=e),total:l(H),onPagination:y},null,8,["limit","page","total"])]),_:1}),o(Le,{ref_key:"deliveryFormRef",ref:te,onSuccess:y},null,512),o(Be,{ref_key:"updateRemarkForm",ref:oe,onSuccess:y},null,512),o(la,{ref_key:"updateAddressFormRef",ref:re,onSuccess:y},null,512),o(aa,{ref_key:"formRef",ref:z,onSuccess:y},null,512)],64)}}}),[["__scopeId","data-v-14c6dd7f"]]);export{_a as default};
|