import{V as Fe,x as ke,y as we,k as N,C as ye,D as Ce,N as he,O as De,w as Be,F as Ve,K as ge,G as Ae,b as $e,H as xe,I as Se}from"./element-plus.8e273e86.js";import{_ as Te}from"./index.vue_vue_type_script_setup_true_lang.d6032bc4.js";import{_ as Ue}from"./index.vue_vue_type_script_setup_true_lang.836a98a3.js";import{u as Oe}from"./usePaging.f8c888e4.js";import{f as Re}from"./index.5ea969a0.js";import{d as H,r as i,s as z,Z as Pe,i as Le,af as Me,ap as Ye,o as m,c as I,U as l,L as u,u as t,j as w,a as F,T as Ne,a9 as ze,K as c,R as p,M as g,S as A,Q as T,n as q}from"./@vue.76ce7aa3.js";import"./lodash.41b9567d.js";import{h as j}from"./moment.40bc58bf.js";import{u as K,v as Ie,q as qe,w as je,x as Ke}from"./beforehand_order.8ecaf26e.js";import{a as Ge}from"./system_store.690ddfdc.js";import{_ as He}from"./drawer.vue_vue_type_script_setup_true_lang.ce04e7a6.js";import{_ as G}from"./edit.vue_vue_type_script_setup_true_name_beforehandOrderEdit_lang.1c42523b.js";import{_ as Qe}from"./copyPop.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.924bb97b.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.5cc5edf3.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.b4cbdbc9.js";import"./jspdf.75308076.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.f23177ae.js";import"./color.a6ad6672.js";import"./clone.954ba32c.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./picker.63ef5be6.js";import"./index.fff992ae.js";import"./index.c1c1a1aa.js";import"./vuedraggable.1d6c5910.js";import"./vue.6c4d4a7c.js";import"./sortablejs.a0474a26.js";import"./admin.5dd1b33a.js";const Ze={class:"flex items-center mr-4"},Je={class:"mt-4"},We={class:"flex mt-4 justify-end"},Xe=H({name:"warehouseOrderLists"}),eo=H({...Xe,setup(el){const y=i(!1),$=z(),O=z(),C=i(!1),d=i([]),R=i(null);i([]);const h=i(!1),D=i("all"),Q=r=>{D.value=="all"?a.order_type="":a.order_type=D.value,_()},B=i("all"),Z=r=>{B.value=="all"?a.warehouse_type="":a.warehouse_type=B.value,_()},J=async r=>{var e;h.value=!0,await q(),(e=O.value)==null||e.open(r.id)},W=r=>{var e;C.value=!0,(e=R.value)==null||e.open(r.id)},a=Pe({order_id:"",product_name:"",financial_pm:1,store_id:"",start_time:"",end_time:"",supplier_id:"",order_sn:"",order_ck:"",order_rk:"",order_type:"",warehouse_type:"",mark:""}),X=i([]),ee=r=>{X.value=r.map(({id:e})=>e)},le=async r=>{var e,b;y.value=!0,await q(),(e=$.value)==null||e.open("edit"),(b=$.value)==null||b.setFormData(r)},{pager:k,getLists:P,resetParams:oe,resetPage:ll}=Oe({fetchFun:K,params:a}),te=async r=>{await Re.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ie({id:r}),_()},E=i([]),ae=()=>{E.value[0]&&E.value[1]?(a.start_time=j(E.value[0]).format("YYYY-MM-DD")+" 00:00:00",a.end_time=j(E.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(a.start_time="",a.end_time=""),_()},ue=r=>{qe({id:r,type:2}).then(e=>{window.open(e.url,"_blank"),N.success("\u5BFC\u51FA\u6210\u529F")})},re=r=>{je({id:r}).then(e=>{window.open(e.url,"_blank"),N.success("\u5BFC\u51FA\u6210\u529F")})},x=i(!1),L=i([]),ne=(r="")=>{x.value=!0,Ge({name:r,page_size:50}).then(e=>{L.value=e.lists,setTimeout(()=>{x.value=!1},300)}).catch(e=>{setTimeout(()=>{x.value=!1},300)})},se=()=>{Ke(a).then(r=>{d.value=r})},_=()=>{P(),se()},de=()=>{a.order_id="",a.product_name="",a.financial_pm=1,a.store_id="",a.start_time="",a.end_time="",a.supplier_id="",a.order_sn="",a.order_ck="",a.order_rk="",a.order_type="",a.warehouse_type="",a.mark="",oe()};return Le(()=>{_()}),(r,e)=>{const b=ye,v=Ce,ie=Fe,pe=he,me=De,f=Be,_e=Ue,fe=Ve,M=ge,U=Me("router-link"),s=ke,Y=we,n=Ae,ce=$e,be=xe,ve=Te,S=Ye("perms"),Ee=Se;return m(),I("div",null,[l(M,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[l(fe,{class:"mb-[-16px]",model:t(a),inline:""},{default:u(()=>[l(v,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:u(()=>[l(b,{class:"w-[280px]",modelValue:t(a).order_id,"onUpdate:modelValue":e[0]||(e[0]=o=>t(a).order_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),l(v,{label:"\u65E5\u671F",prop:"create_time"},{default:u(()=>[l(ie,{modelValue:t(E),"onUpdate:modelValue":e[1]||(e[1]=o=>w(E)?E.value=o:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:ae},null,8,["modelValue"])]),_:1}),l(v,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:u(()=>[F("div",Ze,[l(me,{modelValue:t(a).store_id,"onUpdate:modelValue":e[2]||(e[2]=o=>t(a).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":ne,loading:t(x),style:{width:"240px"},onChange:_},{default:u(()=>[(m(!0),I(Ne,null,ze(t(L),o=>(m(),c(pe,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])])]),_:1}),l(v,{label:"\u652F\u4ED8\u8BA2\u5355\u53F7",prop:"order_sn"},{default:u(()=>[l(b,{class:"w-[200px]",modelValue:t(a).order_sn,"onUpdate:modelValue":e[3]||(e[3]=o=>t(a).order_sn=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),l(v,{label:"\u5165\u5E93\u5355\u53F7",prop:"order_rk"},{default:u(()=>[l(b,{class:"w-[200px]",modelValue:t(a).order_rk,"onUpdate:modelValue":e[4]||(e[4]=o=>t(a).order_rk=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5165\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),l(v,{label:"\u51FA\u5E93\u5355\u53F7",prop:"order_ck"},{default:u(()=>[l(b,{class:"w-[200px]",modelValue:t(a).order_ck,"onUpdate:modelValue":e[5]||(e[5]=o=>t(a).order_ck=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),l(v,{label:"\u5907\u6CE8",prop:"mark"},{default:u(()=>[l(b,{class:"w-[200px]",modelValue:t(a).mark,"onUpdate:modelValue":e[6]||(e[6]=o=>t(a).mark=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),l(v,null,{default:u(()=>[l(f,{type:"primary",onClick:_},{default:u(()=>e[16]||(e[16]=[p("\u67E5\u8BE2")])),_:1}),l(f,{onClick:de},{default:u(()=>e[17]||(e[17]=[p("\u91CD\u7F6E")])),_:1}),l(_e,{class:"ml-2.5","fetch-fun":t(K),params:t(a),"page-size":t(k).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),g((m(),c(M,{class:"!border-none",shadow:"never"},{default:u(()=>[l(U,{to:{path:"beforehand_order_add"},class:"ml-4"},{default:u(()=>[l(f,{type:"primary"},{default:u(()=>e[18]||(e[18]=[p(" \u6DFB\u52A0 ")])),_:1})]),_:1}),l(U,{to:{path:"beforehand_order_cart_info"},class:"ml-4"},{default:u(()=>[l(f,{type:"primary"},{default:u(()=>e[19]||(e[19]=[p(" \u5546\u54C1\u5217\u8868 ")])),_:1})]),_:1}),l(Y,{modelValue:t(D),"onUpdate:modelValue":e[7]||(e[7]=o=>w(D)?D.value=o:null),class:"demo-tabs mt-2",onTabChange:Q},{default:u(()=>[l(s,{label:"\u5168\u90E8",name:"all"}),l(s,{label:`\u94FA\u8D27\u8BA2\u5355(${t(d).order_type_1})`,name:"1"},null,8,["label"]),l(s,{label:`\u644A\u8D29\u8BA2\u5355(${t(d).order_type_2})`,name:"2"},null,8,["label"]),l(s,{label:`\u4E00\u6761\u9F99\u8BA2\u5355(${t(d).order_type_3})`,name:"3"},null,8,["label"]),l(s,{label:`\u7EBF\u4E0A\u8BA2\u5355(${t(d).order_type_4})`,name:"4"},null,8,["label"]),l(s,{label:`\u4ED3\u5E93\u8865\u8D27(${t(d).order_type_5})`,name:"5"},null,8,["label"]),l(s,{label:`\u91C7\u8D2D\u8BA2\u5355(${t(d).order_type_7})`,name:"7"},null,8,["label"]),l(s,{label:`\u5176\u4ED6\u8BA2\u5355(${t(d).order_type_8})`,name:"8"},null,8,["label"])]),_:1},8,["modelValue"]),l(Y,{modelValue:t(B),"onUpdate:modelValue":e[8]||(e[8]=o=>w(B)?B.value=o:null),onTabChange:Z},{default:u(()=>[l(s,{label:"\u5168\u90E8",name:"all"}),l(s,{label:`\u672A\u51FA\u5E93(${t(d).outbound_0})`,name:"1"},null,8,["label"]),l(s,{label:`\u5DF2\u51FA\u5E93(${t(d).outbound_1})`,name:"2"},null,8,["label"]),l(s,{label:`\u672A\u5165\u5E93(${t(d).warehousing_0})`,name:"3"},null,8,["label"]),l(s,{label:`\u5DF2\u5165\u5E93(${t(d).warehousing_1})`,name:"4"},null,8,["label"])]),_:1},8,["modelValue"]),F("div",Je,[l(be,{data:t(k).lists,onSelectionChange:ee},{default:u(()=>[l(n,{type:"selection",width:"55"}),l(n,{label:"id",prop:"id","show-overflow-tooltip":"",width:"55"}),l(n,{label:"\u64CD\u4F5C\u65F6\u95F4/\u4EBA\u5458",prop:"create_time","show-overflow-tooltip":"",width:"150"},{default:u(({row:o})=>[F("div",null,A(o.admin_name),1),F("div",null,A(o.create_time),1)]),_:1}),l(n,{label:"\u5355\u53F7",prop:"order_id","show-overflow-tooltip":"",width:"180"},{default:u(({row:o})=>[F("div",null,A(o.order_id),1),F("div",null,A(o.order_sn),1)]),_:1}),l(n,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_name","show-overflow-tooltip":""}),l(n,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),l(n,{label:"\u5165\u5E93",prop:"warehousing","show-overflow-tooltip":""}),l(n,{label:"\u51FA\u5E93",prop:"outbound","show-overflow-tooltip":""}),l(n,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),l(n,{label:"\u5185\u90E8\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),l(n,{label:"\u4EE3\u8D2D\u5907\u6CE8",prop:"other_data.store_mark","show-overflow-tooltip":""}),l(n,{label:"\u901A\u77E5",prop:"msg","show-overflow-tooltip":""}),l(n,{label:"\u6587\u4EF6",prop:"file","show-overflow-tooltip":""},{default:u(({row:o})=>[l(ce,{style:{width:"50px",height:"50px"},src:o.file,"preview-teleported":!0},null,8,["src"])]),_:1}),l(n,{label:"\u7ED3\u7B97\u72B6\u6001",prop:"audit_status","show-overflow-tooltip":""},{default:u(({row:o})=>[p(A(o.audit_status==1?"\u5DF2\u7ED3\u7B97":"\u672A\u7ED3\u7B97"),1)]),_:1}),l(n,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:o})=>[o.order_type==1?(m(),c(f,{key:0,link:"",onClick:V=>J(o)},{default:u(()=>e[20]||(e[20]=[p(" \u4E00\u952E\u590D\u5236 ")])),_:2},1032,["onClick"])):T("",!0),l(f,{type:"danger",link:"",onClick:V=>W(o)},{default:u(()=>e[21]||(e[21]=[p(" \u6D41\u7A0B ")])),_:2},1032,["onClick"]),l(U,{to:{path:"beforehand_order_details",query:{id:o.id}},class:"ml-4"},{default:u(()=>e[22]||(e[22]=[p(" \u8BE6\u60C5 ")])),_:2},1032,["to"]),g((m(),c(f,{link:"",onClick:V=>le(o)},{default:u(()=>e[23]||(e[23]=[p(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[S,["beforehand_order.beforehand_order/edit"]]]),g((m(),c(f,{type:"danger",link:"",onClick:V=>te(o.id)},{default:u(()=>e[24]||(e[24]=[p(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[S,["beforehand_order.beforehand_order/delete"]]]),g((m(),c(f,{onClick:V=>ue(o.id),link:""},{default:u(()=>e[25]||(e[25]=[p(" \u6253\u5370\u4F9B\u8D27\u5355 ")])),_:2},1032,["onClick"])),[[S,["beforehand_order.beforehand_order/supply_order"]]]),o.uid>0?g((m(),c(f,{key:1,onClick:V=>re(o.id),link:""},{default:u(()=>e[26]||(e[26]=[p(" \u6253\u5370\u4F1A\u5458\u5355 ")])),_:2},1032,["onClick"])),[[S,["beforehand_order.beforehand_order/supply_order"]]]):T("",!0)]),_:1})]),_:1},8,["data"])]),F("div",We,[l(ve,{modelValue:t(k),"onUpdate:modelValue":e[9]||(e[9]=o=>w(k)?k.value=o:null),onChange:_},null,8,["modelValue"])])]),_:1})),[[Ee,t(k).loading]]),t(y)?(m(),c(G,{key:0,ref_key:"editRef",ref:$,"dict-data":r.dictData,onSuccess:t(P),onClose:e[10]||(e[10]=o=>y.value=!1)},null,8,["dict-data","onSuccess"])):T("",!0),t(y)?(m(),c(G,{key:1,ref_key:"editRef",ref:$,onSuccess:_,onClose:e[11]||(e[11]=o=>y.value=!1)},null,512)):T("",!0),l(He,{modelValue:t(C),"onUpdate:modelValue":e[12]||(e[12]=o=>w(C)?C.value=o:null),ref_key:"drawerRef",ref:R,onClose:e[13]||(e[13]=o=>C.value=!1)},null,8,["modelValue"]),l(Qe,{modelValue:t(h),"onUpdate:modelValue":e[14]||(e[14]=o=>w(h)?h.value=o:null),ref_key:"copyRef",ref:O,onSuccess:_,onClose:e[15]||(e[15]=o=>h.value=!1)},null,8,["modelValue"])])}}});export{eo as default};