2 lines
7.1 KiB
JavaScript
2 lines
7.1 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.619595c4.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.02c63712.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.2914ee54.js";import{f as le,b as oe}from"./index.adbcc6f1.js";import{u as te}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.2130484f.js";import{_ as ae,a as ne,b as se}from"./edit.vue_vue_type_script_setup_true_name_customerEdit_lang.2e663ff8.js";import"./lodash.0987e768.js";import{d as A,s as pe,r as k,Z as re,ap as ie,o as i,c as g,U as e,L as u,u as l,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.6ad9ae30.js";import"./axios.fbe06b45.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.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"./nprogress.316b9a3d.js";import"./vue-clipboard3.f9a42727.js";import"./clipboard.bf37ca4b.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.122ff80d.js";const fe={class:"mt-4"},Be={class:"flex mt-4 justify-end"},be=A({name:"customerLists"}),ol=A({...be,setup(ve){const B=pe(),b=k(!1),a=re({name:"",number:"",contacts:"",tel:"",customer_type:"",dept_type:"",related_suppliers:"",invoice_type:""}),C=k([]),U=p=>{C.value=p.map(({id:o})=>o)},{dictData:w}=ue("invoice_type"),{pager:_,getLists:v,resetParams:$,resetPage:L}=te({fetchFun:se,params:a}),R=async()=>{var p;b.value=!0,await x(),(p=B.value)==null||p.open("add")},T=async p=>{var o,s;b.value=!0,await x(),(o=B.value)==null||o.open("edit"),(s=B.value)==null||s.setFormData(p)},E=async p=>{await le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ne({id:p}),v()};return v(),(p,o)=>{const s=Q,r=q,V=M,P=Z,d=z,S=G,D=H,N=oe,n=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:l(a),inline:""},{default:u(()=>[e(r,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).name,"onUpdate:modelValue":o[0]||(o[0]=t=>l(a).name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5BA2\u6237\u7F16\u53F7",prop:"number"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).number,"onUpdate:modelValue":o[1]||(o[1]=t=>l(a).number=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).contacts,"onUpdate:modelValue":o[2]||(o[2]=t=>l(a).contacts=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).tel,"onUpdate:modelValue":o[3]||(o[3]=t=>l(a).tel=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5BA2\u6237\u7C7B\u522B",prop:"customer_type"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).customer_type,"onUpdate:modelValue":o[4]||(o[4]=t=>l(a).customer_type=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u7C7B\u522B"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u7EC4\u7EC7\u67B6\u6784",prop:"dept_type"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).dept_type,"onUpdate:modelValue":o[5]||(o[5]=t=>l(a).dept_type=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u67B6\u6784"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u5173\u8054\u4F9B\u5E94\u5546",prop:"related_suppliers"},{default:u(()=>[e(s,{class:"w-[280px]",modelValue:l(a).related_suppliers,"onUpdate:modelValue":o[6]||(o[6]=t=>l(a).related_suppliers=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5173\u8054\u4F9B\u5E94\u5546"},null,8,["modelValue"])]),_:1}),e(r,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:u(()=>[e(P,{class:"w-[280px]",modelValue:l(a).invoice_type,"onUpdate:modelValue":o[7]||(o[7]=t=>l(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(l(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(r,null,{default:u(()=>[e(d,{type:"primary",onClick:l(L)},{default:u(()=>[c("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:l($)},{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:!l(C).length,onClick:o[8]||(o[8]=t=>E(l(C)))},{default:u(()=>[c(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[F,["customer.customer/delete"]]]),h("div",fe,[e(I,{data:l(_).lists,onSelectionChange:U},{default:u(()=>[e(n,{type:"selection",width:"55"}),e(n,{label:"",prop:"id","show-overflow-tooltip":""}),e(n,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(n,{label:"\u5BA2\u6237\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(n,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts","show-overflow-tooltip":""}),e(n,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel","show-overflow-tooltip":""}),e(n,{label:"\u5BA2\u6237\u7C7B\u522B",prop:"customer_type","show-overflow-tooltip":""}),e(n,{label:"\u7EC4\u7EC7\u67B6\u6784",prop:"dept_type","show-overflow-tooltip":""}),e(n,{label:"\u5173\u8054\u4F9B\u5E94\u5546",prop:"related_suppliers","show-overflow-tooltip":""}),e(n,{label:"\u53D1\u7968\u7C7B\u578B",prop:"invoice_type"},{default:u(({row:t})=>[e(j,{options:l(w).invoice_type,value:t.invoice_type},null,8,["options","value"])]),_:1}),e(n,{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:l(_),"onUpdate:modelValue":o[9]||(o[9]=t=>ce(_)?_.value=t:null),onChange:l(v)},null,8,["modelValue","onChange"])])]),_:1})),[[O,l(_).loading]]),l(b)?(i(),m(ae,{key:0,ref_key:"editRef",ref:B,"dict-data":l(w),onSuccess:l(v),onClose:o[10]||(o[10]=t=>b.value=!1)},null,8,["dict-data","onSuccess"])):_e("",!0)])}}});export{ol as default};
|