import{U as re,C as se,D as ue,J as ne,K as ie,w as me,F as pe,L as de,M as ce,N as _e,O as fe}from"./element-plus.a63a26dd.js";import{_ as he}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{_ as ve}from"./index.vue_vue_type_script_setup_true_lang.6a7afe63.js";import{u as we}from"./usePaging.6a6670f9.js";import{u as Ee}from"./useDictOptions.f757f46e.js";import{i as U,j as Ce}from"./warehouse_order.85326891.js";import"./lodash.2473fc51.js";import{f as Fe}from"./index.914e16f9.js";import{_ as ge}from"./edit.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.00179b56.js";import{_ as be}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.7e6bdfa2.js";import{a as De}from"./system_store.0a321149.js";import{h as Y}from"./moment.40bc58bf.js";import{a as ke}from"./supplier.6c2e696a.js";import{d as z,s as $,r as i,Z as ye,i as Ve,af as Be,ap as xe,o as n,c as b,U as e,L as l,u as o,a as D,T as R,a9 as N,K as p,j as O,R as v,M as k,Q as P,n as Le}from"./@vue.18505fe0.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.da3823b2.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.b651f149.js";import"./store_product.22e2a1b2.js";import"./store_branch_product.9586a3e4.js";import"./warehouse_product_storege.a3485e96.js";import"./warehouse_product.72318036.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.13e33f0a.js";const Se={class:"flex items-center mr-4"},Te={class:"mt-4"},Me={class:"flex mt-4 justify-end"},Ue=z({name:"warehouseOrderLists"}),To=z({...Ue,setup(Ye){const j=$(),C=$(),y=i(!1),F=i(!1),r=ye({warehouse_id:"",product_name:"",financial_pm:0,store_id:"",start_time:"",end_time:"",code:"",supplier_id:""}),A=i([]),I=u=>{A.value=u.map(({id:t})=>t)},{dictData:V}=Ee(""),{pager:d,getLists:c,resetParams:K,resetPage:g}=we({fetchFun:U,params:r}),W=async u=>{await Fe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Ce({id:u}),c()},q=async u=>{var t,f;F.value=!0,await Le(),(t=C.value)==null||t.open(),(f=C.value)==null||f.getDetail(u)},m=i([]),J=()=>{m.value[0]&&m.value[1]?(r.start_time=Y(m.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=Y(m.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time=""),c()},w=i(!1),B=i([]),Q=(u="")=>{w.value=!0,De({name:u,page_size:50}).then(t=>{B.value=t.lists,setTimeout(()=>{w.value=!1},300)}).catch(t=>{setTimeout(()=>{w.value=!1},300)})},E=i(!1),x=i([]),Z=(u="")=>{E.value=!0,ke({mer_name:u}).then(t=>{x.value=t.lists,setTimeout(()=>{E.value=!1},300)}).catch(t=>{setTimeout(()=>{E.value=!1},300)})};return Ve(()=>{c()}),(u,t)=>{const f=se,_=ue,L=ne,S=ie,G=re,h=me,H=ve,X=pe,T=de,ee=Be("router-link"),s=ce,oe=_e,te=he,M=xe("perms"),ae=fe;return n(),b("div",null,[e(T,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(X,{class:"mb-[-16px]",model:o(r),inline:""},{default:l(()=>[e(_,{label:"\u5355\u53F7",prop:"code"},{default:l(()=>[e(f,{class:"w-[280px]",modelValue:o(r).code,"onUpdate:modelValue":t[0]||(t[0]=a=>o(r).code=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u53F7",onChange:o(g)},null,8,["modelValue","onChange"])]),_:1}),e(_,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:l(()=>[D("div",Se,[e(S,{modelValue:o(r).store_id,"onUpdate:modelValue":t[1]||(t[1]=a=>o(r).store_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":Q,loading:o(w),style:{width:"240px"},onChange:o(g)},{default:l(()=>[(n(!0),b(R,null,N(o(B),a=>(n(),p(L,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(_,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[e(f,{class:"w-[280px]",modelValue:o(r).warehouse_id,"onUpdate:modelValue":t[2]||(t[2]=a=>o(r).warehouse_id=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(_,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:l(()=>[e(S,{modelValue:o(r).supplier_id,"onUpdate:modelValue":t[3]||(t[3]=a=>o(r).supplier_id=a),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":Z,loading:o(E),style:{width:"240px"}},{default:l(()=>[(n(!0),b(R,null,N(o(x),a=>(n(),p(L,{key:a.id,label:a.mer_name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(_,{label:"\u65E5\u671F",prop:"create_time"},{default:l(()=>[e(G,{modelValue:o(m),"onUpdate:modelValue":t[4]||(t[4]=a=>O(m)?m.value=a: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(_,null,{default:l(()=>[e(h,{type:"primary",onClick:o(g)},{default:l(()=>[v("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(h,{onClick:o(K)},{default:l(()=>[v("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(H,{class:"ml-2.5","fetch-fun":o(U),params:o(r),"page-size":o(d).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),k((n(),p(T,{class:"!border-none",shadow:"never"},{default:l(()=>[k((n(),p(ee,{to:{path:"import"},class:"ml-4"},{default:l(()=>[e(h,{type:"primary"},{default:l(()=>[v(" \u51FA\u5E93 ")]),_:1})]),_:1})),[[M,["import"]]]),D("div",Te,[e(oe,{data:o(d).lists,onSelectionChange:I},{default:l(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"id",prop:"id","show-overflow-tooltip":"",width:"55"}),e(s,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(s,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(s,{label:"\u95E8\u5E97",prop:"system_store","show-overflow-tooltip":""}),e(s,{label:"\u5355\u53F7",prop:"code","show-overflow-tooltip":""}),e(s,{label:"\u72B6\u6001",prop:"financial_pm_name","show-overflow-tooltip":""}),e(s,{label:"\u586B\u5199\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),e(s,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""}),e(s,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[e(h,{type:"primary",link:"",onClick:le=>q(a)},{default:l(()=>[v("\u8BE6\u60C5")]),_:2},1032,["onClick"]),k((n(),p(h,{type:"danger",link:"",onClick:le=>W(a.id)},{default:l(()=>[v(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[M,["warehouse_order.warehouse_order/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",Me,[e(te,{modelValue:o(d),"onUpdate:modelValue":t[5]||(t[5]=a=>O(d)?d.value=a:null),onChange:o(c)},null,8,["modelValue","onChange"])])]),_:1})),[[ae,o(d).loading]]),o(y)?(n(),p(ge,{key:0,ref_key:"editRef",ref:j,"dict-data":o(V),onSuccess:o(c),onClose:t[6]||(t[6]=a=>y.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),o(F)?(n(),p(be,{key:1,ref_key:"detailsRef",ref:C,onSuccess:o(c),onClose:t[7]||(t[7]=a=>F.value=!1),dictData:o(V)},null,8,["onSuccess","dictData"])):P("",!0)])}}});export{To as default};