sf_web_dist/js/deposit-channels-set.6j9oh-V3.js
2025-07-31 19:33:17 +08:00

2 lines
9.4 KiB
JavaScript

import{b2 as e,bs as o,ag as a,b4 as l,bQ as t,c as n,e as s,N as r,w as i,l as c,d8 as p,an as h,O as d,al as u,t as m,bb as w,g as _,c8 as C,aO as g}from"./index.DS3FXwxf.js";import{_ as b}from"./index.Blii6jYu.js";/* empty css */import{_ as y}from"./add-channel.rNlg-fqp.js";import R from"./channel-code.Bgsp2nyw.js";import f from"./product.BJtZjYVo.js";import k from"./single_fee.Ddiu4mHJ.js";import F from"./test_channel.CijjjfFm.js";import v from"./fee-risk.DpoDJrjz.js";import D from"./copy-channel.DfTDDAwU.js";import S from"./sub-channel.B4Dwsqv7.js";import j from"./channel-fee.BeHn9nte.js";import U from"./channel-risk.BlvvkgFM.js";import{a as x,e as V,b as A}from"./payee-channel.BnAcYxh9.js";import{s as z}from"./staticData.Bf5zg7ho.js";/* empty css */import"./el-col.BuAk1vtD.js";import"./el-text.D39OlimW.js";import"./el-link.DY78mlCt.js";import"./el-time-select.deSbo9b0.js";import"./el-card.vUK-VUTJ.js";import"./sub-channel-add.BwgFolya.js";import"./sub-channel-fee.CYJWWzZs.js";import"./sub-channel-risk.ByPNpWhm.js";const P={key:0},B={key:1},O={class:"operate-btn"},$=e({__name:"deposit-channels-set",setup(e){o({legacy:!0});const $=a({columns:[{prop:"id",label:"ID",align:"center"},{prop:"shop_id",label:"供应商编码",align:"center"},{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"},{prop:"limit",label:"风控限额",align:"center",slot:"limit_slot"},{prop:"notify_time",label:"操作",slot:"operate_slot",width:"400px"}],tableData:[],searchFields:[{label:"接口名称",prop:"name",type:"input",value:""},{label:"供应商",prop:"shop_id",type:"select",options:[],value:""},{label:"是否开启",type:"select",prop:"notify_status",value:"",options:z.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}),I=()=>{$.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),N()};l(()=>{N()});const N=()=>{var e,o;$.loading=!0;let a={per_page:$.per_page,page:$.page},l=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}($.searchFields);(null==(e=l.created_at)?void 0:e.length)>0&&(l.created_at_start=l.created_at[0]?t(l.created_at[0]):"",l.created_at_end=l.created_at[1]?t(l.created_at[1]):""),(null==(o=l.completed_at)?void 0:o.length)>0&&(l.completed_at_start=l.completed_at[0]?t(l.completed_at[0]):"",l.completed_at_end=l.completed_at[1]?t(l.completed_at[1]):""),x(Object.assign(a,l)).then(e=>{$.tableData=e.data,$.total=e.total,$.loading=!1}).catch(()=>{$.loading=!1})},T=()=>{$.showBatchSettingDialog=!0},q=()=>{$.showBatchSettingDialog=!1},E=()=>{$.showRiskControlDialog=!0},G=e=>{$.showAddChannel=!0,$.currentRow=e},L=e=>{e.id?V(e).then(e=>{N(),g.success("修改成功"),$.showAddChannel=!1}):A(e).then(e=>{N(),g.success("添加成功"),$.showAddChannel=!1})};return(e,o)=>{const a=h,l=w,t=p,g=b,x=C;return s(),n("div",null,[r(g,{type:"export",columns:_($).columns,searchFields:_($).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>_($).searchFields=e),data:_($).tableData,per_page:_($).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>_($).per_page=e),page:_($).page,"onUpdate:page":o[4]||(o[4]=e=>_($).page=e),total:_($).total,onGetTableData:N,onResetForm:I,loading:_($).loading,showSelection:!1,showRightRefreshSlot:!1},{btns:i(({row:e})=>[r(a,{type:"primary",onClick:T},{default:i(()=>o[20]||(o[20]=[d("批量开启/关闭")])),_:1,__:[20]}),r(a,{type:"primary",onClick:E},{default:i(()=>o[21]||(o[21]=[d("风控实况")])),_:1,__:[21]}),r(a,{type:"primary",onClick:o[0]||(o[0]=e=>G({}))},{default:i(()=>o[22]||(o[22]=[d("添加渠道")])),_:1,__:[22]}),r(a,{type:"primary",onClick:o[1]||(o[1]=e=>{$.showChannelCode=!0})},{default:i(()=>o[23]||(o[23]=[d("添加渠道编码")])),_:1,__:[23]})]),run_num_slot:i(({row:e})=>[c("div",null,m(`${e.succ_num?e.succ_num:0}/${e.num?e.num:0}`),1),c("div",null,m(`${e.pay_succ_money?e.pay_succ_money:0}/${e.pay_money?e.pay_money:0}`),1)]),success_rate_slot:i(({row:e})=>[d(m((null==e?void 0:e.num)&&(null==e?void 0:e.succ_num)?((null==e?void 0:e.succ_num)/(null==e?void 0:e.num)*100).toFixed(2):0)+"% ",1)]),status_slot:i(({row:e})=>[r(l,{modelValue:e.status,"onUpdate:modelValue":o=>e.status=o,"inline-prompt":"","active-value":1,"inactive-value":2,"active-text":"正常","inactive-text":"停用"},null,8,["modelValue","onUpdate:modelValue"])]),limit_slot:i(({row:e})=>[e.min_money?(s(),n("div",P,m(e.min_money)+"~"+m(e.max_money),1)):u("",!0),e.not_allow_money?(s(),n("div",B,m(e.not_allow_money),1)):u("",!0)]),operate_slot:i(({row:l})=>[c("div",O,[r(t,{style:{"margin-bottom":"4px"}},{default:i(()=>[r(a,{type:"primary",onClick:e=>(e=>{$.showSubChannel=!0,$.currentRow=e})(l),size:"small"},{default:i(()=>o[24]||(o[24]=[d("子账号")])),_:2,__:[24]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{$.showChannelFee=!0,$.currentRow=e})(l),size:"small"},{default:i(()=>o[25]||(o[25]=[d("费率")])),_:2,__:[25]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{$.showChannelRisk=!0,$.currentRow=e})(l),size:"small"},{default:i(()=>o[26]||(o[26]=[d("风控")])),_:2,__:[26]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>G(l),size:"small"},{default:i(()=>o[27]||(o[27]=[d("编辑")])),_:2,__:[27]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{$.channelVisible=!0,$.currentRow=e})(l),size:"small"},{default:i(()=>o[28]||(o[28]=[d("测试通道")])),_:2,__:[28]},1032,["onClick"])]),_:2},1024),r(t,null,{default:i(()=>[r(a,{type:"primary",onClick:e=>(e=>{$.showCopyChannel=!0,$.currentRow=e})(l),size:"small"},{default:i(()=>o[29]||(o[29]=[d("复制通道")])),_:2,__:[29]},1032,["onClick"]),r(a,{type:"primary",onClick:o=>e.handleDelete(l),size:"small"},{default:i(()=>o[30]||(o[30]=[d("删除")])),_:2,__:[30]},1032,["onClick"])]),_:2},1024)])]),_:1},8,["columns","searchFields","data","per_page","page","total","loading"]),r(x,{showDialog:_($).showBatchSettingDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>_($).showBatchSettingDialog=e),formData:_($).batchSetting,"onUpdate:formData":o[6]||(o[6]=e=>_($).batchSetting=e),ref:"productRef"},{submit:i(()=>[r(a,{type:"primary",onClick:q},{default:i(()=>o[31]||(o[31]=[d("确定")])),_:1,__:[31]})]),_:1},8,["showDialog","formData"]),r(x,{showDialog:_($).showRiskControlDialog,"onUpdate:showDialog":o[8]||(o[8]=e=>_($).showRiskControlDialog=e),formData:_($).riskControl,"onUpdate:formData":o[9]||(o[9]=e=>_($).riskControl=e),ref:"productRef",dialogWidth:"900px"},{otherInfo:i(()=>[r(g,{type:"export",columns:_($).riskControlColumns,searchFields:_($).riskControlSearchFields,"onUpdate:searchFields":o[7]||(o[7]=e=>_($).riskControlSearchFields=e),data:_($).riskControlData,loading:_($).loading,showSelection:!1,showRightRefreshSlot:!1},null,8,["columns","searchFields","data","loading"])]),_:1},8,["showDialog","formData"]),r(y,{showAddChannel:_($).showAddChannel,"onUpdate:showAddChannel":o[10]||(o[10]=e=>_($).showAddChannel=e),onConfirmAddChannel:L,currentRow:_($).currentRow},null,8,["showAddChannel","currentRow"]),r(f,{showProduct:_($).showProduct,"onUpdate:showProduct":o[11]||(o[11]=e=>_($).showProduct=e),data:_($).productData},null,8,["showProduct","data"]),r(k,{showSingleFee:_($).showSingleFee,"onUpdate:showSingleFee":o[12]||(o[12]=e=>_($).showSingleFee=e),currentRow:_($).currentRow},null,8,["showSingleFee","currentRow"]),r(F,{channelVisible:_($).channelVisible,"onUpdate:channelVisible":o[13]||(o[13]=e=>_($).channelVisible=e),currentRow:_($).currentRow},null,8,["channelVisible","currentRow"]),r(v,{showFeeRisk:_($).showFeeRisk,"onUpdate:showFeeRisk":o[14]||(o[14]=e=>_($).showFeeRisk=e),currentRow:_($).currentRow},null,8,["showFeeRisk","currentRow"]),r(D,{showCopyChannel:_($).showCopyChannel,"onUpdate:showCopyChannel":o[15]||(o[15]=e=>_($).showCopyChannel=e),currentRow:_($).currentRow},null,8,["showCopyChannel","currentRow"]),r(S,{showSubChannel:_($).showSubChannel,"onUpdate:showSubChannel":o[16]||(o[16]=e=>_($).showSubChannel=e),currentRow:_($).currentRow},null,8,["showSubChannel","currentRow"]),r(j,{showChannelFee:_($).showChannelFee,"onUpdate:showChannelFee":o[17]||(o[17]=e=>_($).showChannelFee=e),currentRow:_($).currentRow},null,8,["showChannelFee","currentRow"]),r(U,{showChannelRisk:_($).showChannelRisk,"onUpdate:showChannelRisk":o[18]||(o[18]=e=>_($).showChannelRisk=e),currentRow:_($).currentRow},null,8,["showChannelRisk","currentRow"]),r(R,{showChannelCode:_($).showChannelCode,"onUpdate:showChannelCode":o[19]||(o[19]=e=>_($).showChannelCode=e)},null,8,["showChannelCode"])])}}},[["__scopeId","data-v-9edb9562"]]);export{$ as default};