Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

2 rindas
5.7KB

  1. var U=Object.defineProperty,W=Object.defineProperties;var G=Object.getOwnPropertyDescriptors;var $=Object.getOwnPropertySymbols;var Y=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable;var z=(s,r,e)=>r in s?U(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e,T=(s,r)=>{for(var e in r||(r={}))Y.call(r,e)&&z(s,e,r[e]);if($)for(var e of $(r))H.call(r,e)&&z(s,e,r[e]);return s},E=(s,r)=>W(s,G(r));var y=(s,r,e)=>new Promise((k,I)=>{var _=t=>{try{d(e.next(t))}catch(p){I(p)}},C=t=>{try{d(e.throw(t))}catch(p){I(p)}},d=t=>t.done?k(t.value):Promise.resolve(t.value).then(_,C);d((e=e.apply(s,r)).next())});import{f as J,g as K,h as M}from"./orderManage.59f47c81.js";import{d as Q,z as X,a as A,r as h,A as Z,f as v,g as ee,c as ae,e as l,w as o,b as te,F as le,h as b,O as B,B as oe,i as re}from"./index.6d448f34.js";const ie=b(" \u63D0\u4EA4 "),se=b(" \u5173\u95ED "),de=b("\u67E5\u8BE2"),ne=b("\u91CD\u7F6E"),ue=b("\u786E\u5B9A"),me=b(" \u5173\u95ED "),pe=Q({name:"driverAssignmentDialog"}),_e=Object.assign(pe,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object,isEditDriver:{type:Boolean,default:!1}},emits:["close"],setup(s,{emit:r}){const e=s,{proxy:k}=re(),I=X.dictStore.energyTypeOptions,_=A({realName:void 0}),C=h(),d=h({}),t=A({visible:!1,rowData:void 0}),p=h(),O=h(0),L=[{type:"radio",width:"55",key:"carId"},{label:"\u53F8\u673A\u59D3\u540D",key:"realName",prop:"realName",minWidth:"180",showOverflowTooltip:!0},{label:"\u8F66\u724C\u53F7\u7801",key:"carNo",prop:"carNo",minWidth:"150",showOverflowTooltip:!0},{label:"\u8054\u7CFB\u65B9\u5F0F",key:"phoneNo",prop:"phoneNo",width:"150"},{label:"\u80FD\u6E90\u7C7B\u578B",key:"carOilType",prop:"carOilType",render:n=>B("span",I[n.carOilType]),width:"150"},{label:"\u672C\u6708\u8BA2\u5355\u6570",key:"orderCount",prop:"orderCount",width:"120"},{label:"\u51FA\u8F66\u65F6\u95F4",key:"driveTime",prop:"driveTime",render:n=>B("span",n.driveTime==="DAY"?"\u767D\u5929":"\u665A\u4E0A"),width:"170",fixed:"right"}],D=h([]),N=n=>y(this,null,function*(){var m,u,c;yield oe(),n=p.value.pageParams;const a=yield J(E(T(T({},n),_),{carType:e.data.carTypeCode,regionCode:e.data.regionId,leaveState:"LEAVE",orderId:e.data.id,recommendationAlgorithmOpen:!0,projectId:e.data.projectId,useCarTime:e.data.useCarTime}));O.value=a.data.total,D.value=(u=(m=a.data)==null?void 0:m.records)==null?void 0:u.map(i=>E(T({},i),{onLeave:i.leaveState==="LEAVE"&&e.data.useCarTime>=i.leaveStartTime&&e.data.useCarTime<=i.leaveEndTime})),t.rowData&&t.rowData.length&&((c=D.value)==null||c.forEach(i=>{var w;((w=t==null?void 0:t.rowData)==null?void 0:w.map(x=>x.carId)).includes(i.carId)&&p.value.setRadio(i.carId)}))}),R=()=>{N()},S=()=>{_.realName=void 0,p.value.pageParams.pageNumber=1,p.value.pageParams.pageSize=10,N()},j=n=>{const{userId:a,carId:m,realName:u}=n;d.value={userId:a,carId:m,realName:u}},F=()=>{t.visible=!1},V=()=>y(this,null,function*(){t.rowData=[{carId:d.value.carId,realName:d.value.realName}],t.visible=!0,yield N()}),q=n=>y(this,null,function*(){!n||(yield n.validate(a=>y(this,null,function*(){if(a){const m=e.isEditDriver?K:M,{userId:u,carId:c}=d.value,g={[e.isEditDriver?"id":"orderId"]:e.data.id,driverId:u,carId:c};yield m(g),k.$message.success(`${e.isEditDriver?"\u4FEE\u6539":"\u5206\u914D"}\u6210\u529F\uFF01`),r("close",!0)}})))});return Z(()=>e.visible,n=>y(this,null,function*(){var a;if(n){if(e.data){const{driverName:m,driverId:u,carId:c}=e.data;d.value={realName:m,userId:u,carId:c},d.value.driverId=(a=e.data)==null?void 0:a.driverId}}else d.value={}})),(n,a)=>{const m=v("el-input"),u=v("el-form-item"),c=v("el-form"),i=v("el-button"),g=v("el-dialog"),w=v("el-col"),x=v("el-row"),P=v("table-list");return ee(),ae(le,null,[l(g,{"model-value":s.visible,title:`${e.isEditDriver?"\u4FEE\u6539":"\u5206\u914D"}\u53F8\u673A`,width:"560px","destroy-on-close":"",onClose:a[3]||(a[3]=f=>r("close"))},{footer:o(()=>[l(i,{type:"primary",size:"small",onClick:a[1]||(a[1]=f=>q(C.value))},{default:o(()=>[ie]),_:1}),l(i,{type:"info",size:"small",onClick:a[2]||(a[2]=f=>r("close"))},{default:o(()=>[se]),_:1})]),default:o(()=>[l(c,{ref_key:"formRef",ref:C,model:d.value,"label-width":"90px","label-suffix":":",size:"small"},{default:o(()=>[l(u,{label:`${e.isEditDriver?"\u4FEE\u6539":"\u5206\u914D"}\u53F8\u673A`,prop:"realName",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u53F8\u673A",trigger:"change"}]},{default:o(()=>[l(m,{modelValue:d.value.realName,"onUpdate:modelValue":a[0]||(a[0]=f=>d.value.realName=f),placeholder:"\u8BF7\u9009\u62E9",readonly:"",style:{cursor:"pointer"},onClick:V},{append:o(()=>[te("a",{onClick:V},"\u6DFB\u52A0")]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["model-value","title"]),l(g,{"model-value":t.visible,title:"\u9009\u62E9\u9A7E\u9A76\u5458",width:"840px","destroy-on-close":"",onClose:a[6]||(a[6]=f=>t.visible=!1)},{footer:o(()=>[l(i,{type:"primary",size:"small",onClick:F},{default:o(()=>[ue]),_:1}),l(i,{type:"info",size:"small",onClick:a[5]||(a[5]=f=>t.visible=!1)},{default:o(()=>[me]),_:1})]),default:o(()=>[l(c,{"label-suffix":":",model:_,size:"small"},{default:o(()=>[l(x,{gutter:16},{default:o(()=>[l(w,{span:8},{default:o(()=>[l(u,{label:"\u53F8\u673A\u59D3\u540D"},{default:o(()=>[l(m,{modelValue:_.realName,"onUpdate:modelValue":a[4]||(a[4]=f=>_.realName=f),maxlength:"10",placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),l(w,{span:8},{default:o(()=>[l(u,null,{default:o(()=>[l(i,{type:"primary",onClick:R},{default:o(()=>[de]),_:1}),l(i,{type:"info",onClick:S},{default:o(()=>[ne]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"]),l(P,{ref_key:"tableListRef",ref:p,column:L,data:D.value,total:O.value,"row-key":"carId",onGetTableData:N,onRadioChange:j},null,8,["data","total"])]),_:1},8,["model-value"])],64)}}});export{_e as default};