2025-08-11 13:38:58 +08:00
|
|
|
import{b2 as e,bt as o,r as l,ag as a,b4 as t,bQ as n,aZ as s,c as r,e as i,N as p,w as h,l as c,d8 as d,an as u,O as m,m as _,al as w,t as C,E as g,ce as y,bb as b,g as f,c8 as k,aO as R}from"./index.Cuf3nwJJ.js";import{_ as v}from"./index.DPDqvMvc.js";/* empty css */import{E as F}from"./el-text.DYsuRYIo.js";import D from"./add-channel.BxeJC6dv.js";import S from"./channel-code.BajsnPM5.js";import j from"./single_fee.DPFGCh1x.js";import U from"./test_channel.mc6EWv8a.js";import x from"./fee-risk.BPQst7Vz.js";import V from"./copy-channel.BUmFwmpB.js";import A from"./sub-channel.CGdryGmw.js";import z from"./channel-fee.C3RSEjA1.js";import E from"./channel-risk.BqzfhxRO.js";import{g as B,d as T,e as O,f as $}from"./payee-channel.CZ2EqnHL.js";import{g as I}from"./payee-suppiler.DmmKbzeC.js";import{s as q}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.C84cYJBf.js";import"./el-link.Chxjh84L.js";import"./el-time-select.CSTaJ6qN.js";import"./el-card.LCSWvbUi.js";import"./sub-channel-add.D40beqJv.js";import"./sub-channel-fee.BsyRk1d-.js";import"./sub-channel-risk.CPaevnrL.js";const N={key:0},P={key:1},Q={class:"operate-btn"},W=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:W}){o({legacy:!0});let G=l([]);const K=a({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:q.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}),Z=()=>{K.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),H()};t(()=>{H(),ee()});const H=()=>{var e,o;K.loading=!0;let l={limit:K.per_page,page:K.page},a=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(K.searchFields);(null==(e=a.created_at)?void 0:e.length)>0&&(a.created_at_start=a.created_at[0]?n(a.created_at[0]):"",a.created_at_end=a.created_at[1]?n(a.created_at[1]):""),(null==(o=a.completed_at)?void 0:o.length)>0&&(a.completed_at_start=a.completed_at[0]?n(a.completed_at[0]):"",a.completed_at_end=a.completed_at[1]?n(a.completed_at[1]):""),B(Object.assign(l,a)).then(e=>{K.tableData=e.data,K.total=e.total,K.loading=!1}).catch(()=>{K.loading=!1})},J=()=>{K.showBatchSettingDialog=!0},L=()=>{K.showBatchSettingDialog=!1},M=()=>{K.showRiskControlDialog=!0},X=e=>{K.showAddChannel=!0,K.currentRow=e},Y=e=>{e.id?O(e).then(e=>{H(),R.success("修改成功"),K.showAddChannel=!1}):$(e).the
|