import{K as le,k as S,L as ue,C as ae,D as oe,O as te,F as re,J as ne,b as de,N as se,w as ie}from"./element-plus.ff90c99c.js";import{u as O,a as pe}from"./vue-router.6d4cf914.js";import{a as me}from"./contract.36754f6e.js";import{e as _e,a as ce,d as fe}from"./index.872975fb.js";import{e as ve}from"./consumer.1ee198e4.js";import{d as be,E as ye,$ as Fe,r as b,i as Be,aq as Ve,o as s,c as B,W as e,Q as u,P as f,T as m,a as p,F as z,a9 as T,R as J,u as M,U as j,V as Ee,bg as Ce,bf as he}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"./lodash.3e731b89.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";const C=D=>(Ce("data-v-7d71011d"),D=D(),he(),D),ge=C(()=>p("span",null,"\u7532\u65B9\u57FA\u672C\u4FE1\u606F",-1)),De=C(()=>p("span",null,"\u7532\u65B9\u8D44\u8D28\u4FE1\u606F",-1)),ke={class:"company"},Ae={class:"company"},we=C(()=>p("span",null,"\u4E59\u65B9\u57FA\u672C\u4FE1\u606F",-1)),Ue=C(()=>p("span",null,"\u4E59\u65B9\u8D44\u8D28\u4FE1\u606F",-1)),qe={class:"company"},xe={class:"company"},Re=C(()=>p("span",null,"\u4E2A\u4EBA\u57FA\u672C\u4FE1\u606F",-1)),Se={class:"persenal"},ze=["src"],Ie=C(()=>p("span",null,"\u4E2A\u4EBA\u8D44\u8D28\u4FE1\u606F",-1)),Ne=["src"],Oe=["src"],Te=["src"],Je=["src"],Me=["src"],je=["src"],Le=C(()=>p("span",null,"\u7535\u5B50\u5408\u540C",-1)),Ke=["href"],Pe=["href"],Qe=be({__name:"contractDetil",setup(D){const{query:L}=O(),{removeTab:K}=_e(),P=ye("base_url"),n=Fe({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 k=b({}),r=b({}),y=b([]),d=b([]),F=b([]),i=b([]),v=b([]),U=b(!0),q=b(!0),x=b(!0),Q=O(),W=ce();async function $(){const o=await me({id:L.id});Object.keys(n).forEach(l=>{o[l]!=null&&o[l]!=null&&(n[l]=o[l])}),r.value=o.party_a_info,k.value=o,(k.value.status==1||o.check_status==3||o.status==1)&&(x.value=!1);try{o.party_a_info.qualification.bank_account=JSON.parse(o.party_a_info.qualification.bank_account),y.value=o.party_a_info.qualification,o.party_b_info.qualification.other_qualifications=JSON.parse(o.party_b_info.qualification.other_qualifications),F.value=o.party_b_info.qualification}catch{}y.value=o.party_a_info.qualification,o.type==2&&(U.value=!1,o.party_b_info.sex==1?o.party_b_info.sex="\u7537":o.party_b_info.sex="\u5973",i.value=o.party_b_info,v.value=o.party_b_info.qualification),o.type==1?(d.value=o.party_b_info,F.value=o.party_b_info.qualification,q.value=!1):d.value.company_name=o.party_b_info.nickname}const G=o=>{var l;return((l=o==null?void 0:o.name)==null?void 0:l.substring(o.name.length-4,o.name.length))!=".pdf"?(S.error("\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u6587\u4EF6"),!1):!0},A=b(null),H=o=>{A.value.clearFiles();const l=o[0];l.uid=ue(),A.value.handleStart(l),A.value.submit()},X=(o,l)=>{if(o.code==0){S.error(o.msg);return}n.file=o.data.uri},Y=pe(),Z=()=>{if(!n.file)return S.error("\u8BF7\u5148\u4E0A\u4F20\u5408\u540C!");ve({file:n.file,id:Q.query.id}),K(),Y.back()};return Be(async()=>{await $()}),(o,l)=>{const _=ae,t=oe,c=te,V=re,E=ne,h=de,w=se,I=ie,ee=le,N=Ve("perms");return s(),B(z,null,[e(E,{class:"box-card"},{header:u(()=>[ge]),default:u(()=>[e(V,{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(E,null,{header:u(()=>[De]),default:u(()=>[e(V,{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(()=>[p("div",ke,[e(h,{src:y.value.business_license,"preview-src-list":[y.value.business_license],"initial-index":0,fit:"cover"},null,8,["src","preview-src-list"])])]),_:1}),e(t,{"label-width":"120px",label:"\u5F00\u6237\u8BB8\u53EF\u8BC1",prop:"contract_no",required:""},{default:u(()=>[p("div",Ae,[e(h,{src:y.value.business_licenseB,"preview-src-list":[y.value.business_licenseB],"initial-index":0,fit:"cover"},null,8,["src","preview-src-list"])])]),_:1}),((a=y.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),B(z,null,T(y.value.other_qualifications,(R,g)=>(s(),B("div",{class:"company",key:g},[e(h,{src:R,"preview-src-list":y.value.other_qualifications,"initial-index":g,fit:"cover"},null,8,["src","preview-src-list","initial-index"])]))),128))]),_:1})):m("",!0)]}),_:1},8,["model","rules"])]),_:1}),U.value?(s(),f(E,{key:0},{header:u(()=>[we]),default:u(()=>[e(V,{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(w)]),_: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(w)]),_: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),U.value?(s(),f(E,{key:1},{header:u(()=>[Ue]),default:u(()=>[e(V,{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(()=>[p("div",qe,[e(h,{src:F.value.business_license,"preview-src-list":[F.value.business_license],"initial-index":0,fit:"cover"},null,8,["src","preview-src-list"])])]),_:1}),e(t,{"label-width":"120px",label:"\u5F00\u6237\u8BB8\u53EF\u8BC1",prop:"contract_no",required:""},{default:u(()=>[p("div",xe,[e(h,{src:F.value.business_licenseB,"preview-src-list":[F.value.business_licenseB],"initial-index":0,fit:"cover"},null,8,["src","preview-src-list"])])]),_:1}),((a=F.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),B(z,null,T(F.value.other_qualifications,(R,g)=>(s(),B("div",{class:"company",key:g},[e(h,{src:R,"preview-src-list":F.value.other_qualifications,"initial-index":g,fit:"cover"},null,8,["src","preview-src-list","initial-index"])]))),128))]),_:1})):m("",!0)]}),_:1},8,["model","rules"])]),_:1})):m("",!0),q.value?(s(),f(E,{key:2},{header:u(()=>[Re]),default:u(()=>[p("div",Se,[p("img",{src:i.value.avatar},null,8,ze),e(V,{inline:!0,ref:"formRef",model:i.value,"label-width":"90px",rules:o.formRules,class:"person_select"},{default:u(()=>[e(t,{label:"\u59D3\u540D"},{default:u(()=>[e(_,{disabled:"",modelValue:i.value.nickname,"onUpdate:modelValue":l[18]||(l[18]=a=>i.value.nickname=a),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u6027\u522B"},{default:u(()=>[e(_,{disabled:"",modelValue:i.value.sex,"onUpdate:modelValue":l[19]||(l[19]=a=>i.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:i.value.mobile,"onUpdate:modelValue":l[20]||(l[20]=a=>i.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:i.value.id_card,"onUpdate:modelValue":l[21]||(l[21]=a=>i.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:i.value.province_name,"onUpdate:modelValue":l[22]||(l[22]=a=>i.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:i.value.city_name,"onUpdate:modelValue":l[23]||(l[23]=a=>i.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:i.value.area_name,"onUpdate:modelValue":l[24]||(l[24]=a=>i.value.area_name=a),placeholder:"\u8BF7\u9009\u62E9\u533A"},{default:u(()=>[e(w)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:u(()=>[e(c,{disabled:"",modelValue:i.value.street_name,"onUpdate:modelValue":l[25]||(l[25]=a=>i.value.street_name=a),placeholder:"\u8BF7\u9009\u62E9\u9547"},{default:u(()=>[e(w)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])]),_:1})):m("",!0),q.value?(s(),f(E,{key:3},{header:u(()=>[Ie]),default:u(()=>[e(V,{class:"idcard",model:v.value,inline:!0},{default:u(()=>[e(t,{label:"\u8EAB\u4EFD\u8BC1"},{default:u(()=>[p("img",{src:v.value.id_card},null,8,Ne),p("img",{src:v.value.id_card_b},null,8,Oe)]),_:1}),e(t,{label:"\u94F6\u884C\u5361"},{default:u(()=>[p("img",{src:v.value.bank_account},null,8,Te),p("img",{src:v.value.bank_account_b},null,8,Je)]),_: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(),B("img",{key:0,src:v.value.car_card},null,8,Me)):m("",!0),v.value.car_card_b?(s(),B("img",{key:1,src:v.value.car_card_b},null,8,je)):m("",!0)]),_:1})):m("",!0)]),_:1},8,["model"])]),_:1})):m("",!0),e(E,null,{header:u(()=>[Le]),default:u(()=>[e(V,{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:k.value.contract_type_name,"onUpdate:modelValue":l[28]||(l[28]=a=>k.value.contract_type_name=a),disabled:!0,placeholder:"\u6682\u65E0\u5408\u540C"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1}),e(E,null,{default:u(()=>[e(V,{"label-width":"100px"},{default:u(()=>[x.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?J((s(),f(ee,{key:0,accept:".pdf",headers:{Token:M(W).token},class:"upload-demo",action:M(P)+"/upload/file","on-success":X,"before-upload":G,limit:1,"on-exceed":H,ref_key:"upload",ref:A},{default:u(()=>[e(I,{type:"primary"},{default:u(()=>[j(Ee(n.file?"\u91CD\u65B0\u4E0A\u4F20":"\u4E0A\u4F20"),1)]),_:1})]),_:1},8,["headers","action"])),[[N,["contract.contract/wind_control"]]]):m("",!0),n.file?(s(),B("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,Ke)):m("",!0)]),_:1})):m("",!0),x.value||n.status==0?(s(),f(t,{key:1},{default:u(()=>[J((s(),f(I,{type:"primary",onClick:Z},{default:u(()=>[j("\u786E\u5B9A")]),_:1})),[[N,["contract.contract/wind_control"]]])]),_:1})):n.file&&n.status?(s(),f(t,{key:2},{default:u(()=>[n.file?(s(),B("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 xl=fe(Qe,[["__scopeId","data-v-7d71011d"]]);export{xl as default};