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

2 lines
12 KiB
JavaScript
Raw Normal View History

2025-08-19 16:53:55 +08:00
import{b2 as e,bs as t,r as a,ag as o,b4 as l,bQ as n,aZ as s,c as r,e as i,N as p,w as c,l as h,d8 as u,an as d,O as m,m as w,al as _,t as C,E as g,ce as y,bb as f,g as b,c8 as k,a_ as R,aO as v}from"./index.Cc__f_67.js";import{_ as F}from"./index.CVSJRWYm.js";/* empty css */import{E as D}from"./el-text.BOS89m4y.js";import S from"./add-channel.CVspqOUg.js";import j from"./channel-code.Ws9Y5cDC.js";import x from"./single_fee.DtOezvev.js";import U from"./test_channel.Cv-FCIFX.js";import B from"./fee-risk.ngoOPUqz.js";import T from"./copy-channel.CSCyOL2a.js";import V from"./sub-channel.D0sWC67l.js";import A from"./channel-fee.BOJGG53T.js";import z from"./channel-risk.C-E_FvEN.js";import{g as E,e as O,d as $,f as P}from"./payee-channel.C99ljYSq.js";import{g as I}from"./payee-suppiler.CkdmNbYy.js";import{s as L}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.B3j0Hjl0.js";import"./el-link.DHB34x3G.js";import"./el-time-select.C96_KlMw.js";import"./el-card.CMCLZnzi.js";import"./sub-channel-add.BFCZ4wUC.js";import"./sub-channel-fee.DM9sSG-s.js";import"./sub-channel-risk.B9RegWa0.js";const N={key:0},q={key:1},H={key:2},M={class:"operate-btn"},W=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:W}){t({legacy:!0});let G=a([]);const J=o({columns:[{prop:"id",label:"ID",align:"center",width:"80"},{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",slot:"pr_slot"},{prop:"limit",label:"风控限额",align:"center",slot:"limit_slot"},{prop:"notify_time",label:"操作",slot:"operate_slot",width:"280px"}],tableData:[],searchFields:[{label:"渠道名称",prop:"name",type:"input",value:""},{label:"供应商",prop:"shop_id",type:"select",options:G.value,value:""},{label:"是否开启",type:"select",prop:"notify_status",value:"",options:L.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}),Q=()=>{J.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),X()};l(()=>{X(),ae()});const X=()=>{var e,t;J.loading=!0;let a={limit:J.per_page,page:J.page},o=function(e){const t={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(t[e.prop]=e.value)}),t}(J.searchFields);(null==(e=o.created_at)?void 0:e.length)>0&&(o.created_at_start=o.created_at[0]?n(o.created_at[0]):"",o.created_at_end=o.created_at[1]?n(o.created_at[1]):""),(null==(t=o.completed_at)?void 0:t.length)>0&&(o.completed_at_start=o.completed_at[0]?n(o.completed_at[0]):"",o.completed_at_end=o.completed_at[1]?n(o.completed_at[1]):""),E(Object.assign(a,o)).then(e=>{J.tableData=e.data,J.total=e.total,J.loading=!1}).catch(()=>{J.loading=!1})},Y=()=>{J.showBatchSettingDialog=!0},Z=()=>{J.showBatchSettingDialog=!1},K=()=>{J.showRiskControlDialog=!0},ee=e=>{J.showAddChannel=!0,J.currentRow=e},te=e=>{e.id?O(e).then(e=>{X(),v.success("修改成功"),J.showAddC