ERP-admin/build/admin/assets/index.d89c59ce.js

2 lines
8.0 KiB
JavaScript

import{C as O,D as Q,w as Z,F as z,L as H,M as J,b as W,N as X,O as Y}from"./element-plus.73c9e9a6.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.317e431e.js";import{f as oe,b as le}from"./index.bd5cd373.js";import{u as ae}from"./usePaging.77fa9d39.js";import{u as ue}from"./useDictOptions.3ea9a314.js";import{d as te,e as se}from"./goods.7f25c2f3.js";import"./lodash.403d4198.js";import{_ as re}from"./edit.vue_vue_type_script_setup_true_name_goodsEdit_lang.77841cff.js";import{_ as ne}from"./details.vue_vue_type_script_setup_true_name_goodsDetails_lang.c635d4bb.js";import{d as R,s as x,r as h,Z as pe,ap as ie,o as i,c as de,U as e,L as u,u as l,R as m,M as _,K as c,a as U,j as me,Q as $,n as g}from"./@vue.663bc523.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./picker.903854da.js";import"./index.fa58e261.js";import"./index.fec21d03.js";import"./index.b3eba7ba.js";import"./vuedraggable.917b44c2.js";import"./vue.648d3a8e.js";import"./sortablejs.86ceda0b.js";import"./goodsclass.7fa15708.js";import"./brand.4eabb91c.js";import"./unit.14e32b28.js";import"./warehouse.72d94fe4.js";const ce={class:"mt-4"},fe={class:"flex mt-4 justify-end"},_e=R({name:"goodsLists"}),po=R({..._e,setup(we){const w=x(),v=x(),C=h(!1),E=h(!1),s=pe({name:"",class:"",brand:"",unit:"",code:"",warehouse:"",retail_name:"",sort:""}),D=h([]),L=n=>{D.value=n.map(({id:o})=>o)},{dictData:V}=ue(""),{pager:f,getLists:F,resetParams:A,resetPage:N}=ae({fetchFun:se,params:s}),P=async()=>{var n;C.value=!0,await g(),(n=w.value)==null||n.open("add")},I=async n=>{var o,r;C.value=!0,await g(),(o=w.value)==null||o.open("edit"),(r=w.value)==null||r.setFormData(n)},S=async n=>{var o,r;E.value=!0,await g(),(o=v.value)==null||o.open(),(r=v.value)==null||r.getDetail(n)},B=async n=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:n}),F()};return F(),(n,o)=>{const r=O,p=Q,d=Z,T=z,k=H,j=le,t=J,G=W,M=X,q=ee,b=ie("perms"),K=Y;return i(),de("div",null,[e(k,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(T,{class:"mb-[-16px]",model:l(s),inline:""},{default:u(()=>[e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).name,"onUpdate:modelValue":o[0]||(o[0]=a=>l(s).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).class,"onUpdate:modelValue":o[1]||(o[1]=a=>l(s).class=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).brand,"onUpdate:modelValue":o[2]||(o[2]=a=>l(s).brand=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u54C1\u724C"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).unit,"onUpdate:modelValue":o[3]||(o[3]=a=>l(s).unit=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6761\u5F62\u7801",prop:"code"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).code,"onUpdate:modelValue":o[4]||(o[4]=a=>l(s).code=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6761\u5F62\u7801"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u9ED8\u8BA4\u4ED3\u5E93",prop:"warehouse"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).warehouse,"onUpdate:modelValue":o[5]||(o[5]=a=>l(s).warehouse=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u9ED8\u8BA4\u4ED3\u5E93"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u96F6\u552E\u540D\u79F0",prop:"retail_name"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).retail_name,"onUpdate:modelValue":o[6]||(o[6]=a=>l(s).retail_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u96F6\u552E\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(p,{label:"\u6392\u5E8F",prop:"sort"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:l(s).sort,"onUpdate:modelValue":o[7]||(o[7]=a=>l(s).sort=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(p,null,{default:u(()=>[e(d,{type:"primary",onClick:l(N)},{default:u(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:l(A)},{default:u(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),c(k,{class:"!border-none",shadow:"never"},{default:u(()=>[_((i(),c(d,{type:"primary",onClick:P},{icon:u(()=>[e(j,{name:"el-icon-Plus"})]),default:u(()=>[m(" \u65B0\u589E ")]),_:1})),[[b,["goods.goods/add"]]]),_((i(),c(d,{disabled:!l(D).length,onClick:o[8]||(o[8]=a=>B(l(D)))},{default:u(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[b,["goods.goods/delete"]]]),U("div",ce,[e(M,{data:l(f).lists,onSelectionChange:L},{default:u(()=>[e(t,{type:"selection",width:"55"}),e(t,{label:"ID",prop:"id",width:"55"}),e(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"imgs"},{default:u(({row:a})=>[e(G,{style:{width:"50px",height:"50px"},src:a.imgs},null,8,["src"])]),_:1}),e(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(t,{label:"\u9996\u62FC\u5B57\u6BCD",prop:"py","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(t,{label:"\u89C4\u683C\u578B\u53F7",prop:"spec","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class_name","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand_name","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),e(t,{label:"\u8D2D\u8D27\u4EF7\u683C",prop:"buy","show-overflow-tooltip":""}),e(t,{label:"\u9500\u8D27\u4EF7\u683C",prop:"sell","show-overflow-tooltip":""}),e(t,{label:"\u96F6\u552E\u4EF7\u683C",prop:"retail","show-overflow-tooltip":""}),e(t,{label:"\u6761\u5F62\u7801",prop:"code","show-overflow-tooltip":""}),e(t,{label:"\u9ED8\u8BA4\u4ED3\u5E93",prop:"warehouse_name","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u8D27\u4F4D",prop:"location","show-overflow-tooltip":""}),e(t,{label:"\u5E93\u5B58\u9608\u503C",prop:"stocktip","show-overflow-tooltip":""}),e(t,{label:"\u96F6\u552E\u540D\u79F0",prop:"retail_name","show-overflow-tooltip":""}),e(t,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(t,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(t,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:a})=>[_((i(),c(d,{type:"primary",link:"",onClick:y=>I(a)},{default:u(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["goods.goods/edit"]]]),e(d,{type:"primary",link:"",onClick:y=>S(a)},{default:u(()=>[m(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"]),_((i(),c(d,{type:"danger",link:"",onClick:y=>B(a.id)},{default:u(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["goods.goods/delete"]]])]),_:1})]),_:1},8,["data"])]),U("div",fe,[e(q,{modelValue:l(f),"onUpdate:modelValue":o[9]||(o[9]=a=>me(f)?f.value=a:null),onChange:l(F)},null,8,["modelValue","onChange"])])]),_:1})),[[K,l(f).loading]]),l(C)?(i(),c(re,{key:0,ref_key:"editRef",ref:w,"dict-data":l(V),onSuccess:l(F),onClose:o[10]||(o[10]=a=>C.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),l(E)?(i(),c(ne,{key:1,ref_key:"detailRef",ref:v,"dict-data":l(V),onClose:o[11]||(o[11]=a=>E.value=!1)},null,8,["dict-data"])):$("",!0)])}}});export{po as default};