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

2 lines
16 KiB
JavaScript

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