Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

orderCompletionDialog.935a9c56.js 8.1KB

před 1 měsícem
1
  1. var T=Object.defineProperty,H=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable;var M=(f,u,i)=>u in f?T(f,u,{enumerable:!0,configurable:!0,writable:!0,value:i}):f[u]=i,N=(f,u)=>{for(var i in u||(u={}))R.call(u,i)&&M(f,i,u[i]);if($)for(var i of $(u))Y.call(u,i)&&M(f,i,u[i]);return f},j=(f,u)=>H(f,O(u));var V=(f,u,i)=>new Promise((w,v)=>{var b=c=>{try{I(i.next(c))}catch(x){v(x)}},a=c=>{try{I(i.throw(c))}catch(x){v(x)}},I=c=>c.done?w(c.value):Promise.resolve(c.value).then(b,a);I((i=i.apply(f,u)).next())});import{d as G,k as J}from"./orderManage.fe83d1aa.js";import{h as E,a as P,b as C}from"./uploadAction.69ee4a64.js";import{d as K,z as Q,r as A,A as W,f as m,g as X,p as Z,w as t,e,x as g,b as p,h as k,i as ee}from"./index.551f5afa.js";import{f as le}from"./imageWaterUtils.2f29f38d.js";const te=p("span",{class:"text-info"},"\u5343\u7C73",-1),ae=p("span",{class:"text-info"},"\u5143",-1),oe=p("span",{class:"text-info"},"\u5143",-1),se=p("span",{class:"text-info"},"\u5C0F\u65F6",-1),ne=p("span",{class:"text-info"},"\u5143",-1),ie=p("span",{class:"text-info"},"\u5143",-1),re=p("span",{class:"text-info"},"\u5143",-1),de=p("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),ue=p("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),fe=p("div",{class:"el-upload__tip"},"\u652F\u6301.png,.jpg,.gif\u683C\u5F0F",-1),me=k(" \u63D0\u4EA4 "),pe=k(" \u5173\u95ED "),ce=K({name:"orderCompletionDialog"}),xe=Object.assign(ce,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(f,{emit:u}){const i=f,{proxy:w}=ee(),v=Q.dictStore.uploadUrl,b=A(),a=A({mileageImgIdList:[],feeImgIdList:[],driverPhotosAtEnd:[]}),I=(s,l,r)=>{var n,d;l||r(new Error("\u8BF7\u8F93\u5165\u603B\u91CC\u7A0B\u6570")),l<=((n=_.value.otherInfo)==null?void 0:n.beginMileage)&&r(new Error(`\u5FC5\u987B\u5927\u4E8E\u4E0A\u8F66\u603B\u91CC\u7A0B\u6570${(d=_.value.otherInfo)==null?void 0:d.beginMileage}\u5343\u7C73`)),r()},c={mileage:[{required:!0,validator:I,trigger:"blur"}],mileageImgIdList:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u91CC\u7A0B\u56FE\u7247",trigger:"blur"}],driverPhotosAtEnd:[{required:!0,message:"\u8BF7\u4E0A\u4F20\u53F8\u673A\u4E0E\u8F66\u8F86\u6B63\u9762\u7167\uFF08\u659C45\u5EA6\uFF09",trigger:"blur"}]},x=s=>V(this,null,function*(){!s||(yield s.validate(l=>V(this,null,function*(){if(l){const{mileageImgIdList:r,feeImgIdList:n,driverPhotosAtEnd:d}=a.value;yield J(j(N({},a.value),{mileageImgIdList:C(r),feeImgIdList:C(n),driverPhotosAtEnd:C(d)})),w.$message.success("\u63D0\u4EA4\u6210\u529F\uFF01"),u("close",!0)}})))});W(()=>i.visible,s=>V(this,null,function*(){var l;s?i.data&&(a.value.orderId=(l=i.data)==null?void 0:l.id,D()):(a.value={},b.value.resetFields())}));function F(s){return new Promise((l,r)=>{var n=["\u516C \u53F8 \u5B81\u8FBE\u79D1\u6280",`\u65F6 \u95F4 ${B()}`,`\u7ECF \u5EA6 ${parseFloat(_.value.basicInfo.addresses[1].lng).toFixed(2)}\xB0E`,`\u7EAC \u5EA6 ${parseFloat(_.value.basicInfo.addresses[1].lat).toFixed(2)}\xB0N`,`\u5730 \u70B9 ${_.value.basicInfo.addresses[0].address}`];le(s,n).then(d=>{l(d)})})}function B(){var s=new Date,l=s.getFullYear(),r=s.getMonth()+1,n=s.getDate(),d=s.getHours()<10?"0"+s.getHours():s.getHours(),y=s.getMinutes()<10?"0"+s.getMinutes():s.getMinutes(),h=s.getSeconds()<10?"0"+s.getSeconds():s.getSeconds();return r>=1&&r<=9&&(r="0"+r),n>=0&&n<=9&&(n="0"+n),l+"-"+r+"-"+n+" "+d+":"+y+":"+h}const _=A({});function D(){return V(this,null,function*(){const s=yield G({orderNum:i.data.orderNum});_.value=s.data,console.log(_)})}return(s,l)=>{const r=m("el-input-number"),n=m("el-form-item"),d=m("el-col"),y=m("el-row"),h=m("Plus"),L=m("el-icon"),U=m("el-upload"),q=m("el-form"),S=m("el-button"),z=m("el-dialog");return X(),Z(z,{"model-value":f.visible,title:"\u8BA2\u5355\u5B8C\u6210",width:"840px","destroy-on-close":"",onClose:l[12]||(l[12]=o=>u("close"))},{footer:t(()=>[e(S,{type:"primary",size:"small",onClick:l[10]||(l[10]=o=>x(b.value))},{default:t(()=>[me]),_:1}),e(S,{type:"info",size:"small",onClick:l[11]||(l[11]=o=>u("close"))},{default:t(()=>[pe]),_:1})]),default:t(()=>[e(q,{ref_key:"formRef",ref:b,model:a.value,rules:c,"label-width":"90px","label-suffix":":",size:"small"},{default:t(()=>[e(y,{gutter:30},{default:t(()=>[e(d,{span:12},{default:t(()=>[e(n,{label:"\u603B\u91CC\u7A0B\u6570",prop:"mileage"},{default:t(()=>[e(r,{modelValue:a.value.mileage,"onUpdate:modelValue":l[0]||(l[0]=o=>a.value.mileage=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),te]),_:1})]),_:1})]),_:1}),e(y,{gutter:30},{default:t(()=>[e(d,{span:12},{default:t(()=>[e(n,{label:"\u9AD8\u901F\u8D39"},{default:t(()=>[e(r,{modelValue:a.value.expresswayFee,"onUpdate:modelValue":l[1]||(l[1]=o=>a.value.expresswayFee=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),ae]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u505C\u8F66\u8D39"},{default:t(()=>[e(r,{modelValue:a.value.parkingFee,"onUpdate:modelValue":l[2]||(l[2]=o=>a.value.parkingFee=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),oe]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u591C\u73ED\u65F6\u957F"},{default:t(()=>[e(r,{modelValue:a.value.nightShiftTime,"onUpdate:modelValue":l[3]||(l[3]=o=>a.value.nightShiftTime=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),se]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u4E0B\u53BF\u8865\u8D34"},{default:t(()=>[e(r,{modelValue:a.value.countySubsidyFee,"onUpdate:modelValue":l[4]||(l[4]=o=>a.value.countySubsidyFee=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),ne]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u9644\u52A0\u8D39"},{default:t(()=>[e(r,{modelValue:a.value.surcharge,"onUpdate:modelValue":l[5]||(l[5]=o=>a.value.surcharge=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),ie]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u5176\u4ED6\u8D39\u7528"},{default:t(()=>[e(r,{modelValue:a.value.otherCost,"onUpdate:modelValue":l[6]||(l[6]=o=>a.value.otherCost=o),controls:!1,placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8",min:0},null,8,["modelValue"]),re]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u91CC\u7A0B\u56FE\u7247",prop:"mileageImgIdList"},{default:t(()=>[e(U,{"file-list":a.value.mileageImgIdList,"onUpdate:file-list":l[7]||(l[7]=o=>a.value.mileageImgIdList=o),class:"picture-card",action:g(v),"list-type":"picture-card",limit:10,"on-success":o=>g(E)(o,a.value.mileageImgIdList),"on-error":g(P),"before-upload":F},{tip:t(()=>[de]),default:t(()=>[e(L,{class:"avatar-uploader-icon"},{default:t(()=>[e(h)]),_:1})]),_:1},8,["file-list","action","on-success","on-error"])]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u8D39\u7528\u56FE\u7247"},{default:t(()=>[e(U,{"file-list":a.value.feeImgIdList,"onUpdate:file-list":l[8]||(l[8]=o=>a.value.feeImgIdList=o),class:"picture-card",action:g(v),"list-type":"picture-card",limit:10,"on-success":o=>g(E)(o,a.value.feeImgIdList),"on-error":g(P),"before-upload":F},{tip:t(()=>[ue]),default:t(()=>[e(L,{class:"avatar-uploader-icon"},{default:t(()=>[e(h)]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload"])]),_:1})]),_:1}),e(d,{span:12},{default:t(()=>[e(n,{label:"\u53F8\u673A\u4E0E\u8F66\u8F86\u6B63\u9762\u7167\uFF08\u659C45\u5EA6\uFF09","label-width":"200",prop:"driverPhotosAtEnd"},{default:t(()=>[e(U,{"file-list":a.value.driverPhotosAtEnd,"onUpdate:file-list":l[9]||(l[9]=o=>a.value.driverPhotosAtEnd=o),class:"picture-card",action:g(v),"list-type":"picture-card",limit:10,"on-success":o=>g(E)(o,a.value.driverPhotosAtEnd),"on-error":g(P),"before-upload":F},{tip:t(()=>[fe]),default:t(()=>[e(L,{class:"avatar-uploader-icon"},{default:t(()=>[e(h)]),_:1})]),_:1},8,["file-list","action","on-success","on-error","before-upload"])]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value"])}}});export{xe as default};