sf_web_dist/js/fee-weight.CmJL3FbJ.js
2025-08-21 17:43:05 +08:00

2 lines
3.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{D as e,ag as a,r as t,m as l,e as o,w as s,N as n,l as d,O as i,an as r,g as p,bb as u,am as m,aX as h,aO as c}from"./index.BfNLRvbL.js";import{_}from"./index.rsJVqKoh.js";import{E as w}from"./el-text.Bg-qYp71.js";/* empty css */import"./el-col.CkvWp8El.js";const g={__name:"fee-weight",props:{showFeeWeight:{type:Boolean,default:!1},currentRow:{type:Object,default:{}}},emits:["update:showFeeWeight"],setup(g,{emit:f}){const b=g;e(()=>b.showFeeWeight,e=>{e&&k()});const V=a({columns:[{label:"费率起始%",prop:"ID",slot:"fee_start_slot"},{label:"费率结算%",prop:"name",slot:"fee_end_slot"},{label:"权重1-9",prop:"name",slot:"weight_slot"},{label:"状态",prop:"name",slot:"status_slot"},{label:"操作",prop:"operate",slot:"operate_slot"}],searchFields:[],tableData:[],selectData:[]}),D=t(),y=f,F=()=>{y("update:showFeeWeight",!1)},k=()=>{V.tableData=[{ID:"1",name:"1",weight:"1",status:!0},{ID:"2",name:"2",weight:"2",status:!0},{ID:"3",name:"3",weight:"3",status:!0}]},x=()=>{V.tableData.push({ID:"",name:"",weight:"",status:!0})};return(e,a)=>{const t=w,f=r,b=m,y=u,C=_,U=h;return o(),l(U,{"model-value":g.showFeeWeight,title:"费率权重",width:"70vw","before-close":F,ref_key:"channelRef",ref:D},{default:s(()=>[n(t,null,{default:s(()=>a[1]||(a[1]=[i("批量权重管理(此处优先级高于户配置得权重)")])),_:1,__:[1]}),d("div",null,[n(f,{type:"primary",onClick:x},{default:s(()=>a[2]||(a[2]=[i("添加")])),_:1,__:[2]}),n(f,{type:"primary",onClick:e.addChannel},{default:s(()=>a[3]||(a[3]=[i("保存")])),_:1,__:[3]},8,["onClick"]),n(f,{type:"primary",onClick:e.addChannel},{default:s(()=>a[4]||(a[4]=[i("适配到批量")])),_:1,__:[4]},8,["onClick"])]),n(C,{type:"export",columns:p(V).columns,searchFields:p(V).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>p(V).searchFields=e),data:p(V).tableData,onGetTableData:k,paginationSlot:!1,loading:p(V).loading,showSelection:!1,showRightRefreshSlot:!1},{fee_start_slot:s(({row:e})=>[n(b,{modelValue:e.weight,"onUpdate:modelValue":a=>e.weight=a,placeholder:"百分比例如百一输入1"},null,8,["modelValue","onUpdate:modelValue"])]),fee_end_slot:s(({row:e})=>[n(b,{modelValue:e.weight,"onUpdate:modelValue":a=>e.weight=a,placeholder:"百分比例如百一输入1"},null,8,["modelValue","onUpdate:modelValue"])]),weight_slot:s(({row:e})=>[n(b,{modelValue:e.weight,"onUpdate:modelValue":a=>e.weight=a,placeholder:"权重值"},null,8,["modelValue","onUpdate:modelValue"])]),status_slot:s(({row:e})=>[n(y,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-text":"开启","inactive-text":"关闭"},null,8,["modelValue","onUpdate:modelValue"])]),operate_slot:s(({row:e,index:t})=>[n(f,{type:"primary",onClick:e=>((e,a)=>{if(1==V.tableData.length)return c.error("至少保留一条数据");V.tableData.splice(a,1)})(0,t)},{default:s(()=>a[5]||(a[5]=[i("删除")])),_:2,__:[5]},1032,["onClick"])]),_:1},8,["columns","searchFields","data","loading"])]),_:1},8,["model-value"])}}};export{g as default};