|
- var N=Object.defineProperty,W=Object.defineProperties;var j=Object.getOwnPropertyDescriptors;var h=Object.getOwnPropertySymbols;var B=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var q=(o,r,l)=>r in o?N(o,r,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[r]=l,k=(o,r)=>{for(var l in r||(r={}))B.call(r,l)&&q(o,l,r[l]);if(h)for(var l of h(r))T.call(r,l)&&q(o,l,r[l]);return o},C=(o,r)=>W(o,j(r));var x=(o,r,l)=>new Promise((V,d)=>{var t=i=>{try{g(l.next(i))}catch(v){d(v)}},w=i=>{try{g(l.throw(i))}catch(v){d(v)}},g=i=>i.done?V(i.value):Promise.resolve(i.value).then(t,w);g((l=l.apply(o,r)).next())});import{N as y,d as D,r as F,z as E,R as S,f as u,g as I,n as M,w as s,e as a,v as A,b,h as P,i as G}from"./index.56ad3315.js";import{u as H}from"./useTreeSelectData.f80dc3c9.js";const se=o=>y.get("/api/v1/region-setting/page",{params:o}),J=o=>y.post("/api/v1/region-setting/save",o),ne=o=>y.delete("/api/v1/region-setting/del",{data:o}),K=b("span",{class:"text-info"},"\u5143",-1),L=b("span",{class:"text-info"},"\u5143/\u5343\u7C73",-1),Q=b("span",{class:"text-info"},"%",-1),X=b("span",{class:"text-info"},"\u5143/\u5C0F\u65F6",-1),Y=b("span",{class:"text-info"},"\u5143",-1),Z=P(" \u63D0\u4EA4 "),ee=P(" \u5173\u95ED "),le=D({name:"regionDialog"}),ae=Object.assign(le,{props:{visible:{type:Boolean,default:!1,required:!0},data:Object},emits:["close"],setup(o,{emit:r}){const l=o,{proxy:V}=G(),d=F(),t=F({workingOvertimeFee:0,nightWorkingFee:0}),w={regionCode:[{required:!0,message:"\u8BF7\u9009\u62E9\u533A\u57DF",trigger:"change"}],carExpense:[{required:!0,message:"\u8BF7\u8F93\u5165\u51FA\u8F66\u8D39",trigger:"blur"}],oilPrice:[{required:!0,message:"\u8BF7\u8F93\u5165\u6CB9\u5355\u4EF7",trigger:"blur"}],serviceFeeRate:[{required:!0,message:"\u8BF7\u8F93\u5165\u670D\u52A1\u8D39\u7387",trigger:"blur"}],workingOvertimeFee:[{required:!0,message:"\u8BF7\u8F93\u5165\u52A0\u73ED\u8D39\u5355\u4EF7",trigger:"blur"}],nightWorkingFee:[{required:!0,message:"\u8BF7\u8F93\u5165\u591C\u73ED\u8D39",trigger:"blur"}]},g=f=>x(this,null,function*(){!f||(yield f.validate(e=>x(this,null,function*(){var p;e&&(yield J(C(k({},t.value),{regionCode:(p=t.value.regionCode)==null?void 0:p.at(-1)})),V.$message.success(`${l.data&&l.data.id?"\u7F16\u8F91":"\u65B0\u589E"}\u6210\u529F\uFF01`),r("close",!0))})))}),i=F([]),{cascaderProps:v}=H();return E(()=>l.visible,f=>x(this,null,function*(){var e;f?(i.value=(yield S()).data,(e=l.data)!=null&&e.id&&(t.value=C(k({},l.data),{regionCode:l.data.regionCodePath.split(",").map(p=>Number(p))}))):(t.value={},d.value.resetFields())})),(f,e)=>{var O;const p=u("el-cascader"),c=u("el-form-item"),m=u("el-col"),_=u("el-input"),R=u("el-row"),U=u("el-form"),$=u("el-button"),z=u("el-dialog");return I(),M(z,{"model-value":o.visible,title:`${(O=o.data)!=null&&O.id?"\u7F16\u8F91":"\u65B0\u589E"}\u533A\u57DF`,width:"840px","destroy-on-close":"",onClose:e[8]||(e[8]=n=>r("close"))},{footer:s(()=>[a($,{type:"primary",size:"small",onClick:e[6]||(e[6]=n=>g(d.value))},{default:s(()=>[Z]),_:1}),a($,{type:"info",size:"small",onClick:e[7]||(e[7]=n=>r("close"))},{default:s(()=>[ee]),_:1})]),default:s(()=>[a(U,{ref_key:"formRef",ref:d,model:t.value,rules:w,"label-width":"120px","label-suffix":":",size:"small"},{default:s(()=>[a(R,{gutter:30},{default:s(()=>[a(m,{span:12},{default:s(()=>[a(c,{label:"\u533A\u57DF",prop:"regionCode"},{default:s(()=>[a(p,{modelValue:t.value.regionCode,"onUpdate:modelValue":e[0]||(e[0]=n=>t.value.regionCode=n),props:A(v),options:i.value,class:"w-full"},null,8,["modelValue","props","options"])]),_:1})]),_:1}),a(m,{span:12},{default:s(()=>[a(c,{label:"\u9A7E\u9A76\u5458\u51FA\u8F66\u8D39",prop:"carExpense"},{default:s(()=>[a(_,{modelValue:t.value.carExpense,"onUpdate:modelValue":e[1]||(e[1]=n=>t.value.carExpense=n),oninput:"if(value>99999.99){value=99999.99} value=((value.replace(/[^0-9.]/g,'')).replace(/([0-9]+\\.[0-9]{2})[0-9]*/,'$1'))",placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8"},null,8,["modelValue"]),K]),_:1})]),_:1}),a(m,{span:12},{default:s(()=>[a(c,{label:"\u6CB9\u5355\u4EF7",prop:"oilPrice"},{default:s(()=>[a(_,{modelValue:t.value.oilPrice,"onUpdate:modelValue":e[2]||(e[2]=n=>t.value.oilPrice=n),oninput:"if(value>99999.99){value=99999.99} value=((value.replace(/[^0-9.]/g,'')).replace(/([0-9]+\\.[0-9]{2})[0-9]*/,'$1'))",placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8"},null,8,["modelValue"]),L]),_:1})]),_:1}),a(m,{span:12},{default:s(()=>[a(c,{label:"\u670D\u52A1\u8D39\u7387",prop:"serviceFeeRate"},{default:s(()=>[a(_,{modelValue:t.value.serviceFeeRate,"onUpdate:modelValue":e[3]||(e[3]=n=>t.value.serviceFeeRate=n),oninput:"if(value>4.5){value=4.5} value=((value.replace(/[^0-9.]/g,'')).replace(/([0-9]+\\.[0-9]{2})[0-9]*/,'$1'))",placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8"},null,8,["modelValue"]),Q]),_:1})]),_:1}),a(m,{span:12},{default:s(()=>[a(c,{label:"\u52A0\u73ED\u8D39\u5355\u4EF7",prop:"workingOvertimeFee"},{default:s(()=>[a(_,{modelValue:t.value.workingOvertimeFee,"onUpdate:modelValue":e[4]||(e[4]=n=>t.value.workingOvertimeFee=n),oninput:"if(value>99999.99){value=99999.99} value=((value.replace(/[^0-9.]/g,'')).replace(/([0-9]+\\.[0-9]{2})[0-9]*/,'$1'))",placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8"},null,8,["modelValue"]),X]),_:1})]),_:1}),a(m,{span:12},{default:s(()=>[a(c,{label:"\u591C\u73ED\u8D39",prop:"nightWorkingFee"},{default:s(()=>[a(_,{modelValue:t.value.nightWorkingFee,"onUpdate:modelValue":e[5]||(e[5]=n=>t.value.nightWorkingFee=n),oninput:"if(value>99999.99){value=99999.99} value=((value.replace(/[^0-9.]/g,'')).replace(/([0-9]+\\.[0-9]{2})[0-9]*/,'$1'))",placeholder:"\u8BF7\u8F93\u5165",class:"flex-1 mr-8"},null,8,["modelValue"]),Y]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1},8,["model-value","title"])}}}),ie=Object.freeze(Object.defineProperty({__proto__:null,default:ae},Symbol.toStringTag,{value:"Module"}));export{ae as _,ne as d,se as l,ie as r};
|