sf_web_dist/js/deposit-channels-set.mone7XBZ.js

2 lines
9.7 KiB
JavaScript
Raw Normal View History

2025-08-05 16:16:22 +08:00
import{b2 as e,bs as o,r as a,ag as l,b4 as n,bQ as t,c as s,e as r,N as i,w as p,l as h,d8 as c,an as u,O as d,al as m,t as w,bb as _,g as C,c8 as g,aO as b}from"./index.DNQap0jx.js";import{_ as f}from"./index.CwfGYvXG.js";/* empty css */import y from"./add-channel.DmNnrWGp.js";import R from"./channel-code.DAs4DDcN.js";import k from"./single_fee.DRwBSLcC.js";import v from"./test_channel.8h-MQWsP.js";import F from"./fee-risk.BAujzPMF.js";import D from"./copy-channel.DqTmpwyy.js";import S from"./sub-channel.Dyg7VTZ2.js";import j from"./channel-fee.Dd5s9U_2.js";import U from"./channel-risk.Dlpl1Bh5.js";import{a as x,e as A,b as V}from"./payee-channel.BEIwonGF.js";import{g as z}from"./payee-suppiler.CMaru4ap.js";import{s as B}from"./staticData.pxPvJypV.js";/* empty css */import"./el-col.CIr3qPUV.js";import"./el-text.De5ks7Di.js";import"./el-link.Cu4elSuy.js";import"./el-time-select.DJz9_DzI.js";import"./el-card.BoFLmjtT.js";import"./sub-channel-add.A9cnOboK.js";import"./sub-channel-fee.soq8tJww.js";import"./sub-channel-risk.DT9LfWxu.js";const O={key:0},T={key:1},$={class:"operate-btn"},E=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:E}){o({legacy:!0});let I=a([]);const N=l({columns:[{prop:"id",label:"ID",align:"center"},{prop:"shop_id",label:"供应商编码",align:"center"},{prop:"shop_id",label:"供应商名称",align:"center",slot:"shop_name_slot"},{prop:"name",label:"渠道名称",align:"center"},{prop:"code",label:"渠道代码",align:"center"},{prop:"",label:"跑量",align:"center",slot:"run_num_slot",sortable:"custom"},{prop:"",label:"成功率",align:"center",slot:"success_rate_slot",sortable:"custom"},{prop:"status",label:"接口状态",align:"center",slot:"status_slot"},{prop:"pr",label:"费率",align:"center"},{prop:"limit",label:"风控限额",align:"center",slot:"limit_slot"},{prop:"notify_time",label:"操作",slot:"operate_slot",width:"400px"}],tableData:[],searchFields:[{label:"渠道名称",prop:"name",type:"input",value:""},{label:"供应商",prop:"shop_id",type:"select",options:I.value,value:""},{label:"是否开启",type:"select",prop:"notify_status",value:"",options:B.status}],total:0,page:1,per_page:10,loading:!1,showBatchSettingDialog:!1,batchSetting:{title:"批量设置",fields:[{label:"设置",type:"radio",prop:"status",options:[{label:"开启",value:1},{label:"关闭",value:0}]}],rules:{status:[{required:!0,message:"请选择设置",trigger:"blur"}]},values:{status:""}},showRiskControlDialog:!1,riskControl:{title:"风控实况",fields:[],rules:{},values:{}},riskControlColumns:[{label:"通道名称/子账号",prop:"channelName"},{label:"交易时间",prop:"channelCode"},{label:"今天交易金额/可交易金额",prop:"status"},{label:"上线请款",prop:"description"}],riskControlSearchFields:[],riskControlData:[],showAddChannel:!1,batchSettingType:"1",showProduct:!1,productData:{},currentRow:{},channelVisible:!1,showFeeRisk:!1,showCopyChannel:!1,showSubChannel:!1,showChannelCode:!1}),P=()=>{N.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),q()};n(()=>{q(),H()});const q=()=>{var e,o;N.loading=!0;let a={limit:N.per_page,page:N.page},l=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(N.searchFields);(null==(e=l.created_at)?void 0:e.length)>0&&(l.created_at_start=l.created_at[0]?t(l.created_at[0]):"",l.created_at_end=l.created_at[1]?t(l.created_at[1]):""),(null==(o=l.completed_at)?void 0:o.length)>0&&(l.completed_at_start=l.completed_at[0]?t(l.completed_at[0]):"",l.completed_at_end=l.completed_at[1]?t(l.completed_at[1]):""),x(Object.assign(a,l)).then(e=>{N.tableData=e.data,N.total=e.total,N.loading=!1}).catch(()=>{N.loading=!1})},G=()=>{N.showBatchSettingDialog=!0},L=()=>{N.showBatchSettingDialog=!1},M=()=>{N.showRiskControlDialog=!0},Q=e=>{N.showAddChannel=!0,N.currentRow=e},W=e=>{e.id?A(e).then(e=>{q(),b.success("修改成功"),N.showAddChannel=!1}):V(e).then(e=>{q(),b.success("添加成功"),N.showAddChannel=!1,N.showCopyChannel=!1