import{J as Z,k as D,K as ee,B as le,C as ae,D as ue,I as oe,b as te,N as re,M as ne,w as de}from"./element-plus.10e48c93.js";import{u as N,a as se}from"./vue-router.9f65afb1.js";import{a as ie,b as me}from"./shop_contract.f879400c.js";import{e as pe,a as _e,d as fe}from"./index.5f96f8d7.js";import{d as ce,C as ye,$ as ve,r as c,j as Ve,af as be,o as s,c as b,U as e,L as a,K as _,Q as m,T as M,a7 as Ee,a as f,M as A,u as T,R as U,S as Fe,bf as Be,be as ge}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.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 E=F=>(Be("data-v-7735eef5"),F=F(),ge(),F),Ce=E(()=>f("span",null,"\u7532\u65B9\u57FA\u672C\u4FE1\u606F",-1)),ke=E(()=>f("span",null,"\u4E59\u65B9\u57FA\u672C\u4FE1\u606F",-1)),Ae=E(()=>f("span",null,"\u4E59\u65B9\u8D44\u8D28\u4FE1\u606F",-1)),Ue=E(()=>f("span",null,"\u4E2A\u4EBA\u57FA\u672C\u4FE1\u606F",-1)),he={class:"persenal"},qe=["src"],De=E(()=>f("span",null,"\u4E2A\u4EBA\u8D44\u8D28\u4FE1\u606F",-1)),we=["src"],xe=["src"],Se=["src"],Re=["src"],Ie=["src"],ze=["src"],Ne=E(()=>f("span",null,"\u7535\u5B50\u5408\u540C",-1)),Me=E(()=>f("br",null,null,-1)),Te=["href"],Oe=["href"],je=ce({__name:"details",setup(F){const{query:O}=N(),{removeTab:j}=pe(),J=ye("base_url"),n=ve({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:"",notes:""});c([]);const w=c({}),r=c({}),x=c([]),p=c([]),B=c([]),i=c([]),y=c([]),S=c(!0),h=c(!1),q=c(!0),K=N(),L=_e();async function Q(){const o=await ie({id:O.id});Object.keys(n).forEach(l=>{o[l]!=null&&o[l]!=null&&(n[l]=o[l])}),r.value=o.party_a_info,w.value=o,(w.value.status==1||o.check_status==3||o.status==1)&&(q.value=!1);try{o.party_a_info.qualification.bank_account&&(o.party_a_info.qualification.bank_account=JSON.parse(o.party_a_info.qualification.bank_account),x.value=o.party_a_info.qualification),o.party_b_info.qualification.other_qualifications&&(o.party_b_info.qualification.other_qualifications=JSON.parse(o.party_b_info.qualification.other_qualifications),B.value=o.party_b_info.qualification)}catch{}x.value=o.party_a_info.qualification,p.value=o.party_b_info,B.value=o.party_b_info.qualification,h.value=!1}const W=o=>{var l;return((l=o==null?void 0:o.name)==null?void 0:l.substring(o.name.length-4,o.name.length))!=".pdf"?(D.error("\u4EC5\u652F\u6301\u4E0A\u4F20.pdf\u6587\u4EF6"),!1):!0},g=c(null),$=o=>{g.value.clearFiles();const l=o[0];l.uid=ee(),g.value.handleStart(l),g.value.submit()},G=(o,l)=>{if(o.code==0){D.error(o.msg);return}n.file=o.data.uri},H=se(),P=()=>{if(!n.file)return D.error("\u8BF7\u5148\u4E0A\u4F20\u5408\u540C!");me({file:n.file,id:K.query.id}),j(),H.back()};return Ve(async()=>{await Q()}),(o,l)=>{const d=le,t=ae,v=ue,V=oe,X=te,C=re,R=ne,I=de,Y=Z,k=be("perms");return s(),b(M,null,[e(V,{class:"box-card"},{header:a(()=>[Ce]),default:a(()=>[e(v,{inline:!0,ref:"formRef",model:r.value,"label-width":"91.5px",rules:o.formRules,class:"select"},{default:a(()=>[e(t,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.company_name,"onUpdate:modelValue":l[0]||(l[0]=u=>r.value.company_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.organization_code,"onUpdate:modelValue":l[1]||(l[1]=u=>r.value.organization_code=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u4E3B\u8981\u8054\u7CFB\u4EBA",prop:"company_name",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.master_name,"onUpdate:modelValue":l[2]||(l[2]=u=>r.value.master_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u624B\u673A\u53F7",prop:"master_phone",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.master_phone,"onUpdate:modelValue":l[3]||(l[3]=u=>r.value.master_phone=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.city_name,"onUpdate:modelValue":l[4]||(l[4]=u=>r.value.city_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.area_name,"onUpdate:modelValue":l[5]||(l[5]=u=>r.value.area_name=u)},null,8,["modelValue"])]),_:1}),r.value.company_type!=30?(s(),_(t,{key:0,label:"\u9547",prop:"company_type_name"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.street_name,"onUpdate:modelValue":l[6]||(l[6]=u=>r.value.street_name=u)},null,8,["modelValue"])]),_:1})):m("",!0),r.value.company_type!=30?(s(),_(t,{key:1,label:"\u5730\u5740",prop:"address"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.address,"onUpdate:modelValue":l[7]||(l[7]=u=>r.value.address=u),style:{width:"32rem"}},null,8,["modelValue"])]),_:1})):m("",!0)]),_:1},8,["model","rules"])]),_:1}),m("",!0),S.value?(s(),_(V,{key:1},{header:a(()=>[ke]),default:a(()=>[e(v,{inline:!0,ref:"formRef",model:p.value,"label-width":"91.5px",rules:o.formRules,class:"select"},{default:a(()=>[e(t,{label:"\u5546\u6237\u540D\u79F0",prop:"company_name",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:p.value.company_name,"onUpdate:modelValue":l[8]||(l[8]=u=>p.value.company_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:p.value.organization_code,"onUpdate:modelValue":l[9]||(l[9]=u=>p.value.organization_code=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u4E3B\u8981\u8054\u7CFB\u4EBA",prop:"master_name",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:p.value.master_name,"onUpdate:modelValue":l[10]||(l[10]=u=>p.value.master_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u624B\u673A\u53F7",prop:"master_phone",required:""},{default:a(()=>[e(d,{readonly:"",modelValue:p.value.master_phone,"onUpdate:modelValue":l[11]||(l[11]=u=>p.value.master_phone=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.city_name,"onUpdate:modelValue":l[12]||(l[12]=u=>r.value.city_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.area_name,"onUpdate:modelValue":l[13]||(l[13]=u=>r.value.area_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:a(()=>[e(d,{readonly:"",modelValue:r.value.street_name,"onUpdate:modelValue":l[14]||(l[14]=u=>r.value.street_name=u)},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5730\u5740",prop:"street"},{default:a(()=>[e(d,{readonly:"",modelValue:p.value.address,"onUpdate:modelValue":l[15]||(l[15]=u=>p.value.address=u),style:{width:"31.5rem"}},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])]),_:1})):m("",!0),S.value?(s(),_(V,{key:2},{header:a(()=>[Ae]),default:a(()=>[e(v,{inline:!0,ref:"formRef",model:n,"label-width":"90px",rules:o.formRules,class:"company_z"},{default:a(()=>[e(t,{class:"other",label:"\u8D44\u8D28\u4FE1\u606F",prop:"contract_no",required:""},{default:a(()=>[(s(!0),b(M,null,Ee(B.value,(u,z)=>(s(),b("div",{class:"company",key:z},[e(X,{src:u,"preview-src-list":B.value,"initial-index":z,fit:"cover"},null,8,["src","preview-src-list","initial-index"])]))),128))]),_:1})]),_:1},8,["model","rules"])]),_:1})):m("",!0),h.value?(s(),_(V,{key:3},{header:a(()=>[Ue]),default:a(()=>[f("div",he,[f("img",{src:i.value.avatar},null,8,qe),e(v,{inline:!0,ref:"formRef",model:i.value,"label-width":"90px",rules:o.formRules,class:"person_select"},{default:a(()=>[e(t,{label:"\u59D3\u540D"},{default:a(()=>[e(d,{readonly:"",modelValue:i.value.nickname,"onUpdate:modelValue":l[16]||(l[16]=u=>i.value.nickname=u),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u6027\u522B"},{default:a(()=>[e(d,{readonly:"",modelValue:i.value.sex,"onUpdate:modelValue":l[17]||(l[17]=u=>i.value.sex=u),placeholder:"\u8BF7\u8F93\u5165\u6027\u522B"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u8054\u7CFB\u7535\u8BDD"},{default:a(()=>[e(d,{readonly:"",modelValue:i.value.mobile,"onUpdate:modelValue":l[18]||(l[18]=u=>i.value.mobile=u),placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u8EAB\u4EFD\u8BC1\u53F7"},{default:a(()=>[e(d,{modelValue:i.value.id_card,"onUpdate:modelValue":l[19]||(l[19]=u=>i.value.id_card=u),placeholder:"\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7",readonly:""},null,8,["modelValue"])]),_:1}),e(t,{label:"\u7701",prop:"province"},{default:a(()=>[e(C,{readonly:"",modelValue:i.value.province_name,"onUpdate:modelValue":l[20]||(l[20]=u=>i.value.province_name=u),placeholder:"\u8BF7\u9009\u62E9\u7701"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5E02",prop:"city"},{default:a(()=>[e(C,{readonly:"",modelValue:i.value.city_name,"onUpdate:modelValue":l[21]||(l[21]=u=>i.value.city_name=u),placeholder:"\u8BF7\u9009\u62E9\u5E02"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u533A",prop:"area"},{default:a(()=>[e(C,{readonly:"",modelValue:i.value.area_name,"onUpdate:modelValue":l[22]||(l[22]=u=>i.value.area_name=u),placeholder:"\u8BF7\u9009\u62E9\u533A"},{default:a(()=>[e(R)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:a(()=>[e(C,{readonly:"",modelValue:i.value.street_name,"onUpdate:modelValue":l[23]||(l[23]=u=>i.value.street_name=u),placeholder:"\u8BF7\u9009\u62E9\u9547"},{default:a(()=>[e(R)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])]),_:1})):m("",!0),h.value?(s(),_(V,{key:4},{header:a(()=>[De]),default:a(()=>[e(v,{class:"idcard",model:y.value,inline:!0},{default:a(()=>[e(t,{label:"\u8EAB\u4EFD\u8BC1"},{default:a(()=>[f("img",{src:y.value.id_card},null,8,we),f("img",{src:y.value.id_card_b},null,8,xe)]),_:1}),e(t,{label:"\u94F6\u884C\u5361"},{default:a(()=>[f("img",{src:y.value.bank_account},null,8,Se),f("img",{src:y.value.bank_account_b},null,8,Re)]),_:1}),y.value.car_card||y.value.car_card_b?(s(),_(t,{key:0,label:"\u884C\u9A76\u8BC1"},{default:a(()=>[y.value.car_card?(s(),b("img",{key:0,src:y.value.car_card},null,8,Ie)):m("",!0),y.value.car_card_b?(s(),b("img",{key:1,src:y.value.car_card_b},null,8,ze)):m("",!0)]),_:1})):m("",!0)]),_:1},8,["model"])]),_:1})):m("",!0),e(V,null,{header:a(()=>[Ne]),default:a(()=>[e(v,{inline:!0,class:"frame",ref:"formRef",model:n,"label-width":"90px",rules:o.formRules},{default:a(()=>[e(t,{label:"\u7532\u65B9",prop:"contract_type"},{default:a(()=>[e(d,{modelValue:r.value.company_name,"onUpdate:modelValue":l[24]||(l[24]=u=>r.value.company_name=u),readonly:!0,placeholder:"\u6682\u65E0\u7532\u65B9\u65B9"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u4E59\u65B9",prop:"contract_no"},{default:a(()=>[e(d,{modelValue:p.value.company_name,"onUpdate:modelValue":l[25]||(l[25]=u=>p.value.company_name=u),readonly:!0,placeholder:"\u6682\u65E0\u4E59\u65B9"},null,8,["modelValue"])]),_:1}),e(t,{label:"\u5408\u540C\u7C7B\u578B"},{default:a(()=>[e(d,{value:"\u5546\u6237\u5165\u9A7B\u5408\u540C",readonly:!0,placeholder:"\u5546\u6237\u5165\u9A7B\u5408\u540C"})]),_:1}),Me,n.notes?(s(),_(t,{key:0,label:"\u5907\u6CE8"},{default:a(()=>[e(d,{modelValue:n.notes,"onUpdate:modelValue":l[26]||(l[26]=u=>n.notes=u),readonly:!0,type:"textarea"},null,8,["modelValue"])]),_:1})):m("",!0)]),_:1},8,["model","rules"])]),_:1}),e(V,null,{default:a(()=>[e(v,{"label-width":"100px"},{default:a(()=>[q.value||(n==null?void 0:n.status)==0?(s(),_(t,{key:0,label:"\u5408\u540C\u4E0A\u4F20",prop:"field127"},{default:a(()=>[(n==null?void 0:n.status)==0?A((s(),_(Y,{key:0,accept:".pdf",headers:{Token:T(L).token},class:"upload-demo",action:T(J)+"/upload/file","on-success":G,"before-upload":W,limit:1,"on-exceed":$,ref_key:"upload",ref:g},{default:a(()=>[e(I,{type:"primary"},{default:a(()=>[U(Fe(n.file?"\u91CD\u65B0\u4E0A\u4F20":"\u4E0A\u4F20"),1)]),_:1})]),_:1},8,["headers","action"])),[[k,["shop_contract/upload"]]]):m("",!0),n.file?A((s(),b("a",{key:1,style:{"margin-left":"10px",color:"#4a5dff","align-self":"flex-start"},href:n.file,target:"_blank"},[U("\u5408\u540C\u5DF2\u4E0A\u4F20,\u70B9\u51FB\u67E5\u770B")],8,Te)),[[k,["shop_contract/file"]]]):m("",!0)]),_:1})):m("",!0),q.value||n.status==0?(s(),_(t,{key:1},{default:a(()=>[A((s(),_(I,{type:"primary",onClick:P},{default:a(()=>[U("\u786E\u5B9A")]),_:1})),[[k,["shop_contract/upload"]]])]),_:1})):n.file&&n.status?(s(),_(t,{key:2},{default:a(()=>[n.file?A((s(),b("a",{key:0,style:{"margin-left":"10px",color:"#4a5dff"},href:n.signed_contract_url?n.signed_contract_url:n.file,target:"_blank"},[U("\u67E5\u770B\u5408\u540C")],8,Oe)),[[k,["shop_contract/file"]]]):m("",!0)]),_:1})):m("",!0)]),_:1})]),_:1})],64)}}});const gl=fe(je,[["__scopeId","data-v-7735eef5"]]);export{gl as default};