import{B as T,C as L,_ as z,$ as I,D as J,F as $,Z as A,w as G,J as K}from"./element-plus.9c2fdfa8.js";import{a as O,u as Q}from"./vue-router.e2f4a118.js";import{l as Z,f as H}from"./contract.707fdd59.js";import{a as M}from"./index.5be037e5.js";import{r as P,$ as W,C as X,o as p,c as m,U as e,L as a,a as r,Q as c,K as f,u as w,T as g,a7 as k,R as U,S as Y}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"./lodash.47b8af7d.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";const ee={class:"edit-popup"},le=r("div",{class:"tit"},"\u7532\u65B9\u4FE1\u606F",-1),ae=r("div",{class:"tit"},"\u4E3B\u8981\u8054\u7CFB\u4EBA",-1),oe={style:{display:"flex","justify-content":"left"}},te={class:"right"},de=r("div",{class:"tit"},"\u4E59\u65B9\u4FE1\u606F",-1),se=r("div",{class:"tit"},"\u4E3B\u8981\u8054\u7CFB\u4EBA",-1),ne={style:{display:"flex","justify-content":"left"}},ie={class:"right"},re=r("div",{class:"tit"},"\u79DF\u8D41\u4FE1\u606F",-1),pe={key:0,class:"el-card pt-6"},ue=r("div",{class:"tit"},"\u79DF\u8D41\u4FE1\u606F",-1),_e={style:{padding:"0 2vw"}},me={class:"el-card pt-6"},ce=["href"],fe=["href"],Ye={__name:"vehicle_detail",setup(be){const E=M(),C=O(),h=Q(),V=P([]),l=W({contract_logistic_id:"",contract_no:"",company_a_id:"",company_a_name:"",company_a_code:"",company_a_user:"",company_a_phone:"",company_a_email:"@service.ebaoquan.org",company_b_id:"",company_b_name:"",company_b_user:"",company_b_phone:"",company_b_code:"",company_b_email:"@service.ebaoquan.org",num:"",cars_info:[{id:"",license:"",type:"",rent_time:""}],car_list:[],type:0,status:0,file:"",contract_url:"",signing_timer:0,url:null,create_time:"2023-08-31 14:26:42",update_time:"2023-08-31 14:26:49",reject_message:""});let b=[];const x=X("base_url"),D=d=>{b=[],d.map(o=>{l.car_list.forEach(n=>{n.license==o&&b.push(n)})})},F=d=>{if(d==0)return"\u79DF\u8D41\u8F66\u8F86";if(d==1)return"\u81EA\u6709\u8F66\u8F86";if(d==2)return"\u8D2D\u4E70\u8F66\u8F86"};Z({id:h.query.id}).then(d=>{for(let o in l)l[o]=d[o];l.cars_info.forEach(o=>{o.type=F(o.type)})});const B=(d,o)=>{l.file=d.data.uri},R=()=>{H({id:h.query.id,file:l.file,cars:JSON.stringify(b)}).then(d=>{setTimeout(()=>{C.go(-1)},1e3)})};return(d,o)=>{const n=T,i=L,s=z,u=I,S=J,N=$,j=A,v=G,q=K;return p(),m("div",ee,[e(S,{ref:"formRef",model:l,"label-width":"90px",rules:d.formRules,disabled:!0},{default:a(()=>[e(s,{span:24,class:"el-card pt-6"},{default:a(()=>[le,e(u,null,{default:a(()=>[e(s,{span:8},{default:a(()=>[e(i,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name"},{default:a(()=>[e(n,{modelValue:l.company_a_name,"onUpdate:modelValue":o[0]||(o[0]=t=>l.company_a_name=t),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0",clearable:"",disabled:d.isDisabled,style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_a_code,"onUpdate:modelValue":o[1]||(o[1]=t=>l.company_a_code=t),placeholder:"\u8BF7\u8F93\u5165\u793E\u4F1A\u4EE3\u7801",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),e(s,{span:24,class:"el-card pt-6"},{default:a(()=>[ae,e(u,null,{default:a(()=>[r("div",oe,[r("div",te,[e(u,null,{default:a(()=>[e(s,{span:8},{default:a(()=>[e(i,{label:"\u59D3\u540D",prop:"master_name"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_a_user,"onUpdate:modelValue":o[2]||(o[2]=t=>l.company_a_user=t),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u624B\u673A",prop:"master_phone"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_a_phone,"onUpdate:modelValue":o[3]||(o[3]=t=>l.company_a_phone=t),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u90AE\u7BB1"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_a_email,"onUpdate:modelValue":o[4]||(o[4]=t=>l.company_a_email=t),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1})])])]),_:1})]),_:1}),e(s,{span:24,class:"el-card pt-6"},{default:a(()=>[de,e(u,null,{default:a(()=>[e(s,{span:8},{default:a(()=>[e(i,{label:"\u516C\u53F8\u540D\u79F0",prop:"company_name"},{default:a(()=>[e(n,{modelValue:l.company_b_name,"onUpdate:modelValue":o[5]||(o[5]=t=>l.company_b_name=t),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0",clearable:"",disabled:d.isDisabled,style:{width:"100%"}},null,8,["modelValue","disabled"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u793E\u4F1A\u4EE3\u7801",prop:"organization_code"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_b_code,"onUpdate:modelValue":o[6]||(o[6]=t=>l.company_b_code=t),placeholder:"\u8BF7\u8F93\u5165\u793E\u4F1A\u4EE3\u7801",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1})]),_:1}),e(s,{span:24,class:"el-card pt-6"},{default:a(()=>[se,e(u,null,{default:a(()=>[r("div",ne,[r("div",ie,[e(u,null,{default:a(()=>[e(s,{span:8},{default:a(()=>[e(i,{label:"\u59D3\u540D",prop:"master_name"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_b_user,"onUpdate:modelValue":o[7]||(o[7]=t=>l.company_b_user=t),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u624B\u673A",prop:"master_phone"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_b_phone,"onUpdate:modelValue":o[8]||(o[8]=t=>l.company_b_phone=t),placeholder:"\u8BF7\u8F93\u5165\u624B\u673A",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1}),e(s,{span:8},{default:a(()=>[e(i,{label:"\u90AE\u7BB1"},{default:a(()=>[e(n,{disabled:d.isDisabled,modelValue:l.company_b_email,"onUpdate:modelValue":o[9]||(o[9]=t=>l.company_b_email=t),placeholder:"\u8BF7\u8F93\u5165\u90AE\u7BB1",clearable:"",style:{width:"100%"}},null,8,["disabled","modelValue"])]),_:1})]),_:1})]),_:1})])])]),_:1})]),_:1}),l.cars_info?(p(),f(s,{key:0,span:24,class:"el-card pt-6"},{default:a(()=>[re,r("div",null,[(p(!0),m(g,null,k(l.cars_info,(t,y)=>(p(),f(u,{key:y},{default:a(()=>[e(s,{span:4},{default:a(()=>[e(i,{"label-width":"120px",label:"\u8F66\u724C\u53F7"},{default:a(()=>[e(n,{modelValue:t.license,"onUpdate:modelValue":_=>t.license=_,placeholder:"\u8BF7\u8F93\u5165\u8F66\u724C\u53F7",clearable:"",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),e(s,{span:4},{default:a(()=>[e(i,{"label-width":"120px",label:"\u8F66\u8F86\u7C7B\u578B"},{default:a(()=>[e(n,{modelValue:t.type,"onUpdate:modelValue":_=>t.type=_,placeholder:"\u8BF7\u8F93\u5165\u8F66\u8F86\u7C7B\u578B",clearable:"",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024),e(s,{span:6},{default:a(()=>[e(i,{"label-width":"120px",label:"\u4F7F\u7528\u516C\u53F8"},{default:a(()=>[e(n,{modelValue:l.company_b_name,"onUpdate:modelValue":o[10]||(o[10]=_=>l.company_b_name=_),placeholder:"\u8BF7\u8F93\u5165\u4F7F\u7528\u516C\u53F8",clearable:"",style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1}),e(s,{span:6},{default:a(()=>[e(i,{"label-width":"120px",label:"\u7B7E\u7EA6\u65F6\u95F4"},{default:a(()=>[e(n,{modelValue:t.rent_time,"onUpdate:modelValue":_=>t.rent_time=_,placeholder:"\u8BF7\u8F93\u5165\u7B7E\u7EA6\u65F6\u95F4",clearable:"",style:{width:"100%"}},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024)]),_:2},1024)]),_:2},1024))),128))])]),_:1})):c("",!0)]),_:1},8,["model","rules"]),l.contract_logistic_id&&l.type==0&&l.status==0?(p(),m("div",pe,[ue,r("div",_e,[e(j,{max:l.num,modelValue:V.value,"onUpdate:modelValue":o[11]||(o[11]=t=>V.value=t),onChange:D},{default:a(()=>[(p(!0),m(g,null,k(l.car_list,(t,y)=>(p(),f(N,{label:t.license,key:y},null,8,["label"]))),128))]),_:1},8,["max","modelValue"])])])):c("",!0),r("div",me,[(l==null?void 0:l.status)==0?(p(),f(q,{key:0,style:{display:"inline-block"},headers:{Token:w(E).token},action:w(x)+"/upload/taskFile","on-success":B,"before-upload":d.handleBeforeUpload,limit:1,"on-exceed":d.handleExceed,ref:"upload"},{default:a(()=>[e(v,{type:"primary"},{default:a(()=>[U(Y(l.file?"\u91CD\u65B0\u4E0A\u4F20":"\u4E0A\u4F20\u5408\u540C"),1)]),_:1})]),_:1},8,["headers","action","before-upload","on-exceed"])):c("",!0),l.file&&(l==null?void 0:l.status)==0?(p(),m("a",{key:1,style:{"margin-left":"10px",color:"#4a5dff"},href:l.file,target:"_blank"},"\u5408\u540C\u5DF2\u4E0A\u4F20,\u70B9\u51FB\u67E5\u770B",8,ce)):c("",!0),l.status>0?(p(),m("a",{key:2,style:{"margin-left":"10px",color:"#4a5dff"},href:l.file},"\u67E5\u770B\u5408\u540C",8,fe)):c("",!0)]),l.status==0?(p(),f(v,{key:1,type:"primary",onClick:R},{default:a(()=>[U("\u786E\u5B9A")]),_:1})):c("",!0)])}}};export{Ye as default};