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.6f299ad8.js 6.4KB

3 months ago
1
  1. var ee=Object.defineProperty,te=Object.defineProperties;var oe=Object.getOwnPropertyDescriptors;var q=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(q)for(var a of q(i))ae.call(i,a)&&j(n,a,i[a]);return n},A=(n,i)=>te(n,oe(i));var b=(n,i,a)=>new Promise((w,y)=>{var x=f=>{try{s(a.next(f))}catch(v){y(v)}},_=f=>{try{s(a.throw(f))}catch(v){y(v)}},s=f=>f.done?w(f.value):Promise.resolve(f.value).then(x,_);s((a=a.apply(n,i)).next())});import{m as se,d as ie}from"./orderManage.fe83d1aa.js";import{h as R,a as H,b as E}from"./uploadAction.69ee4a64.js";import{d as re,n as ne,z as de,r as S,A as ue,f as u,g as I,p as O,w as e,e as t,x as m,c as k,F as ce,s as fe,b as P,h,i as pe}from"./index.551f5afa.js";import{f as ge}from"./imageWaterUtils.2f29f38d.js";const me=P("span",{class:"text-info"},"\u5343\u7C73",-1),_e=h("\u662F"),ve=h("\u5426"),be=P("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),Ie=P("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),he=h(" \u53F8\u673A\u8EAB\u4EFD\u8BC1 "),we={key:0,class:"mt-8"},ye={class:"image-slot"},xe={key:1},Me=h(" \u63D0\u4EA4 "),Pe=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,w=ne.defaults.baseURL+"/file/download?fileId=",{proxy:y}=pe(),x=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(A(z({},s.value),{beginMileageImgIdList:E(c),driverPhotos:E(d)})),y.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),i("close",!0)}})))}),g=S({});function T(){return b(this,null,function*(){const l=yield ie({orderNum:a.data.orderNum});g.value=l.data,console.log(g)})}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(g.value.basicInfo.addresses[0].lng).toFixed(2)}\xB0E`,`\u7EAC \u5EA6 ${parseFloat(g.value.basicInfo.addresses[0].lat).toFixed(2)}\xB0N`,`\u5730 \u70B9 ${g.value.basicInfo.addresses[0].address}`];ge(l,d).then(p=>{o(p)})})}function Y(){var l=new Date,o=l.getFullYear(),c=l.getMonth()+1,d=l.getDate(),p=l.getHours()<10?"0"+l.getHours():l.getHours(),M=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+" "+p+":"+M+":"+F}return(l,o)=>{const c=u("el-input-number"),d=u("el-form-item"),p=u("el-col"),M=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(()=>[Me]),_:1}),t(D,{type:"info",size:"small",onClick:o[5]||(o[5]=r=>i("close"))},{default:e(()=>[Pe]),_: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(p,{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"]),me]),_:1})]),_:1}),t(p,{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(M,{label:"1"},{default:e(()=>[_e]),_:1}),t(M,{label:"2"},{default:e(()=>[ve]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1}),t(p,{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:m(x),"list-type":"picture-card",limit:10,"on-success":r=>m(R)(r,s.value.beginMileageImgIdList),"on-error":m(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(p,{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:m(x),"list-type":"picture-card",limit:10,"on-success":r=>m(R)(r,s.value.driverPhotos),"on-error":m(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(p,{span:24},{default:e(()=>{var r,$,C;return[he,(C=($=(r=g.value)==null?void 0:r.carAndDriverInfo)==null?void 0:$.cardPhotos)!=null&&C.length?(I(),k("div",we,[(I(!0),k(ce,null,fe(g.value.carAndDriverInfo.cardPhotos,(X,N)=>(I(),O(J,{key:N,class:"imgBox mr-8",src:w+X,"initial-index":N,"preview-src-list":g.value.carAndDriverInfo.cardPhotos.map(Z=>w+Z),fit:"cover"},{error:e(()=>[P("div",ye,[t(L,null,{default:e(()=>[t(G)]),_:1})])]),_:2},1032,["src","initial-index","preview-src-list"]))),128))])):(I(),k("span",xe,"-"))]}),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{Be as default};