2025-08-07 16:35:41 +08:00
|
|
|
import{b2 as e,bs 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 c,l as h,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.aKQDzHIr.js";import{_ as v}from"./index.39Mm1eZ3.js";/* empty css */import{E as F}from"./el-text.9HRy6AVu.js";import D from"./add-channel.DP2bRKAF.js";import S from"./channel-code.BFc0LCkJ.js";import j from"./single_fee.Cc93WZib.js";import U from"./test_channel.BqKAoWfl.js";import x from"./fee-risk.QFFr2jm6.js";import V from"./copy-channel.CksVgsmH.js";import A from"./sub-channel.B8gdAkmz.js";import z from"./channel-fee.DumdltCP.js";import E from"./channel-risk.D6AdIVkC.js";import{g as B,e as O,d as T}from"./payee-channel.mDlvWxS6.js";import{g as $}from"./payee-suppiler.57R2uemK.js";import{s as I}from"./staticData.b8Nd3Dnh.js";/* empty css */import"./el-col.nXkQqG5X.js";import"./el-link.BmAeo2x_.js";import"./el-time-select.DFkZ_w7a.js";import"./el-card.CB13ooeb.js";import"./sub-channel-add.DhTQ25kd.js";import"./sub-channel-fee.BqkVOuIi.js";import"./sub-channel-risk.foG7cPOx.js";const N={key:0},P={key:1},Q={class:"operate-btn"},q=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:q}){o({legacy:!0});let G=l([]);const H=a({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",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:I.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}),W=()=>{H.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),Z()};t(()=>{Z(),Y()});const Z=()=>{var e,o;H.loading=!0;let l={limit:H.per_page,page:H.page},a=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(H.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=>{H.tableData=e.data,H.total=e.total,H.loading=!1}).catch(()=>{H.loading=!1})},J=()=>{H.showBatchSettingDialog=!0},K=()=>{H.showBatchSettingDialog=!1},L=()=>{H.showRiskControlDialog=!0},M=e=>{H.showAddChannel=!0,H.currentRow=e},X=e=>{e.id?O(e).then(e=>{Z(),R.success("修改成功"),H.showAddChannel=!1}):T(e).then(e=>{Z(),R.success
|