sf_web_dist/js/single_fee_set.1758705418851DEjPOjnN.js
2025-09-24 17:18:33 +08:00

2 lines
3.3 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 t,r as a,aZ as l,m as o,e as s,w as n,l as r,N as i,g as p,al as d,O as c,t as u,E as m,am as h,an as _,aX as g,dh as w,a_ as y,dg as f}from"./index.1758705418851CdmBKQ2N.js";import{_ as b}from"./index.1758705418851Z_vhPJoE.js";import{E as x}from"./el-text.1758705418851X1CgxUPv.js";import{p as S}from"./common.1758705418851CCwWzMi9.js";/* empty css */import"./el-col.1758705418851Bs1zq0om.js";const F={__name:"single_fee_set",props:{showSingleFeeSet:{type:Boolean,default:!1},currentRow:{type:Object,default:()=>{}}},emits:["update:showSingleFeeSet"],setup(F,{emit:B}){const k=F;e(()=>k.showSingleFeeSet,e=>{e&&v()});const j=t({columns:[{label:"通道编号",prop:"id"},{label:"通道名称",prop:"name",slot:"name_slot"},{label:"批量费率",prop:"pr",slot:"batch_pr_slot"},{label:"定制费率",prop:"rate",slot:"rate_slot",align:"center"}],searchFields:[],tableData:[],loading:!1,selectData:[]});a([]);const C=B,T=()=>{C("update:showSingleFeeSet",!1)},v=()=>{j.loading=!0;let e={shop_id:k.currentRow.shop_id},t=(e=>{const t={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(t[e.prop]=e.value)}),t})(j.searchFields);w(Object.assign(e,t)).then(e=>{j.tableData=e,j.loading=!1}).catch(()=>{j.loading=!1})};return(e,t)=>{const a=x,w=l("EditPen"),B=m,C=h,D=_,R=b,E=g;return s(),o(E,{"model-value":F.showSingleFeeSet,title:"费率设置",width:"60vw",onClose:T},{default:n(()=>[t[2]||(t[2]=r("div",null,"注费率为千分位例如千分之一则填0.001",-1)),i(R,{type:"export",columns:p(j).columns,searchFields:p(j).searchFields,"onUpdate:searchFields":t[0]||(t[0]=e=>p(j).searchFields=e),paginationSlot:!1,data:p(j).tableData,onGetTableData:v,loading:p(j).loading,showSelection:!1,showRightRefreshSlot:!1},{name_slot:n(({row:e})=>[r("span",null,u(e.name),1)]),batch_pr_slot:n(({row:e})=>[r("span",null,u(p(S)(e.global_pr)),1)]),rate_slot:n(({row:e})=>[e.edit?d("",!0):(s(),o(a,{key:0,type:e.global_pr!=e.pr?"danger":""},{default:n(()=>[c(u(p(S)(e.pr)),1)]),_:2},1032,["type"])),e.edit?d("",!0):(s(),o(a,{key:1,type:"primary",onClick:t=>e.edit=!0},{default:n(()=>[i(B,null,{default:n(()=>[i(w)]),_:1})]),_:2},1032,["onClick"])),e.edit?(s(),o(C,{key:2,modelValue:e.pr,"onUpdate:modelValue":t=>e.pr=t,placeholder:"请输入费率",style:{width:"80px"}},null,8,["modelValue","onUpdate:modelValue"])):d("",!0),e.edit?(s(),o(D,{key:3,type:"primary",style:{"margin-left":"4px"},size:"small",onClick:t=>(e=>{let t={shop_id:k.currentRow.shop_id,payment_product_id:e.id,pr:e.pr};e.max_cost_pr-e.pr>0?y({title:"提示",message:'<span style="color: red">通道费率小于渠道成本</span>',confirmButtonText:"我已知晓",cancelButtonText:"取消",showCancelButton:!0,type:"warning",dangerouslyUseHTMLString:!0}).then(()=>{y.alert("确定修改通道费率吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{f(t).then(e=>{v()})}).catch(()=>{e.edit=!1,v()})}).catch(()=>{e.edit=!1,v()}):y.alert("确定修改通道费率吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",showCancelButton:!0,type:"warning"}).then(()=>{f(t).then(e=>{v()})}).catch(()=>{e.edit=!1,v()})})(e)},{default:n(()=>t[1]||(t[1]=[c("保存")])),_:2,__:[1]},1032,["onClick"])):d("",!0)]),_:1},8,["columns","searchFields","data","loading"])]),_:1,__:[2]},8,["model-value"])}}};export{F as default};