WokerTask/public/admin/assets/edit.a24bc407.js

2 lines
16 KiB
JavaScript

import{U as sa,K as ca,k as g,J as pa,c as ma,a3 as _a,C as fa,D as ba,a2 as ga,N as va,O as ya,a4 as Va,w as Fa,F as ka,M as Ba}from"./element-plus.ff90c99c.js";import{a as ha,u as wa}from"./vue-router.6d4cf914.js";import{b as Ea,c as Ca}from"./consumer.fca32b62.js";import{a as qa,b as Da,c as Aa,d as Ua,e as xa,f as Oa}from"./common.7af9351a.js";import{e as La,a as Sa}from"./index.87cea444.js";import"./lodash.3e731b89.js";import"./index.vue_vue_type_style_index_0_scoped_95d1884e_lang.af59f801.js";import{_ as Ta}from"./dialog_index.vue_vue_type_script_setup_true_name_companyLists_lang.07fbb8d0.js";import{d as S,E as $a,r as w,$ as L,s as Ra,ag as Pa,o as r,c as s,W as l,Q as n,u as e,a as h,P as c,F as E,a9 as C,U as Ia,j as Ma}from"./@vue.f8dfc830.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";import"./index.vue_vue_type_script_setup_true_lang.44dbc460.js";import"./usePaging.bd7a7dec.js";import"./company.c7fa1368.js";import"./dict.a50846ba.js";const Na=h("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),ja={class:"headimg"},za=["src"],Ha=h("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u8D44\u8D28\u4FE1\u606F",-1),Ja={style:{display:"flex","justify-content":"space-between"}},Ka=["src"],Qa=["src"],Wa=["src"],Ya=["src"],Ga=["src"],Xa=["src"],Za=S({name:"consumerDetail"}),Je=S({...Za,setup(ae){const v=$a("base_url");La();const T=ha();wa(),w(!0);const a=L({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:""}),$=w({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"}]}),R=()=>{let t=a.deposit_date;const u=t.getFullYear(),U=String(t.getMonth()+1).padStart(2,"0"),A=String(t.getDate()).padStart(2,"0");a.deposit_date=`${u}-${U}-${A}`,console.log(a.deposit_date)},p=L({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],villageOptions:[],dictTypeLists:[],brigadeOptions:[],contract_type:[],contract:[]}),D=w(!1),P=t=>{var u;a.company_id=t.id,a.company_name=t.company_name,a.province=t.province,a.city=t.city,a.area=t.area,a.street=t.street,a.village=t.village,a.brigade=t.brigade,a.province_name=t.province_name,a.city_name=t.city_name,a.area_name=t.area_name,a.street_name=t.street_name,a.village_name=t.village_name,a.brigade_name=t.brigade_name,(u=q.value)==null||u.clearValidate(["company_name"]),D.value=!1},x=w([]);Ea({}).then(t=>{x.value=t});const q=Ra();w(!1);const y=Sa();w([]);const I=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.id_card=t.data.uri},M=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.avatar=t.data.uri},N=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.id_card_b=t.data.uri},j=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.car_card=t.data.uri},z=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.car_card_b=t.data.uri},H=t=>!0,J=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.bank_account=t.data.uri},K=(t,u)=>{if(t.code==0){g.error(t.msg);return}a.qualification.bank_account_b=t.data.uri},O=t=>!0;function Q(t){console.log(a),aa()}function W(t){ea()}function Y(t){la()}function G(t){ta(),a.street=t}function X(t){ua()}const Z=async()=>{const t=await qa({});p.provinceOptions=t},aa=async()=>{const t=await Da({city:a.province});p.cityOptions=t},ea=async()=>{const t=await Aa({area:a.city});p.areaOptions=t},la=async()=>{const t=await Ua({street:a.area});p.streetOptions=t},ta=async()=>{const t=await xa({village:a.street});p.villageOptions=t},ua=async()=>{const t=await Oa({brigade:a.village});p.brigadeOptions=t};Z();const oa=()=>{var t;(t=q.value)==null||t.validate(u=>{u&&Ca(a).then(()=>{g.success("\u6DFB\u52A0\u6210\u529F"),T.back()})})};return(t,u)=>{const U=sa,A=pa,V=Pa("Plus"),F=ma,k=ca,f=_a,_=fa,i=ba,m=ga,b=va,B=ya,na=Va,ra=Fa,ia=ka,da=Ba;return r(),s("div",null,[l(A,{class:"!border-none",shadow:"never"},{default:n(()=>[l(U,{content:"\u65B0\u589E\u7528\u6237",onBack:u[0]||(u[0]=o=>t.$router.back())})]),_:1}),l(A,{class:"mt-4 !border-none",shadow:"never"},{default:n(()=>[l(ia,{ref_key:"formRef",ref:q,model:e(a),rules:e($),"label-width":"84px"},{default:n(()=>[Na,h("div",ja,[l(k,{modelValue:e(a).avatar,"onUpdate:modelValue":u[1]||(u[1]=o=>e(a).avatar=o),class:"avatar-uploader-head",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":M},{default:n(()=>[e(a).avatar?(r(),s("img",{key:0,src:e(a).avatar,class:"avatar"},null,8,za)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),l(m,{class:"pt-6 !border-none"},{default:n(()=>[l(f),l(f,null,{default:n(()=>[l(m,{span:11},{default:n(()=>[l(i,{label:"\u59D3\u540D",prop:"nickname"},{default:n(()=>[l(_,{modelValue:e(a).nickname,"onUpdate:modelValue":u[2]||(u[2]=o=>e(a).nickname=o),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),l(m,{span:13},{default:n(()=>[l(i,{label:"\u89D2\u8272",prop:"group_id"},{default:n(()=>[l(B,{modelValue:e(a).group_id,"onUpdate:modelValue":u[3]||(u[3]=o=>e(a).group_id=o),placeholder:"\u8BF7\u9009\u62E9\u89D2\u8272",readonly:"",style:{width:"100%"},onChange:u[4]||(u[4]=o=>{var d;return(d=e(q))==null?void 0:d.clearValidate(["group_id"])})},{default:n(()=>[(r(!0),s(E,null,C(e(x),(o,d)=>(r(),c(b,{label:o.name,value:o.id},null,8,["label","value"]))),256))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(m,{span:11},{default:n(()=>[l(i,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"account"},{default:n(()=>[l(_,{modelValue:e(a).account,"onUpdate:modelValue":u[5]||(u[5]=o=>e(a).account=o),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),l(m,{span:13},{default:n(()=>[l(i,{label:"\u8EAB\u4EFD\u8BC1\u53F7"},{default:n(()=>[l(_,{modelValue:e(a).id_card,"onUpdate:modelValue":u[6]||(u[6]=o=>e(a).id_card=o),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(m,{span:11},{default:n(()=>[l(i,{label:"\u62BC\u91D1"},{default:n(()=>[l(_,{modelValue:e(a).deposit,"onUpdate:modelValue":u[7]||(u[7]=o=>e(a).deposit=o),placeholder:"\u8BF7\u8F93\u5165\u62BC\u91D1",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),l(m,{span:13},{default:n(()=>[l(i,{label:"\u62BC\u91D1\u7F34\u7EB3\u65F6\u95F4","label-width":"120px"},{default:n(()=>[l(na,{modelValue:e(a).deposit_date,"onUpdate:modelValue":u[8]||(u[8]=o=>e(a).deposit_date=o),style:{width:"150%"},placeholder:"\u8BF7\u9009\u62E9\u62BC\u91D1\u7F34\u7EB3\u65F6\u95F4",onChange:R,clearable:""},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(m,{span:12},{default:n(()=>[l(i,{label:"\u7BA1\u7406\u6237\u6570",prop:"user_information_count","label-width":"200px"},{default:n(()=>[l(_,{modelValue:e(a).user_information_count,"onUpdate:modelValue":u[9]||(u[9]=o=>e(a).user_information_count=o),placeholder:"\u7BA1\u7406\u6237\u6570",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),l(m,{span:12},{default:n(()=>[l(i,{label:"\u6027\u522B"},{default:n(()=>[l(B,{modelValue:e(a).sex,"onUpdate:modelValue":u[10]||(u[10]=o=>e(a).sex=o),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",style:{width:"100%"},onChange:u[11]||(u[11]=o=>{var d;return(d=e(q))==null?void 0:d.clearValidate(["sex"])})},{default:n(()=>[l(b,{label:"\u7537",value:1}),l(b,{label:"\u5973",value:2})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(m,{span:12},{default:n(()=>[l(i,{label:"\u6CE8\u518C\u7528\u6237\u6570",prop:"register_num","label-width":"200px"},{default:n(()=>[l(_,{modelValue:e(a).register_num,"onUpdate:modelValue":u[12]||(u[12]=o=>e(a).register_num=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),l(m,{span:12},{default:n(()=>[l(i,{label:"\u5165\u9A7B\u5546\u6237\u6570",prop:"merchant_num","label-width":"100px"},{default:n(()=>[l(_,{modelValue:e(a).merchant_num,"onUpdate:modelValue":u[13]||(u[13]=o=>e(a).merchant_num=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(m,{span:12},{default:n(()=>[l(i,{label:"\u4EA4\u6613\u91D1\u989D",prop:"trade_amount","label-width":"200px"},{default:n(()=>[l(_,{modelValue:e(a).trade_amount,"onUpdate:modelValue":u[14]||(u[14]=o=>e(a).trade_amount=o),placeholder:"\u8BF7\u8F93\u5165",clearable:"",type:"number",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(f,null,{default:n(()=>[l(i,{label:"\u7701",prop:"province","label-width":"200px"},{default:n(()=>[l(B,{modelValue:e(a).province,"onUpdate:modelValue":u[15]||(u[15]=o=>e(a).province=o),placeholder:"\u8BF7\u9009\u62E9\u7701",clearable:"",onChange:Q,style:{width:"100%"}},{default:n(()=>[(r(!0),s(E,null,C(e(p).provinceOptions,(o,d)=>(r(),c(b,{key:d,label:o.province_name,value:o.province_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(i,{label:"\u5E02",prop:"city"},{default:n(()=>[l(B,{modelValue:e(a).city,"onUpdate:modelValue":u[16]||(u[16]=o=>e(a).city=o),placeholder:"\u8BF7\u9009\u62E9\u5E02",clearable:"",onChange:W,style:{width:"100%"}},{default:n(()=>[(r(!0),s(E,null,C(e(p).cityOptions,(o,d)=>(r(),c(b,{key:d,label:o.city_name,value:o.city_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(i,{label:"\u533A\u53BF",prop:"area"},{default:n(()=>[l(B,{modelValue:e(a).area,"onUpdate:modelValue":u[17]||(u[17]=o=>e(a).area=o),placeholder:"\u8BF7\u9009\u62E9\u533A\u53BF",clearable:"",onChange:Y,style:{width:"100%"}},{default:n(()=>[(r(!0),s(E,null,C(e(p).areaOptions,(o,d)=>(r(),c(b,{key:d,label:o.area_name,value:o.area_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(i,{label:"\u4E61\u9547",prop:"street"},{default:n(()=>[l(B,{modelValue:e(a).street,"onUpdate:modelValue":u[18]||(u[18]=o=>e(a).street=o),placeholder:"\u8BF7\u9009\u62E9\u4E61\u9547",clearable:"",onChange:G,style:{width:"100%"}},{default:n(()=>[(r(!0),s(E,null,C(e(p).streetOptions,(o,d)=>(r(),c(b,{key:d,label:o.street_name,value:o.street_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(i,{label:"\u6751\u793E",prop:"village"},{default:n(()=>[l(B,{modelValue:e(a).village,"onUpdate:modelValue":u[19]||(u[19]=o=>e(a).village=o),placeholder:"\u8BF7\u9009\u62E9\u6751\u793E",clearable:"",onChange:X,style:{width:"100%"}},{default:n(()=>[(r(!0),s(E,null,C(e(p).villageOptions,(o,d)=>(r(),c(b,{key:d,label:o.village_name,value:o.village_code},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),l(i,{label:"\u961F/\u5C0F\u533A",prop:"brigade","label-width":"200px"},{default:n(()=>[l(_,{modelValue:e(a).brigade,"onUpdate:modelValue":u[20]||(u[20]=o=>e(a).brigade=o),placeholder:"\u8BF7\u8F93\u5165\u961F/\u5C0F\u533A\u540D\u79F0",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),Ha,h("div",Ja,[h("div",null,[l(i,{label:"\u8EAB\u4EFD\u8BC1"},{default:n(()=>[l(k,{modelValue:e(a).qualification.id_card,"onUpdate:modelValue":u[21]||(u[21]=o=>e(a).qualification.id_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":I},{default:n(()=>[e(a).qualification.id_card?(r(),s("img",{key:0,src:e(a).qualification.id_card,class:"avatar"},null,8,Ka)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"]),l(k,{modelValue:e(a).qualification.id_card_b,"onUpdate:modelValue":u[22]||(u[22]=o=>e(a).qualification.id_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":N},{default:n(()=>[e(a).qualification.id_card_b?(r(),s("img",{key:0,src:e(a).qualification.id_card_b,class:"avatar"},null,8,Qa)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})]),h("div",null,[l(i,{label:"\u94F6\u884C\u5361"},{default:n(()=>[l(k,{modelValue:e(a).qualification.bank_account,"onUpdate:modelValue":u[23]||(u[23]=o=>e(a).qualification.bank_account=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":J,"before-upload":O},{default:n(()=>[e(a).qualification.bank_account?(r(),s("img",{key:0,src:e(a).qualification.bank_account,class:"avatar"},null,8,Wa)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"]),l(k,{modelValue:e(a).qualification.bank_account_b,"onUpdate:modelValue":u[24]||(u[24]=o=>e(a).qualification.bank_account_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":K,"before-upload":O},{default:n(()=>[e(a).qualification.bank_account_b?(r(),s("img",{key:0,src:e(a).qualification.bank_account_b,class:"avatar"},null,8,Ya)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})]),h("div",null,[l(i,{label:"\u884C\u9A76\u8BC1",prop:"car_card"},{default:n(()=>[l(k,{modelValue:e(a).qualification.car_card,"onUpdate:modelValue":u[25]||(u[25]=o=>e(a).qualification.car_card=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":j},{default:n(()=>[e(a).qualification.car_card?(r(),s("img",{key:0,src:e(a).qualification.car_card,class:"avatar"},null,8,Ga)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"]),l(k,{modelValue:e(a).qualification.car_card_b,"onUpdate:modelValue":u[26]||(u[26]=o=>e(a).qualification.car_card_b=o),class:"pl-3 avatar-uploader",data:{cid:1},headers:{Token:e(y).token},action:e(v)+"/upload/image","show-file-list":!1,"on-success":z,"before-upload":H},{default:n(()=>[e(a).qualification.car_card_b?(r(),s("img",{key:0,src:e(a).qualification.car_card_b,class:"avatar"},null,8,Xa)):(r(),c(F,{key:1,class:"avatar-uploader-icon"},{default:n(()=>[l(V)]),_:1}))]),_:1},8,["modelValue","headers","action"])]),_:1})])]),l(ra,{type:"primary",onClick:oa},{default:n(()=>[Ia("\u521B\u5EFA")]),_:1})]),_:1},8,["model","rules"])]),_:1}),l(da,{modelValue:e(D),"onUpdate:modelValue":u[27]||(u[27]=o=>Ma(D)?D.value=o:null)},{default:n(()=>[l(Ta,{companyTypeList:e(p).dictTypeLists,type:41,onCustomEvent:P},null,8,["companyTypeList"])]),_:1},8,["modelValue"])])}}});export{Je as default};