2 lines
7.3 KiB
JavaScript
2 lines
7.3 KiB
JavaScript
import{J as G,K as H,D as X,C as Y,w as ee,F as oe,L as te,M as ae,b as le,N as re,O as se}from"./element-plus.9e22693c.js";import{_ as ue}from"./index.vue_vue_type_script_setup_true_lang.153a119f.js";import{f as ie,b as ne}from"./index.56c7da87.js";import{_ as pe}from"./index.vue_vue_type_script_setup_true_lang.524981cd.js";import{u as de}from"./usePaging.6a6670f9.js";import{u as me}from"./useDictOptions.edc916f4.js";import{a as P,_ as ce,b as _e,c as fe}from"./edit.vue_vue_type_script_setup_true_name_warehouseProductEdit_lang.c504a1a9.js";import{d as T,s as he,r as C,Z as we,i as ve,ap as be,o as u,c as S,U as e,L as l,u as o,a as F,T as Ee,a9 as Ce,K as n,R as d,M as c,S as Fe,Q as k,j as ge,n as $}from"./@vue.18505fe0.js";import"./lodash.419afce2.js";import{a as ke}from"./system_store.9333c3b8.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.129a2796.js";import"./axios.d44c8eec.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.867692c9.js";import"./vue-clipboard3.d30f83bc.js";import"./clipboard.24da1bd3.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.b9cdeb0d.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.f1ed1fb4.js";import"./store_product.102bace4.js";import"./warehouse_product_storege.a5bdefa0.js";import"./warehouse.20a70818.js";const ye={class:"flex items-center mr-4"},De={class:"mt-4"},xe={style:{color:"red"}},Ve={class:"flex mt-4 justify-end"},Be=T({name:"warehouseProductLists"}),Co=T({...Be,setup(Le){const h=he(),w=C(!1),i=we({warehouse_id:"",product_id:"",financial_pm:1,store_id:""}),g=C([]),A=s=>{g.value=s.map(({id:a})=>a)},{dictData:N}=me("warehouse_produc_pm"),{pager:m,getLists:_,resetParams:R,resetPage:y}=de({fetchFun:P,params:i}),U=async()=>{var s;w.value=!0,await $(),(s=h.value)==null||s.open("add")},z=async s=>{var a,b;w.value=!0,await $(),(a=h.value)==null||a.open("edit"),(b=h.value)==null||b.setFormData(s)},I=async s=>{await _e({id:s}),_()},D=async s=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await fe({id:s}),_()},v=C(!1),x=C([]),M=(s="")=>{v.value=!0,ke({name:s,page_size:50}).then(a=>{x.value=a.lists,setTimeout(()=>{v.value=!1},300)}).catch(a=>{setTimeout(()=>{v.value=!1},300)})};return ve(()=>{_()}),(s,a)=>{const b=G,W=H,E=X,V=Y,p=ee,j=pe,K=oe,B=te,O=ne,r=ae,q=le,J=re,Q=ue,f=be("perms"),Z=se;return u(),S("div",null,[e(B,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(K,{class:"mb-[-16px]",model:o(i),inline:""},{default:l(()=>[e(E,{label:"\u95E8\u5E97\u540D\u79F0",prop:"store_id"},{default:l(()=>[F("div",ye,[e(W,{modelValue:o(i).store_id,"onUpdate:modelValue":a[0]||(a[0]=t=>o(i).store_id=t),filterable:"",remote:"","reserve-keyword":"",placeholder:"\u8F93\u5165\u95E8\u5E97\u540D\u79F0\u641C\u7D22","remote-show-suffix":"","remote-method":M,loading:o(v),style:{width:"240px"},onChange:o(y)},{default:l(()=>[(u(!0),S(Ee,null,Ce(o(x),t=>(u(),n(b,{key:t.id,label:t.name,value:t.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","onChange"])])]),_:1}),e(E,{label:"\u4ED3\u5E93ID",prop:"warehouse_id"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:o(i).warehouse_id,"onUpdate:modelValue":a[1]||(a[1]=t=>o(i).warehouse_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(E,{label:"\u5546\u54C1",prop:"product_id"},{default:l(()=>[e(V,{class:"w-[280px]",modelValue:o(i).product_id,"onUpdate:modelValue":a[2]||(a[2]=t=>o(i).product_id=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1"},null,8,["modelValue"])]),_:1}),e(E,null,{default:l(()=>[e(p,{type:"primary",onClick:o(y)},{default:l(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:o(R)},{default:l(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"]),e(j,{class:"ml-2.5","fetch-fun":o(P),params:o(i),"page-size":o(m).size},null,8,["fetch-fun","params","page-size"])]),_:1})]),_:1},8,["model"])]),_:1}),c((u(),n(B,{class:"!border-none",shadow:"never"},{default:l(()=>[c((u(),n(p,{type:"primary",onClick:U},{icon:l(()=>[e(O,{name:"el-icon-Plus"})]),default:l(()=>[d(" \u65B0\u589E ")]),_:1})),[[f,["warehouse_product.warehouse_product/add"]]]),c((u(),n(p,{disabled:!o(g).length,onClick:a[3]||(a[3]=t=>D(o(g)))},{default:l(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[f,["warehouse_product.warehouse_product/delete"]]]),F("div",De,[e(J,{data:o(m).lists,onSelectionChange:A},{default:l(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"id",prop:"id","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C\u4EBA\u5458",prop:"admin_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:l(({row:t})=>[e(q,{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:"\u6279\u6B21",prop:"batch","show-overflow-tooltip":""}),e(r,{label:"\u6570\u91CF",prop:"nums","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:"\u91C7\u8D2D\u4EF7",prop:"purchase","show-overflow-tooltip":""}),e(r,{label:"\u5546\u6237\u4EF7",prop:"cost","show-overflow-tooltip":""}),e(r,{label:"\u96F6\u552E\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:"\u5907\u6CE8","show-overflow-tooltip":""},{default:l(({row:t})=>[F("span",xe,Fe(t.mark),1)]),_:1}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:t})=>[t.status==0?c((u(),n(p,{key:0,type:"primary",link:"",onClick:L=>z(t)},{default:l(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[f,["warehouse_product.warehouse_product/edit"]]]):k("",!0),c((u(),n(p,{type:"danger",link:"",onClick:L=>D(t.id)},{default:l(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[f,["warehouse_product.warehouse_product/delete"]]]),t.status==0?c((u(),n(p,{key:1,type:"primary",link:"",onClick:L=>I(t.id)},{default:l(()=>[d(" \u786E\u8BA4 ")]),_:2},1032,["onClick"])),[[f,["warehouse_product.warehouse_product/enter"]]]):k("",!0)]),_:1})]),_:1},8,["data"])]),F("div",Ve,[e(Q,{modelValue:o(m),"onUpdate:modelValue":a[4]||(a[4]=t=>ge(m)?m.value=t:null),onChange:o(_)},null,8,["modelValue","onChange"])])]),_:1})),[[Z,o(m).loading]]),o(w)?(u(),n(ce,{key:0,ref_key:"editRef",ref:h,"dict-data":o(N),onSuccess:o(_),onClose:a[5]||(a[5]=t=>w.value=!1)},null,8,["dict-data","onSuccess"])):k("",!0)])}}});export{Co as default};
|