2 lines
5.4 KiB
JavaScript
2 lines
5.4 KiB
JavaScript
import{C as q,D as I,w as M,F as W,L as K,M as O,N as Q,O as Z}from"./element-plus.4a7d92a3.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{f as G,b as H}from"./index.9f0893c4.js";import{u as J}from"./usePaging.6a6670f9.js";import{u as X}from"./useDictOptions.3afb9a75.js";import{e as Y,a as ee}from"./warehouse.86d32635.js";import{d as g,s as oe,r as D,Z as te,af as ae,ap as le,o as r,c as ue,U as e,L as o,u as t,R as i,M as _,K as d,a as B,S as ne,j as se,Q as re,n as k}from"./@vue.18505fe0.js";import"./lodash.9dc701ad.js";import{_ as ie}from"./edit.vue_vue_type_script_setup_true_name_warehouseEdit_lang.50a3d3b8.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.61b33f8b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const pe={class:"mt-4"},me={class:"flex mt-4 justify-end"},de=g({name:"warehouseLists"}),Xe=g({...de,setup(ce){const f=oe(),w=D(!1),s=te({name:"",contacts:"",tel:""}),E=D([]),y=n=>{E.value=n.map(({id:a})=>a)},{dictData:V}=X(""),{pager:c,getLists:v,resetParams:x,resetPage:$}=J({fetchFun:ee,params:s}),L=async()=>{var n;w.value=!0,await k(),(n=f.value)==null||n.open("add")},S=async n=>{var a,p;w.value=!0,await k(),(a=f.value)==null||a.open("edit"),(p=f.value)==null||p.setFormData(n)},h=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Y({id:n}),v()};return v(),(n,a)=>{const p=q,C=I,m=M,A=W,b=K,N=H,u=O,P=ae("router-link"),R=Q,U=z,F=le("perms"),T=Z;return r(),ue("div",null,[e(b,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(A,{class:"mb-[-16px]",model:t(s),inline:""},{default:o(()=>[e(C,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"name"},{default:o(()=>[e(p,{class:"w-[280px]",modelValue:t(s).name,"onUpdate:modelValue":a[0]||(a[0]=l=>t(s).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(C,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts"},{default:o(()=>[e(p,{class:"w-[280px]",modelValue:t(s).contacts,"onUpdate:modelValue":a[1]||(a[1]=l=>t(s).contacts=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(C,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel"},{default:o(()=>[e(p,{class:"w-[280px]",modelValue:t(s).tel,"onUpdate:modelValue":a[2]||(a[2]=l=>t(s).tel=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(C,null,{default:o(()=>[e(m,{type:"primary",onClick:t($)},{default:o(()=>[i("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(m,{onClick:t(x)},{default:o(()=>[i("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((r(),d(b,{class:"!border-none",shadow:"never"},{default:o(()=>[_((r(),d(m,{type:"primary",onClick:L},{icon:o(()=>[e(N,{name:"el-icon-Plus"})]),default:o(()=>[i(" \u65B0\u589E ")]),_:1})),[[F,["admin.warehouse/add"]]]),_((r(),d(m,{disabled:!t(E).length,onClick:a[3]||(a[3]=l=>h(t(E)))},{default:o(()=>[i(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[F,["admin.warehouse/delete"]]]),B("div",pe,[e(R,{data:t(c).lists,onSelectionChange:y},{default:o(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"",prop:"id","show-overflow-tooltip":""}),e(u,{label:"\u4ED3\u5E93\u540D\u79F0","show-overflow-tooltip":""},{default:o(({row:l})=>[e(P,{to:{path:"product_import",query:{id:l.id}},class:"ml-4 text-success"},{default:o(()=>[i(ne(l.name),1)]),_:2},1032,["to"])]),_:1}),e(u,{label:"\u4ED3\u5E93\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),e(u,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts","show-overflow-tooltip":""}),e(u,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel","show-overflow-tooltip":""}),e(u,{label:"\u4ED3\u5E93\u5730\u5740",prop:"address","show-overflow-tooltip":""}),e(u,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"notes","show-overflow-tooltip":""}),e(u,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:o(({row:l})=>[_((r(),d(m,{type:"primary",link:"",onClick:j=>S(l)},{default:o(()=>[i(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[F,["admin.warehouse/edit"]]]),_((r(),d(m,{type:"danger",link:"",onClick:j=>h(l.id)},{default:o(()=>[i(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["admin.warehouse/delete"]]])]),_:1})]),_:1},8,["data"])]),B("div",me,[e(U,{modelValue:t(c),"onUpdate:modelValue":a[4]||(a[4]=l=>se(c)?c.value=l:null),onChange:t(v)},null,8,["modelValue","onChange"])])]),_:1})),[[T,t(c).loading]]),t(w)?(r(),d(ie,{key:0,ref_key:"editRef",ref:f,"dict-data":t(V),onSuccess:t(v),onClose:a[5]||(a[5]=l=>w.value=!1)},null,8,["dict-data","onSuccess"])):re("",!0)])}}});export{Xe as default};
|