sf_web_dist/js/deposit-channels-set.B5w2dbPX.js

2 lines
11 KiB
JavaScript
Raw Normal View History

2025-08-13 16:32:00 +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.v591Wcjz.js";import{_ as F}from"./index.fvxAZyUX.js";/* empty css */import{E as D}from"./el-text.C_gZZ8Kd.js";import S from"./add-channel.DN3AiML-.js";import j from"./channel-code.BQX_78zv.js";import x from"./single_fee.CNOZK6-q.js";import U from"./test_channel.Raajzkuh.js";import V from"./fee-risk.CXEghJ9r.js";import B from"./copy-channel.DbWp9uQ7.js";import A from"./sub-channel.BHOu_dYe.js";import T from"./channel-fee.n20WW5_B.js";import z from"./channel-risk.BQuutl4Y.js";import{g as E,e as O,d as $,f as I}from"./payee-channel.Dh1oieGN.js";import{g as P}from"./payee-suppiler.DVafVjmh.js";import{s as q}from"./staticData.8wZxkmL4.js";/* empty css */import"./el-col.DxrGPb_X.js";import"./el-link.BXkb9shM.js";import"./el-time-select.BONPdso0.js";import"./el-card.D8reI0oc.js";import"./sub-channel-add.i8ZKvGaY.js";import"./sub-channel-fee.Cv71_Tfn.js";import"./sub-channel-risk.RuInYsWW.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})