2 lines
8.8 KiB
JavaScript
2 lines
8.8 KiB
JavaScript
import{T as G,I as W,c as X,J as Y,B as Z,C as ee,_ as ae,M as te,N as le,$ as oe,w as ue,D as ne,k as S}from"./element-plus.9c2fdfa8.js";import{a as se,u as re}from"./vue-router.e2f4a118.js";import{a as de,u as ie,i as ce}from"./consumer.8d003425.js";import{n as pe}from"./company.0e78bc1e.js";import{e as me,a as _e,f as fe}from"./index.5be037e5.js";import{d as be}from"./dict.6bcfed15.js";import"./dialog_index.vue_vue_type_script_setup_true_name_companyLists_lang.18e17e8c.js";import"./lodash.47b8af7d.js";import{d as q,C as ye,r as p,$ as D,s as Fe,a4 as j,o as i,c as h,U as e,L as a,u as t,a as O,K as c,Q as m,k as ve,R as T,T as Be,a7 as Ce}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.96be3cef.js";import"./pinia.bd103f5d.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.efc99072.js";import"./color.e83714e9.js";import"./clone.fb54e01d.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.b4b577c6.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";const Ee=O("div",{style:{"font-size":"1.2rem",margin:"10px 0"}},"\u57FA\u672C\u4FE1\u606F",-1),ke={class:"headimg"},we=["src"],Ve=q({name:"consumerDetail"}),_a=q({...Ve,setup(De){const g=ye("base_url");me(),se();const _=re(),v=p(!0),l=D({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:""}}),I=p(!1),B=D({show:!1,value:""}),A=D({provinceOptions:[],cityOptions:[],areaOptions:[],streetOptions:[],dictTypeLists:[],contract_type:[],contract:[]}),N=Fe();p(!1),p(!1);const U=_e(),M=async()=>{const u=await be({type_id:7});A.contract_type=u.lists},f=p(null);M();const x=async()=>{var o,b,y,E,k,F;const u=await pe({user_id:_.query.id});console.log(u),Object.keys(l).forEach(d=>{l[d]=u[d]}),f.value=_.query.mode,l.sex=u.sex,l.mobile=u.mobile,l.contract_type=(o=u.contract)==null?void 0:o.contract_type,l.party_b_name=(b=u.contract)==null?void 0:b.party_b_name,l.party_b=(y=u.contract)==null?void 0:y.party_b,l.file=(E=u.contract)==null?void 0:E.file,u.contract&&(C.value[0]={url:(k=u.contract)==null?void 0:k.file,name:(F=u.contract)!=null?F:"\u5408\u540C\u6587\u4EF6"}),await getCityList(),await getAreaList(),await getStreetList()},C=p([]),P=(u,o)=>{if(u.code==0){S.error(u.msg);return}l.avatar=u.data.uri},$=(u,o)=>{if(u.code==0){S.error(u.msg);return}l.file=u.data.uri,ie({file:l.file,id:_.query.mdoeid}).then(b=>[f.value=!1])},z=async u=>{await de({user_id:_.query.id,...u}),B.show=!1,x()},H=()=>{const{contract_type:u}=l;ce({party_b:_.query.id,contract_type:u,type:2}).then(o=>{fe.msgSuccess("\u53D1\u8D77\u6210\u529F\uFF0C\u7B49\u5F85\u5E73\u53F0\u98CE\u63A7\u90E8\u4E0A\u4F20\u5408\u540C")})};return x(),console.log(l),(u,o)=>{const b=G,y=W,E=j("Plus"),k=X,F=Y,d=Z,r=ee,s=ae,V=te,L=le,w=oe,R=ue,J=ne,K=j("account-adjust");return i(),h("div",null,[e(y,{class:"!border-none",shadow:"never"},{default:a(()=>[e(b,{content:"\u7528\u6237\u8BE6\u60C5",onBack:o[0]||(o[0]=n=>u.$router.back())})]),_:1}),e(y,{class:"mt-4 !border-none",shadow:"never"},{default:a(()=>[e(J,{ref_key:"formRef",ref:N,model:t(l),"label-width":"84px"},{default:a(()=>[Ee,O("div",ke,[e(F,{modelValue:t(l).avatar,"onUpdate:modelValue":o[1]||(o[1]=n=>t(l).avatar=n),class:"avatar-uploader-head",disabled:t(v),data:{cid:1},headers:{Token:t(U).token},action:t(g)+"/upload/taskImage","show-file-list":!1,"on-success":P},{default:a(()=>[t(l).avatar?(i(),h("img",{key:0,src:t(l).avatar,class:"avatar"},null,8,we)):(i(),c(k,{key:1,class:"avatar-uploader-icon"},{default:a(()=>[e(E)]),_:1}))]),_:1},8,["modelValue","disabled","headers","action"])]),e(s,{class:"pt-6 !border-none"},{default:a(()=>[e(w,null,{default:a(()=>[e(s,{span:11},{default:a(()=>[e(r,{label:"\u59D3\u540D",prop:"nickname"},{default:a(()=>[e(d,{modelValue:t(l).nickname,"onUpdate:modelValue":o[2]||(o[2]=n=>t(l).nickname=n),disabled:t(v),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e(s,{span:13},{default:a(()=>[e(r,{label:"\u6027\u522B",prop:"gender"},{default:a(()=>[e(L,{modelValue:t(l).sex,"onUpdate:modelValue":o[3]||(o[3]=n=>t(l).sex=n),disabled:t(v),placeholder:"\u8BF7\u9009\u62E9\u6027\u522B",style:{width:"100%"}},{default:a(()=>[e(V,{label:"\u7537",value:0}),e(V,{label:"\u5973",value:1})]),_:1},8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}),e(w,null,{default:a(()=>[e(s,{span:13},{default:a(()=>[e(r,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"mobile"},{default:a(()=>[e(d,{modelValue:t(l).mobile,"onUpdate:modelValue":o[4]||(o[4]=n=>t(l).mobile=n),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD",disabled:t(v),clearable:"",style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})]),_:1}),e(s,{span:24,style:{"margin-top":"1vh"}}),t(I)?(i(),c(s,{key:0,span:24},{default:a(()=>[e(w,null,{default:a(()=>[e(s,{span:12},{default:a(()=>[e(r,{label:"\u7B7E\u7EA6\u59D3\u540D",prop:"name"},{default:a(()=>[e(d,{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(s,{span:12},{default:a(()=>[e(r,{label:"\u6027\u522B",prop:"sex"},{default:a(()=>[e(d,{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(s,{span:12},{default:a(()=>[e(r,{label:"\u8EAB\u4EFD\u8BC1\u53F7",prop:"id_card"},{default:a(()=>[e(d,{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(s,{span:12},{default:a(()=>[e(r,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"account"},{default:a(()=>[e(d,{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?(i(),c(s,{key:0,span:12},{default:a(()=>[e(r,{label:"\u8D26\u53F7"},{default:a(()=>[e(d,{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?(i(),c(s,{key:1,span:12},{default:a(()=>[e(r,{label:"\u521D\u59CB\u5BC6\u7801",prop:"password"},{default:a(()=>[e(d,{"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(f)=="uplode"?(i(),c(s,{key:1,span:24},{default:a(()=>[e(r,{label:"\u5408\u540C\u4E0A\u4F20",prop:"field127"},{default:a(()=>[e(F,{headers:{Token:t(U).token},"file-list":t(C),"onUpdate:fileList":o[9]||(o[9]=n=>ve(C)?C.value=n:null),class:"upload-demo",action:t(g)+"/upload/taskFile","on-success":$,multiple:"",limit:1},{default:a(()=>[e(R,{type:"primary"},{default:a(()=>[T("\u4E0A\u4F20")]),_:1})]),_:1},8,["headers","file-list","action"])]),_:1})]),_:1})):m("",!0),t(f)=="initiate"?(i(),c(s,{key:2,span:24,class:"pt-6"},{default:a(()=>[e(w,null,{default:a(()=>[e(s,{span:8},{default:a(()=>[e(r,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_type"},{default:a(()=>[e(s,{span:24},{default:a(()=>[e(L,{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(()=>[(i(!0),h(Be,null,Ce(t(A).contract_type,(n,Q)=>(i(),c(V,{key:Q,label:n.name,value:n.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(s,{span:4},{default:a(()=>[e(r,{prop:"field139"},{default:a(()=>[t(f)=="initiate"?(i(),c(R,{key:0,type:"primary",onClick:H},{default:a(()=>[T("\u53D1\u8D77\u5408\u540C")]),_:1})):m("",!0)]),_:1})]),_:1})]),_:1})]),_:1})):m("",!0)]),_:1},8,["model"])]),_:1}),e(K,{show:t(B).show,"onUpdate:show":o[11]||(o[11]=n=>t(B).show=n),value:t(B).value,onConfirm:z},null,8,["show","value"])])}}});export{_a as default};
|