2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
import{L as U,M as T,N as q,O as I,B as M,C as W,w as j,D as K}from"./element-plus.2acb577d.js";import{_ as O}from"./index.vue_vue_type_script_setup_true_lang.a280d02d.js";import{f as Q,b as Z}from"./index.81df6f20.js";import{u as z}from"./usePaging.23706826.js";import{u as G}from"./useDictOptions.4fbfb4d7.js";import{e as H,a as J}from"./warehouse.77723b1e.js";import{d as g,s as X,r as B,Z as Y,ah as ee,am as oe,o as r,c as te,U as e,L as l,u as t,R as i,M as _,K as d,a as h,S as le,i as ae,Q as se,n as ue}from"./@vue.821a47ec.js";import"./lodash.6bfd3540.js";import{_ as ne}from"./edit.vue_vue_type_script_setup_true_name_warehouseEdit_lang.1e9d185a.js";import"./lodash-es.df44a280.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.81e2759c.js";import"./@element-plus.dabbc398.js";import"./dayjs.d2a77ee0.js";import"./axios.9e996410.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.4c04f9b6.js";import"./pinia.fefed778.js";import"./css-color-function.8ff67959.js";import"./color.bfa08e9a.js";import"./clone.660f80c4.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.dcb32030.js";import"./vue-clipboard3.e681583f.js";import"./clipboard.3ad9b20b.js";import"./echarts.42bea269.js";import"./tslib.60310f1a.js";import"./zrender.2cb48b70.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8864a4be.js";import"./index.f292cd50.js";const re={class:"mt-4"},ie={class:"flex mt-4 justify-end"},pe=g({name:"warehouseLists"}),He=g({...pe,setup(me){const b=X(),w=B(!1),u=Y({name:"",contacts:"",tel:""}),C=B([]),k=n=>{C.value=n.map(({id:o})=>o)},{dictData:V}=G(""),{pager:p,getLists:c,resetParams:y,resetPage:x}=z({fetchFun:J,params:u}),L=async()=>{var n;w.value=!0,await ue(),(n=b.value)==null||n.open("add")},F=async n=>{await Q.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await H({id:n}),c()};return c(),(n,o)=>{const E=M,f=W,m=j,S=K,D=U,$=Z,s=T,A=ee("router-link"),N=q,P=O,v=oe("perms"),R=I;return r(),te("div",null,[e(D,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(S,{class:"mb-[-16px]",model:t(u),inline:""},{default:l(()=>[e(f,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"name"},{default:l(()=>[e(E,{class:"w-[280px]",modelValue:t(u).name,"onUpdate:modelValue":o[0]||(o[0]=a=>t(u).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts"},{default:l(()=>[e(E,{class:"w-[280px]",modelValue:t(u).contacts,"onUpdate:modelValue":o[1]||(o[1]=a=>t(u).contacts=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(f,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel"},{default:l(()=>[e(E,{class:"w-[280px]",modelValue:t(u).tel,"onUpdate:modelValue":o[2]||(o[2]=a=>t(u).tel=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(f,null,{default:l(()=>[e(m,{type:"primary",onClick:t(x)},{default:l(()=>o[6]||(o[6]=[i("\u67E5\u8BE2")])),_:1},8,["onClick"]),e(m,{onClick:t(y)},{default:l(()=>o[7]||(o[7]=[i("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((r(),d(D,{class:"!border-none",shadow:"never"},{default:l(()=>[_((r(),d(m,{type:"primary",onClick:L},{icon:l(()=>[e($,{name:"el-icon-Plus"})]),default:l(()=>[o[8]||(o[8]=i(" \u65B0\u589E "))]),_:1})),[[v,["admin.warehouse/add"]]]),_((r(),d(m,{disabled:!t(C).length,onClick:o[3]||(o[3]=a=>F(t(C)))},{default:l(()=>o[9]||(o[9]=[i(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[v,["admin.warehouse/delete"]]]),h("div",re,[e(N,{data:t(p).lists,onSelectionChange:k},{default:l(()=>[e(s,{type:"selection",width:"55"}),e(s,{label:"",prop:"id","show-overflow-tooltip":""}),e(s,{label:"\u4ED3\u5E93\u540D\u79F0","show-overflow-tooltip":""},{default:l(({row:a})=>[e(A,{to:{path:"warehouse_storege",query:{id:a.id}},class:"ml-4 text-success"},{default:l(()=>[i(le(a.name),1)]),_:2},1032,["to"])]),_:1}),e(s,{label:"\u4ED3\u5E93\u7F16\u53F7",prop:"code","show-overflow-tooltip":""}),e(s,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts","show-overflow-tooltip":""}),e(s,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel","show-overflow-tooltip":""}),e(s,{label:"\u4ED3\u5E93\u5730\u5740",prop:"address","show-overflow-tooltip":""}),e(s,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"notes","show-overflow-tooltip":""}),e(s,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(s,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:l(({row:a})=>[_((r(),d(m,{type:"danger",link:"",onClick:de=>F(a.id)},{default:l(()=>o[10]||(o[10]=[i(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[v,["admin.warehouse/delete"]]])]),_:1})]),_:1},8,["data"])]),h("div",ie,[e(P,{modelValue:t(p),"onUpdate:modelValue":o[4]||(o[4]=a=>ae(p)?p.value=a:null),onChange:t(c)},null,8,["modelValue","onChange"])])]),_:1})),[[R,t(p).loading]]),t(w)?(r(),d(ne,{key:0,ref_key:"editRef",ref:b,"dict-data":t(V),onSuccess:t(c),onClose:o[5]||(o[5]=a=>w.value=!1)},null,8,["dict-data","onSuccess"])):se("",!0)])}}});export{He as default};
|