TaskSystem/public/admin/assets/contractDetil.b3b8aca0.js
2023-09-15 15:27:32 +08:00

2 lines
16 KiB
JavaScript

import{J as ee,k as R,K as le,B as ue,C as ae,N as oe,D as te,I as re,M as ne,w as de}from"./element-plus.49ac63ff.js";import{u as N,a as se}from"./vue-router.9f65afb1.js";import{a as ie}from"./contract.1819844c.js";import{e as pe,a as me,d as _e}from"./index.e06d2f61.js";import{b as ce}from"./consumer.cf24ef6b.js";import{d as fe,C as ve,$ as be,r as b,j as ye,af as Fe,o as s,c as y,U as e,L as u,K as f,Q as m,a as i,T as S,a7 as M,M as T,u as O,R as j,S as Be,bf as Ve,be as Ee}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.a074d1f6.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.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.40d5feba.js";const V=h=>(Ve("data-v-3d15f554"),h=h(),Ee(),h),Ce=V(()=>i("span",null,"\u7532\u65B9\u57FA\u672C\u4FE1\u606F",-1)),he=V(()=>i("span",null,"\u7532\u65B9\u8D44\u8D28\u4FE1\u606F",-1)),ge={class:"company"},De=["src"],ke={class:"company"},Ae=["src"],Ue=["src"],qe=V(()=>i("span",null,"\u4E59\u65B9\u57FA\u672C\u4FE1\u606F",-1)),we=V(()=>i("span",null,"\u4E59\u65B9\u8D44\u8D28\u4FE1\u606F",-1)),xe={class:"company"},Re=["src"],Se={class:"company"},ze=["src"],Ie=["src"],Ne=V(()=>i("span",null,"\u4E2A\u4EBA\u57FA\u672C\u4FE1\u606F",-1)),Me={class:"persenal"},Te=["src"],Oe=V(()=>i("span",null,"\u4E2A\u4EBA\u8D44\u8D28\u4FE1\u606F",-1)),je=["src"],Je=["src"],Ke=["src"],Le=["src"],Qe=["src"],$e=["src"],Ge=V(()=>i("span",null,"\u7535\u5B50\u5408\u540C",-1)),He=["href"],Pe=["href"],We=fe({__name:"contractDetil",setup(h){const{query:J}=N(),{removeTab:K}=pe(),L=ve("base_url"),n=be({id:"",company_id:"",contract_type:"",contract_type_name:"",contract_no:"",file:"",status:"",check_status:"",party_a:"",party_a_name:"",party_b:"",party_b_name:"",area_manager:"",area_manager_name:"",type_name:"",url:"",status_name:"",signed_contract_url:""});b([]);const g=b({}),r=b({}),E=b([]),d=b([]),C=b([]),p=b([]),v=b([]),A=b(!0),U=b(!0),q=b(!0),Q=N(),$=me();async function G(){const o=await ie({id:J.id});Object.keys(n).forEach(l=>{o[l]!=null&&o[l]!=null&&(n[l]=o[l])}),r.value=o.party_a_info,g.value=o,(g.value.status==1||o.check_status==3||o.status==1)&&(q.value=!1);try{o.party_a_info.qualification.bank_account=JSON.parse(o.party_a_info.qualification.bank_account),E.value=o.party_a_info.qualification,o.party_b_info.qualification.other_qualifications=JSON.parse(o.party_b_info.qualification.other_qualifications),C.value=o.party_b_info.qualification}catch{}E.value=o.party_a_info.qualification,o.type==2&&(A.value=!1,o.party_b_info.sex==1?o.party_b_info.sex="\u7537":o.party_b_info.sex="\u5973",p.value=o.party_b_info,v.value=o.party_b_info.qualification),o.type==1?(d.value=o.party_b_info,C.value=o.party_b_info.qualification,U.value=!1):d.value.company_name=o.party_b_info.nickname}const H=o=>{var l;return((l=o==null?void 0:o.name)==null?void 0:l.substring(o.name.length-4,o.name.length))!=".pdf"?(R.error("\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u6587\u4EF6"),!1):!0},D=b(null),P=o=>{D.value.clearFiles();const l=o[0];l.uid=le(),D.value.handleStart(l),D.value.submit()},W=(o,l)=>{if(o.code==0){R.error(o.msg);return}n.file=o.data.uri},X=se(),Y=()=>{if(!n.file)return R.error("\u8BF7\u5148\u4E0A\u4F20\u5408\u540C!");ce({file:n.file,id:Q.query.id}),K(),X.back()};return ye(async()=>{await G()}),(o,l)=>{const _=ue,t=ae,c=oe,F=te,B=re,k=ne,z=de,Z=ee,I=Fe("perms");return s(),y(S,null,[e(B,{class:"box-card"},{header:u(()=>[Ce]),default:u(()=>[e(F,{inline:!0,ref:"formRef",model:r.value,"label-width":"91.5px",rules:o.formRules,class:"select"},{default:u(()=>[e(t,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:r.value.company_name,"onUpdate:modelValue":l[0]||(l[0]=a=>r.value.company_name=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:r.value.organization_code,"onUpdate:modelValue":l[1]||(l[1]=a=>r.value.organization_code=a),placeholder:"\u8BF7\u8F93\u5165\u793E\u4F1A\u4EE3\u7801"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u4E3B\u8981\u8054\u7CFB\u4EBA",prop:"company_name",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:r.value.master_name,"onUpdate:modelValue":l[2]||(l[2]=a=>r.value.master_name=a),placeholder:"\u8BF7\u8F93\u5165\u4E3B\u8981\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u516C\u53F8\u7C7B\u578B",prop:"compeny"},{default:u(()=>[e(c,{disabled:"",modelValue:r.value.company_type_name,"onUpdate:modelValue":l[3]||(l[3]=a=>r.value.company_type_name=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u7C7B\u578B"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u7701",prop:"province"},{default:u(()=>[e(c,{disabled:"",modelValue:r.value.province_name,"onUpdate:modelValue":l[4]||(l[4]=a=>r.value.province_name=a),placeholder:"\u8BF7\u9009\u62E9\u7701"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:u(()=>[e(c,{disabled:"",modelValue:r.value.city_name,"onUpdate:modelValue":l[5]||(l[5]=a=>r.value.city_name=a),placeholder:"\u8BF7\u9009\u62E9\u5E02"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:u(()=>[e(c,{disabled:"",modelValue:r.value.area_name,"onUpdate:modelValue":l[6]||(l[6]=a=>r.value.area_name=a),placeholder:"\u8BF7\u9009\u62E9\u533A"},null,8,["modelValue"])]),_:1}),r.value.company_type!=30?(s(),f(t,{key:0,label:"\u9547",prop:"company_type_name"},{default:u(()=>[e(c,{disabled:"",modelValue:r.value.street_name,"onUpdate:modelValue":l[7]||(l[7]=a=>r.value.street_name=a),placeholder:"\u8BF7\u9009\u62E9\u9547"},null,8,["modelValue"])]),_:1})):m("",!0),r.value.company_type!=30?(s(),f(t,{key:1,label:"\u5730\u5740",prop:"address"},{default:u(()=>[e(_,{disabled:"",modelValue:r.value.address,"onUpdate:modelValue":l[8]||(l[8]=a=>r.value.address=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u5730\u5740",style:{width:"32rem"}},null,8,["modelValue"])]),_:1})):m("",!0)]),_:1},8,["model","rules"])]),_:1}),e(B,null,{header:u(()=>[he]),default:u(()=>[e(F,{inline:!0,ref:"formRef",model:r.value,"label-width":"90px",rules:o.formRules,class:"company_z"},{default:u(()=>{var a;return[e(t,{label:"\u516C\u53F8\u8D44\u8D28",prop:"contract_type",required:""},{default:u(()=>[i("div",ge,[i("img",{src:E.value.business_license},null,8,De)])]),_:1}),e(t,{"label-width":"120px",label:"\u5F00\u6237\u8BB8\u53EF\u8BC1",prop:"contract_no",required:""},{default:u(()=>[i("div",ke,[i("img",{src:E.value.business_licenseB},null,8,Ae)])]),_:1}),((a=E.value.other_qualifications)==null?void 0:a.length)>0?(s(),f(t,{key:0,class:"other",label:"\u5176\u4ED6\u8D44\u8D28",prop:"contract_no",required:""},{default:u(()=>[(s(!0),y(S,null,M(E.value.other_qualifications,(w,x)=>(s(),y("div",{class:"company",key:x},[i("img",{src:w},null,8,Ue)]))),128))]),_:1})):m("",!0)]}),_:1},8,["model","rules"])]),_:1}),A.value?(s(),f(B,{key:0},{header:u(()=>[qe]),default:u(()=>[e(F,{inline:!0,ref:"formRef",model:d.value,"label-width":"91.5px",rules:o.formRules,class:"select"},{default:u(()=>[e(t,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:d.value.company_name,"onUpdate:modelValue":l[9]||(l[9]=a=>d.value.company_name=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:d.value.organization_code,"onUpdate:modelValue":l[10]||(l[10]=a=>d.value.organization_code=a),placeholder:"\u8BF7\u8F93\u5165\u793E\u4F1A\u4EE3\u7801"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u516C\u53F8\u7C7B\u578B",prop:"company_type"},{default:u(()=>[e(c,{disabled:"",modelValue:d.value.company_type_name,"onUpdate:modelValue":l[11]||(l[11]=a=>d.value.company_type_name=a),placeholder:"\u8BF7\u8F93\u5165\u793E\u4F1A\u7C7B\u578B"},{default:u(()=>[e(k)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u4E3B\u8981\u8054\u7CFB\u4EBA",prop:"master_name",required:""},{default:u(()=>[e(_,{disabled:"",modelValue:d.value.master_name,"onUpdate:modelValue":l[12]||(l[12]=a=>d.value.master_name=a),placeholder:"\u8BF7\u8F93\u5165\u4E3B\u8981\u8054\u7CFB\u4EBA"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u7701",prop:"province"},{default:u(()=>[e(c,{disabled:"",modelValue:d.value.province_name,"onUpdate:modelValue":l[13]||(l[13]=a=>d.value.province_name=a),placeholder:"\u8BF7\u9009\u62E9\u7701"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:u(()=>[e(c,{disabled:"",modelValue:d.value.city_name,"onUpdate:modelValue":l[14]||(l[14]=a=>d.value.city_name=a),placeholder:"\u8BF7\u9009\u62E9\u5E02"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:u(()=>[e(c,{disabled:"",modelValue:d.value.area_name,"onUpdate:modelValue":l[15]||(l[15]=a=>d.value.area_name=a),placeholder:"\u8BF7\u9009\u62E9\u533A"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:u(()=>[e(c,{disabled:"",modelValue:d.value.street_name,"onUpdate:modelValue":l[16]||(l[16]=a=>d.value.street_name=a),placeholder:"\u8BF7\u9009\u62E9\u9547"},{default:u(()=>[e(k)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u5730\u5740",prop:"street"},{default:u(()=>[e(_,{disabled:"",modelValue:d.value.address,"onUpdate:modelValue":l[17]||(l[17]=a=>d.value.address=a),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u5730\u5740",style:{width:"31.5rem"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1})):m("",!0),A.value?(s(),f(B,{key:1},{header:u(()=>[we]),default:u(()=>[e(F,{inline:!0,ref:"formRef",model:n,"label-width":"90px",rules:o.formRules,class:"company_z"},{default:u(()=>{var a;return[e(t,{label:"\u516C\u53F8\u8D44\u8D28",prop:"contract_type",required:""},{default:u(()=>[i("div",xe,[i("img",{src:C.value.business_license},null,8,Re)])]),_:1}),e(t,{"label-width":"120px",label:"\u5F00\u6237\u8BB8\u53EF\u8BC1",prop:"contract_no",required:""},{default:u(()=>[i("div",Se,[i("img",{src:C.value.business_licenseB},null,8,ze)])]),_:1}),((a=C.value.other_qualifications)==null?void 0:a.length)>0?(s(),f(t,{key:0,class:"other",label:"\u5176\u4ED6\u8D44\u8D28",prop:"contract_no",required:""},{default:u(()=>[(s(!0),y(S,null,M(C.value.other_qualifications,(w,x)=>(s(),y("div",{class:"company",key:x},[i("img",{src:w},null,8,Ie)]))),128))]),_:1})):m("",!0)]}),_:1},8,["model","rules"])]),_:1})):m("",!0),U.value?(s(),f(B,{key:2},{header:u(()=>[Ne]),default:u(()=>[i("div",Me,[i("img",{src:p.value.avatar},null,8,Te),e(F,{inline:!0,ref:"formRef",model:p.value,"label-width":"90px",rules:o.formRules,class:"person_select"},{default:u(()=>[e(t,{label:"\u59D3\u540D"},{default:u(()=>[e(_,{disabled:"",modelValue:p.value.nickname,"onUpdate:modelValue":l[18]||(l[18]=a=>p.value.nickname=a),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u6027\u522B"},{default:u(()=>[e(_,{disabled:"",modelValue:p.value.sex,"onUpdate:modelValue":l[19]||(l[19]=a=>p.value.sex=a),placeholder:"\u8BF7\u8F93\u5165\u6027\u522B"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u8054\u7CFB\u7535\u8BDD"},{default:u(()=>[e(_,{disabled:"",modelValue:p.value.mobile,"onUpdate:modelValue":l[20]||(l[20]=a=>p.value.mobile=a),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u8EAB\u4EFD\u8BC1\u53F7"},{default:u(()=>[e(_,{modelValue:p.value.id_card,"onUpdate:modelValue":l[21]||(l[21]=a=>p.value.id_card=a),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",disabled:""},null,8,["modelValue"])]),_:1}),e(t,{label:"\u7701",prop:"province"},{default:u(()=>[e(c,{disabled:"",modelValue:p.value.province_name,"onUpdate:modelValue":l[22]||(l[22]=a=>p.value.province_name=a),placeholder:"\u8BF7\u9009\u62E9\u7701"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:u(()=>[e(c,{disabled:"",modelValue:p.value.city_name,"onUpdate:modelValue":l[23]||(l[23]=a=>p.value.city_name=a),placeholder:"\u8BF7\u9009\u62E9\u5E02"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:u(()=>[e(c,{disabled:"",modelValue:p.value.area_name,"onUpdate:modelValue":l[24]||(l[24]=a=>p.value.area_name=a),placeholder:"\u8BF7\u9009\u62E9\u533A"},{default:u(()=>[e(k)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:u(()=>[e(c,{disabled:"",modelValue:p.value.street_name,"onUpdate:modelValue":l[25]||(l[25]=a=>p.value.street_name=a),placeholder:"\u8BF7\u9009\u62E9\u9547"},{default:u(()=>[e(k)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])]),_:1})):m("",!0),U.value?(s(),f(B,{key:3},{header:u(()=>[Oe]),default:u(()=>[e(F,{class:"idcard",model:v.value,inline:!0},{default:u(()=>[e(t,{label:"\u8EAB\u4EFD\u8BC1"},{default:u(()=>[i("img",{src:v.value.id_card},null,8,je),i("img",{src:v.value.id_card_b},null,8,Je)]),_:1}),e(t,{label:"\u94F6\u884C\u5361"},{default:u(()=>[i("img",{src:v.value.bank_account},null,8,Ke),i("img",{src:v.value.bank_account_b},null,8,Le)]),_:1}),v.value.car_card||v.value.car_card_b?(s(),f(t,{key:0,label:"\u884C\u9A76\u8BC1"},{default:u(()=>[v.value.car_card?(s(),y("img",{key:0,src:v.value.car_card},null,8,Qe)):m("",!0),v.value.car_card_b?(s(),y("img",{key:1,src:v.value.car_card_b},null,8,$e)):m("",!0)]),_:1})):m("",!0)]),_:1},8,["model"])]),_:1})):m("",!0),e(B,null,{header:u(()=>[Ge]),default:u(()=>[e(F,{inline:!0,class:"frame",ref:"formRef",model:n,"label-width":"90px",rules:o.formRules},{default:u(()=>[e(t,{label:"\u7532\u65B9",prop:"contract_type"},{default:u(()=>[e(_,{modelValue:r.value.company_name,"onUpdate:modelValue":l[26]||(l[26]=a=>r.value.company_name=a),disabled:!0,placeholder:"\u6682\u65E0\u7532\u65B9\u65B9"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u4E59\u65B9",prop:"contract_no"},{default:u(()=>[e(_,{modelValue:d.value.company_name,"onUpdate:modelValue":l[27]||(l[27]=a=>d.value.company_name=a),disabled:!0,placeholder:"\u6682\u65E0\u4E59\u65B9"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5408\u540C\u7C7B\u578B",prop:"contract_no"},{default:u(()=>[e(_,{modelValue:g.value.contract_type_name,"onUpdate:modelValue":l[28]||(l[28]=a=>g.value.contract_type_name=a),disabled:!0,placeholder:"\u6682\u65E0\u5408\u540C"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1}),e(B,null,{default:u(()=>[e(F,{"label-width":"100px"},{default:u(()=>[q.value||(n==null?void 0:n.status)==0?(s(),f(t,{key:0,label:"\u5408\u540C\u4E0A\u4F20",prop:"field127"},{default:u(()=>[(n==null?void 0:n.status)==0?T((s(),f(Z,{key:0,accept:".pdf",headers:{Token:O($).token},class:"upload-demo",action:O(L)+"/upload/file","on-success":W,"before-upload":H,limit:1,"on-exceed":P,ref_key:"upload",ref:D},{default:u(()=>[e(z,{type:"primary"},{default:u(()=>[j(Be(n.file?"\u91CD\u65B0\u4E0A\u4F20":"\u4E0A\u4F20"),1)]),_:1})]),_:1},8,["headers","action"])),[[I,["contract.contract/wind_control"]]]):m("",!0),n.file?(s(),y("a",{key:1,style:{"margin-left":"10px",color:"#4a5dff","align-self":"flex-start"},href:n.file,target:"_blank"},"\u5408\u540C\u5DF2\u4E0A\u4F20,\u70B9\u51FB\u67E5\u770B",8,He)):m("",!0)]),_:1})):m("",!0),q.value||n.status==0?(s(),f(t,{key:1},{default:u(()=>[T((s(),f(z,{type:"primary",onClick:Y},{default:u(()=>[j("\u786E\u5B9A")]),_:1})),[[I,["contract.contract/wind_control"]]])]),_:1})):n.file&&n.status?(s(),f(t,{key:2},{default:u(()=>[n.file?(s(),y("a",{key:0,style:{"margin-left":"10px",color:"#4a5dff"},href:n.signed_contract_url?n.signed_contract_url:n.file,target:"_blank"},"\u67E5\u770B\u5408\u540C",8,Pe)):m("",!0)]),_:1})):m("",!0)]),_:1})]),_:1})],64)}}});const Rl=_e(We,[["__scopeId","data-v-3d15f554"]]);export{Rl as default};