2 lines
10 KiB
JavaScript
2 lines
10 KiB
JavaScript
|
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.Cf-jAOZU.js";import{_ as v}from"./index.Bg1VCFas.js";/* empty css */import{E as F}from"./el-text.nwqXyDtv.js";import D from"./add-channel.oJx5zAFP.js";import S from"./channel-code.ClPmHBAO.js";import j from"./single_fee.tcKBuwOp.js";import U from"./test_channel.CoAt-OcX.js";import x from"./fee-risk.CDVtlM8w.js";import V from"./copy-channel.C5n4S_we.js";import A from"./sub-channel.n_erzDlF.js";import z from"./channel-fee.DVxEUyI6.js";import E from"./channel-risk.DbrUTJQh.js";import{g as B,e as T,d as O}from"./payee-channel.m5RMvef0.js";import{g as $}from"./payee-suppiler.DFwRSVgn.js";import{s as I}from"./staticData.b8Nd3Dnh.js";/* empty css */import"./el-col.CQAFfm4Z.js";import"./el-link.Bc7zApna.js";import"./el-time-select.CguQ9-ym.js";import"./el-card.C6yDa8ld.js";import"./sub-channel-add.TiLnLgnP.js";import"./sub-channel-fee.BDvREA9u.js";import"./sub-channel-risk.CdbVTcqR.js";const q={key:0},N={key:1},P={class:"operate-btn"},Q=e({__name:"deposit-channels-set",props:{currentRow:{type:Object,default:{}}},setup(e,{expose:Q}){o({legacy:!0});let W=l([]);const G=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:W.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}),K=()=>{G.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),Z()};t(()=>{Z(),Y()});const Z=()=>{var e,o;G.loading=!0;let l={limit:G.per_page,page:G.page},a=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(G.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=>{G.tableData=e.data,G.total=e.total,G.loading=!1}).catch(()=>{G.loading=!1})},H=()=>{G.showBatchSettingDialog=!0},J=()=>{G.showBatchSettingDialog=!1},L=()=>{G.showRiskControlDialog=!0},M=e=>{G.showAddChannel=!0,G.currentRow=e},X=e=>{e.id?T(e).then(e=>{Z(),R.success("修改成功"),G.showAddChannel=!1}):O(e).then(e=>{Z(
|