sf_web_dist/js/batch-setting-fee.1760689147687B15u_I1J.js

2 lines
1.9 KiB
JavaScript
Raw Normal View History

2025-10-17 16:21:07 +08:00
import{m as e,e as t,w as a,N as o,O as l,bO as s,bM as n,l as i,am as r,an as p,aX as d,a$ as c}from"./index.1760689147687BkZt69p9.js";import{E as m}from"./el-text.1760689147687B-_S5uBY.js";const u={class:"dialog-footer"},f={__name:"batch-setting-fee",props:{showBatchSettingFee:{type:Boolean,default:!1},selectData:{type:Object,default:{}}},emits:["update:showBatchSettingFee","confirmSetting"],setup(f,{emit:h}){const _=f,y=h,g=()=>{y("update:showBatchSettingFee",!1)},w=()=>{let e=[];_.selectData.forEach(t=>{if(null==t?void 0:t.modify_pr){t.supplierApi.some(e=>e.pr-t.modify_pr>0)&&e.push(t.name)}}),e.length?c({title:"提示",message:`<span style="color: red">[${e.join(",")}]通道费率小于渠道成本</span>`,confirmButtonText:"我已知晓",cancelButtonText:"取消",showCancelButton:!0,type:"warning",dangerouslyUseHTMLString:!0}).then(()=>{y("confirmSetting",_.selectData)}).catch(()=>{row.edit=!1,Object.assign(row,tempRow)}):y("confirmSetting",_.selectData)};return(c,h)=>{const _=m,y=n,b=r,B=s,S=p,x=d;return t(),e(x,{"model-value":f.showBatchSettingFee,title:"费率",width:"700px","before-close":g},{footer:a(()=>[i("div",u,[o(S,{type:"primary",onClick:w},{default:a(()=>h[1]||(h[1]=[l(" 保存 ")])),_:1,__:[1]}),o(S,{type:"primary",onClick:g},{default:a(()=>h[2]||(h[2]=[l(" 取消 ")])),_:1,__:[2]})])]),default:a(()=>[o(_,{type:"info"},{default:a(()=>h[0]||(h[0]=[l("单位:‰,通道的费率,千分之一填 0.001")])),_:1,__:[0]}),o(B,{data:f.selectData,style:{width:"100%"}},{default:a(()=>[o(y,{label:"通道名称",prop:"name"}),o(y,{label:"通道编码",prop:"code"}),o(y,{label:"当前费率",prop:"pr"}),o(y,{label:"修改费率",width:"240"},{default:a(e=>[i("div",null,[o(b,{type:"number",modelValue:e.row.modify_pr,"onUpdate:modelValue":t=>e.row.modify_pr=t,placeholder:"请输入内容"},null,8,["modelValue","onUpdate:modelValue"])])]),_:1})]),_:1},8,["data"])]),_:1},8,["model-value"])}}};export{f as default};