import{T as ia,J as na,k as m,I as da,c as sa,B as ca,C as ma,a1 as pa,M as _a,N as fa,a2 as ba,w as va,D as ga,L as ya}from"./element-plus.b0ecf6ae.js";import{a as Fa,u as ka}from"./vue-router.9f65afb1.js";import{c as Va,d as Ba}from"./consumer.9456502a.js";import{a as Ea,b as qa,c as Ca,d as ha}from"./common.231fd6fa.js";import{e as wa,a as Aa}from"./index.2ce58885.js";import"./lodash.ffb5376d.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.0fc4c9f8.js";import{_ as Da}from"./dialog_index.vue_vue_type_script_setup_true_name_companyLists_lang.2c936381.js";import{d as S,C as Ua,r as q,$ as O,s as La,a4 as xa,o as i,c,U as o,L as r,u as e,a as k,K as d,T as w,a7 as A,Q as U,R as Ta,k as Oa}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.f9df025a.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.4b0c77cb.js";import"./color.992612d2.js";import"./clone.d8d3ae9a.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.40d5feba.js";import"./index.vue_vue_type_script_setup_true_lang.ebbecf1a.js";import"./usePaging.60d02673.js";import"./company.a117638c.js";import"./dict.faa8fd3a.js";const Sa=k("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),Ra={class:"headimg"},$a=["src"],Ia=k("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u8D44\u8D28\u4FE1\u606F",-1),Na={style:{display:"flex","justify-content":"space-between"}},Pa=["src"],Ma=["src"],ja=["src"],za=["src"],Ha=["src"],Ja=["src"],Ka=S({name:"consumerDetail"}),Oe=S({...Ka,setup(Qa){const _=Ua("base_url");wa();const R=Fa();ka();const V=q(!0),a=O({id:"",sex:"",id_card:"",nickname:"",group_id:"",company_id:"",company_name:"",province:"",city:"",area:"",street:"",village:"",brigade:"",province_name:"",city_name:"",area_name:"",street_name:"",village_name:"",brigade_name:"",address:"",account:"",qualification:{id_card:"",id_card_b:"",car_card:"",car_card_b:"",bank_account:"",bank_account_b:""},avatar:"",multipoint_login:1}),$=q({company_name:[{required:!0,message:"\u8BF7\u9009\u62E9\u516C\u53F8",trigger:"blur"}],group_id:[{required:!0,message:"\u8BF7\u9009\u62E9\u89D2\u8272",trigger:"blur"}],nickname:[{required:!0,message:"\u8BF7\u8F93\u5165\u59D3\u540D",trigger:"blur"}],sex:[{required:!0,message:"\u8BF7\u9009\u62E9\u6027\u522B",trigger:"blur"}],id_card:[{required:!0,message:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",trigger:"blur"}],account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",trigger:"blur"}],"qualification.bank_account":[{required:!0,message:"\u8BF7\u4E0A\u4F20\u94F6\u884C\u5361",trigger:"blur"}],"qualification.id_card":[{required:!0,message:"\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1",trigger:"blur"}]}),p=O({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],dictTypeLists:[],contract_type:[],contract:[]}),C=q(!1),I=l=>{var t;a.company_id=l.id,a.company_name=l.company_name,a.province=l.province,a.city=l.city,a.area=l.area,a.street=l.street,a.village=l.village,a.brigade=l.brigade,a.province_name=l.province_name,a.city_name=l.city_name,a.area_name=l.area_name,a.street_name=l.street_name,a.village_name=l.village_name,a.brigade_name=l.brigade_name,(t=h.value)==null||t.clearValidate(["company_name"]),C.value=!1},L=q([]);Va({}).then(l=>{L.value=l});const h=La();q(!1);const f=Aa();q([]);const N=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.id_card=l.data.uri},P=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.avatar=l.data.uri},M=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.id_card_b=l.data.uri},j=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.car_card=l.data.uri},z=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.car_card_b=l.data.uri},H=l=>!0,J=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.bank_account=l.data.uri},K=(l,t)=>{if(l.code==0){m.error(l.msg);return}a.qualification.bank_account_b=l.data.uri},x=l=>!0;function Q(l){Z()}function G(l){aa()}function W(l){ea()}function X(l){a.street=l}const Y=async()=>{const l=await Ea({});p.provinceOptions=l},Z=async()=>{const l=await qa({city:a.province});p.cityOptions=l},aa=async()=>{const l=await Ca({area:a.city});p.areaOptions=l},ea=async()=>{const l=await ha({street:a.area});p.streetOptions=l};Y();const la=()=>{var l;if(!a.avatar)return m.error("\u8BF7\u4E0A\u4F20\u5934\u50CF");(l=h.value)==null||l.validate(t=>{if(t){if(!a.qualification.id_card||!a.qualification.id_card_b)return m.error("\u8BF7\u4E0A\u4F20\u8EAB\u4EFD\u8BC1\u4FE1\u606F");if(!a.qualification.bank_account||!a.qualification.bank_account_b)return m.error("\u8BF7\u4E0A\u4F20\u94F6\u884C\u5361\u4FE1\u606F");Ba(a).then(()=>{m.success("\u6DFB\u52A0\u6210\u529F"),R.back()})}})};return(l,t)=>{const ta=ia,T=da,b=xa("Plus"),v=sa,g=na,B=ca,n=ma,y=pa,F=_a,E=fa,D=ba,ua=va,oa=ga,ra=ya;return i(),c("div",null,[o(T,{class:"!border-none",shadow:"never"},{default:r(()=>[o(ta,{content:"\u65B0\u589E\u7528\u6237",onBack:t[0]||(t[0]=u=>l.$router.back())})]),_:1}),o(T,{class:"mt-4 !border-none",shadow:"never"},{default:r(()=>[o(oa,{ref_key:"formRef",ref:h,model:e(a),rules:e($),"label-width":"84px"},{default:r(()=>[Sa,k("div",Ra,[o(g,{modelValue:e(a).avatar,"onUpdate:modelValue":t[1]||(t[1]=u=>e(a).avatar=u),class:"avatar-uploader-head",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":P},{default:r(()=>[e(a).avatar?(i(),c("img",{key:0,src:e(a).avatar,class:"avatar"},null,8,$a)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),o(y,{class:"pt-6 !border-none"},{default:r(()=>[o(D,null,{default:r(()=>[o(y,{span:11},{default:r(()=>[o(n,{label:"\u516C\u53F8",prop:"company_name"},{default:r(()=>[o(B,{modelValue:e(a).company_name,"onUpdate:modelValue":t[2]||(t[2]=u=>e(a).company_name=u),placeholder:"\u8BF7\u9009\u62E9\u516C\u53F8",readonly:"",clearable:"",style:{width:"100%"},onClick:t[3]||(t[3]=u=>C.value=!0)},null,8,["modelValue"])]),_:1})]),_:1}),o(y,{span:13},{default:r(()=>[o(n,{label:"\u89D2\u8272",prop:"group_id"},{default:r(()=>[o(E,{modelValue:e(a).group_id,"onUpdate:modelValue":t[4]||(t[4]=u=>e(a).group_id=u),placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",readonly:"",style:{width:"100%"},onChange:t[5]||(t[5]=u=>{var s;return(s=e(h))==null?void 0:s.clearValidate(["group_id"])})},{default:r(()=>[(i(!0),c(w,null,A(e(L),(u,s)=>(i(),d(F,{label:u.name,value:u.id},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o(D,null,{default:r(()=>[o(y,{span:11},{default:r(()=>[o(n,{label:"\u59D3\u540D",prop:"nickname"},{default:r(()=>[o(B,{modelValue:e(a).nickname,"onUpdate:modelValue":t[6]||(t[6]=u=>e(a).nickname=u),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),o(y,{span:13},{default:r(()=>[o(n,{label:"\u6027\u522B",prop:"sex"},{default:r(()=>[o(E,{modelValue:e(a).sex,"onUpdate:modelValue":t[7]||(t[7]=u=>e(a).sex=u),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",style:{width:"100%"},onChange:t[8]||(t[8]=u=>{var s;return(s=e(h))==null?void 0:s.clearValidate(["sex"])})},{default:r(()=>[o(F,{label:"\u7537",value:1}),o(F,{label:"\u5973",value:2})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o(D,null,{default:r(()=>[o(y,{span:11},{default:r(()=>[o(n,{label:"\u8EAB\u4EFD\u8BC1\u53F7",prop:"id_card"},{default:r(()=>[o(B,{modelValue:e(a).id_card,"onUpdate:modelValue":t[9]||(t[9]=u=>e(a).id_card=u),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),o(y,{span:13},{default:r(()=>[o(n,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"account"},{default:r(()=>[o(B,{modelValue:e(a).account,"onUpdate:modelValue":t[10]||(t[10]=u=>e(a).account=u),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),o(D,null,{default:r(()=>[o(n,{label:"\u7701",prop:"province"},{default:r(()=>[o(E,{modelValue:e(a).province_name,"onUpdate:modelValue":t[11]||(t[11]=u=>e(a).province_name=u),placeholder:"\u8BF7\u9009\u62E9\u7701",disabled:e(V),clearable:"",onChange:Q,style:{width:"100%"}},{default:r(()=>[(i(!0),c(w,null,A(e(p).provinceOptions,(u,s)=>(i(),d(F,{key:s,label:u.province_name,value:u.province_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),o(n,{label:"\u5E02",prop:"city"},{default:r(()=>[o(E,{modelValue:e(a).city_name,"onUpdate:modelValue":t[12]||(t[12]=u=>e(a).city_name=u),placeholder:"\u8BF7\u9009\u62E9\u5E02",clearable:"",disabled:e(V),onChange:G,style:{width:"100%"}},{default:r(()=>[(i(!0),c(w,null,A(e(p).cityOptions,(u,s)=>(i(),d(F,{key:s,label:u.city_name,value:u.city_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),o(n,{label:"\u533A\u53BF",prop:"area"},{default:r(()=>[o(E,{modelValue:e(a).area_name,"onUpdate:modelValue":t[13]||(t[13]=u=>e(a).area_name=u),placeholder:"\u8BF7\u9009\u62E9\u533A\u53BF",disabled:e(V),clearable:"",onChange:W,style:{width:"100%"}},{default:r(()=>[(i(!0),c(w,null,A(e(p).areaOptions,(u,s)=>(i(),d(F,{key:s,label:u.area_name,value:u.area_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),e(a).street_name?(i(),d(n,{key:0,label:"\u4E61\u9547",prop:"street"},{default:r(()=>[o(E,{modelValue:e(a).street_name,"onUpdate:modelValue":t[14]||(t[14]=u=>e(a).street_name=u),placeholder:"\u8BF7\u9009\u62E9\u4E61\u9547",disabled:e(V),clearable:"",onChange:X,style:{width:"100%"}},{default:r(()=>[(i(!0),c(w,null,A(e(p).streetOptions,(u,s)=>(i(),d(F,{key:s,label:u.street_name,value:u.street_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})):U("",!0),e(a).village_name?(i(),d(n,{key:1,label:"\u6751\u793E",prop:"village"},{default:r(()=>[o(B,{modelValue:e(a).village_name,"onUpdate:modelValue":t[15]||(t[15]=u=>e(a).village_name=u),disabled:e(V),placeholder:"\u8BF7\u8F93\u5165\u6751\u793E",clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})):U("",!0),e(a).brigade_name?(i(),d(n,{key:2,label:"\u5C0F\u961F",prop:"brigade"},{default:r(()=>[o(B,{modelValue:e(a).brigade_name,"onUpdate:modelValue":t[16]||(t[16]=u=>e(a).brigade_name=u),disabled:e(V),placeholder:"\u8BF7\u8F93\u5165\u5C0F\u961F",clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})):U("",!0)]),_:1})]),_:1}),Ia,k("div",Na,[k("div",null,[o(n,{label:"\u8EAB\u4EFD\u8BC1",prop:"qualification.id_card"},{default:r(()=>[o(g,{modelValue:e(a).qualification.id_card,"onUpdate:modelValue":t[17]||(t[17]=u=>e(a).qualification.id_card=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":N},{default:r(()=>[e(a).qualification.id_card?(i(),c("img",{key:0,src:e(a).qualification.id_card,class:"avatar"},null,8,Pa)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"]),o(g,{modelValue:e(a).qualification.id_card_b,"onUpdate:modelValue":t[18]||(t[18]=u=>e(a).qualification.id_card_b=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":M},{default:r(()=>[e(a).qualification.id_card_b?(i(),c("img",{key:0,src:e(a).qualification.id_card_b,class:"avatar"},null,8,Ma)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})]),k("div",null,[o(n,{label:"\u94F6\u884C\u5361",prop:"qualification.bank_account"},{default:r(()=>[o(g,{modelValue:e(a).qualification.bank_account,"onUpdate:modelValue":t[19]||(t[19]=u=>e(a).qualification.bank_account=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":J,"before-upload":x},{default:r(()=>[e(a).qualification.bank_account?(i(),c("img",{key:0,src:e(a).qualification.bank_account,class:"avatar"},null,8,ja)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"]),o(g,{modelValue:e(a).qualification.bank_account_b,"onUpdate:modelValue":t[20]||(t[20]=u=>e(a).qualification.bank_account_b=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":K,"before-upload":x},{default:r(()=>[e(a).qualification.bank_account_b?(i(),c("img",{key:0,src:e(a).qualification.bank_account_b,class:"avatar"},null,8,za)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})]),k("div",null,[o(n,{label:"\u884C\u9A76\u8BC1",prop:"car_card"},{default:r(()=>[o(g,{modelValue:e(a).qualification.car_card,"onUpdate:modelValue":t[21]||(t[21]=u=>e(a).qualification.car_card=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":j},{default:r(()=>[e(a).qualification.car_card?(i(),c("img",{key:0,src:e(a).qualification.car_card,class:"avatar"},null,8,Ha)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"]),o(g,{modelValue:e(a).qualification.car_card_b,"onUpdate:modelValue":t[22]||(t[22]=u=>e(a).qualification.car_card_b=u),class:"avatar-uploader pl-3",data:{cid:1},headers:{Token:e(f).token},action:e(_)+"/upload/image","show-file-list":!1,"on-success":z,"before-upload":H},{default:r(()=>[e(a).qualification.car_card_b?(i(),c("img",{key:0,src:e(a).qualification.car_card_b,class:"avatar"},null,8,Ja)):(i(),d(v,{key:1,class:"avatar-uploader-icon"},{default:r(()=>[o(b)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})])]),o(ua,{type:"primary",onClick:la},{default:r(()=>[Ta("\u521B\u5EFA")]),_:1})]),_:1},8,["model","rules"])]),_:1}),o(ra,{modelValue:e(C),"onUpdate:modelValue":t[23]||(t[23]=u=>Oa(C)?C.value=u:null)},{default:r(()=>[o(Da,{companyTypeList:e(p).dictTypeLists,type:41,onCustomEvent:I},null,8,["companyTypeList"])]),_:1},8,["modelValue"])])}}});export{Oe as default};