2 lines
7.7 KiB
JavaScript
2 lines
7.7 KiB
JavaScript
import{C as Q,D as q,K as M,L as Z,w as z,F as G,T as H,O as J,Q as W,R as X}from"./element-plus.681b9893.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.58d80c54.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.2914ee54.js";import{f as oe,b as le}from"./index.0c8416f0.js";import{u as te}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.b307efcf.js";import{_ as ae,a as pe,b as re}from"./edit.vue_vue_type_script_setup_true_name_customerEdit_lang.ac6dae1c.js";import"./lodash.466e9fe4.js";import{d as A,s as ne,r as k,Z as se,ap as ie,o as i,c as g,U as e,L as u,u as o,T as me,a9 as de,K as m,R as c,M as f,a as h,j as ce,Q as _e,n as x}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"./index.a7179cc9.js";const fe={class:"mt-4"},Be={class:"flex mt-4 justify-end"},be=A({name:"customerLists"}),Eo=A({...be,setup(ve){const B=ne(),b=k(!1),a=se({name:"",number:"",contacts:"",tel:"",customer_type:"",dept_type:"",related_suppliers:"",invoice_type:""}),C=k([]),U=n=>{C.value=n.map(({id:l})=>l)},{dictData:w}=ue("invoice_type"),{pager:_,getLists:v,resetParams:$,resetPage:L}=te({fetchFun:re,params:a}),R=async()=>{var n;b.value=!0,await x(),(n=B.value)==null||n.open("add")},T=async n=>{var l,r;b.value=!0,await x(),(l=B.value)==null||l.open("edit"),(r=B.value)==null||r.setFormData(n)},E=async n=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:n}),v()};return v(),(n,l)=>{const r=Q,s=q,V=M,P=Z,d=z,S=G,D=H,N=le,p=J,j=ee,I=W,K=Y,F=ie("perms"),O=X;return i(),g("div",null,[e(D,{class:"!border-none mb-4",shadow:"never"},{default:u(()=>[e(S,{class:"mb-[-16px]",model:o(a),inline:""},{default:u(()=>[e(s,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).name,"onUpdate:modelValue":l[0]||(l[0]=t=>o(a).name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5BA2\u6237\u7F16\u53F7",prop:"number"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).number,"onUpdate:modelValue":l[1]||(l[1]=t=>o(a).number=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).contacts,"onUpdate:modelValue":l[2]||(l[2]=t=>o(a).contacts=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).tel,"onUpdate:modelValue":l[3]||(l[3]=t=>o(a).tel=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5BA2\u6237\u7C7B\u522B",prop:"customer_type"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).customer_type,"onUpdate:modelValue":l[4]||(l[4]=t=>o(a).customer_type=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u7C7B\u522B"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u7EC4\u7EC7\u67B6\u6784",prop:"dept_type"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).dept_type,"onUpdate:modelValue":l[5]||(l[5]=t=>o(a).dept_type=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u67B6\u6784"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5173\u8054\u4F9B\u5E94\u5546",prop:"related_suppliers"},{default:u(()=>[e(r,{class:"w-[280px]",modelValue:o(a).related_suppliers,"onUpdate:modelValue":l[6]||(l[6]=t=>o(a).related_suppliers=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u8054\u4F9B\u5E94\u5546"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:u(()=>[e(P,{class:"w-[280px]",modelValue:o(a).invoice_type,"onUpdate:modelValue":l[7]||(l[7]=t=>o(a).invoice_type=t),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u53D1\u7968\u7C7B\u578B"},{default:u(()=>[e(V,{label:"\u5168\u90E8",value:""}),(i(!0),g(me,null,de(o(w).invoice_type,(t,y)=>(i(),m(V,{key:y,label:t.name,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,null,{default:u(()=>[e(d,{type:"primary",onClick:o(L)},{default:u(()=>[c("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:o($)},{default:u(()=>[c("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),m(D,{class:"!border-none",shadow:"never"},{default:u(()=>[f((i(),m(d,{type:"primary",onClick:R},{icon:u(()=>[e(N,{name:"el-icon-Plus"})]),default:u(()=>[c(" \u65B0\u589E ")]),_:1})),[[F,["customer.customer/add"]]]),f((i(),m(d,{disabled:!o(C).length,onClick:l[8]||(l[8]=t=>E(o(C)))},{default:u(()=>[c(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[F,["customer.customer/delete"]]]),h("div",fe,[e(I,{data:o(_).lists,onSelectionChange:U},{default:u(()=>[e(p,{type:"selection",width:"55"}),e(p,{label:"",prop:"id","show-overflow-tooltip":""}),e(p,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(p,{label:"\u5BA2\u6237\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(p,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts","show-overflow-tooltip":""}),e(p,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel","show-overflow-tooltip":""}),e(p,{label:"\u5BA2\u6237\u7C7B\u522B",prop:"customer_type","show-overflow-tooltip":""}),e(p,{label:"\u7EC4\u7EC7\u67B6\u6784",prop:"dept_type","show-overflow-tooltip":""}),e(p,{label:"\u5173\u8054\u4F9B\u5E94\u5546",prop:"related_suppliers","show-overflow-tooltip":""}),e(p,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:u(({row:t})=>[e(j,{options:o(w).invoice_type,value:t.invoice_type},null,8,["options","value"])]),_:1}),e(p,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:u(({row:t})=>[f((i(),m(d,{type:"primary",link:"",onClick:y=>T(t)},{default:u(()=>[c(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[F,["customer.customer/edit"]]]),f((i(),m(d,{type:"danger",link:"",onClick:y=>E(t.id)},{default:u(()=>[c(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[F,["customer.customer/delete"]]])]),_:1})]),_:1},8,["data"])]),h("div",Be,[e(K,{modelValue:o(_),"onUpdate:modelValue":l[9]||(l[9]=t=>ce(_)?_.value=t:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[O,o(_).loading]]),o(b)?(i(),m(ae,{key:0,ref_key:"editRef",ref:B,"dict-data":o(w),onSuccess:o(v),onClose:l[10]||(l[10]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{Eo as default};
|