2025-03-20 10:25:32 +08:00

2 lines
7.1 KiB
JavaScript

import{G as J,H as K,J as Q,L as Z,M as X,N as ee,O as oe,C as le,B as te,w as ae,D as ue,b as re}from"./element-plus.2acb577d.js";import{_ as se}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{u as pe}from"./usePaging.23706826.js";import{u as ie}from"./useDictOptions.4fbfb4d7.js";import{e as ne}from"./warehouse_product.d57b2a29.js";import"./lodash.6bfd3540.js";import"./index.81df6f20.js";import{_ as de}from"./edit.vue_vue_type_script_setup_true_name_psiWarehouseProductEdit_lang.d93a321e.js";import{h as k}from"./moment.40bc58bf.js";import{a as me}from"./warehouse.77723b1e.js";import{a as _e}from"./system_store.9ac735ff.js";import{a as ce}from"./supplier.62efcbb1.js";import{d as U,s as fe,r as d,Z as we,o as s,c as w,U as e,L as u,u as t,T as h,a9 as F,K as _,i as x,R as L,M as be,a as S,Q as ve}from"./@vue.821a47ec.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"./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";import"./index.f292cd50.js";const Ee={class:"mt-4"},he={class:"flex mt-4 justify-end"},Fe=U({name:"psiWarehouseProductLists"}),no=U({...Fe,setup(Ce){const T=fe(),C=d(!1),g=d([]),Y=()=>{me({page_size:999}).then(p=>{g.value=p.lists})},V=d([]),M=()=>{_e({page_size:999}).then(p=>{V.value=p.lists})},c=d(!1),D=d([]),P=(p="")=>{c.value=!0,ce({mer_name:p}).then(l=>{D.value=l.lists,setTimeout(()=>{c.value=!1},300)}).catch(l=>{setTimeout(()=>{c.value=!1},300)})},a=we({warehouse_id:"",supplier_id:"",store_id:"",order_type:"",product_name:"",bar_code:"",oid:"",code:"",pay_type:"",status:"",start_time:"",end_time:""}),n=d([]),N=()=>{n.value[0]&&n.value[1]?(a.start_time=k(n.value[0]).format("YYYY-MM-DD")+" 00:00:00",a.end_time=k(n.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(a.start_time="",a.end_time=""),f()},R=d([]),I=p=>{R.value=p.map(({id:l})=>l)},{dictData:W}=ie("product_type"),{pager:m,getLists:f,resetParams:$,resetPage:z}=pe({fetchFun:ne,params:a});return Y(),M(),f(),(p,l)=>{const b=J,v=K,i=le,E=te,O=Q,y=ae,j=ue,B=Z,r=X,q=re,A=ee,G=se,H=oe;return s(),w("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(j,{class:"mb-[-16px]",model:t(a),inline:""},{default:u(()=>[e(i,{class:"w-[220px]",label:"\u4ED3\u5E93",prop:"warehouse_id"},{default:u(()=>[e(v,{modelValue:t(a).warehouse_id,"onUpdate:modelValue":l[0]||(l[0]=o=>t(a).warehouse_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u4ED3\u5E93",style:{width:"240px"}},{default:u(()=>[(s(!0),w(h,null,F(t(g),o=>(s(),_(b,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{class:"w-[220px]",label:"\u95E8\u5E97",prop:"store_id"},{default:u(()=>[e(v,{modelValue:t(a).store_id,"onUpdate:modelValue":l[1]||(l[1]=o=>t(a).store_id=o),filterable:"",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u95E8\u5E97",style:{width:"240px"}},{default:u(()=>[(s(!0),w(h,null,F(t(V),o=>(s(),_(b,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(i,{class:"w-[220px]",label:"\u4F9B\u5E94\u5546",prop:"store_id"},{default:u(()=>[e(v,{modelValue:t(a).supplier_id,"onUpdate:modelValue":l[2]||(l[2]=o=>t(a).supplier_id=o),filterable:"",clearable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u4F9B\u5E94\u5546\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":P,loading:t(c)},{default:u(()=>[(s(!0),w(h,null,F(t(D),o=>(s(),_(b,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading"])]),_:1}),e(i,{label:"\u5546\u54C1",prop:"product_name"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:t(a).product_name,"onUpdate:modelValue":l[3]||(l[3]=o=>t(a).product_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(i,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:t(a).bar_code,"onUpdate:modelValue":l[4]||(l[4]=o=>t(a).bar_code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(i,{label:"\u5165\u5E93\u5355\u53F7",prop:"code"},{default:u(()=>[e(E,{class:"w-[280px]",modelValue:t(a).code,"onUpdate:modelValue":l[5]||(l[5]=o=>t(a).code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5165\u5E93\u5355\u53F7"},null,8,["modelValue"])]),_:1}),e(i,{label:"\u65E5\u671F",prop:"create_time"},{default:u(()=>[e(O,{modelValue:t(n),"onUpdate:modelValue":l[6]||(l[6]=o=>x(n)?n.value=o:null),type:"daterange","range-separator":"\u81F3","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","unlink-panels":"",onChange:N},null,8,["modelValue"])]),_:1}),e(i,null,{default:u(()=>[e(y,{type:"primary",onClick:t(z)},{default:u(()=>l[9]||(l[9]=[L("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(y,{onClick:t($)},{default:u(()=>l[10]||(l[10]=[L("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),be((s(),_(B,{class:"!border-none",shadow:"never"},{default:u(()=>[S("div",Ee,[e(A,{data:t(m).lists,onSelectionChange:I},{default:u(()=>[e(r,{label:"ID",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u5165\u5E93\u5355\u53F7",prop:"code","show-overflow-tooltip":"","min-width":"110"}),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:o})=>[e(q,{style:{width:"50px",height:"50px"},src:o.image,"preview-teleported":!0,"preview-src-list":[o.image]},null,8,["src","preview-src-list"])]),_:1}),e(r,{label:"\u6279\u6B21",prop:"batch","show-overflow-tooltip":""}),e(r,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(r,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(r,{label:"\u603B\u4EF7\u683C",prop:"total_price","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(r,{label:"\u5907\u6CE8",prop:"mark","show-overflow-tooltip":""})]),_:1},8,["data"])]),S("div",he,[e(G,{modelValue:t(m),"onUpdate:modelValue":l[7]||(l[7]=o=>x(m)?m.value=o:null),onChange:t(f)},null,8,["modelValue","onChange"])])]),_:1})),[[H,t(m).loading]]),t(C)?(s(),_(de,{key:0,ref_key:"editRef",ref:T,"dict-data":t(W),onSuccess:t(f),onClose:l[8]||(l[8]=o=>C.value=!1)},null,8,["dict-data","onSuccess"])):ve("",!0)])}}});export{no as default};