2 lines
17 KiB
JavaScript
2 lines
17 KiB
JavaScript
import{C as Z,D as ee,w as ae,F as le,J as te,P as ve,Q as Fe,R as Ve,U as Be,K as ke,k as D,c as he,a3 as Ce,a2 as Ee,N as we,O as De,a4 as qe}from"./element-plus.ff90c99c.js";import{a as Ue,u as Ae}from"./vue-router.6d4cf914.js";import{b as xe,g as Le,u as Oe}from"./consumer.863adda5.js";import{a as Te,b as Pe,c as Se,d as Re,e as $e,f as Ye}from"./common.7646b996.js";import{d as Me}from"./dict.20fb4260.js";import{_ as Ne}from"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import{u as je}from"./usePaging.bd7a7dec.js";import{e as Ie,a as ze}from"./index.000b0758.js";import{k as Qe}from"./company.e86935db.js";import{d as N,$ as M,o as r,c as p,W as a,Q as t,u as e,U as H,R as He,P as c,a as C,j as Je,E as Ke,r as q,s as We,ag as Ge,F as A,a9 as x,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 Xe={class:"mt-4"},Ze={class:"flex mt-4 justify-end"},ea=N({name:"companyLists"});({...ea});const aa=C("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),la={class:"headimg"},ta=["src"],oa=C("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u8D44\u8D28\u4FE1\u606F",-1),ua={style:{display:"flex","justify-content":"space-between"}},na=["src"],da=["src"],ra=["src"],ia=["src"],sa=["src"],ca=["src"],pa=N({name:"consumerDetail"}),tl=N({...pa,setup(oe){const V=Ke("base_url");Ie();const E=Ue(),T=Ae();q(!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=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"}],account:[{required:!0,message:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",trigger:"blur"}]});q(!1),M({show:!1,value:""});const m=M({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],villageOptions:[],dictTypeLists:[],contract_type:[],brigadeOptions:[],contract:[]}),L=We();q(!1),q(!1);const b=ze(),B=q([]);xe({}).then(u=>{B.value=u});const S=async()=>{const u=await Me({type_id:7});m.contract_type=u.lists},d=q(null);S();const R=async()=>{var n,Y,O,g,v,F;const u=await Le({id:T.query.id});Object.keys(l).forEach(f=>{l[f]=u[f]}),d.value=T.query.mode,l.brigade=Number(l.brigade),l.contract_type=(n=u.contract)==null?void 0:n.contract_type,l.party_b_name=(Y=u.contract)==null?void 0:Y.party_b_name,l.party_b=(O=u.contract)==null?void 0:O.party_b,l.file=(g=u.contract)==null?void 0:g.file,u.contract&&(j.value[0]={url:(v=u.contract)==null?void 0:v.file,name:(F=u.contract)!=null?F:"\u5408\u540C\u6587\u4EF6"}),await K(),await W(),await G(),await me(),await _e()},j=q([]),$=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.id_card=u.data.uri},y=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.avatar=u.data.uri},I=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.id_card_b=u.data.uri},z=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.car_card=u.data.uri},Q=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.car_card_b=u.data.uri},U=u=>!0,ue=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.bank_account=u.data.uri},ne=(u,n)=>{if(u.code==0){D.error(u.msg);return}l.qualification.bank_account_b=u.data.uri},J=u=>!0;function de(u){K()}function re(u){W()}function ie(u){G()}function se(u){l.street=u}function ce(u){l.brigade=u,console.log(u)}const pe=async()=>{const u=await Te({});m.provinceOptions=u},K=async()=>{const u=await Pe({city:l.province});m.cityOptions=u},W=async()=>{const u=await Se({area:l.city});m.areaOptions=u},G=async()=>{const u=await Re({street:l.area});m.streetOptions=u},me=async()=>{const u=await $e({village:l.street});m.villageOptions=u},_e=async()=>{const u=await Ye({brigade:l.village});m.brigadeOptions=u},fe=()=>{var u;(u=L.value)==null||u.validate(n=>{n&&Oe(l).then(()=>{D.success("\u6DFB\u52A0\u6210\u529F"),E.back()})})};return R(),pe(),console.log(d.value),(u,n)=>{const Y=Be,O=te,g=Ge("Plus"),v=he,F=ke,f=Ce,k=Z,i=ee,_=Ee,h=we,w=De,be=qe,ye=ae,ge=le;return r(),p("div",null,[a(O,{class:"!border-none",shadow:"never"},{default:t(()=>[a(Y,{content:"\u65B0\u589E\u7528\u6237",onBack:n[0]||(n[0]=o=>u.$router.back())})]),_:1}),a(O,{class:"mt-4 !border-none",shadow:"never"},{default:t(()=>[a(ge,{ref_key:"formRef",ref:L,model:e(l),rules:e(P),"label-width":"84px"},{default:t(()=>[aa,C("div",la,[a(F,{modelValue:e(l).avatar,"onUpdate:modelValue":n[1]||(n[1]=o=>e(l).avatar=o),class:"avatar-uploader-head",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/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,ta)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_: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(k,{modelValue:e(l).nickname,"onUpdate:modelValue":n[2]||(n[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(w,{modelValue:e(l).group_id,"onUpdate:modelValue":n[3]||(n[3]=o=>e(l).group_id=o),placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",style:{width:"100%"},onChange:n[4]||(n[4]=o=>{var s;return(s=e(L))==null?void 0:s.clearValidate(["group_id"])}),disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(A,null,x(e(B),(o,s)=>(r(),c(h,{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(k,{modelValue:e(l).account,"onUpdate:modelValue":n[5]||(n[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(k,{modelValue:e(l).id_card,"onUpdate:modelValue":n[6]||(n[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(k,{modelValue:e(l).deposit,"onUpdate:modelValue":n[7]||(n[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(be,{readonly:e(d)=="detail",format:"YYYY/MM/DD","value-format":"YYYY-MM-DD",modelValue:e(l).deposit_date,"onUpdate:modelValue":n[8]||(n[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(k,{modelValue:e(l).user_information_count,"onUpdate:modelValue":n[9]||(n[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(w,{modelValue:e(l).sex,"onUpdate:modelValue":n[10]||(n[10]=o=>e(l).sex=o),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",readonly:e(d)=="detail",style:{width:"100%"},onChange:n[11]||(n[11]=o=>{var s;return(s=e(L))==null?void 0:s.clearValidate(["sex"])})},{default:t(()=>[a(h,{label:"\u7537",value:1}),a(h,{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(k,{modelValue:e(l).register_num,"onUpdate:modelValue":n[12]||(n[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(k,{modelValue:e(l).merchant_num,"onUpdate:modelValue":n[13]||(n[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(k,{modelValue:e(l).trade_amount,"onUpdate:modelValue":n[14]||(n[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(k,{modelValue:e(l).invite_code,"onUpdate:modelValue":n[15]||(n[15]=o=>e(l).invite_code=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",type:"number",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(w,{modelValue:e(l).province,"onUpdate:modelValue":n[16]||(n[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(A,null,x(e(m).provinceOptions,(o,s)=>(r(),c(h,{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(w,{modelValue:e(l).city,"onUpdate:modelValue":n[17]||(n[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(A,null,x(e(m).cityOptions,(o,s)=>(r(),c(h,{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(w,{modelValue:e(l).area,"onUpdate:modelValue":n[18]||(n[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(A,null,x(e(m).areaOptions,(o,s)=>(r(),c(h,{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(w,{modelValue:e(l).street,"onUpdate:modelValue":n[19]||(n[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(A,null,x(e(m).streetOptions,(o,s)=>(r(),c(h,{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(w,{modelValue:e(l).village,"onUpdate:modelValue":n[20]||(n[20]=o=>e(l).village=o),placeholder:"\u8BF7\u9009\u62E9\u6751\u793E",clearable:"",onChange:u.village_change,style:{width:"100%"},disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(A,null,x(e(m).villageOptions,(o,s)=>(r(),c(h,{key:s,label:o.village_name,value:o.village_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange","disabled"])]),_:1}),a(i,{label:"\u5C0F\u961F",prop:"brigade","label-width":"200px"},{default:t(()=>[a(w,{modelValue:e(l).brigade,"onUpdate:modelValue":n[21]||(n[21]=o=>e(l).brigade=o),placeholder:"\u8BF7\u9009\u62E9\u5C0F\u961F",clearable:"",style:{width:"100%"},onChange:ce,disabled:e(d)=="detail"},{default:t(()=>[(r(!0),p(A,null,x(e(m).brigadeOptions,(o,s)=>(r(),c(h,{key:s,label:o.brigade_name,value:o.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),oa,C("div",ua,[C("div",null,[a(i,{label:"\u8EAB\u4EFD\u8BC1"},{default:t(()=>[a(F,{modelValue:e(l).qualification.id_card,"onUpdate:modelValue":n[22]||(n[22]=o=>e(l).qualification.id_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/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,na)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.id_card_b,"onUpdate:modelValue":n[23]||(n[23]=o=>e(l).qualification.id_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/upload/image","show-file-list":!1,"on-success":I,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,da)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})]),C("div",null,[a(i,{label:"\u94F6\u884C\u5361"},{default:t(()=>[a(F,{modelValue:e(l).qualification.bank_account,"onUpdate:modelValue":n[24]||(n[24]=o=>e(l).qualification.bank_account=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/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,ra)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.bank_account_b,"onUpdate:modelValue":n[25]||(n[25]=o=>e(l).qualification.bank_account_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/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,ia)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})]),C("div",null,[a(i,{label:"\u884C\u9A76\u8BC1",prop:"car_card"},{default:t(()=>[a(F,{modelValue:e(l).qualification.car_card,"onUpdate:modelValue":n[26]||(n[26]=o=>e(l).qualification.car_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/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,sa)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"]),a(F,{modelValue:e(l).qualification.car_card_b,"onUpdate:modelValue":n[27]||(n[27]=o=>e(l).qualification.car_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(b).token},action:e(V)+"/upload/image","show-file-list":!1,"on-success":Q,"before-upload":U,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,ca)):(r(),c(v,{key:1,class:"avatar-uploader-icon"},{default:t(()=>[a(g)]),_:1}))]),_:1},8,["modelValue","headers","action","disabled"])]),_:1})])]),e(d)=="edit"?(r(),c(ye,{key:0,type:"primary",onClick:fe},{default:t(()=>[H("\u4FEE\u6539")]),_:1})):X("",!0)]),_:1},8,["model","rules"])]),_:1})])}}});export{tl as default};
|