You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
10KB

  1. var T=Object.defineProperty,S=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var w=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,K=Object.prototype.propertyIsEnumerable;var V=(d,a,o)=>a in d?T(d,a,{enumerable:!0,configurable:!0,writable:!0,value:o}):d[a]=o,R=(d,a)=>{for(var o in a||(a={}))B.call(a,o)&&V(d,o,a[o]);if(w)for(var o of w(a))K.call(a,o)&&V(d,o,a[o]);return d},D=(d,a)=>S(d,U(a));var _=(d,a,o)=>new Promise((f,m)=>{var b=e=>{try{c(o.next(e))}catch(h){m(h)}},v=e=>{try{c(o.throw(e))}catch(h){m(h)}},c=e=>e.done?f(e.value):Promise.resolve(e.value).then(b,v);c((o=o.apply(d,a)).next())});import{_ as j,d as M,y as O,u as X,k as z,r as y,o as E,f as L,P as G,g as x,c as H,b as C,C as J,n as Q,w as l,e as s,v as W,h as $,i as Y}from"./index.56ad3315.js";import Z from"./basicInfo.db0a1ec4.js";import ee from"./paymentInfo.d67ce369.js";import re from"./driverlicenseInfo.423030e2.js";import te from"./drivinglicenseInfo.b0d08bf5.js";import ie from"./policyInfo.9d6ab7f1.js";import oe from"./equipmentInfo.e3a79174.js";import{g as u,b as n}from"./uploadAction.9c148b89.js";import{d as ae,s as se}from"./driverManage.7d406f6e.js";import"./companyManage.4f2ff780.js";import"./useTreeSelectData.f80dc3c9.js";const ue={class:"edit"},ne={class:"footer"},de=$("\u63D0 \u4EA4"),le=$("\u8FD4 \u56DE"),ge=M({name:"edit"}),ce=Object.assign(ge,{setup(d){const{proxy:a}=Y(),o=O.userStore.userBaseInfo,f=X(),m=z(),b=y(),v=y([]),c=y(!1),e=y({cardPhotoFront:[],cardPhotoReverse:[],driverLicensePhotoFront:[],driverLicensePhotoReverse:[],drivingLicensePhotoFront:[],drivingLicensePhotoReverse:[],carPhoto:[],annualAuditPhoto:[],forcedInsurancePhoto:[],forcedInsuranceValidity:1,commercialInsurancePhoto:[],commercialInsuranceValidity:1,drivingInsurancePhoto:[],drivingInsuranceValidity:1,thirdInsurancePhoto:[],thirdInsuranceValidity:1,tripodPhoto:[],medicalKitPhoto:[],extinguisherPhoto:[]}),h={realName:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],phone:[{required:!0,pattern:/^1[3456789]\d{9}$/,message:"\u624B\u673A\u53F7\u7801\u683C\u5F0F\u4E0D\u6B63\u786E",trigger:"blur"}],companyName:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],driveRegionCode:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],idCard:[{required:!0,pattern:/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/,message:"\u8EAB\u4EFD\u8BC1\u53F7\u7801\u8F93\u5165\u4E0D\u6B63\u786E",trigger:"blur"}],gender:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],birthDate:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],age:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],address:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],cardPhotoFront:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],cardPhotoReverse:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],cardStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],cardValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],bankName:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],bankCardNo:[{required:!0,trigger:"blur",message:"\u8BF7\u8F93\u5165\u94F6\u884C\u5361\u53F7"}],driverLicenseType:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],driverLicensePhotoFront:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],driverLicensePhotoReverse:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],driverLicenseStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],driverLicenseValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],carNo:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],vehicleType:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],drivingLicensePhotoFront:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],drivingLicensePhotoReverse:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],carPhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],annualAuditPhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],annualAuditPass:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],annualAuditValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],insuredAmount:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],thirdInsurance:[{required:!0,message:"\u8BF7\u8F93\u5165",trigger:"blur"}],personnelInsurance:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],forcedInsurance:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],vehicleAge:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],mileage:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],forcedInsurancePhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],forcedInsuranceStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],forcedInsuranceValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],commercialInsurancePhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],commercialInsuranceStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],commercialInsuranceValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],drivingInsurancePhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],drivingInsuranceStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],drivingInsuranceValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],thirdInsurancePhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],thirdInsuranceStartTime:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],thirdInsuranceValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],tripodPhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],medicalKitPhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],extinguisherPhoto:[{required:!0,message:"\u8BF7\u4E0A\u4F20",trigger:"blur"}],extinguisherProdDate:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}],extinguisherValidity:[{required:!0,message:"\u8BF7\u9009\u62E9",trigger:"blur"}]},A=()=>_(this,null,function*(){c.value=!0;try{const r=(yield ae(m.query.userId)).data;e.value=D(R({},r),{forcedInsuranceValidity:1,commercialInsuranceValidity:1,drivingInsuranceValidity:1,thirdInsuranceValidity:1,cardPhotoFront:r.cardPhotoFront?yield u([r.cardPhotoFront]):[],cardPhotoReverse:r.cardPhotoReverse?yield u([r.cardPhotoReverse]):[],driverLicensePhotoFront:r.driverLicensePhotoFront?yield u([r.driverLicensePhotoFront]):[],driverLicensePhotoReverse:r.driverLicensePhotoReverse?yield u([r.driverLicensePhotoReverse]):[],drivingLicensePhotoFront:r.drivingLicensePhotoFront?yield u([r.drivingLicensePhotoFront]):[],drivingLicensePhotoReverse:r.drivingLicensePhotoReverse?yield u([r.drivingLicensePhotoReverse]):[],carPhoto:yield u(r.carPhoto),forcedInsurancePhoto:yield u(r.forcedInsurancePhoto),commercialInsurancePhoto:yield u(r.commercialInsurancePhoto),drivingInsurancePhoto:yield u(r.drivingInsurancePhoto),thirdInsurancePhoto:yield u(r.thirdInsurancePhoto),tripodPhoto:yield u(r.tripodPhoto),medicalKitPhoto:yield u(r.medicalKitPhoto),extinguisherPhoto:yield u(r.extinguisherPhoto),annualAuditPhoto:yield u(r.annualAuditPhoto)})}finally{c.value=!1,v.value=["1","2","3","4","5","6"]}}),k=r=>_(this,null,function*(){!r||(yield r.validate(t=>_(this,null,function*(){var g,p,q,P,I,i,F;if(t){const N=D(R({},e.value),{userId:+m.query.userId,role:o.role,driveRegionCode:typeof e.value.driveRegionCode=="object"?(g=e.value.driveRegionCode)==null?void 0:g.at(-1):e.value.driveRegionCode||void 0,cardPhotoFront:(p=n(e.value.cardPhotoFront))==null?void 0:p[0],cardPhotoReverse:(q=n(e.value.cardPhotoReverse))==null?void 0:q[0],driverLicensePhotoFront:(P=n(e.value.driverLicensePhotoFront))==null?void 0:P[0],driverLicensePhotoReverse:(I=n(e.value.driverLicensePhotoReverse))==null?void 0:I[0],drivingLicensePhotoFront:(i=n(e.value.drivingLicensePhotoFront))==null?void 0:i[0],drivingLicensePhotoReverse:(F=n(e.value.drivingLicensePhotoReverse))==null?void 0:F[0],carPhoto:n(e.value.carPhoto),forcedInsurancePhoto:n(e.value.forcedInsurancePhoto),commercialInsurancePhoto:n(e.value.commercialInsurancePhoto),drivingInsurancePhoto:n(e.value.drivingInsurancePhoto),thirdInsurancePhoto:n(e.value.thirdInsurancePhoto),tripodPhoto:n(e.value.tripodPhoto),medicalKitPhoto:n(e.value.medicalKitPhoto),extinguisherPhoto:n(e.value.extinguisherPhoto),annualAuditPhoto:n(e.value.annualAuditPhoto)});yield se(N),localStorage.setItem("modify",1),a.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),f.go(-1)}})))});return E(()=>{m.query.userId&&A()}),(r,t)=>{const g=L("el-collapse-item"),p=L("el-collapse"),q=L("el-form"),P=L("el-button"),I=G("loading");return x(),H("div",ue,[C("div",null,[J((x(),Q(q,{ref_key:"formRef",ref:b,"label-suffix":":",model:e.value,rules:h,"label-width":"160","scroll-to-error":"","element-loading-text":"\u52A0\u8F7D\u4E2D..."},{default:l(()=>[s(p,{modelValue:v.value,"onUpdate:modelValue":t[6]||(t[6]=i=>v.value=i),class:"collapse form-collapse"},{default:l(()=>[s(g,{title:"\u57FA\u7840\u4FE1\u606F",name:"1"},{default:l(()=>[s(Z,{formData:e.value,"onUpdate:formData":t[0]||(t[0]=i=>e.value=i)},null,8,["formData"])]),_:1}),s(g,{title:"\u652F\u4ED8\u4FE1\u606F",name:"2"},{default:l(()=>[s(ee,{formData:e.value,"onUpdate:formData":t[1]||(t[1]=i=>e.value=i)},null,8,["formData"])]),_:1}),s(g,{title:"\u9A7E\u9A76\u8BC1\u4FE1\u606F",name:"3"},{default:l(()=>[s(re,{formData:e.value,"onUpdate:formData":t[2]||(t[2]=i=>e.value=i)},null,8,["formData"])]),_:1}),s(g,{title:"\u884C\u9A76\u8BC1\u4FE1\u606F",name:"4"},{default:l(()=>[s(te,{formData:e.value,"onUpdate:formData":t[3]||(t[3]=i=>e.value=i)},null,8,["formData"])]),_:1}),s(g,{title:"\u4FDD\u5355\u4FE1\u606F",name:"5"},{default:l(()=>[s(ie,{formData:e.value,"onUpdate:formData":t[4]||(t[4]=i=>e.value=i)},null,8,["formData"])]),_:1}),s(g,{title:"\u8BBE\u5907\u4FE1\u606F",name:"6"},{default:l(()=>[s(oe,{formData:e.value,"onUpdate:formData":t[5]||(t[5]=i=>e.value=i)},null,8,["formData"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["model"])),[[I,c.value]])]),C("div",ne,[s(P,{type:"primary",onClick:t[7]||(t[7]=i=>k(b.value))},{default:l(()=>[de]),_:1}),s(P,{onClick:t[8]||(t[8]=i=>W(f).go(-1))},{default:l(()=>[le]),_:1})])])}}}),Re=j(ce,[["__scopeId","data-v-0394c5d4"]]);export{Re as default};