2 lines
7.1 KiB
JavaScript
2 lines
7.1 KiB
JavaScript
import{C as M,D as O,w as Z,F as z,T as H,O as J,b as W,Q as X,R as Y}from"./element-plus.bccb9376.js";import{_ as oo}from"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import{f as eo,b as to}from"./index.68fb39c6.js";import{u as lo}from"./usePaging.6a6670f9.js";import{u as ao}from"./useDictOptions.a4142f6d.js";import{f as io,a as uo}from"./goods.3c9bcb60.js";import"./lodash.466e9fe4.js";import{_ as ro}from"./edit.vue_vue_type_script_setup_true_name_goodsEdit_lang.9316b30b.js";import{_ as so}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.83db7b04.js";import{d as L,s as x,r as D,Z as no,ap as po,o as n,c as mo,U as o,L as l,u as t,R as m,M as f,K as d,a as $,j as co,Q as R,n as E}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./dialogTableConfig.62bb260f.js";import"./goods_label.1fae9da6.js";import"./picker.1a023d0c.js";import"./index.49b5f729.js";import"./index.8558506a.js";import"./index.98da9f68.js";import"./vuedraggable.9f282753.js";import"./vue.e5198d72.js";import"./sortablejs.6fa237f8.js";import"./goodsclass.1edf5349.js";import"./brand.ece289ec.js";import"./unit.0fd28ec6.js";import"./warehouse.e30337eb.js";const fo={class:"mt-4"},_o={class:"flex mt-4 justify-end"},Co=L({name:"goodsLists"}),Te=L({...Co,setup(wo){const _=x(),F=x(),C=D(!1),g=D(!1),s=no({name:"",class:"",brand:"",unit:"",code:"",warehouse:"",retail_name:"",sort:""}),h=D([]),P=u=>{h.value=u.map(({id:e})=>e)},{dictData:k}=ao(""),{pager:c,getLists:w,resetParams:T,resetPage:U}=lo({fetchFun:uo,params:s}),I=async()=>{var u;C.value=!0,await E(),(u=_.value)==null||u.open("add")},N=async u=>{var e,r;C.value=!0,await E(),(e=_.value)==null||e.open("edit"),(r=_.value)==null||r.setFormData(u)},S=async u=>{var e,r;g.value=!0,await E(),(e=F.value)==null||e.open("edit"),(r=F.value)==null||r.setFormData(u)},y=async u=>{await eo.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await io({id:u}),w()};return w(),(u,e)=>{const r=M,v=O,p=Z,j=z,V=H,A=to,a=J,G=W,Q=X,q=oo,b=po("perms"),K=Y;return n(),mo("div",null,[o(V,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[o(j,{class:"mb-[-16px]",model:t(s),inline:""},{default:l(()=>[o(v,{label:"\u5546\u54C1\u540D\u79F0",prop:"name"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(s).name,"onUpdate:modelValue":e[0]||(e[0]=i=>t(s).name=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(v,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(s).brand,"onUpdate:modelValue":e[1]||(e[1]=i=>t(s).brand=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u54C1\u724C"},null,8,["modelValue"])]),_:1}),o(v,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit"},{default:l(()=>[o(r,{class:"w-[280px]",modelValue:t(s).unit,"onUpdate:modelValue":e[2]||(e[2]=i=>t(s).unit=i),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5355\u4F4D"},null,8,["modelValue"])]),_:1}),o(v,null,{default:l(()=>[o(p,{type:"primary",onClick:t(U)},{default:l(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),o(p,{onClick:t(T)},{default:l(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((n(),d(V,{class:"!border-none",shadow:"never"},{default:l(()=>[f((n(),d(p,{type:"primary",onClick:I},{icon:l(()=>[o(A,{name:"el-icon-Plus"})]),default:l(()=>[m(" \u65B0\u589E ")]),_:1})),[[b,["goods.goods/add"]]]),f((n(),d(p,{disabled:!t(h).length,onClick:e[3]||(e[3]=i=>y(t(h)))},{default:l(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[b,["goods.goods/delete"]]]),$("div",fo,[o(Q,{data:t(c).lists,onSelectionChange:P},{default:l(()=>[o(a,{type:"selection",width:"55"}),o(a,{label:"ID",prop:"id",width:"55"}),o(a,{label:"\u5546\u54C1\u56FE\u7247",prop:"imgs"},{default:l(({row:i})=>[o(G,{style:{width:"50px",height:"50px"},src:i.imgs},null,8,["src"])]),_:1}),o(a,{label:"\u5546\u54C1\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(a,{label:"\u89C4\u683C\u578B\u53F7",prop:"spec","show-overflow-tooltip":""}),o(a,{label:"\u5546\u54C1\u5206\u7C7B",prop:"class_name","show-overflow-tooltip":""}),o(a,{label:"\u5546\u54C1\u54C1\u724C",prop:"brand_name","show-overflow-tooltip":""}),o(a,{label:"\u5546\u54C1\u5355\u4F4D",prop:"unit_name","show-overflow-tooltip":""}),o(a,{label:"\u8D2D\u8D27\u4EF7\u683C",prop:"buy","show-overflow-tooltip":""}),o(a,{label:"\u9500\u8D27\u4EF7\u683C",prop:"sell","show-overflow-tooltip":""}),o(a,{label:"\u96F6\u552E\u4EF7\u683C",prop:"retail","show-overflow-tooltip":""}),o(a,{label:"\u6761\u5F62\u7801",prop:"code","show-overflow-tooltip":""}),o(a,{label:"\u5E93\u5B58\u9608\u503C",prop:"stocktip","show-overflow-tooltip":""}),o(a,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),o(a,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),o(a,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:l(({row:i})=>[f((n(),d(p,{type:"primary",link:"",onClick:B=>N(i)},{default:l(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[b,["goods.goods/edit"]]]),f((n(),d(p,{type:"danger",link:"",onClick:B=>y(i.id)},{default:l(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[b,["goods.goods/delete"]]]),o(p,{link:"",onClick:B=>S(i)},{default:l(()=>[m(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),$("div",_o,[o(q,{modelValue:t(c),"onUpdate:modelValue":e[4]||(e[4]=i=>co(c)?c.value=i:null),onChange:t(w)},null,8,["modelValue","onChange"])])]),_:1})),[[K,t(c).loading]]),t(C)?(n(),d(ro,{key:0,ref_key:"editRef",ref:_,"dict-data":t(k),onSuccess:t(w),onClose:e[5]||(e[5]=i=>C.value=!1)},null,8,["dict-data","onSuccess"])):R("",!0),t(g)?(n(),d(so,{key:1,ref_key:"detailRef",ref:F,"dict-data":t(k),onClose:e[6]||(e[6]=i=>g.value=!1)},null,8,["dict-data"])):R("",!0)])}}});export{Te as default};
|