import{_ as oe,a5 as le,H as ue,$ as ne,C as se,D as re,J as ie,K as pe,w as me,F as de,L as _e,M as ce,b as fe,N as De,O as ye}from"./element-plus.573d45d4.js";import{_ as Fe}from"./index.vue_vue_type_script_setup_true_lang.ffc076c1.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.ab7008c1.js";import{d as A,s as Y,r as f,Z as ge,o as s,c as D,U as e,L as o,u,aa as Ee,j as V,T as L,a9 as R,K as m,R as r,M as he,a as S,S as y,Q as U,n as we}from"./@vue.18505fe0.js";import{u as be}from"./usePaging.6a6670f9.js";import{u as Ce}from"./useDictOptions.8f7adb99.js";import{a as ke}from"./store_order.c969a154.js";import"./lodash.60201f64.js";import"./index.ad128f8c.js";import{h as $}from"./moment.40bc58bf.js";import"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.3e1bd0c0.js";import{_ as Be}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.ca5f5072.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.4ac26464.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./orderInfo.vue_vue_type_script_setup_true_name_orderInfo_lang.d1baa7a8.js";import"./storeTable.vue_vue_type_script_setup_true_name_storeTable_lang.cc5de20f.js";import"./orderTable.vue_vue_type_script_setup_true_name_orderTable_lang.7349f1d8.js";import"./deliverTable.vue_vue_type_script_setup_true_name_deliverTable_lang.dd1cb301.js";const xe={class:"mt-4"},Ve={class:"truncate text-[12px]"},Se={key:0,style:{"text-align":"left"}},Me={class:"flex mt-4 justify-end"},Te=A({name:"storeOrderLists"}),Ct=A({...Te,setup(Ye){Y();const E=Y();f(!1);const h=f(!1),K=[{text:"\u8FD1\u4E00\u5468",value:()=>{const n=new Date,a=new Date;return a.setDate(a.getDate()-7),[a,n]}},{text:"\u8FD1\u4E00\u6708",value:()=>{const n=new Date,a=new Date;return a.setMonth(a.getMonth()-1),[a,n]}},{text:"\u8FD1\u4E09\u6708",value:()=>{const n=new Date,a=new Date;return a.setMonth(a.getMonth()-3),[a,n]}}],p=f([]),l=ge({order_id:"",pay_type:"",start_time:"",end_time:"",paid:null,status:null,is_writeoff:null}),w=f("0"),N=n=>{n==0?(l.paid=null,l.status=null,l.is_writeoff=null):n==1?(l.paid=0,l.status=null,l.is_writeoff=null):n==2?(l.paid=1,l.status=1,l.is_writeoff=0):n==3?(l.paid=1,l.status=2,l.is_writeoff=null):n==4&&(l.paid=null,l.status=4,l.is_writeoff=null),_()},O=()=>{p.value[0]&&p.value[1]?(l.start_time=$(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",l.end_time=$(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(l.start_time="",l.end_time=""),_()},P=f([]),I=n=>{P.value=n.map(({id:a})=>a)},{dictData:b}=Ce("pay_type"),{pager:d,getLists:_,resetParams:j,resetPage:C}=be({fetchFun:ke,params:l}),q=async n=>{var a,F;h.value=!0,await we(),(a=E.value)==null||a.open(),(F=E.value)==null||F.getDetail(n)};return _(),(n,a)=>{const F=se,v=re,G=oe,H=ie,J=pe,k=me,Q=de,M=_e,c=le,Z=ue,i=ce,z=fe,g=ne,W=ve,X=De,ee=Fe,te=ye;return s(),D("div",null,[e(M,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(Q,{class:"mb-[-16px]",model:u(l),inline:""},{default:o(()=>[e(v,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:o(()=>[e(F,{class:"w-[280px]",modelValue:u(l).order_id,"onUpdate:modelValue":a[0]||(a[0]=t=>u(l).order_id=t),onKeydown:Ee(u(C),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),e(v,{label:"\u65E5\u671F",prop:"order_id"},{default:o(()=>[e(G,{modelValue:u(p),"onUpdate:modelValue":a[1]||(a[1]=t=>V(p)?p.value=t:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",shortcuts:K,onChange:O},null,8,["modelValue"])]),_:1}),e(v,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:o(()=>[e(J,{class:"w-[280px]",modelValue:u(l).pay_type,"onUpdate:modelValue":a[2]||(a[2]=t=>u(l).pay_type=t),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:u(C)},{default:o(()=>[(s(!0),D(L,null,R(u(b).pay_type,t=>(s(),m(H,{label:t.name,value:t.value,key:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),e(v,null,{default:o(()=>[e(k,{type:"primary",onClick:u(C)},{default:o(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(k,{onClick:u(j)},{default:o(()=>[r("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),he((s(),m(M,{class:"!border-none",shadow:"never"},{default:o(()=>[e(Z,{modelValue:u(w),"onUpdate:modelValue":a[3]||(a[3]=t=>V(w)?w.value=t:null),onChange:N},{default:o(()=>[e(c,{label:"0"},{default:o(()=>[r("\u5168\u90E8")]),_:1}),e(c,{label:"1"},{default:o(()=>[r("\u5F85\u652F\u4ED8")]),_:1}),e(c,{label:"2"},{default:o(()=>[r("\u5F85\u6838\u9500")]),_:1}),e(c,{label:"3"},{default:o(()=>[r("\u5DF2\u5B8C\u6210")]),_:1}),e(c,{label:"4"},{default:o(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})]),_:1},8,["modelValue"]),S("div",xe,[e(X,{data:u(d).lists,onSelectionChange:I},{default:o(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"\u8BA2\u5355ID",prop:"id","show-overflow-tooltip":""}),e(i,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":""}),e(i,{label:"\u5546\u54C1\u4FE1\u606F",prop:"order_id","min-width":"150","show-overflow-tooltip":""},{default:o(({row:t})=>{var B,T;return[(s(!0),D(L,null,R((B=t.product)==null?void 0:B.slice(0,3),(x,ae)=>(s(),D("div",{class:"flex items-center mb-2",key:ae},[e(z,{class:"w-[30px] h-[30px] mr-2 flex-shrink-0",src:x.image,fit:"cover","preview-src-list":[x.image],"preview-teleported":!0},null,8,["src","preview-src-list"]),S("p",Ve,y(x.store_name),1)]))),128)),((T=t.product)==null?void 0:T.length)>3?(s(),D("div",Se,"...")):U("",!0)]}),_:1}),e(i,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":""}),e(i,{label:"\u5B9E\u9645\u652F\u4ED8\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":""}),e(i,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status_name"},{default:o(({row:t})=>[t.status_name=="\u5F85\u6536\u8D27"?(s(),m(g,{key:0,type:"success"},{default:o(()=>[r(y(t.status_name),1)]),_:2},1024)):t.status_name=="\u5DF2\u6536\u8D27"||t.status_name=="\u5DF2\u5B8C\u6210"?(s(),m(g,{key:1,type:"info"},{default:o(()=>[r(y(t.status_name),1)]),_:2},1024)):t.status_name=="\u5F85\u53D1\u8D27"||t.status_name=="\u5F85\u6838\u9500"?(s(),m(g,{key:2,type:"warning"},{default:o(()=>[r(y(t.status_name),1)]),_:2},1024)):(s(),m(g,{key:3,type:"danger"},{default:o(()=>[r(y(t.status_name),1)]),_:2},1024))]),_:1}),e(i,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":""},{default:o(({row:t})=>[e(W,{options:u(b).pay_type,value:t.pay_type},null,8,["options","value"])]),_:1}),e(i,{label:"\u652F\u4ED8\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:t})=>[e(k,{type:"primary",link:"",onClick:B=>q(t)},{default:o(()=>[r("\u8BE6\u60C5")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),S("div",Me,[e(ee,{modelValue:u(d),"onUpdate:modelValue":a[4]||(a[4]=t=>V(d)?d.value=t:null),onChange:u(_)},null,8,["modelValue","onChange"])])]),_:1})),[[te,u(d).loading]]),u(h)?(s(),m(Be,{key:0,ref_key:"detailsRef",ref:E,onSuccess:u(_),onClose:a[5]||(a[5]=t=>h.value=!1),dictData:u(b)},null,8,["onSuccess","dictData"])):U("",!0)])}}});export{Ct as default};