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

2 lines
15 KiB
JavaScript

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