import{K as Z,k as D,L as ee,C as le,D as ae,F as ue,J as oe,b as te,O as re,N as ne,w as de}from"./element-plus.ff90c99c.js";import{u as N,a as se}from"./vue-router.6d4cf914.js";import{a as ie,b as me}from"./shop_contract.57619865.js";import{e as pe,a as _e,d as fe}from"./index.872975fb.js";import{d as ce,E as ye,$ as ve,r as c,i as Ve,aq as be,o as s,c as b,W as e,Q as a,P as _,T as m,F as O,a9 as Ee,a as f,R as A,u as T,U,V as Fe,bg as Be,bf as ge}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 E=F=>(Be("data-v-7735eef5"),F=F(),ge(),F),ke=E(()=>f("span",null,"\u7532\u65B9\u57FA\u672C\u4FE1\u606F",-1)),Ce=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"],Re=["src"],Se=["src"],Ie=["src"],ze=["src"],Ne=E(()=>f("span",null,"\u7535\u5B50\u5408\u540C",-1)),Oe=E(()=>f("br",null,null,-1)),Te=["href"],Je=["href"],Me=ce({__name:"details",setup(F){const{query:J}=N(),{removeTab:M}=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([]),R=c(!0),h=c(!1),q=c(!0),L=N(),W=_e();async function K(){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,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 P=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),Q=o=>{g.value.clearFiles();const l=o[0];l.uid=ee(),g.value.handleStart(l),g.value.submit()},$=(o,l)=>{if(o.code==0){D.error(o.msg);return}n.file=o.data.uri},G=se(),H=()=>{if(!n.file)return D.error("\u8BF7\u5148\u4E0A\u4F20\u5408\u540C!");me({file:n.file,id:L.query.id}),M(),G.back()};return Ve(async()=>{await K()}),(o,l)=>{const d=le,t=ae,v=ue,V=oe,X=te,k=re,S=ne,I=de,Y=Z,C=be("perms");return s(),b(O,null,[e(V,{class:"box-card"},{header:a(()=>[ke]),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),R.value?(s(),_(V,{key:1},{header:a(()=>[Ce]),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),R.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(O,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(k,{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(k,{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(k,{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(S)]),_:1},8,["modelValue"])]),_:1}),e(t,{label:"\u9547",prop:"street"},{default:a(()=>[e(k,{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(S)]),_: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,Re),f("img",{src:y.value.bank_account_b},null,8,Se)]),_: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}),Oe,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(W).token},class:"upload-demo",action:T(j)+"/upload/file","on-success":$,"before-upload":P,limit:1,"on-exceed":Q,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"])),[[C,["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)),[[C,["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:H},{default:a(()=>[U("\u786E\u5B9A")]),_:1})),[[C,["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,Je)),[[C,["shop_contract/file"]]]):m("",!0)]),_:1})):m("",!0)]),_:1})]),_:1})],64)}}});const Al=fe(Me,[["__scopeId","data-v-7735eef5"]]);export{Al as default};