import{C as Z,D as ee,w as ae,F as le,J as te,P as ye,Q as ve,R as ge,U as Fe,K as Ve,k as w,c as Be,a3 as ke,a2 as he,N as Ee,O as Ce,a4 as we}from"./element-plus.ff90c99c.js";import{a as De,u as qe}from"./vue-router.6d4cf914.js";import{b as Ae,g as Ue,u as xe}from"./consumer.fca32b62.js";import{a as Le,b as Oe,c as Te,d as Pe,e as Se}from"./common.7af9351a.js";import{d as Re}from"./dict.a50846ba.js";import{_ as $e}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{u as Ye}from"./usePaging.bd7a7dec.js";import{e as Me,a as je}from"./index.87cea444.js";import{k as Ie}from"./company.c7fa1368.js";import{d as j,$ as M,o as r,c as p,W as a,Q as t,u as e,U as H,R as Ne,P as c,a as h,j as ze,E as Qe,r as D,s as He,ag as Je,F as x,a9 as L,T as X}from"./@vue.f8dfc830.js";import"./lodash.3e731b89.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./axios.c2babb35.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.3a7f085f.js";import"./color.5ae3e2dd.js";import"./clone.7bcb5228.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.37836f15.js";import"./ms.a9ae1d6d.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.79024f1a.js";const Ke={class:"mt-4"},We={class:"flex mt-4 justify-end"},Ge=j({name:"companyLists"});({...Ge});const Xe=h("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),Ze={class:"headimg"},ea=["src"],aa=h("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u8D44\u8D28\u4FE1\u606F",-1),la={style:{display:"flex","justify-content":"space-between"}},ta=["src"],oa=["src"],ua=["src"],na=["src"],da=["src"],ra=["src"],ia=j({name:"consumerDetail"}),el=j({...ia,setup(oe){const B=Qe("base_url");Me();const E=De(),T=qe();D(!0);const l=M({id:"",sex:"",id_card:"",nickname:"",group_id:"",company_id:0,user_information_count:"",company_name:"",deposit_date:"",deposit:"",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,register_num:"",merchant_num:"",trade_amount:"",invite_code:""}),P=D({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"}],account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",trigger:"blur"}]});D(!1),M({show:!1,value:""});const m=M({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],villageOptions:[],dictTypeLists:[],contract_type:[],brigadeOptions:[],contract:[]}),U=He();D(!1),D(!1);const b=je(),k=D([]);Ae({}).then(n=>{k.value=n});const S=async()=>{const n=await Re({type_id:7});m.contract_type=n.lists},d=D(null);S();const R=async()=>{var u,Y,O,v,g,F;const n=await Ue({id:T.query.id});Object.keys(l).forEach(f=>{l[f]=n[f]}),d.value=T.query.mode,l.contract_type=(u=n.contract)==null?void 0:u.contract_type,l.party_b_name=(Y=n.contract)==null?void 0:Y.party_b_name,l.party_b=(O=n.contract)==null?void 0:O.party_b,l.file=(v=n.contract)==null?void 0:v.file,n.contract&&(I.value[0]={url:(g=n.contract)==null?void 0:g.file,name:(F=n.contract)!=null?F:"\u5408\u540C\u6587\u4EF6"}),await K(),await W(),await G(),await pe()},I=D([]),$=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.id_card=n.data.uri},y=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.avatar=n.data.uri},N=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.id_card_b=n.data.uri},z=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.car_card=n.data.uri},Q=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.car_card_b=n.data.uri},q=n=>!0,ue=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.bank_account=n.data.uri},ne=(n,u)=>{if(n.code==0){w.error(n.msg);return}l.qualification.bank_account_b=n.data.uri},J=n=>!0;function de(n){K()}function re(n){W()}function ie(n){G()}function se(n){l.street=n}const ce=async()=>{const n=await Le({});m.provinceOptions=n},K=async()=>{const n=await Oe({city:l.province});m.cityOptions=n},W=async()=>{const n=await Te({area:l.city});m.areaOptions=n},G=async()=>{const n=await Pe({street:l.area});m.streetOptions=n},pe=async()=>{const n=await Se({village:l.street});m.villageOptions=n},me=()=>{var n;(n=U.value)==null||n.validate(u=>{u&&xe(l).then(()=>{w.success("\u6DFB\u52A0\u6210\u529F"),E.back()})})};return R(),ce(),console.log(d.value),(n,u)=>{const Y=Fe,O=te,v=Je("Plus"),g=Be,F=Ve,f=ke,V=Z,i=ee,_=he,C=Ee,A=Ce,_e=we,fe=ae,be=le;return r(),p("div",null,[a(O,{class:"!border-none",shadow:"never"},{default:t(()=>[a(Y,{content:"\u65B0\u589E\u7528\u6237",onBack:u[0]||(u[0]=o=>n.$router.back())})]),_:1}),a(O,{class:"mt-4 !border-none",shadow:"never"},{default:t(()=>[a(be,{ref_key:"formRef",ref:U,model:e(l),rules:e(P),"label-width":"84px"},{default:t(()=>[Xe,h("div",Ze,[a(F,{modelValue:e(l).avatar,"onUpdate:modelValue":u[1]||(u[1]=o=>e(l).avatar=o),class:"avatar-uploader-head",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":y,disabled:e(d)=="detail"},{default:t(()=>[e(l).avatar?(r(),p("img",{key:0,src:e(l).avatar,class:"avatar"},null,8,ea)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),a(_,{class:"pt-6 !border-none"},{default:t(()=>[a(f),a(f,null,{default:t(()=>[a(_,{span:11},{default:t(()=>[a(i,{label:"\u59D3\u540D",prop:"nickname"},{default:t(()=>[a(V,{modelValue:e(l).nickname,"onUpdate:modelValue":u[2]||(u[2]=o=>e(l).nickname=o),readonly:e(d)=="detail",placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),a(_,{span:13},{default:t(()=>[a(i,{label:"\u89D2\u8272",prop:"group_id"},{default:t(()=>[a(A,{modelValue:e(l).group_id,"onUpdate:modelValue":u[3]||(u[3]=o=>e(l).group_id=o),placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",style:{width:"100%"},onChange:u[4]||(u[4]=o=>{var s;return(s=e(U))==null?void 0:s.clearValidate(["group_id"])}),disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(k),(o,s)=>(r(),c(C,{label:o.name,value:o.id},null,8,["label","value"]))),256))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),a(f,null,{default:t(()=>[a(_,{span:11},{default:t(()=>[a(i,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"account"},{default:t(()=>[a(V,{modelValue:e(l).account,"onUpdate:modelValue":u[5]||(u[5]=o=>e(l).account=o),readonly:e(d)=="detail",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",clearable:"",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),a(_,{span:13},{default:t(()=>[a(i,{label:"\u8EAB\u4EFD\u8BC1\u53F7"},{default:t(()=>[a(V,{modelValue:e(l).id_card,"onUpdate:modelValue":u[6]||(u[6]=o=>e(l).id_card=o),readonly:e(d)=="detail",placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",clearable:"",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1})]),_:1}),a(f,null,{default:t(()=>[a(_,{span:11},{default:t(()=>[a(i,{label:"\u62BC\u91D1"},{default:t(()=>[a(V,{modelValue:e(l).deposit,"onUpdate:modelValue":u[7]||(u[7]=o=>e(l).deposit=o),readonly:e(d)=="detail",placeholder:"\u8BF7\u8F93\u5165\u62BC\u91D1",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),a(_,{span:13},{default:t(()=>[a(i,{label:"\u62BC\u91D1\u7F34\u7EB3\u65F6\u95F4","label-width":"120px"},{default:t(()=>[a(_e,{readonly:e(d)=="detail",format:"YYYY/MM/DD","value-format":"YYYY-MM-DD",modelValue:e(l).deposit_date,"onUpdate:modelValue":u[8]||(u[8]=o=>e(l).deposit_date=o),style:{width:"150%"},placeholder:"\u8BF7\u9009\u62E9\u62BC\u91D1\u7F34\u7EB3\u65F6\u95F4",clearable:""},null,8,["readonly","modelValue"])]),_:1})]),_:1})]),_:1}),a(f,null,{default:t(()=>[a(_,{span:12},{default:t(()=>[a(i,{label:"\u7BA1\u7406\u6237\u6570",prop:"user_information_count","label-width":"200px"},{default:t(()=>[a(V,{modelValue:e(l).user_information_count,"onUpdate:modelValue":u[9]||(u[9]=o=>e(l).user_information_count=o),placeholder:"\u7BA1\u7406\u6237\u6570",readonly:e(d)=="detail",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),a(_,{span:12},{default:t(()=>[a(i,{label:"\u6027\u522B"},{default:t(()=>[a(A,{modelValue:e(l).sex,"onUpdate:modelValue":u[10]||(u[10]=o=>e(l).sex=o),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",readonly:e(d)=="detail",style:{width:"100%"},onChange:u[11]||(u[11]=o=>{var s;return(s=e(U))==null?void 0:s.clearValidate(["sex"])})},{default:t(()=>[a(C,{label:"\u7537",value:1}),a(C,{label:"\u5973",value:2})]),_:1},8,["modelValue","readonly"])]),_:1})]),_:1})]),_:1}),a(f,null,{default:t(()=>[a(_,{span:12},{default:t(()=>[a(i,{label:"\u6CE8\u518C\u7528\u6237\u6570",prop:"register_num","label-width":"200px"},{default:t(()=>[a(V,{modelValue:e(l).register_num,"onUpdate:modelValue":u[12]||(u[12]=o=>e(l).register_num=o),readonly:e(d)=="detail",placeholder:"\u8BF7\u8F93\u5165",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),a(_,{span:12},{default:t(()=>[a(i,{label:"\u5165\u9A7B\u5546\u6237\u6570",prop:"merchant_num","label-width":"100px"},{default:t(()=>[a(V,{modelValue:e(l).merchant_num,"onUpdate:modelValue":u[13]||(u[13]=o=>e(l).merchant_num=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",readonly:e(d)=="detail",type:"number",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1})]),_:1}),a(f,null,{default:t(()=>[a(_,{span:12},{default:t(()=>[a(i,{label:"\u4EA4\u6613\u91D1\u989D",prop:"trade_amount","label-width":"200px"},{default:t(()=>[a(V,{modelValue:e(l).trade_amount,"onUpdate:modelValue":u[14]||(u[14]=o=>e(l).trade_amount=o),placeholder:"\u8BF7\u8F93\u5165",readonly:e(d)=="detail",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue","readonly"])]),_:1})]),_:1}),e(d)=="detail"?(r(),c(_,{key:0,span:12},{default:t(()=>[a(i,{label:"\u9080\u8BF7\u7801",prop:"invite_code"},{default:t(()=>[a(V,{modelValue:e(l).invite_code,"onUpdate:modelValue":u[15]||(u[15]=o=>e(l).invite_code=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})):X("",!0)]),_:1}),a(f,null,{default:t(()=>[a(i,{label:"\u7701",prop:"province","label-width":"200px"},{default:t(()=>[a(A,{modelValue:e(l).province,"onUpdate:modelValue":u[16]||(u[16]=o=>e(l).province=o),placeholder:"\u8BF7\u9009\u62E9\u7701",readonly:e(d)=="detail",clearable:"",onChange:de,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(m).provinceOptions,(o,s)=>(r(),c(C,{key:s,label:o.province_name,value:o.province_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","readonly","disabled"])]),_:1}),a(i,{label:"\u5E02",prop:"city"},{default:t(()=>[a(A,{modelValue:e(l).city,"onUpdate:modelValue":u[17]||(u[17]=o=>e(l).city=o),placeholder:"\u8BF7\u9009\u62E9\u5E02",clearable:"",onChange:re,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(m).cityOptions,(o,s)=>(r(),c(C,{key:s,label:o.city_name,value:o.city_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),a(i,{label:"\u533A\u53BF",prop:"area"},{default:t(()=>[a(A,{modelValue:e(l).area,"onUpdate:modelValue":u[18]||(u[18]=o=>e(l).area=o),placeholder:"\u8BF7\u9009\u62E9\u533A\u53BF",clearable:"",onChange:ie,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(m).areaOptions,(o,s)=>(r(),c(C,{key:s,label:o.area_name,value:o.area_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),a(i,{label:"\u4E61\u9547",prop:"street"},{default:t(()=>[a(A,{modelValue:e(l).street,"onUpdate:modelValue":u[19]||(u[19]=o=>e(l).street=o),placeholder:"\u8BF7\u9009\u62E9\u4E61\u9547",clearable:"",onChange:se,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(m).streetOptions,(o,s)=>(r(),c(C,{key:s,label:o.street_name,value:o.street_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1}),a(i,{label:"\u6751\u793E",prop:"village"},{default:t(()=>[a(A,{modelValue:e(l).village,"onUpdate:modelValue":u[20]||(u[20]=o=>e(l).village=o),placeholder:"\u8BF7\u9009\u62E9\u6751\u793E",clearable:"",onChange:n.village_change,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(x,null,L(e(m).villageOptions,(o,s)=>(r(),c(C,{key:s,label:o.village_name,value:o.village_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange","disabled"])]),_:1}),a(i,{label:"\u961F/\u5C0F\u533A",prop:"brigade","label-width":"200px"},{default:t(()=>[a(V,{modelValue:e(l).brigade,"onUpdate:modelValue":u[21]||(u[21]=o=>e(l).brigade=o),placeholder:"\u8BF7\u8F93\u5165\u961F/\u5C0F\u533A\u540D\u79F0",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),aa,h("div",la,[h("div",null,[a(i,{label:"\u8EAB\u4EFD\u8BC1"},{default:t(()=>[a(F,{modelValue:e(l).qualification.id_card,"onUpdate:modelValue":u[22]||(u[22]=o=>e(l).qualification.id_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":$,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.id_card?(r(),p("img",{key:0,src:e(l).qualification.id_card,class:"avatar"},null,8,ta)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.id_card_b,"onUpdate:modelValue":u[23]||(u[23]=o=>e(l).qualification.id_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":N,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.id_card_b?(r(),p("img",{key:0,src:e(l).qualification.id_card_b,class:"avatar"},null,8,oa)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})]),h("div",null,[a(i,{label:"\u94F6\u884C\u5361"},{default:t(()=>[a(F,{modelValue:e(l).qualification.bank_account,"onUpdate:modelValue":u[24]||(u[24]=o=>e(l).qualification.bank_account=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":ue,"before-upload":J,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.bank_account?(r(),p("img",{key:0,src:e(l).qualification.bank_account,class:"avatar"},null,8,ua)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.bank_account_b,"onUpdate:modelValue":u[25]||(u[25]=o=>e(l).qualification.bank_account_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":ne,"before-upload":J,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.bank_account_b?(r(),p("img",{key:0,src:e(l).qualification.bank_account_b,class:"avatar"},null,8,na)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})]),h("div",null,[a(i,{label:"\u884C\u9A76\u8BC1",prop:"car_card"},{default:t(()=>[a(F,{modelValue:e(l).qualification.car_card,"onUpdate:modelValue":u[26]||(u[26]=o=>e(l).qualification.car_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":z,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.car_card?(r(),p("img",{key:0,src:e(l).qualification.car_card,class:"avatar"},null,8,da)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.car_card_b,"onUpdate:modelValue":u[27]||(u[27]=o=>e(l).qualification.car_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(B)+"/upload/image","show-file-list":!1,"on-success":Q,"before-upload":q,disabled:e(d)=="detail"},{default:t(()=>[e(l).qualification.car_card_b?(r(),p("img",{key:0,src:e(l).qualification.car_card_b,class:"avatar"},null,8,ra)):(r(),c(g,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(v)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})])]),e(d)=="edit"?(r(),c(fe,{key:0,type:"primary",onClick:me},{default:t(()=>[H("\u4FEE\u6539")]),_:1})):X("",!0)]),_:1},8,["model","rules"])]),_:1})])}}});export{el as default};