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 ve,O as De}from"./element-plus.573d45d4.js";import{_ as ye}from"./index.vue_vue_type_script_setup_true_lang.ffc076c1.js";import{_ as Fe}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 v,U as t,L as o,u,aa as Ee,j as V,T as L,a9 as R,K as m,R as r,M as we,a as S,S as D,Q as $,n as he}from"./@vue.18505fe0.js";import{u as be}from"./usePaging.6a6670f9.js";import{u as Ce}from"./useDictOptions.c412c527.js";import{a as ke}from"./store_order.ee9a41fc.js";import"./lodash.60201f64.js";import"./index.3f2a8b50.js";import{h as U}from"./moment.40bc58bf.js";import"./edit.vue_vue_type_script_setup_true_name_storeOrderEdit_lang.e65c945c.js";import{_ as Be}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.e8657ce1.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.631cbd47.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.cf1bced7.js";import"./orderTable.vue_vue_type_script_setup_true_name_orderTable_lang.22a44321.js";import"./deliverTable.vue_vue_type_script_setup_true_name_deliverTable_lang.a400e43a.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 w=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}),h=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=U(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",l.end_time=U(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,y;w.value=!0,await he(),(a=E.value)==null||a.open(),(y=E.value)==null||y.getDetail(n)};return _(),(n,a)=>{const y=se,F=re,G=oe,H=ie,J=pe,k=me,Q=de,M=_e,c=le,Z=ue,i=ce,z=fe,g=ne,W=Fe,X=ve,ee=ye,te=De;return s(),v("div",null,[t(M,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[t(Q,{class:"mb-[-16px]",model:u(l),inline:""},{default:o(()=>[t(F,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:o(()=>[t(y,{class:"w-[280px]",modelValue:u(l).order_id,"onUpdate:modelValue":a[0]||(a[0]=e=>u(l).order_id=e),onKeydown:Ee(u(C),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue","onKeydown"])]),_:1}),t(F,{label:"\u65E5\u671F",prop:"order_id"},{default:o(()=>[t(G,{modelValue:u(p),"onUpdate:modelValue":a[1]||(a[1]=e=>V(p)?p.value=e: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}),t(F,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type"},{default:o(()=>[t(J,{class:"w-[280px]",modelValue:u(l).pay_type,"onUpdate:modelValue":a[2]||(a[2]=e=>u(l).pay_type=e),placeholder:"\u8BF7\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",onChange:u(C)},{default:o(()=>[(s(!0),v(L,null,R(u(b).pay_type,e=>(s(),m(H,{label:e.name,value:e.value,key:e.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"])]),_:1}),t(F,null,{default:o(()=>[t(k,{type:"primary",onClick:u(C)},{default:o(()=>[r("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(k,{onClick:a[3]||(a[3]=e=>{p.value=[],u(j)()})},{default:o(()=>[r("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),we((s(),m(M,{class:"!border-none",shadow:"never"},{default:o(()=>[t(Z,{modelValue:u(h),"onUpdate:modelValue":a[4]||(a[4]=e=>V(h)?h.value=e:null),onChange:N},{default:o(()=>[t(c,{label:"0"},{default:o(()=>[r("\u5168\u90E8")]),_:1}),t(c,{label:"1"},{default:o(()=>[r("\u5F85\u652F\u4ED8")]),_:1}),t(c,{label:"2"},{default:o(()=>[r("\u5F85\u6838\u9500")]),_:1}),t(c,{label:"3"},{default:o(()=>[r("\u5DF2\u5B8C\u6210")]),_:1}),t(c,{label:"4"},{default:o(()=>[r("\u5DF2\u9000\u6B3E")]),_:1})]),_:1},8,["modelValue"]),S("div",xe,[t(X,{data:u(d).lists,onSelectionChange:I},{default:o(()=>[t(i,{type:"selection",width:"55"}),t(i,{label:"\u8BA2\u5355ID",prop:"id","show-overflow-tooltip":""}),t(i,{label:"\u8BA2\u5355\u53F7",prop:"order_id","show-overflow-tooltip":""}),t(i,{label:"\u5546\u54C1\u4FE1\u606F",prop:"order_id","min-width":"150","show-overflow-tooltip":""},{default:o(({row:e})=>{var B,T;return[(s(!0),v(L,null,R((B=e.product)==null?void 0:B.slice(0,3),(x,ae)=>(s(),v("div",{class:"flex items-center mb-2",key:ae},[t(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,D(x.store_name),1)]))),128)),((T=e.product)==null?void 0:T.length)>3?(s(),v("div",Se,"...")):$("",!0)]}),_:1}),t(i,{label:"\u7528\u6237",prop:"nickname","show-overflow-tooltip":""}),t(i,{label:"\u5B9E\u9645\u652F\u4ED8\u91D1\u989D",prop:"pay_price","show-overflow-tooltip":""}),t(i,{label:"\u8BA2\u5355\u72B6\u6001",prop:"status_name"},{default:o(({row:e})=>[e.status_name=="\u5F85\u6536\u8D27"?(s(),m(g,{key:0,type:"success"},{default:o(()=>[r(D(e.status_name),1)]),_:2},1024)):e.status_name=="\u5DF2\u6536\u8D27"||e.status_name=="\u5DF2\u5B8C\u6210"?(s(),m(g,{key:1,type:"info"},{default:o(()=>[r(D(e.status_name),1)]),_:2},1024)):e.status_name=="\u5F85\u53D1\u8D27"||e.status_name=="\u5F85\u6838\u9500"?(s(),m(g,{key:2,type:"warning"},{default:o(()=>[r(D(e.status_name),1)]),_:2},1024)):(s(),m(g,{key:3,type:"danger"},{default:o(()=>[r(D(e.status_name),1)]),_:2},1024))]),_:1}),t(i,{label:"\u652F\u4ED8\u65B9\u5F0F",prop:"pay_type","show-overflow-tooltip":""},{default:o(({row:e})=>[t(W,{options:u(b).pay_type,value:e.pay_type},null,8,["options","value"])]),_:1}),t(i,{label:"\u652F\u4ED8\u65F6\u95F4",prop:"pay_time","show-overflow-tooltip":""}),t(i,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:e})=>[t(k,{type:"primary",link:"",onClick:B=>q(e)},{default:o(()=>[r("\u8BE6\u60C5")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),S("div",Me,[t(ee,{modelValue:u(d),"onUpdate:modelValue":a[5]||(a[5]=e=>V(d)?d.value=e:null),onChange:u(_)},null,8,["modelValue","onChange"])])]),_:1})),[[te,u(d).loading]]),u(w)?(s(),m(Be,{key:0,ref_key:"detailsRef",ref:E,onSuccess:u(_),onClose:a[6]||(a[6]=e=>w.value=!1),dictData:u(b)},null,8,["onSuccess","dictData"])):$("",!0)])}}});export{Ct as default};