import{G as H,H as J,J as K,L as W,M as Z,N as Q,O as X,C as ee,B as oe,w as le,D as te,b as ae}from"./element-plus.2acb577d.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.804ffc77.js";import{u as se}from"./usePaging.23706826.js";import{u as ne}from"./useDictOptions.4fbfb4d7.js";import{d as k}from"./purchase_product.d1fc5db6.js";import{d as S,Z as ie,r as m,e as pe,o as d,c as v,U as e,L as u,u as l,a as f,T as y,a9 as B,K as b,i as L,R as T,M as me,S as de}from"./@vue.821a47ec.js";import"./lodash.6bfd3540.js";import"./index.81df6f20.js";import{a as _e}from"./system_store.9ac735ff.js";import{h as M}from"./moment.40bc58bf.js";import{a as ce}from"./supplier.62efcbb1.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./index.f292cd50.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";const fe={class:"flex items-center mr-4"},we={class:"mt-4"},he={style:{color:"red"}},ve={class:"flex mt-4 justify-end"},be=S({name:"warehouseProductLists"}),so=S({...be,setup(Ee){const a=ie({warehouse_id:"",product_name:"",financial_pm:1,store_id:"",bar_code:"",start_time:"",end_time:"",supplier_id:""}),U=m([]),Y=p=>{U.value=p.map(({id:o})=>o)};ne("warehouse_produc_pm");const{pager:i,getLists:w,resetParams:P,resetPage:E}=se({fetchFun:k,params:a}),s=m([]),z=()=>{s.value[0]&&s.value[1]?(a.start_time=M(s.value[0]).format("YYYY-MM-DD")+" 00:00:00",a.end_time=M(s.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(a.start_time="",a.end_time=""),w()},_=m(!1),F=m([]),I=(p="")=>{_.value=!0,_e({name:p,page_size:50}).then(o=>{F.value=o.lists,setTimeout(()=>{_.value=!1},300)}).catch(o=>{setTimeout(()=>{_.value=!1},300)})},c=m(!1),g=m([]),N=(p="")=>{c.value=!0,ce({mer_name:p}).then(o=>{g.value=o.lists,setTimeout(()=>{c.value=!1},300)}).catch(o=>{setTimeout(()=>{c.value=!1},300)})};return pe(()=>{w()}),(p,o)=>{const C=H,D=J,n=ee,h=oe,A=K,V=le,O=re,R=te,x=W,r=Z,$=ae,j=Q,q=ue,G=X;return d(),v("div",null,[e(x,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(R,{class:"mb-[-16px]",model:l(a),inline:""},{default:u(()=>[e(n,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:u(()=>[f("div",fe,[e(D,{modelValue:l(a).store_id,"onUpdate:modelValue":o[0]||(o[0]=t=>l(a).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":I,loading:l(_),style:{width:"240px"},onChange:l(E)},{default:u(()=>[(d(!0),v(y,null,B(l(F),t=>(d(),b(C,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(n,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:l(a).warehouse_id,"onUpdate:modelValue":o[1]||(o[1]=t=>l(a).warehouse_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u4F9B\u5E94\u5546",prop:"supplier_id"},{default:u(()=>[e(D,{modelValue:l(a).supplier_id,"onUpdate:modelValue":o[2]||(o[2]=t=>l(a).supplier_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":N,loading:l(c),style:{width:"240px"}},{default:u(()=>[(d(!0),v(y,null,B(l(g),t=>(d(),b(C,{key:t.id,label:t.mer_name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(n,{label:"\u5546\u54C1",prop:"product_name"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:l(a).product_name,"onUpdate:modelValue":o[3]||(o[3]=t=>l(a).product_name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:u(()=>[e(h,{class:"w-[280px]",modelValue:l(a).bar_code,"onUpdate:modelValue":o[4]||(o[4]=t=>l(a).bar_code=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(n,{label:"\u65E5\u671F",prop:"create_time"},{default:u(()=>[e(A,{modelValue:l(s),"onUpdate:modelValue":o[5]||(o[5]=t=>L(s)?s.value=t: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(n,null,{default:u(()=>[e(V,{type:"primary",onClick:l(E)},{default:u(()=>o[7]||(o[7]=[T("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(V,{onClick:l(P)},{default:u(()=>o[8]||(o[8]=[T("\u91CD\u7F6E")])),_:1},8,["onClick"]),e(O,{class:"ml-2.5","fetch-fun":l(k),params:l(a),"page-size":l(i).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),me((d(),b(x,{class:"!border-none",shadow:"never"},{default:u(()=>[f("div",we,[e(j,{data:l(i).lists,onSelectionChange:Y},{default:u(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u5355\u53F7",prop:"code",width:"180","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),e(r,{label:"\u4F9B\u5E94\u5546",prop:"supplier_name","show-overflow-tooltip":""}),e(r,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(r,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),e(r,{label:"\u56FE\u7247",prop:"image","min-width":"80"},{default:u(({row:t})=>[e($,{style:{width:"50px",height:"50px"},src:t.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(r,{label:"\u51FA\u5165\u5E93",prop:"financial_pm_name","show-overflow-tooltip":""}),e(r,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(r,{label:"\u91C7\u8D2D\u4EF7",prop:"price","show-overflow-tooltip":""}),e(r,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(r,{label:"\u751F\u4EA7\u671F",prop:"manufacture","show-overflow-tooltip":""}),e(r,{label:"\u4FDD\u8D28\u671F",prop:"expiration_date","show-overflow-tooltip":""}),e(r,{label:"\u5907\u6CE8","show-overflow-tooltip":""},{default:u(({row:t})=>[f("span",he,de(t.mark),1)]),_:1})]),_:1},8,["data"])]),f("div",ve,[e(q,{modelValue:l(i),"onUpdate:modelValue":o[6]||(o[6]=t=>L(i)?i.value=t:null),onChange:l(w)},null,8,["modelValue","onChange"])])]),_:1})),[[G,l(i).loading]])])}}});export{so as default};