2025-08-12 16:55:50 +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.CtszyqLR.js";import{_ as v}from"./index.hLogsjuK.js";/* empty css */import{E as F}from"./el-text.DVk15pAg.js";import D from"./add-channel.CY49_BBT.js";import S from"./channel-code.CAyjBK06.js";import j from"./single_fee.BPi9ZN5B.js";import U from"./test_channel.BbaXwc94.js";import x from"./fee-risk.wzLLhpwp.js";import V from"./copy-channel.Bm64qFGa.js";import A from"./sub-channel.BEMj4Rpx.js";import z from"./channel-fee.BZ5iuaxy.js";import E from"./channel-risk.CYsLyup4.js";import{g as B,d as O,e as T,f as $}from"./payee-channel.vycNyttj.js";import{g as I}from"./payee-suppiler.BdAuF1rq.js";import{s as q}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.U1N_w5pw.js";import"./el-link.Bl0Uy45b.js";import"./el-time-select.BQCHOaE2.js";import"./el-card.BZiaOcqi.js";import"./sub-channel-add.CQwW3Jko.js";import"./sub-channel-fee.BRXBXElU.js";import"./sub-channel-risk.DPvvQ8nt.js";const N={key:0},P={key:1},W={class:"operate-btn"},G=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:G}){o({legacy:!0});let Q=l([]);const X=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:Q.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}),Y=()=>{X.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),Z()};t(()=>{Z(),ee()});const Z=()=>{var e,o;X.loading=!0;let l={limit:X.per_page,page:X.page},a=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(X.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=>{X.tableData=e.data,X.total=e.total,X.loading=!1}).catch(()=>{X.loading=!1})},H=()=>{X.showBatchSettingDialog=!0},J=()=>{X.showBatchSettingDialog=!1},K=()=>{X.showRiskControlDialog=!0},L=e=>{X.showAddChannel=!0,X.currentRow=e},M=e=>{e.id?T(e).then(e=>{Z(),R.success("修改成功"),X.showAddChannel=!1}):$(e).the
|