import{U as le,J as ae,K as re,D as se,C as ue,w as ie,F as ne,L as pe,M as me,N as de,O as ce}from"./element-plus.a63a26dd.js";import{_ as _e}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.js";import{u as fe}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.da569484.js";import{h as he,i as we}from"./warehouse_order.df1ba9b0.js";import"./lodash.2473fc51.js";import{f as Ee}from"./index.5bbc12c8.js";import{_ as Ce}from"./edit.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.6887ff59.js";import{_ as be}from"./details.vue_vue_type_script_setup_true_name_storeOrderDETAILS_lang.95a8fe6a.js";import{a as Fe}from"./system_store.0486886b.js";import{h as T}from"./moment.40bc58bf.js";import{a as De}from"./supplier.5b0316e4.js";import{d as O,s as U,r as n,Z as ge,af as ke,ap as ye,o as i,c as F,U as e,L as a,u as t,a as D,T as M,a9 as Y,K as c,j as R,R as h,M as $,Q as N,n as Ve}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"./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.5f9b7233.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.dccd0873.js";import"./store_product.6d73dabd.js";import"./store_branch_product.82f3fc31.js";import"./warehouse_product_storege.a0f043a8.js";import"./warehouse_product.45892a67.js";import"./editProduct.vue_vue_type_script_setup_true_name_warehouseOrderEdit_lang.1345c496.js";const Be={class:"flex items-center mr-4"},xe={class:"mt-4"},Le={class:"flex mt-4 justify-end"},Se=O({name:"warehouseOrderLists"}),Bo=O({...Se,setup(Te){const P=U(),C=U(),g=n(!1),b=n(!1),r=ge({warehouse_id:"",product_name:"",financial_pm:0,store_id:"",start_time:"",end_time:"",supplier_id:""}),A=n([]),I=u=>{A.value=u.map(({id:o})=>o)},{dictData:k}=ve(""),{pager:_,getLists:m,resetParams:j,resetPage:y}=fe({fetchFun:we,params:r}),K=async u=>{await Ee.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await he({id:u}),m()},W=async u=>{var o,f;b.value=!0,await Ve(),(o=C.value)==null||o.open(),(f=C.value)==null||f.getDetail(u)},p=n([]),q=()=>{p.value[0]&&p.value[1]?(r.start_time=T(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=T(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time=""),m()},w=n(!1),V=n([]),z=(u="")=>{w.value=!0,Fe({name:u,page_size:50}).then(o=>{V.value=o.lists,setTimeout(()=>{w.value=!1},300)}).catch(o=>{setTimeout(()=>{w.value=!1},300)})},E=n(!1),B=n([]),J=(u="")=>{E.value=!0,De({}).then(o=>{B.value=o.lists,setTimeout(()=>{E.value=!1},300)}).catch(o=>{setTimeout(()=>{E.value=!1},300)})};return m(),(u,o)=>{const f=ae,x=re,d=se,L=ue,Q=le,v=ie,Z=ne,S=pe,G=ke("router-link"),s=me,H=de,X=_e,ee=ye("perms"),oe=ce;return i(),F("div",null,[e(S,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(Z,{class:"mb-[-16px]",model:t(r),inline:""},{default:a(()=>[e(d,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:a(()=>[D("div",Be,[e(x,{modelValue:t(r).store_id,"onUpdate:modelValue":o[0]||(o[0]=l=>t(r).store_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":z,loading:t(w),style:{width:"240px"},onChange:t(y)},{default:a(()=>[(i(!0),F(M,null,Y(t(V),l=>(i(),c(f,{key:l.id,label:l.name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(d,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:a(()=>[e(L,{class:"w-[280px]",modelValue:t(r).warehouse_id,"onUpdate:modelValue":o[1]||(o[1]=l=>t(r).warehouse_id=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:a(()=>[e(x,{modelValue:t(r).supplier_id,"onUpdate:modelValue":o[2]||(o[2]=l=>t(r).supplier_id=l),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":J,loading:t(E),style:{width:"240px"}},{default:a(()=>[(i(!0),F(M,null,Y(t(B),l=>(i(),c(f,{key:l.id,label:l.mer_name,value:l.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(d,{label:"\u5546\u54C1",prop:"product_name"},{default:a(()=>[e(L,{class:"w-[280px]",modelValue:t(r).product_name,"onUpdate:modelValue":o[3]||(o[3]=l=>t(r).product_name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(d,{label:"\u65E5\u671F",prop:"create_time"},{default:a(()=>[e(Q,{modelValue:t(p),"onUpdate:modelValue":o[4]||(o[4]=l=>R(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:q},null,8,["modelValue"])]),_:1}),e(d,null,{default:a(()=>[e(v,{type:"primary",onClick:t(y)},{default:a(()=>[h("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(v,{onClick:t(j)},{default:a(()=>[h("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),$((i(),c(S,{class:"!border-none",shadow:"never"},{default:a(()=>[e(G,{to:{path:"import"},class:"ml-4"},{default:a(()=>[e(v,{type:"primary"},{default:a(()=>[h(" \u51FA\u5E93 ")]),_:1})]),_:1}),D("div",xe,[e(H,{data:t(_).lists,onSelectionChange:I},{default:a(()=>[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:a(({row:l})=>[e(v,{type:"primary",link:"",onClick:te=>W(l)},{default:a(()=>[h("\u8BE6\u60C5")]),_:2},1032,["onClick"]),$((i(),c(v,{type:"danger",link:"",onClick:te=>K(l.id)},{default:a(()=>[h(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[ee,["warehouse_order.warehouse_order/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",Le,[e(X,{modelValue:t(_),"onUpdate:modelValue":o[5]||(o[5]=l=>R(_)?_.value=l:null),onChange:t(m)},null,8,["modelValue","onChange"])])]),_:1})),[[oe,t(_).loading]]),t(g)?(i(),c(Ce,{key:0,ref_key:"editRef",ref:P,"dict-data":t(k),onSuccess:t(m),onClose:o[6]||(o[6]=l=>g.value=!1)},null,8,["dict-data","onSuccess"])):N("",!0),t(b)?(i(),c(be,{key:1,ref_key:"detailsRef",ref:C,onSuccess:t(m),onClose:o[7]||(o[7]=l=>b.value=!1),dictData:t(k)},null,8,["onSuccess","dictData"])):N("",!0)])}}});export{Bo as default};