2025-08-13 18:37:04 +08:00
|
|
|
import{b2 as e,bs as o,r as a,ag as t,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 d,an as u,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.ZfD0KPCP.js";import{_ as F}from"./index.Dr3pgF4g.js";/* empty css */import{E as D}from"./el-text.8O7bSRLl.js";import S from"./add-channel.WKboFrS7.js";import j from"./channel-code.DBqDXGSz.js";import x from"./single_fee.CsTndVOM.js";import U from"./test_channel.BGmBwmGa.js";import V from"./fee-risk.DzzX6rar.js";import B from"./copy-channel.CCLwJL_s.js";import A from"./sub-channel.C3BwZLo-.js";import T from"./channel-fee.Wrv06abn.js";import z from"./channel-risk.B9LGJZ1U.js";import{g as E,e as O,d as $,f as I}from"./payee-channel.CLZxH5NA.js";import{g as P}from"./payee-suppiler.BMknLDsG.js";import{s as q}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.DgnSRLc_.js";import"./el-link.DNsISzde.js";import"./el-time-select.CeVB0OAR.js";import"./el-card.CPZqRzRU.js";import"./sub-channel-add.B5jiiEP8.js";import"./sub-channel-fee.Bp1UX-XO.js";import"./sub-channel-risk.CDSMtSj1.js";const N={key:0},W={key:1},G={class:"operate-btn"},H=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:H}){o({legacy:!0});let L=a([]);const M=t({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:L.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}),Q=()=>{M.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),X()};l(()=>{X(),oe()});const X=()=>{var e,o;M.loading=!0;let a={limit:M.per_page,page:M.page},t=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(M.searchFields);(null==(e=t.created_at)?void 0:e.length)>0&&(t.created_at_start=t.created_at[0]?n(t.created_at[0]):"",t.created_at_end=t.created_at[1]?n(t.created_at[1]):""),(null==(o=t.completed_at)?void 0:o.length)>0&&(t.completed_at_start=t.completed_at[0]?n(t.completed_at[0]):"",t.completed_at_end=t.completed_at[1]?n(t.completed_at[1]):""),E(Object.assign(a,t)).then(e=>{M.tableData=e.data,M.total=e.total,M.loading=!1}).catch(()=>{M.loading=!1})},Y=()=>{M.showBatchSettingDialog=!0},Z=()=>{M.showBatchSettingDialog=!1},J=()=>{M.showRiskControlDialog=!0},K=e=>{M.showAddChannel=!0,M.currentRow=e},ee=e=>{e.id?O(e).then(e=>{X(),v.success("修改成功"),M.showAddChannel=!1})
|