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.

confirmBoardingDialog.de6a294d.js 6.4KB

5 months ago
1
  1. var ee=Object.defineProperty,te=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var le=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable;var j=(n,i,a)=>i in n?ee(n,i,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[i]=a,z=(n,i)=>{for(var a in i||(i={}))le.call(i,a)&&j(n,a,i[a]);if(C)for(var a of C(i))ae.call(i,a)&&j(n,a,i[a]);return n},R=(n,i)=>te(n,oe(i));var b=(n,i,a)=>new Promise((y,w)=>{var M=f=>{try{s(a.next(f))}catch(v){w(v)}},_=f=>{try{s(a.throw(f))}catch(v){w(v)}},s=f=>f.done?y(f.value):Promise.resolve(f.value).then(M,_);s((a=a.apply(n,i)).next())});import{m as se,d as ie}from"./orderManage.4bde94f8.js";import{h as A,a as H,b as E}from"./uploadAction.7e1f76bc.js";import{d as re,N as ne,y as de,r as S,z as ue,f as u,g as I,n as O,w as e,e as t,v as p,c as k,F as ce,q as fe,b as x,h,i as ge}from"./index.5459e2ad.js";import{f as me}from"./imageWaterUtils.2f29f38d.js";const pe=x("span",{class:"text-info"},"\u5343\u7C73",-1),_e=h("\u662F"),ve=h("\u5426"),be=x("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),Ie=x("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),he=h(" \u53F8\u673A\u8EAB\u4EFD\u8BC1 "),ye={key:0,class:"mt-8"},we={class:"image-slot"},Me={key:1},Pe=h(" \u63D0\u4EA4 "),xe=h(" \u5173\u95ED "),Fe=re({name:"confirmBoardingDialog"}),Be=Object.assign(Fe,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(n,{emit:i}){const a=n,y=ne.defaults.baseURL+"/file/download?fileId=",{proxy:w}=ge(),M=de.dictStore.uploadUrl,_=S(),s=S({beginMileageImgIdList:[],driverPhotos:[],isSelf:""}),f={beginMileage:[{required:!0,message:"\u8BF7\u8F93\u5165\u603B\u91CC\u7A0B\u6570",trigger:"blur"}],isSelf:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u4E3A\u672C\u4EBA",trigger:"blur"}],beginMileageImgIdList:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u91CC\u7A0B\u56FE\u7247",trigger:"blur"}],driverPhotos:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u53F8\u673A\u4E0E\u8F66\u8F86\u6B63\u9762\u7167\uFF08\u659C45\u5EA6\uFF09",trigger:"blur"}]},v=l=>b(this,null,function*(){!l||(yield l.validate(o=>b(this,null,function*(){if(o){const{beginMileageImgIdList:c,driverPhotos:d}=s.value;yield se(R(z({},s.value),{beginMileageImgIdList:E(c),driverPhotos:E(d)})),w.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),i("close",!0)}})))}),m=S({});function T(){return b(this,null,function*(){const l=yield ie({orderNum:a.data.orderNum});m.value=l.data,console.log(m)})}ue(()=>a.visible,l=>b(this,null,function*(){var o;l?a.data&&(s.value.orderId=(o=a.data)==null?void 0:o.id,T()):(s.value={},_.value.resetFields())}));function U(l){return new Promise((o,c)=>{var d=["\u516C \u53F8 \u5B81\u8FBE\u79D1\u6280",`\u65F6 \u95F4 ${Y()}`,`\u7ECF \u5EA6 ${parseFloat(m.value.basicInfo.addresses[0].lng).toFixed(2)}\xB0E`,`\u7EAC \u5EA6 ${parseFloat(m.value.basicInfo.addresses[0].lat).toFixed(2)}\xB0N`,`\u5730 \u70B9 ${m.value.basicInfo.addresses[0].address}`];me(l,d).then(g=>{o(g)})})}function Y(){var l=new Date,o=l.getFullYear(),c=l.getMonth()+1,d=l.getDate(),g=l.getHours()<10?"0"+l.getHours():l.getHours(),P=l.getMinutes()<10?"0"+l.getMinutes():l.getMinutes(),F=l.getSeconds()<10?"0"+l.getSeconds():l.getSeconds();return c>=1&&c<=9&&(c="0"+c),d>=0&&d<=9&&(d="0"+d),o+"-"+c+"-"+d+" "+g+":"+P+":"+F}return(l,o)=>{const c=u("el-input-number"),d=u("el-form-item"),g=u("el-col"),P=u("el-radio"),F=u("el-radio-group"),V=u("Plus"),L=u("el-icon"),B=u("el-upload"),G=u("Picture"),J=u("el-image"),K=u("el-row"),Q=u("el-form"),D=u("el-button"),W=u("el-dialog");return I(),O(W,{"model-value":n.visible,title:"\u786E\u8BA4\u4E0A\u8F66",width:"840px","destroy-on-close":"",onClose:o[6]||(o[6]=r=>i("close"))},{footer:e(()=>[t(D,{type:"primary",size:"small",onClick:o[4]||(o[4]=r=>v(_.value))},{default:e(()=>[Pe]),_:1}),t(D,{type:"info",size:"small",onClick:o[5]||(o[5]=r=>i("close"))},{default:e(()=>[xe]),_:1})]),default:e(()=>[t(Q,{ref_key:"formRef",ref:_,model:s.value,rules:f,"label-width":"90px","label-suffix":":",size:"small"},{default:e(()=>[t(K,{gutter:30},{default:e(()=>[t(g,{span:12},{default:e(()=>[t(d,{label:"\u603B\u91CC\u7A0B\u6570",prop:"beginMileage"},{default:e(()=>[t(c,{modelValue:s.value.beginMileage,"onUpdate:modelValue":o[0]||(o[0]=r=>s.value.beginMileage=r),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),pe]),_:1})]),_:1}),t(g,{span:12},{default:e(()=>[t(d,{"label-width":"100",required:"",label:"\u662F\u5426\u4E3A\u53F8\u673A\u672C\u4EBA",prop:"isSelf"},{default:e(()=>[t(F,{modelValue:s.value.isSelf,"onUpdate:modelValue":o[1]||(o[1]=r=>s.value.isSelf=r)},{default:e(()=>[t(P,{label:"1"},{default:e(()=>[_e]),_:1}),t(P,{label:"2"},{default:e(()=>[ve]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(g,{span:12},{default:e(()=>[t(d,{label:"\u91CC\u7A0B\u56FE\u7247",prop:"beginMileageImgIdList"},{default:e(()=>[t(B,{"file-list":s.value.beginMileageImgIdList,"onUpdate:file-list":o[2]||(o[2]=r=>s.value.beginMileageImgIdList=r),class:"picture-card",action:p(M),"list-type":"picture-card",limit:10,"on-success":r=>p(A)(r,s.value.beginMileageImgIdList),"on-error":p(H),"before-upload":U},{tip:e(()=>[be]),default:e(()=>[t(L,{class:"avatar-uploader-icon"},{default:e(()=>[t(V)]),_:1})]),_:1},8,["file-list","action","on-success","on-error"])]),_:1})]),_:1}),t(g,{span:12},{default:e(()=>[t(d,{"label-width":"200",label:"\u53F8\u673A\u4E0E\u8F66\u8F86\u6B63\u9762\u7167\uFF08\u659C45\u5EA6\uFF09",prop:"driverPhotos"},{default:e(()=>[t(B,{"file-list":s.value.driverPhotos,"onUpdate:file-list":o[3]||(o[3]=r=>s.value.driverPhotos=r),class:"picture-card",action:p(M),"list-type":"picture-card",limit:10,"on-success":r=>p(A)(r,s.value.driverPhotos),"on-error":p(H),"before-upload":U},{tip:e(()=>[Ie]),default:e(()=>[t(L,{class:"avatar-uploader-icon"},{default:e(()=>[t(V)]),_:1})]),_:1},8,["file-list","action","on-success","on-error"])]),_:1})]),_:1}),t(g,{span:24},{default:e(()=>{var r,N,$;return[he,($=(N=(r=m.value)==null?void 0:r.carAndDriverInfo)==null?void 0:N.cardPhotos)!=null&&$.length?(I(),k("div",ye,[(I(!0),k(ce,null,fe(m.value.carAndDriverInfo.cardPhotos,(X,q)=>(I(),O(J,{key:q,class:"imgBox mr-8",src:y+X,"initial-index":q,"preview-src-list":m.value.carAndDriverInfo.cardPhotos.map(Z=>y+Z),fit:"cover"},{error:e(()=>[x("div",we,[t(L,null,{default:e(()=>[t(G)]),_:1})])]),_:2},1032,["src","initial-index","preview-src-list"]))),128))])):(I(),k("span",Me,"-"))]}),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{Be as default};