import{ag as e,D as a,r as l,c as n,e as o,N as t,w as s,g as r,dm as u,an as p,O as h,bc as d,aX as i,a7 as c}from"./index.1759238431373BA_Sq77r.js";import{_ as b}from"./index.1759238431373BHw4K_A4.js";/* empty css */import w from"./sub-channel-add.1759238431373KLvHOskV.js";import m from"./sub-channel-fee.1759238431373Dxiz_VNp.js";import S from"./sub-channel-risk.1759238431373DlgQg3iW.js";/* empty css */import"./el-col.1759238431373A8WKhbnQ.js";import"./el-time-select.1759238431373BoQpjfuN.js";import"./el-text.1759238431373CRubKPHG.js";import"./el-card.1759238431373Bvvs-k2D.js";const C={__name:"sub-channel",props:{showSubChannel:{type:Boolean,default:!1},currentRow:{type:Object,default:{}}},emits:["update:showSubChannel"],setup(C,{emit:_}){const g=C,R=e({columns:[{label:"编号",prop:"productName",align:"center"},{label:"账号名称",prop:"productName",align:"center"},{label:"账户状态",prop:"productType",align:"center",slot:"status_slot"},{label:"轮椅权重",prop:"productType",align:"center"},{label:"费率模式",prop:"productType",align:"center"},{label:"操作",prop:"productType",align:"center",slot:"operate_slot",width:"220px"}],searchFields:[],tableData:[],total:0,page:1,per_page:10,loading:!1,showSubChannelAdd:!1,currentSubRow:{},showSubChannelFee:!1,showSubChannelRisk:!1});a(()=>g.showSubChannel,e=>{e&&(R.tableData=[{productName:"1"}])});const f=l(),k=_,y=()=>{k("update:showSubChannel",!1)},F=()=>{},j=(e={})=>{R.showSubChannelAdd=!0,R.currentSubRow=e};return(e,a)=>{const l=p,_=d,g=u,k=b,x=i;return o(),n(c,null,[t(x,{"model-value":C.showSubChannel,title:"编辑产品",width:"70vw","before-close":y,ref_key:"channelRef",ref:f},{default:s(()=>[t(k,{type:"export",columns:r(R).columns,searchFields:r(R).searchFields,"onUpdate:searchFields":a[0]||(a[0]=e=>r(R).searchFields=e),per_page:r(R).per_page,"onUpdate:per_page":a[1]||(a[1]=e=>r(R).per_page=e),page:r(R).page,"onUpdate:page":a[2]||(a[2]=e=>r(R).page=e),total:r(R).total,onGetTableData:F,loading:r(R).loading,data:r(R).tableData,showSelection:!1,showRightRefreshSlot:!1},{btns:s(()=>[t(l,{type:"primary",onClick:j},{default:s(()=>a[6]||(a[6]=[h("添加账号")])),_:1,__:[6]})]),status_slot:s(({row:e})=>[t(_,{modelValue:e.status,"onUpdate:modelValue":a=>e.status=a,"inline-prompt":"","active-text":"开启","inactive-text":"关闭"},null,8,["modelValue","onUpdate:modelValue"])]),operate_slot:s(({row:n})=>[t(g,null,{default:s(()=>[t(l,{type:"primary",onClick:e=>j(n),size:"small"},{default:s(()=>a[7]||(a[7]=[h("编辑")])),_:2,__:[7]},1032,["onClick"]),t(l,{type:"primary",onClick:e=>((e={})=>{R.showSubChannelFee=!0,R.currentSubRow=e})(n),size:"small"},{default:s(()=>a[8]||(a[8]=[h("费率")])),_:2,__:[8]},1032,["onClick"]),t(l,{type:"primary",onClick:e=>((e={})=>{R.showSubChannelRisk=!0,R.currentSubRow=e})(n),size:"small"},{default:s(()=>a[9]||(a[9]=[h("风控")])),_:2,__:[9]},1032,["onClick"]),t(l,{type:"primary",onClick:a=>e.handleDelete(n),size:"small"},{default:s(()=>a[10]||(a[10]=[h("删除")])),_:2,__:[10]},1032,["onClick"])]),_:2},1024)]),_:1},8,["columns","searchFields","per_page","page","total","loading","data"])]),_:1},8,["model-value"]),t(w,{showSubChannelAdd:r(R).showSubChannelAdd,"onUpdate:showSubChannelAdd":a[3]||(a[3]=e=>r(R).showSubChannelAdd=e),currentSubRow:r(R).currentSubRow},null,8,["showSubChannelAdd","currentSubRow"]),t(m,{showSubChannelFee:r(R).showSubChannelFee,"onUpdate:showSubChannelFee":a[4]||(a[4]=e=>r(R).showSubChannelFee=e),currentSubRow:r(R).currentSubRow},null,8,["showSubChannelFee","currentSubRow"]),t(S,{showSubChannelRisk:r(R).showSubChannelRisk,"onUpdate:showSubChannelRisk":a[5]||(a[5]=e=>r(R).showSubChannelRisk=e),currentSubRow:r(R).currentSubRow},null,8,["showSubChannelRisk","currentSubRow"])],64)}}};export{C as default};