import{U as W,C as X,D as ee,J as oe,K as te,w as le,F as ae,L as ue,M as re,b as se,N as ne,O as ie}from"./element-plus.91c68cc0.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang.d8941eba.js";import{u as me}from"./usePaging.f8c888e4.js";import{f as _e}from"./index.e9c2eb26.js";import"./lodash.4e6d2a38.js";import{h as L}from"./moment.40bc58bf.js";import{n as T,o as fe}from"./beforehand_order.279f12bc.js";import{a as ce}from"./system_store.ce6419b9.js";import{_ as ve}from"./drawer.vue_vue_type_script_setup_true_lang.fa206e01.js";import{_ as we}from"./edit.vue_vue_type_script_setup_true_name_beforehandOrderEdit_lang.2612318c.js";import{d as S,r as i,s as Ee,Z as be,i as Fe,af as he,ap as Be,o as m,c as M,U as e,L as a,u as t,j as g,a as D,T as Ce,a9 as ye,K as E,R as _,M as V,Q as ge,n as De}from"./@vue.76ce7aa3.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.d78ce335.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.ef5d1750.js";import"./index.2efc98a8.js";import"./index.ece4e136.js";import"./vuedraggable.c04c7c0c.js";import"./vue.3299ef77.js";import"./sortablejs.c62bcaf8.js";const Ve={class:"flex items-center mr-4"},ke={class:"mt-4"},Ae={class:"flex mt-4 justify-end"},xe=S({name:"warehouseOrderLists"}),Ao=S({...xe,setup(Ue){const F=i(!1),h=Ee(),B=i(!1),Y=i(null);i([]);const u=be({order_id:"",product_name:"",financial_pm:1,store_id:"",start_time:"",end_time:"",supplier_id:"",order_sn:"",order_type:"",warehouse_type:""}),R=i([]),$=n=>{R.value=n.map(({id:o})=>o)},N=async n=>{var o,w;F.value=!0,await De(),(o=h.value)==null||o.open("edit"),(w=h.value)==null||w.setFormData(n)},{pager:f,getLists:v,resetParams:O,resetPage:k}=me({fetchFun:T,params:u}),P=async n=>{await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:n}),v()},p=i([]),z=()=>{p.value[0]&&p.value[1]?(u.start_time=L(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",u.end_time=L(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(u.start_time="",u.end_time=""),v()},b=i(!1),A=i([]),I=(n="")=>{b.value=!0,ce({name:n,page_size:50}).then(o=>{A.value=o.lists,setTimeout(()=>{b.value=!1},300)}).catch(o=>{setTimeout(()=>{b.value=!1},300)})};return Fe(()=>{v()}),(n,o)=>{const w=X,d=ee,j=W,s=oe,C=te,c=le,q=de,K=ae,x=ue,y=he("router-link"),r=re,J=se,Q=ne,Z=pe,U=Be("perms"),G=ie;return m(),M("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(K,{class:"mb-[-16px]",model:t(u),inline:""},{default:a(()=>[e(d,{label:"\u8BA2\u5355\u53F7",prop:"order_id"},{default:a(()=>[e(w,{class:"w-[280px]",modelValue:t(u).order_id,"onUpdate:modelValue":o[0]||(o[0]=l=>t(u).order_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u65E5\u671F",prop:"create_time"},{default:a(()=>[e(j,{modelValue:t(p),"onUpdate:modelValue":o[1]||(o[1]=l=>g(p)?p.value=l:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:z},null,8,["modelValue"])]),_:1}),e(d,{label:"\u8BA2\u5355\u7C7B\u578B",prop:"order_type"},{default:a(()=>[e(C,{modelValue:t(u).order_type,"onUpdate:modelValue":o[2]||(o[2]=l=>t(u).order_type=l),placeholder:"\u8BF7\u9009\u62E9\u8BA2\u5355\u7C7B\u578B",style:{width:"240px"}},{default:a(()=>[e(s,{value:1,label:"\u94FA\u8D27\u8BA2\u5355"}),e(s,{value:2,label:"\u644A\u8D29\u8BA2\u5355"}),e(s,{value:3,label:"\u4E00\u6761\u9F99\u8BA2\u5355"}),e(s,{value:4,label:"\u7EBF\u4E0A\u8BA2\u5355"}),e(s,{value:5,label:"\u4ED3\u5E93\u8865\u8D27"})]),_:1},8,["modelValue"])]),_:1}),e(d,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:a(()=>[D("div",Ve,[e(C,{modelValue:t(u).store_id,"onUpdate:modelValue":o[3]||(o[3]=l=>t(u).store_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":I,loading:t(b),style:{width:"240px"},onChange:t(k)},{default:a(()=>[(m(!0),M(Ce,null,ye(t(A),l=>(m(),E(s,{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:a(()=>[e(w,{class:"w-[280px]",modelValue:t(u).order_sn,"onUpdate:modelValue":o[4]||(o[4]=l=>t(u).order_sn=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8BA2\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u51FA\u5165\u5E93",prop:"warehouse_type"},{default:a(()=>[e(C,{modelValue:t(u).warehouse_type,"onUpdate:modelValue":o[5]||(o[5]=l=>t(u).warehouse_type=l),placeholder:"\u8BF7\u9009\u62E9\u51FA\u5165\u5E93\u7C7B\u578B",style:{width:"180px"}},{default:a(()=>[e(s,{value:1,label:"\u672A\u51FA\u5E93"}),e(s,{value:2,label:"\u5DF2\u51FA\u5E93"}),e(s,{value:3,label:"\u672A\u5165\u5E93"}),e(s,{value:4,label:"\u5DF2\u5165\u5E93"})]),_:1},8,["modelValue"])]),_:1}),e(d,null,{default:a(()=>[e(c,{type:"primary",onClick:t(k)},{default:a(()=>o[9]||(o[9]=[_("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(c,{onClick:t(O)},{default:a(()=>o[10]||(o[10]=[_("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(q,{class:"ml-2.5","fetch-fun":t(T),params:t(u),"page-size":t(f).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),V((m(),E(x,{class:"!border-none",shadow:"never"},{default:a(()=>[e(y,{to:{path:"beforehand_order_add"},class:"ml-4"},{default:a(()=>[e(c,{type:"primary"},{default:a(()=>o[11]||(o[11]=[_(" \u6DFB\u52A0 ")])),_:1})]),_:1}),e(y,{to:{path:"beforehand_order_cart_info"},class:"ml-4"},{default:a(()=>[e(c,{type:"primary"},{default:a(()=>o[12]||(o[12]=[_(" \u5546\u54C1\u5217\u8868 ")])),_:1})]),_:1}),D("div",ke,[e(Q,{data:t(f).lists,onSelectionChange:$},{default:a(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":"",width:"55"}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(r,{label:"\u5355\u53F7",prop:"order_id","show-overflow-tooltip":""}),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:"\u586B\u5199\u4EBA\u5458",prop:"admin_name","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:a(({row:l})=>[e(J,{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:a(({row:l})=>[e(y,{to:{path:"beforehand_order_details",query:{id:l.id}},class:"ml-4"},{default:a(()=>o[13]||(o[13]=[_(" \u8BE6\u60C5 ")])),_:2},1032,["to"]),V((m(),E(c,{link:"",onClick:H=>N(l)},{default:a(()=>o[14]||(o[14]=[_(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[U,["beforehand_order.beforehand_order/edit"]]]),V((m(),E(c,{type:"danger",link:"",onClick:H=>P(l.id)},{default:a(()=>o[15]||(o[15]=[_(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[U,["beforehand_order.beforehand_order/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",Ae,[e(Z,{modelValue:t(f),"onUpdate:modelValue":o[6]||(o[6]=l=>g(f)?f.value=l:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[G,t(f).loading]]),t(F)?(m(),E(we,{key:0,ref_key:"editRef",ref:h,onSuccess:t(v),onClose:o[7]||(o[7]=l=>F.value=!1)},null,8,["onSuccess"])):ge("",!0),e(ve,{modelValue:t(B),"onUpdate:modelValue":o[8]||(o[8]=l=>g(B)?B.value=l:null),ref_key:"drawerRef",ref:Y},null,8,["modelValue"])])}}});export{Ao as default};