import{U as ee,k as oe,C as le,D as te,J as ue,K as ae,w as re,F as se,L as ne,M as de,b as ie,N as pe,O as me}from"./element-plus.91c68cc0.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{_ as fe}from"./index.vue_vue_type_script_setup_true_lang.5e208f4c.js";import{u as ce}from"./usePaging.f8c888e4.js";import{f as Fe}from"./index.e778e9f4.js";import{d as Y,r as i,s as ve,Z as be,i as Ee,af as we,ap as he,o as p,c as M,U as e,L as u,u as t,j as A,a as F,T as Be,a9 as Ce,K as b,R as m,M as h,S as B,Q as ke,n as ye}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{h as T}from"./moment.40bc58bf.js";import{o as O,p as ge,l as Ve}from"./beforehand_order.8e87e56d.js";import{a as De}from"./system_store.5476f6ce.js";import{_ as Ae}from"./drawer.vue_vue_type_script_setup_true_lang.0939aaf4.js";import{_ as xe}from"./edit.vue_vue_type_script_setup_true_name_beforehandOrderEdit_lang.f346481b.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.b83333d9.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.77953008.js";import"./index.c3cc477b.js";import"./index.641616a6.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";const Ue={class:"flex items-center mr-4"},Se={class:"mt-4"},Le={class:"flex mt-4 justify-end"},Me=Y({name:"warehouseOrderLists"}),Lo=Y({...Me,setup(Te){const C=i(!1),k=ve(),y=i(!1),$=i(null);i([]);const a=be({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:""}),R=i([]),P=s=>{R.value=s.map(({id:o})=>o)},N=async s=>{var o,f;C.value=!0,await ye(),(o=k.value)==null||o.open("edit"),(f=k.value)==null||f.setFormData(s)},{pager:v,getLists:E,resetParams:z,resetPage:x}=ce({fetchFun:O,params:a}),I=async s=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ge({id:s}),E()},_=i([]),j=()=>{_.value[0]&&_.value[1]?(a.start_time=T(_.value[0]).format("YYYY-MM-DD")+" 00:00:00",a.end_time=T(_.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(a.start_time="",a.end_time=""),E()},q=s=>{Ve({id:s,type:2}).then(o=>{window.open(o.url,"_blank"),oe.success("\u5BFC\u51FA\u6210\u529F")})},w=i(!1),U=i([]),K=(s="")=>{w.value=!0,De({name:s,page_size:50}).then(o=>{U.value=o.lists,setTimeout(()=>{w.value=!1},300)}).catch(o=>{setTimeout(()=>{w.value=!1},300)})};return Ee(()=>{E()}),(s,o)=>{const f=le,d=te,J=ee,n=ue,g=ae,c=re,Q=fe,Z=se,S=ne,V=we("router-link"),r=de,G=ie,H=pe,W=_e,D=he("perms"),X=me;return p(),M("div",null,[e(S,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(Z,{class:"mb-[-16px]",model:t(a),inline:""},{default:u(()=>[e(d,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:u(()=>[e(f,{class:"w-[280px]",modelValue:t(a).order_id,"onUpdate:modelValue":o[0]||(o[0]=l=>t(a).order_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u65E5\u671F",prop:"create_time"},{default:u(()=>[e(J,{modelValue:t(_),"onUpdate:modelValue":o[1]||(o[1]=l=>A(_)?_.value=l:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:j},null,8,["modelValue"])]),_:1}),e(d,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type"},{default:u(()=>[e(g,{modelValue:t(a).order_type,"onUpdate:modelValue":o[2]||(o[2]=l=>t(a).order_type=l),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",style:{width:"240px"}},{default:u(()=>[e(n,{value:1,label:"\u94FA\u8D27\u8BA2\u5355"}),e(n,{value:2,label:"\u644A\u8D29\u8BA2\u5355"}),e(n,{value:3,label:"\u4E00\u6761\u9F99\u8BA2\u5355"}),e(n,{value:4,label:"\u7EBF\u4E0A\u8BA2\u5355"}),e(n,{value:5,label:"\u4ED3\u5E93\u8865\u8D27"})]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:u(()=>[F("div",Ue,[e(g,{modelValue:t(a).store_id,"onUpdate:modelValue":o[3]||(o[3]=l=>t(a).store_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":K,loading:t(w),style:{width:"240px"},onChange:t(x)},{default:u(()=>[(p(!0),M(Be,null,Ce(t(U),l=>(p(),b(n,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(d,{label:"\u652F\u4ED8\u8BA2\u5355\u53F7",prop:"order_sn"},{default:u(()=>[e(f,{class:"w-[200px]",modelValue:t(a).order_sn,"onUpdate:modelValue":o[4]||(o[4]=l=>t(a).order_sn=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u5165\u5E93\u5355\u53F7",prop:"order_rk"},{default:u(()=>[e(f,{class:"w-[200px]",modelValue:t(a).order_rk,"onUpdate:modelValue":o[5]||(o[5]=l=>t(a).order_rk=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5165\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u51FA\u5E93\u5355\u53F7",prop:"order_ck"},{default:u(()=>[e(f,{class:"w-[200px]",modelValue:t(a).order_ck,"onUpdate:modelValue":o[6]||(o[6]=l=>t(a).order_ck=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u51FA\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u51FA\u5165\u5E93",prop:"warehouse_type"},{default:u(()=>[e(g,{modelValue:t(a).warehouse_type,"onUpdate:modelValue":o[7]||(o[7]=l=>t(a).warehouse_type=l),placeholder:"\u8BF7\u9009\u62E9\u51FA\u5165\u5E93\u7C7B\u578B",style:{width:"180px"}},{default:u(()=>[e(n,{value:1,label:"\u672A\u51FA\u5E93"}),e(n,{value:2,label:"\u5DF2\u51FA\u5E93"}),e(n,{value:3,label:"\u672A\u5165\u5E93"}),e(n,{value:4,label:"\u5DF2\u5165\u5E93"})]),_:1},8,["modelValue"])]),_:1}),e(d,null,{default:u(()=>[e(c,{type:"primary",onClick:t(x)},{default:u(()=>o[11]||(o[11]=[m("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(c,{onClick:t(z)},{default:u(()=>o[12]||(o[12]=[m("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(Q,{class:"ml-2.5","fetch-fun":t(O),params:t(a),"page-size":t(v).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),h((p(),b(S,{class:"!border-none",shadow:"never"},{default:u(()=>[e(V,{to:{path:"beforehand_order_add"},class:"ml-4"},{default:u(()=>[e(c,{type:"primary"},{default:u(()=>o[13]||(o[13]=[m(" \u6DFB\u52A0 ")])),_:1})]),_:1}),e(V,{to:{path:"beforehand_order_cart_info"},class:"ml-4"},{default:u(()=>[e(c,{type:"primary"},{default:u(()=>o[14]||(o[14]=[m(" \u5546\u54C1\u5217\u8868 ")])),_:1})]),_:1}),F("div",Se,[e(H,{data:t(v).lists,onSelectionChange:P},{default:u(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":"",width:"55"}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4/\u4EBA\u5458",prop:"create_time","show-overflow-tooltip":"",width:"150"},{default:u(({row:l})=>[F("div",null,B(l.admin_name),1),F("div",null,B(l.create_time),1)]),_:1}),e(r,{label:"\u5355\u53F7",prop:"order_id","show-overflow-tooltip":"",width:"180"},{default:u(({row:l})=>[F("div",null,B(l.order_id),1),F("div",null,B(l.order_sn),1)]),_:1}),e(r,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type_name","show-overflow-tooltip":""}),e(r,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),e(r,{label:"\u5165\u5E93",prop:"warehousing","show-overflow-tooltip":""}),e(r,{label:"\u51FA\u5E93",prop:"outbound","show-overflow-tooltip":""}),e(r,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),e(r,{label:"\u5185\u90E8\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),e(r,{label:"\u901A\u77E5",prop:"msg","show-overflow-tooltip":""}),e(r,{label:"\u6587\u4EF6",prop:"file","show-overflow-tooltip":""},{default:u(({row:l})=>[e(G,{style:{width:"50px",height:"50px"},src:l.file,"preview-teleported":!0},null,8,["src"])]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:l})=>[e(V,{to:{path:"beforehand_order_details",query:{id:l.id}},class:"ml-4"},{default:u(()=>o[15]||(o[15]=[m(" \u8BE6\u60C5 ")])),_:2},1032,["to"]),h((p(),b(c,{link:"",onClick:L=>N(l)},{default:u(()=>o[16]||(o[16]=[m(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[D,["beforehand_order.beforehand_order/edit"]]]),h((p(),b(c,{type:"danger",link:"",onClick:L=>I(l.id)},{default:u(()=>o[17]||(o[17]=[m(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[D,["beforehand_order.beforehand_order/delete"]]]),h((p(),b(c,{onClick:L=>q(l.id),link:""},{default:u(()=>o[18]||(o[18]=[m(" \u6253\u5370\u4F9B\u8D27\u5355 ")])),_:2},1032,["onClick"])),[[D,["beforehand_order.beforehand_order/supply_order"]]])]),_:1})]),_:1},8,["data"])]),F("div",Le,[e(W,{modelValue:t(v),"onUpdate:modelValue":o[8]||(o[8]=l=>A(v)?v.value=l:null),onChange:t(E)},null,8,["modelValue","onChange"])])]),_:1})),[[X,t(v).loading]]),t(C)?(p(),b(xe,{key:0,ref_key:"editRef",ref:k,onSuccess:t(E),onClose:o[9]||(o[9]=l=>C.value=!1)},null,8,["onSuccess"])):ke("",!0),e(Ae,{modelValue:t(y),"onUpdate:modelValue":o[10]||(o[10]=l=>A(y)?y.value=l:null),ref_key:"drawerRef",ref:$},null,8,["modelValue"])])}}});export{Lo as default};