2 lines
9.4 KiB
JavaScript
2 lines
9.4 KiB
JavaScript
import{T as W,I as X,c as Y,J as Z,B as ee,C as ae,_ as te,M as le,N as oe,$ as ue,w as ne,D as re,k as q}from"./element-plus.9c2fdfa8.js";import{a as se,u as de}from"./vue-router.e2f4a118.js";import{g as ie,a as pe,u as ce,i as me}from"./consumer.ed84615b.js";import{e as _e,a as fe,f as be}from"./index.b57b84f0.js";import{d as ye}from"./dict.3d59f58c.js";import"./dialog_index.vue_vue_type_script_setup_true_name_companyLists_lang.282b33b4.js";import"./lodash.5512e984.js";import{_ as Be}from"./account-adjust.vue_vue_type_script_setup_true_lang.96a66fb0.js";import{d as I,C as Fe,r as c,$ as g,s as ve,a4 as Ee,o as d,c as h,U as e,L as a,u as t,a as N,K as p,T as L,a7 as O,Q as m,k as Ve,R as j}from"./@vue.53f8d7c3.js";import"./@vueuse.038954e7.js";import"./@element-plus.37f92579.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./axios.92474d72.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.ee641d3d.js";import"./color.cbc2f3a9.js";import"./clone.7fddbad2.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.a7d78d4d.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.9cf3e967.js";import"./index.vue_vue_type_script_setup_true_lang.261df48b.js";import"./usePaging.c22e2b6f.js";import"./company.da0ac536.js";import"./index.3fc23cf2.js";import"./index.vue_vue_type_style_index_0_scoped_187b1ead_lang.33043b78.js";const ke=N("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F\u521B\u5EFA",-1),Ce={class:"headimg"},he=["src"],De=I({name:"consumerDetail"}),Ba=I({...De,setup(we){const A=Fe("base_url");_e(),se();const _=de(),f=c(!0),l=g({id:"",sex:"",id_card:"",nickname:"",province:"",city:"",area:"",street:"",address:"",account:"",is_contract:0,party_b_name:"",party_b:"",qualification:{id_card:"",id_card_b:"",car_card:"",car_card_b:"",bank_account:"",bank_account_b:""},contract_type:"",file:"",avatar:"",multipoint_login:1,contract:{url:""}}),$=c(!1),E=g({show:!1,value:""}),U=g({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],dictTypeLists:[],contract_type:[],contract:[]}),M=ve();c(!1),c(!1);const x=fe(),P=async()=>{const u=await ye({type_id:7});U.contract_type=u.lists},b=c(null);P();const R=async()=>{var o,y,B,k,C,F;const u=await ie({id:_.query.id});console.log(u),Object.keys(l).forEach(i=>{l[i]=u[i]}),b.value=_.query.mode,l.gender=u.gender,l.phone=u.phone,l.gender=u.gender,l.app_list=u.app_list,l.contract_type=(o=u.contract)==null?void 0:o.contract_type,l.party_b_name=(y=u.contract)==null?void 0:y.party_b_name,l.party_b=(B=u.contract)==null?void 0:B.party_b,l.file=(k=u.contract)==null?void 0:k.file,u.contract&&(V.value[0]={url:(C=u.contract)==null?void 0:C.file,name:(F=u.contract)!=null?F:"\u5408\u540C\u6587\u4EF6"})},V=c([]),z=(u,o)=>{if(u.code==0){q.error(u.msg);return}l.avatar=u.data.uri},H=(u,o)=>{if(u.code==0){q.error(u.msg);return}l.file=u.data.uri,ce({file:l.file,id:_.query.mdoeid}).then(y=>[b.value=!1])},J=async u=>{await pe({user_id:_.query.id,...u}),E.show=!1,R()},K=()=>{const{contract_type:u}=l;me({party_b:_.query.id,contract_type:u,type:2}).then(o=>{be.msgSuccess("\u53D1\u8D77\u6210\u529F\uFF0C\u7B49\u5F85\u5E73\u53F0\u98CE\u63A7\u90E8\u4E0A\u4F20\u5408\u540C")})};return R(),console.log(l),(u,o)=>{const y=W,B=X,k=Ee("Plus"),C=Y,F=Z,i=ee,s=ae,r=te,D=le,S=oe,v=ue,T=ne,Q=re;return d(),h("div",null,[e(B,{class:"!border-none",shadow:"never"},{default:a(()=>[e(y,{content:"\u7528\u6237\u8BE6\u60C5",onBack:o[0]||(o[0]=n=>u.$router.back())})]),_:1}),e(B,{class:"mt-4 !border-none",shadow:"never"},{default:a(()=>[e(Q,{ref_key:"formRef",ref:M,model:t(l),"label-width":"84px"},{default:a(()=>[ke,N("div",Ce,[e(F,{modelValue:t(l).avatar,"onUpdate:modelValue":o[1]||(o[1]=n=>t(l).avatar=n),class:"avatar-uploader-head",disabled:t(f),data:{cid:1},headers:{Token:t(x).token},action:t(A)+"/upload/taskImage","show-file-list":!1,"on-success":z},{default:a(()=>[t(l).avatar?(d(),h("img",{key:0,src:t(l).avatar,class:"avatar"},null,8,he)):(d(),p(C,{key:1,class:"avatar-uploader-icon"},{default:a(()=>[e(k)]),_:1}))]),_:1},8,["modelValue","disabled","headers","action"])]),e(r,{class:"pt-6 !border-none"},{default:a(()=>[e(v,null,{default:a(()=>[e(r,{span:11},{default:a(()=>[e(s,{label:"\u59D3\u540D",prop:"nickname"},{default:a(()=>[e(i,{modelValue:t(l).nickname,"onUpdate:modelValue":o[2]||(o[2]=n=>t(l).nickname=n),disabled:t(f),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e(r,{span:13},{default:a(()=>[e(s,{label:"\u6027\u522B",prop:"gender"},{default:a(()=>[e(S,{modelValue:t(l).gender,"onUpdate:modelValue":o[3]||(o[3]=n=>t(l).gender=n),disabled:t(f),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",style:{width:"100%"}},{default:a(()=>[e(D,{label:"\u7537",value:0}),e(D,{label:"\u5973",value:1})]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(v,null,{default:a(()=>[e(r,{span:13},{default:a(()=>[e(s,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"phone"},{default:a(()=>[e(i,{modelValue:t(l).phone,"onUpdate:modelValue":o[4]||(o[4]=n=>t(l).phone=n),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",disabled:t(f),clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(v,null,{default:a(()=>[e(r,{span:13},{default:a(()=>[(d(!0),h(L,null,O(t(l).app_list,(n,w)=>(d(),p(s,{label:"\u7ED1\u5B9A\u5E94\u7528",prop:"phone",key:w},{default:a(()=>[e(i,{modelValue:n.name,"onUpdate:modelValue":G=>n.name=G,placeholder:"\u7ED1\u5B9A\u5E94\u7528",disabled:t(f),clearable:"",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue","disabled"])]),_:2},1024))),128))]),_:1})]),_:1})]),_:1}),e(r,{span:24,style:{"margin-top":"1vh"}}),t($)?(d(),p(r,{key:0,span:24},{default:a(()=>[e(v,null,{default:a(()=>[e(r,{span:12},{default:a(()=>[e(s,{label:"\u7B7E\u7EA6\u59D3\u540D",prop:"name"},{default:a(()=>[e(i,{modelValue:t(l).nickname,"onUpdate:modelValue":o[5]||(o[5]=n=>t(l).nickname=n),placeholder:"\u8BF7\u8F93\u5165\u7B7E\u7EA6\u59D3\u540D",disabled:!0,clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(s,{label:"\u6027\u522B",prop:"sex"},{default:a(()=>[e(i,{placeholder:"\u8BF7\u8F93\u5165\u6027\u522B",disabled:!0,clearable:"",style:{width:"100%"},value:t(l).gender=="0"?"\u7537":"\u5973"},null,8,["value"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(s,{label:"\u8EAB\u4EFD\u8BC1\u53F7",prop:"id_card"},{default:a(()=>[e(i,{modelValue:t(l).id_card,"onUpdate:modelValue":o[6]||(o[6]=n=>t(l).id_card=n),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",disabled:!0,clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),e(r,{span:12},{default:a(()=>[e(s,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"account"},{default:a(()=>[e(i,{modelValue:t(l).account,"onUpdate:modelValue":o[7]||(o[7]=n=>t(l).account=n),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",disabled:!0,clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),t(l).name?(d(),p(r,{key:0,span:12},{default:a(()=>[e(s,{label:"\u8D26\u53F7"},{default:a(()=>[e(i,{modelValue:t(l).account,"onUpdate:modelValue":o[8]||(o[8]=n=>t(l).account=n),disabled:!0,clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})):m("",!0),t(l).name?(d(),p(r,{key:1,span:12},{default:a(()=>[e(s,{label:"\u521D\u59CB\u5BC6\u7801",prop:"password"},{default:a(()=>[e(i,{"model-value":"m"+t(l).account,disabled:!0,clearable:"",style:{width:"100%"}},null,8,["model-value"])]),_:1})]),_:1})):m("",!0)]),_:1})]),_:1})):m("",!0),t(b)=="uplode"?(d(),p(r,{key:1,span:24},{default:a(()=>[e(s,{label:"\u5408\u540C\u4E0A\u4F20",prop:"field127"},{default:a(()=>[e(F,{headers:{Token:t(x).token},"file-list":t(V),"onUpdate:fileList":o[9]||(o[9]=n=>Ve(V)?V.value=n:null),class:"upload-demo",action:t(A)+"/upload/taskFile","on-success":H,multiple:"",limit:1},{default:a(()=>[e(T,{type:"primary"},{default:a(()=>[j("\u4E0A\u4F20")]),_:1})]),_:1},8,["headers","file-list","action"])]),_:1})]),_:1})):m("",!0),t(b)=="initiate"?(d(),p(r,{key:2,span:24,class:"pt-6"},{default:a(()=>[e(v,null,{default:a(()=>[e(r,{span:8},{default:a(()=>[e(s,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type"},{default:a(()=>[e(r,{span:24},{default:a(()=>[e(S,{modelValue:t(l).contract_type,"onUpdate:modelValue":o[10]||(o[10]=n=>t(l).contract_type=n),placeholder:"\u8BF7\u9009\u62E9\u5408\u540C\u7C7B\u578B",clearable:"",style:{width:"100%"}},{default:a(()=>[(d(!0),h(L,null,O(t(U).contract_type,(n,w)=>(d(),p(D,{key:w,label:n.name,value:n.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(r,{span:4},{default:a(()=>[e(s,{prop:"field139"},{default:a(()=>[t(b)=="initiate"?(d(),p(T,{key:0,type:"primary",onClick:K},{default:a(()=>[j("\u53D1\u8D77\u5408\u540C")]),_:1})):m("",!0)]),_:1})]),_:1})]),_:1})]),_:1})):m("",!0)]),_:1},8,["model"])]),_:1}),e(Be,{show:t(E).show,"onUpdate:show":o[11]||(o[11]=n=>t(E).show=n),value:t(E).value,onConfirm:J},null,8,["show","value"])])}}});export{Ba as default};
|