import{I as Z,y as ee,G as oe,H as te,w as le,D as ue,C as ae,L as ne,M as se,N as ie}from"./element-plus.517d4382.js";import{_ as re}from"./index.vue_vue_type_script_setup_true_lang.5ae95555.js";import{_ as me}from"./index.vue_vue_type_script_setup_true_lang.e1e5e943.js";import{f as pe,a as ce}from"./index.8b1962e9.js";import{u as de}from"./usePaging.f6660143.js";import{u as _e}from"./useDictOptions.b5854a9e.js";import{b as fe,a as $,e as ve}from"./custom.99349afc.js";import"./lodash.1d82ee7c.js";import Ee from"./edit.c790c870.js";import Be from"./detail.293642c0.js";import{e as Ce}from"./common.9d529cba.js";/* empty css */import{d as M,s as R,r as w,a0 as S,ai as De,o as a,c as A,V as e,M as l,O as f,u as r,L as m,S as U,W as N,a8 as T,a as I,k as Fe,T as d,n as V}from"./@vue.ab566ce7.js";import"./@vueuse.8fcae4c2.js";import"./@element-plus.b89f1627.js";import"./lodash-es.49f4af13.js";import"./dayjs.4afe12d3.js";import"./axios.37fc980d.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./vue-router.87ebc608.js";import"./pinia.b6700c26.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.d0bec2c9.js";import"./color.ea90db3f.js";import"./clone.cbd692e6.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.ad6bc3c0.js";import"./ms.a9ae1d6d.js";import"./nprogress.bcdf1f46.js";import"./vue-clipboard3.c45111bf.js";import"./clipboard.1cb79a0d.js";import"./echarts.b30ab882.js";import"./tslib.60310f1a.js";import"./zrender.3760070d.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.62ff6725.js";import"./index.b17dae19.js";import"./department.b8dec04d.js";import"./organization.5e75830a.js";import"./project.a81dff6c.js";import"./quotation.5cc5d967.js";import"./custom_service.2829147c.js";import"./custom_contacts.ce9803c8.js";import"./contract.2d0c2079.js";import"./contract_negotiation.85be8886.js";import"./remittance.aceb913b.js";import"./recordsPayment.6ee62b87.js";const we=d("\u67E5\u8BE2"),be=d("\u91CD\u7F6E"),he=d(" \u65B0\u589E "),ye=d(" \u5220\u9664 "),ke={class:"mt-4"},Ae=d(" \u7F16\u8F91 "),Ve=d(" \u5220\u9664 "),ge=d(" \u8BE6\u60C5 "),xe={class:"flex justify-end mt-4"},Le=M({name:"customLists"}),Ro=M({...Le,setup(Pe){const B=R(),C=R(),D=w(!1),b=w(!1);S([{name:"\u5168\u90E8\u5BA2\u6237",count:1e3},{name:"\u516C\u6D77\u5BA2\u6237",count:1e3},{name:"\u79C1\u6709\u5BA2\u6237",count:1e3},{name:"\u4ECA\u65E5\u65B0\u589E",count:1e3},{name:"\u4ECA\u65E5\u5206\u914D\u516C\u6D77\u5BA2\u6237",count:1e3},{name:"\u4ECA\u65E5\u5E94\u8054\u7CFB",count:1e3},{name:"\u4ECA\u65E5\u672A\u8054\u7CFB",count:1e3},{name:"\u4ECA\u65E5\u5DF2\u8054\u7CFB",count:1e3}]);const n=S({name:"",custom_type:"",master_phone:"",master_name:"",province:""}),h=w([]),O=i=>{h.value=i.map(({id:t})=>t)},{dictData:y}=_e("custom_type,credit_rating"),{pager:v,getLists:F,resetParams:j,resetPage:q}=de({fetchFun:fe,params:n}),G=async()=>{var i;D.value=!0,await V(),(i=B.value)==null||i.open("add")},H=async i=>{var p,s;let t=await $({id:i.id});D.value=!0,await V(),(p=B.value)==null||p.open("edit"),(s=B.value)==null||s.setFormData(t)},W=async i=>{var p,s;let t=await $({id:i.id});b.value=!0,await V(),console.log(C),(p=C.value)==null||p.open(),(s=C.value)==null||s.setFormData(t)},g=async i=>{await pe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ve({id:i}),F()},x=w([]);return(async()=>{x.value=await Ce({})})(),F(),(i,t)=>{const p=Z,s=ee,k=oe,L=te,c=le,z=ue,P=ae,J=ce,u=ne,K=me,Q=se,X=re,E=De("perms"),Y=ie;return a(),A("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:l(()=>[e(z,{class:"mb-[-16px]",model:n,"label-width":"auto",inline:""},{default:l(()=>[e(s,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name"},{default:l(()=>[e(p,{class:"w-[280px]",modelValue:n.name,"onUpdate:modelValue":t[0]||(t[0]=o=>n.name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5BA2\u6237\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u5BA2\u6237\u5C5E\u6027",prop:"custom_type"},{default:l(()=>[e(L,{class:"w-[280px]",modelValue:n.custom_type,"onUpdate:modelValue":t[1]||(t[1]=o=>n.custom_type=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5BA2\u6237\u5C5E\u6027"},{default:l(()=>[e(k,{label:"\u5168\u90E8",value:""}),(a(!0),A(N,null,T(r(y).custom_type,(o,_)=>(a(),m(k,{key:_,label:o.name,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u7535\u8BDD",prop:"master_phone"},{default:l(()=>[e(p,{class:"w-[280px]",modelValue:n.master_phone,"onUpdate:modelValue":t[2]||(t[2]=o=>n.master_phone=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u8054\u7CFB\u4EBA",prop:"master_name"},{default:l(()=>[e(p,{class:"w-[280px]",modelValue:n.master_name,"onUpdate:modelValue":t[3]||(t[3]=o=>n.master_name=o),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1}),e(s,{label:"\u7701\u4EFD",prop:"province"},{default:l(()=>[e(L,{modelValue:n.province,"onUpdate:modelValue":t[4]||(t[4]=o=>n.province=o),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u7701",style:{width:"280px"}},{default:l(()=>[(a(!0),A(N,null,T(x.value,(o,_)=>(a(),m(k,{key:_,label:o.province_name,value:parseInt(o.province_code)},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(s,null,{default:l(()=>[e(c,{type:"primary",onClick:r(q)},{default:l(()=>[we]),_:1},8,["onClick"]),e(c,{onClick:r(j)},{default:l(()=>[be]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((a(),m(P,{class:"!border-none",shadow:"never"},{default:l(()=>[f((a(),m(c,{type:"primary",onClick:G},{icon:l(()=>[e(J,{name:"el-icon-Plus"})]),default:l(()=>[he]),_:1})),[[E,["custom.custom/add"]]]),f((a(),m(c,{disabled:!h.value.length,onClick:t[5]||(t[5]=o=>g(h.value))},{default:l(()=>[ye]),_:1},8,["disabled"])),[[E,["custom.custom/delete"]]]),I("div",ke,[e(Q,{data:r(v).lists,onSelectionChange:O},{default:l(()=>[e(u,{type:"selection",width:"55"}),e(u,{label:"\u5E8F\u53F7",type:"index",width:"55"}),e(u,{label:"\u5BA2\u6237\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(u,{label:"\u5BA2\u6237\u5C5E\u6027",prop:"custom_type"},{default:l(({row:o})=>[e(K,{options:r(y).custom_type,value:o.custom_type},null,8,["options","value"])]),_:1}),e(u,{label:"\u6240\u5728\u7701",prop:"province_name","show-overflow-tooltip":""}),e(u,{label:"\u8D1F\u8D23\u4EBA\u59D3\u540D",prop:"master_name","show-overflow-tooltip":""}),e(u,{label:"\u8D1F\u8D23\u4EBA\u804C\u52A1",prop:"master_position","show-overflow-tooltip":""}),e(u,{label:"\u8D1F\u8D23\u4EBA\u624B\u673A",prop:"master_phone","show-overflow-tooltip":""}),e(u,{label:"\u8D1F\u8D23\u4EBA\u7535\u8BDD",prop:"master_telephone","show-overflow-tooltip":""}),e(u,{label:"\u8DDF\u8FDB\u8BB0\u5F55",prop:"follow_total","show-overflow-tooltip":""}),e(u,{label:"\u6700\u540E\u8DDF\u8FDB",prop:"last_follow_date","show-overflow-tooltip":""}),e(u,{label:"\u4E0B\u6B21\u56DE\u8BBF\u65E5\u671F",prop:"next_follow_date","show-overflow-tooltip":""}),e(u,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"create_time","show-overflow-tooltip":""}),e(u,{label:"\u64CD\u4F5C",width:"160",fixed:"right"},{default:l(({row:o})=>[f((a(),m(c,{type:"primary",link:"",onClick:_=>H(o)},{default:l(()=>[Ae]),_:2},1032,["onClick"])),[[E,["custom.custom/edit"]]]),f((a(),m(c,{type:"danger",link:"",onClick:_=>g(o.id)},{default:l(()=>[Ve]),_:2},1032,["onClick"])),[[E,["custom.custom/delete"]]]),f((a(),m(c,{link:"",onClick:_=>W(o)},{default:l(()=>[ge]),_:2},1032,["onClick"])),[[E,["custom.custom/detail"]]])]),_:1})]),_:1},8,["data"])]),I("div",xe,[e(X,{modelValue:r(v),"onUpdate:modelValue":t[6]||(t[6]=o=>Fe(v)?v.value=o:null),onChange:r(F)},null,8,["modelValue","onChange"])])]),_:1})),[[Y,r(v).loading]]),D.value?(a(),m(Ee,{key:0,ref_key:"editRef",ref:B,"dict-data":r(y),onSuccess:r(F),onClose:t[7]||(t[7]=o=>D.value=!1)},null,8,["dict-data","onSuccess"])):U("",!0),b.value?(a(),m(Be,{key:1,ref_key:"detailRef",ref:C,onClose:t[8]||(t[8]=o=>b.value=!1)},null,512)):U("",!0)])}}});export{Ro as default};