import{T as F,_ as L,a as j,r as o,C as E,J as G,k as u,G as H,o as C,c as J,H as k,f as t,m as O,e as r,d as l,q as c,t as f,U as b,I as K,n as M,D as Q,B as W,h as X}from"./index.R3qQMktZ.js";/* empty css */function Y(y){return F({url:"/sys/notice/list",method:"get",params:y})}const Z={class:"app-container"},x={class:"dialog-footer"},ee=W({name:"Commission"}),te=Object.assign(ee,{setup(y){j();const{proxy:i}=X();i.useDict("ff_tenant_type","ff_tenant_status","ff_tenant_agent_approval_status","ff_tenant_agent_commission_type");const h=o([]),R=o(!1),v=o(!0);o(!0),o([]),o(!0),o(!0),o("");const d=o(!1);o(!1),o(""),o([]),o(0),o(0);const T=o(0);o(0),o(0),o([]);const U=E({form:{},queryParams:{pageNum:1,pageSize:10,orderByColumn:"createTime",isAsc:"desc"},rules:{account:[{required:!0,message:i.t("商户账号不能为空"),trigger:"blur"}],password:[{required:!0,message:i.t("密码不能为空"),trigger:"blur"}],scoreRatio:[{required:!0,message:i.t("买分比例不能为空"),trigger:"blur"}],tenantType:[{required:!0,message:i.t("商户模式不能为空"),trigger:"change"}]}}),{queryParams:p,form:s,rules:q}=G(U);function V(){v.value=!0,Y(p.value).then(e=>{h.value=e.rows,T.value=e.total,v.value=!1})}function N(){d.value=!1,B()}function B(){s.value={account:"",password:"",scoreRatio:1,tenantType:1,tenantAgentPlatforms:[]},i.resetForm("agentRef")}function S(e){s.value={...e,updateTime:b(e.updateTime),createTime:b(e.createTime)},d.value=!0}function D(){i.$refs.agentRef.validate(e=>{e&&createAgent(s.value).then(n=>{i.$modal.msgSuccess(i.t("新增成功")),R.value=!1,V()})})}return V(),(e,n)=>{const m=u("el-table-column"),w=u("el-button"),P=u("el-table"),z=u("pagination"),g=u("el-input"),_=u("el-form-item"),A=u("el-form"),I=u("el-dialog"),$=H("loading");return C(),J("div",Z,[k((C(),O(P,{data:t(h),stripe:"",border:"",class:"c-table-main",height:"672px"},{default:r(()=>[l(m,{label:e.t("标题"),align:"center",prop:"title"},null,8,["label"]),l(m,{label:e.t("内容"),align:"center",prop:"content"},null,8,["label"]),l(m,{label:e.t("创建时间"),align:"center",prop:"createTime","show-overflow-tooltip":!0},{default:r(a=>[c(f(t(b)(a.row.createTime)),1)]),_:1},8,["label"]),l(m,{label:e.t("更新时间"),align:"center",prop:"updateTime","show-overflow-tooltip":!0},{default:r(a=>[c(f(t(b)(a.row.updateTime)),1)]),_:1},8,["label"]),l(m,{label:e.t("操作"),align:"center"},{default:r(a=>[l(w,{link:"",type:"primary",onClick:ae=>S(a.row)},{default:r(()=>[c(f(e.t("详情")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[$,t(v)]]),k(l(z,{total:t(T),page:t(p).pageNum,"onUpdate:page":n[0]||(n[0]=a=>t(p).pageNum=a),limit:t(p).pageSize,"onUpdate:limit":n[1]||(n[1]=a=>t(p).pageSize=a),onPagination:V},null,8,["total","page","limit"]),[[K,t(T)>0]]),l(I,{title:e.t("详情"),modelValue:t(d),"onUpdate:modelValue":n[6]||(n[6]=a=>Q(d)?d.value=a:null),width:"520px","append-to-body":""},{footer:r(()=>[M("div",x,[l(w,{type:"primary",onClick:D},{default:r(()=>[c(f(e.t("确 定")),1)]),_:1}),l(w,{onClick:N},{default:r(()=>[c(f(e.t("取 消")),1)]),_:1})])]),default:r(()=>[l(A,{ref:"agentRef",model:t(s),rules:t(q),"label-width":"120px"},{default:r(()=>[l(_,{label:e.t("标题"),prop:"title"},{default:r(()=>[l(g,{modelValue:t(s).title,"onUpdate:modelValue":n[2]||(n[2]=a=>t(s).title=a),disabled:"",placeholder:e.t("请输入标题")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(_,{label:e.t("内容"),prop:"content",width:"480px"},{default:r(()=>[l(g,{modelValue:t(s).content,"onUpdate:modelValue":n[3]||(n[3]=a=>t(s).content=a),disabled:"",rows:5,type:"textarea"},null,8,["modelValue"])]),_:1},8,["label"]),l(_,{label:e.t("创建时间"),prop:"createTime"},{default:r(()=>[l(g,{modelValue:t(s).createTime,"onUpdate:modelValue":n[4]||(n[4]=a=>t(s).createTime=a),disabled:"",placeholder:e.t("请输入创建时间")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),l(_,{label:e.t("更新时间"),prop:"updateTime"},{default:r(()=>[l(g,{modelValue:t(s).updateTime,"onUpdate:modelValue":n[5]||(n[5]=a=>t(s).updateTime=a),disabled:"",placeholder:e.t("请输入更新时间")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},8,["model","rules"])]),_:1},8,["title","modelValue"])])}}}),ne=L(te,[["__scopeId","data-v-1415654c"]]);export{ne as default};