2024-05-16 10:05:14 +08:00
|
|
|
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.8c800afc.js";import{_ as Y}from"./index.vue_vue_type_script_setup_true_lang.7b224fce.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.ab7008c1.js";import{f as le,b as oe}from"./index.2398c167.js";import{u as te}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.080d297e.js";import{_ as ae,a as ne,b as se}from"./edit.vue_vue_type_script_setup_true_name_customerEdit_lang.c979c57b.js";import"./lodash.be6e4bb5.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.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.886c5f5a.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.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.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.d0a14c5a.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:"\u
|