2 lines
9.4 KiB
JavaScript
2 lines
9.4 KiB
JavaScript
import{b2 as e,bs as o,ah as a,b4 as l,bQ as t,c as n,e as s,O as r,w as i,l as c,d8 as p,ao as h,P as d,am as u,t as m,bb as w,g as _,c8 as C,aO as g}from"./index.IG9Kr4U_.js";import{_ as b}from"./index.BPCdXHb1.js";/* empty css */import{_ as y}from"./add-channel.B0_N3hHi.js";import f from"./channel-code.Bs8Nj3r2.js";import R from"./product.C4O5vdf_.js";import k from"./single_fee.B9GsZcvJ.js";import F from"./test_channel.DSCYI1Yx.js";import v from"./fee-risk.DV46KzHZ.js";import D from"./copy-channel.BdLU8Eot.js";import S from"./sub-channel.CugXeAIz.js";import j from"./channel-fee.DvwCU_m_.js";import U from"./channel-risk.CJ8pGXXu.js";import{a as x,e as V,b as A}from"./payee-channel.DS64VtLM.js";import{s as z}from"./staticData.Bf5zg7ho.js";/* empty css */import"./el-col.DRUiGYEu.js";import"./el-text.DGRzEcIQ.js";import"./el-time-select.C4P5jGsK.js";import"./el-card.POOwNuEg.js";import"./sub-channel-add.pAt1H5gO.js";import"./sub-channel-fee.CJXJ1iKd.js";import"./sub-channel-risk.CkMQB-tn.js";const P={key:0},B={key:1},$={class:"operate-btn"},I=e({__name:"deposit-channels-set",setup(e){o({legacy:!0});const I=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"},{prop:"",label:"成功率",align:"center",slot:"success_rate_slot"},{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}),E=()=>{I.searchFields.forEach(e=>{"datetimerange"==e.dateType?e.value=[]:e.value=""}),O()};l(()=>{O()});const O=()=>{var e,o;I.loading=!0;let a={per_page:I.per_page,page:I.page},l=function(e){const o={};return e.forEach(e=>{e.prop&&void 0!==e.value&&(o[e.prop]=e.value)}),o}(I.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=>{I.tableData=e.data,I.total=e.total,I.loading=!1}).catch(()=>{I.loading=!1})},T=()=>{I.showBatchSettingDialog=!0},q=()=>{I.showBatchSettingDialog=!1},G=()=>{I.showRiskControlDialog=!0},H=e=>{I.showAddChannel=!0,I.currentRow=e},N=e=>{e.id?V(e).then(e=>{O(),g.success("修改成功"),I.showAddChannel=!1}):A(e).then(e=>{O(),g.success("添加成功"),I.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:_(I).columns,searchFields:_(I).searchFields,"onUpdate:searchFields":o[2]||(o[2]=e=>_(I).searchFields=e),data:_(I).tableData,per_page:_(I).per_page,"onUpdate:per_page":o[3]||(o[3]=e=>_(I).per_page=e),page:_(I).page,"onUpdate:page":o[4]||(o[4]=e=>_(I).page=e),total:_(I).total,onGetTableData:O,onResetForm:E,loading:_(I).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:G},{default:i(()=>o[21]||(o[21]=[d("风控实况")])),_:1,__:[21]}),r(a,{type:"primary",onClick:o[0]||(o[0]=e=>H({}))},{default:i(()=>o[22]||(o[22]=[d("添加渠道")])),_:1,__:[22]}),r(a,{type:"primary",onClick:o[1]||(o[1]=e=>{I.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",$,[r(t,{style:{"margin-bottom":"4px"}},{default:i(()=>[r(a,{type:"primary",onClick:e=>(e=>{I.showSubChannel=!0,I.currentRow=e})(l),size:"small"},{default:i(()=>o[24]||(o[24]=[d("子账号")])),_:2,__:[24]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{I.showChannelFee=!0,I.currentRow=e})(l),size:"small"},{default:i(()=>o[25]||(o[25]=[d("费率")])),_:2,__:[25]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{I.showChannelRisk=!0,I.currentRow=e})(l),size:"small"},{default:i(()=>o[26]||(o[26]=[d("风控")])),_:2,__:[26]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>H(l),size:"small"},{default:i(()=>o[27]||(o[27]=[d("编辑")])),_:2,__:[27]},1032,["onClick"]),r(a,{type:"primary",onClick:e=>(e=>{I.channelVisible=!0,I.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=>{I.showCopyChannel=!0,I.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:_(I).showBatchSettingDialog,"onUpdate:showDialog":o[5]||(o[5]=e=>_(I).showBatchSettingDialog=e),formData:_(I).batchSetting,"onUpdate:formData":o[6]||(o[6]=e=>_(I).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:_(I).showRiskControlDialog,"onUpdate:showDialog":o[8]||(o[8]=e=>_(I).showRiskControlDialog=e),formData:_(I).riskControl,"onUpdate:formData":o[9]||(o[9]=e=>_(I).riskControl=e),ref:"productRef",dialogWidth:"900px"},{otherInfo:i(()=>[r(g,{type:"export",columns:_(I).riskControlColumns,searchFields:_(I).riskControlSearchFields,"onUpdate:searchFields":o[7]||(o[7]=e=>_(I).riskControlSearchFields=e),data:_(I).riskControlData,loading:_(I).loading,showSelection:!1,showRightRefreshSlot:!1},null,8,["columns","searchFields","data","loading"])]),_:1},8,["showDialog","formData"]),r(y,{showAddChannel:_(I).showAddChannel,"onUpdate:showAddChannel":o[10]||(o[10]=e=>_(I).showAddChannel=e),onConfirmAddChannel:N,currentRow:_(I).currentRow},null,8,["showAddChannel","currentRow"]),r(R,{showProduct:_(I).showProduct,"onUpdate:showProduct":o[11]||(o[11]=e=>_(I).showProduct=e),data:_(I).productData},null,8,["showProduct","data"]),r(k,{showSingleFee:_(I).showSingleFee,"onUpdate:showSingleFee":o[12]||(o[12]=e=>_(I).showSingleFee=e),currentRow:_(I).currentRow},null,8,["showSingleFee","currentRow"]),r(F,{channelVisible:_(I).channelVisible,"onUpdate:channelVisible":o[13]||(o[13]=e=>_(I).channelVisible=e),currentRow:_(I).currentRow},null,8,["channelVisible","currentRow"]),r(v,{showFeeRisk:_(I).showFeeRisk,"onUpdate:showFeeRisk":o[14]||(o[14]=e=>_(I).showFeeRisk=e),currentRow:_(I).currentRow},null,8,["showFeeRisk","currentRow"]),r(D,{showCopyChannel:_(I).showCopyChannel,"onUpdate:showCopyChannel":o[15]||(o[15]=e=>_(I).showCopyChannel=e),currentRow:_(I).currentRow},null,8,["showCopyChannel","currentRow"]),r(S,{showSubChannel:_(I).showSubChannel,"onUpdate:showSubChannel":o[16]||(o[16]=e=>_(I).showSubChannel=e),currentRow:_(I).currentRow},null,8,["showSubChannel","currentRow"]),r(j,{showChannelFee:_(I).showChannelFee,"onUpdate:showChannelFee":o[17]||(o[17]=e=>_(I).showChannelFee=e),currentRow:_(I).currentRow},null,8,["showChannelFee","currentRow"]),r(U,{showChannelRisk:_(I).showChannelRisk,"onUpdate:showChannelRisk":o[18]||(o[18]=e=>_(I).showChannelRisk=e),currentRow:_(I).currentRow},null,8,["showChannelRisk","currentRow"]),r(f,{showChannelCode:_(I).showChannelCode,"onUpdate:showChannelCode":o[19]||(o[19]=e=>_(I).showChannelCode=e)},null,8,["showChannelCode"])])}}},[["__scopeId","data-v-e5014a05"]]);export{I as default};
|