2 lines
8.3 KiB
JavaScript
2 lines
8.3 KiB
JavaScript
import{U as oe,J as te,K as ae,D as le,C as ue,w as re,F as se,L as ne,M as ie,b as pe,N as de,O as me}from"./element-plus.4a7d92a3.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{f as _e,b as fe}from"./index.cb6439ac.js";import{_ as he}from"./index.vue_vue_type_script_setup_true_lang.e90b1001.js";import{u as we}from"./usePaging.6a6670f9.js";import{u as ve}from"./useDictOptions.26a6ab01.js";import{a as L,_ as be,b as Ee,c as Fe}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.143eb69e.js";import{d as Y,s as Ce,r as v,Z as ge,i as De,ap as ke,o as n,c as T,U as e,L as l,u as t,a as g,T as ye,a9 as Ve,K as i,j as $,R as m,M as h,S as xe,Q as y,n as M}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{a as Be}from"./system_store.f6bfaa18.js";import{h as U}from"./moment.40bc58bf.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.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.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.1ffeb9ae.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.5d894292.js";import"./store_product.b280756e.js";import"./store_branch_product.364cf925.js";import"./warehouse_product_storege.8548ef41.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.f5c2be47.js";import"./warehouse.0f2d639e.js";const Pe={class:"flex items-center mr-4"},Se={class:"mt-4"},Le={style:{color:"red"}},Te={class:"flex mt-4 justify-end"},$e=Y({name:"warehouseProductLists"}),Bo=Y({...$e,setup(Me){const b=Ce(),E=v(!1),r=ge({warehouse_id:"",product_id:"",financial_pm:1,store_id:"",bar_code:"",start_time:"",end_time:""}),D=v([]),A=s=>{D.value=s.map(({id:a})=>a)},{dictData:N}=ve("warehouse_produc_pm"),{pager:c,getLists:_,resetParams:R,resetPage:V}=we({fetchFun:L,params:r}),z=async()=>{var s;E.value=!0,await M(),(s=b.value)==null||s.open("add")},I=async s=>{var a,C;E.value=!0,await M(),(a=b.value)==null||a.open("edit"),(C=b.value)==null||C.setFormData(s)},W=async s=>{await Ee({id:s}),_()},x=async s=>{await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Fe({id:s}),_()},p=v([]),j=()=>{p.value[0]&&p.value[1]?(r.start_time=U(p.value[0]).format("YYYY-MM-DD")+" 00:00:00",r.end_time=U(p.value[1]).format("YYYY-MM-DD")+" 23:59:59"):(r.start_time="",r.end_time=""),_()},F=v(!1),B=v([]),K=(s="")=>{F.value=!0,Be({name:s,page_size:50}).then(a=>{B.value=a.lists,setTimeout(()=>{F.value=!1},300)}).catch(a=>{setTimeout(()=>{F.value=!1},300)})};return De(()=>{_()}),(s,a)=>{const C=te,O=ae,f=le,k=ue,q=oe,d=re,J=he,Q=se,P=ne,Z=fe,u=ie,G=pe,H=de,X=ce,w=ke("perms"),ee=me;return n(),T("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(Q,{class:"mb-[-16px]",model:t(r),inline:""},{default:l(()=>[e(f,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:l(()=>[g("div",Pe,[e(O,{modelValue:t(r).store_id,"onUpdate:modelValue":a[0]||(a[0]=o=>t(r).store_id=o),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":K,loading:t(F),style:{width:"240px"},onChange:t(V)},{default:l(()=>[(n(!0),T(ye,null,Ve(t(B),o=>(n(),i(C,{key:o.id,label:o.name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(f,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[e(k,{class:"w-[280px]",modelValue:t(r).warehouse_id,"onUpdate:modelValue":a[1]||(a[1]=o=>t(r).warehouse_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u5546\u54C1",prop:"product_id"},{default:l(()=>[e(k,{class:"w-[280px]",modelValue:t(r).product_id,"onUpdate:modelValue":a[2]||(a[2]=o=>t(r).product_id=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u5546\u54C1\u6761\u7801",prop:"bar_code"},{default:l(()=>[e(k,{class:"w-[280px]",modelValue:t(r).bar_code,"onUpdate:modelValue":a[3]||(a[3]=o=>t(r).bar_code=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6761\u7801"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u65E5\u671F",prop:"create_time"},{default:l(()=>[e(q,{modelValue:t(p),"onUpdate:modelValue":a[4]||(a[4]=o=>$(p)?p.value=o: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(f,null,{default:l(()=>[e(d,{type:"primary",onClick:t(V)},{default:l(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:t(R)},{default:l(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(J,{class:"ml-2.5","fetch-fun":t(L),params:t(r),"page-size":t(c).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),h((n(),i(P,{class:"!border-none",shadow:"never"},{default:l(()=>[h((n(),i(d,{type:"primary",onClick:z},{icon:l(()=>[e(Z,{name:"el-icon-Plus"})]),default:l(()=>[m(" \u65B0\u589E ")]),_:1})),[[w,["warehouse_product.warehouse_product/add"]]]),h((n(),i(d,{disabled:!t(D).length,onClick:a[5]||(a[5]=o=>x(t(D)))},{default:l(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["warehouse_product.warehouse_product/delete"]]]),g("div",Se,[e(H,{data:t(c).lists,onSelectionChange:A},{default:l(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"id",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_name","show-overflow-tooltip":""}),e(u,{label:"\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(u,{label:"\u5546\u54C1",prop:"store_name","show-overflow-tooltip":""}),e(u,{label:"\u56FE\u7247",prop:"image","min-width":"80"},{default:l(({row:o})=>[e(G,{style:{width:"50px",height:"50px"},src:o.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(u,{label:"\u51FA\u5165\u5E93",prop:"financial_pm_name","show-overflow-tooltip":""}),e(u,{label:"\u6279\u6B21",prop:"batch","show-overflow-tooltip":""}),e(u,{label:"\u6570\u91CF",prop:"nums","show-overflow-tooltip":""}),e(u,{label:"\u751F\u4EA7\u671F",prop:"manufacture","show-overflow-tooltip":""}),e(u,{label:"\u4FDD\u8D28\u671F",prop:"expiration_date","show-overflow-tooltip":""}),e(u,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(u,{label:"\u5546\u6237\u4EF7",prop:"cost","show-overflow-tooltip":""}),e(u,{label:"\u96F6\u552E\u4EF7",prop:"price","show-overflow-tooltip":""}),e(u,{label:"\u603B\u4EF7",prop:"total_price","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(u,{label:"\u5907\u6CE8","show-overflow-tooltip":""},{default:l(({row:o})=>[g("span",Le,xe(o.mark),1)]),_:1}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:o})=>[o.status==0?h((n(),i(d,{key:0,type:"primary",link:"",onClick:S=>I(o)},{default:l(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/edit"]]]):y("",!0),h((n(),i(d,{type:"danger",link:"",onClick:S=>x(o.id)},{default:l(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/delete"]]]),o.status==0?h((n(),i(d,{key:1,type:"primary",link:"",onClick:S=>W(o.id)},{default:l(()=>[m(" \u786E\u8BA4 ")]),_:2},1032,["onClick"])),[[w,["warehouse_product.warehouse_product/enter"]]]):y("",!0)]),_:1})]),_:1},8,["data"])]),g("div",Te,[e(X,{modelValue:t(c),"onUpdate:modelValue":a[6]||(a[6]=o=>$(c)?c.value=o:null),onChange:t(_)},null,8,["modelValue","onChange"])])]),_:1})),[[ee,t(c).loading]]),t(E)?(n(),i(be,{key:0,ref_key:"editRef",ref:b,"dict-data":t(N),onSuccess:t(_),onClose:a[7]||(a[7]=o=>E.value=!1)},null,8,["dict-data","onSuccess"])):y("",!0)])}}});export{Bo as default};
|