2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
|
import{ag as a,r as e,o,cD as l,bV as i,c as s,e as t,m as d,N as n,w as r,l as g,an as p,O as u,al as _,g as c,bv as m,bw as w,am as b,R as D,a_ as f,bu as h}from"./index.DLrOu3jP.js";import{_ as L}from"./index.DEDWMUkM.js";import{c as v,d as y}from"./service.DfCCxvWD.js";import"./el-col.DGF9ic0j.js";const k={class:"operate"},V={class:"dialog-footer"},F={__name:"service-info",setup(F){const x=a({columns:[{prop:"service_name",label:"名称",width:100},{prop:"code",label:"编号",width:150},{prop:"name",label:"登录账户",width:100},{prop:"phone",label:"手机号",width:100},{prop:"commission_balance",label:"佣金余额",width:100},{prop:"deposit_total",label:"总押金",width:100},{prop:"deposit_frozen",label:"冻结押金",width:100},{prop:"deposit_available",label:"可用押金",width:100},{prop:"min_deposit",label:"最低接单押金",width:100},{prop:"status",label:"状态",width:100,slot:"status_slot"},{prop:"can_confirm_order",label:"接单权限",width:100,slot:"can_confirm_order_slot"},{prop:"created_at",label:"创建时间",width:180},{prop:"operate",label:"操作",width:240,slot:"operate",align:"center",fixed:"right"}],tableData:[],searchFields:[],eidtLoginDialog:{title:"",showAddDialog:!1,btnLoading:!1,rules:{old_password:[{required:!0,message:"请输入密码",trigger:"blur"}],new_password:[{required:!0,message:"请输入密码",trigger:"blur"}],confirm_password:[{required:!0,message:"请输入确认密码",trigger:"blur"},{validator:(a,e,o)=>{""===e?o(new Error("请再次输入新密码")):e!==x.eidtLoginDialog.values.new_password?o(new Error("两次输入的密码不一致")):o()},trigger:"blur"}]},values:{old_password:"",new_password:"",confirm_password:""}},paginationSlot:!1,loading:!1}),z=e();o(()=>{A()});const A=()=>{x.loading=!0,l().then(a=>{x.tableData=[a],x.total=0,x.loading=!1}).catch(()=>{x.loading=!1})},C=()=>{z.value&&z.value.resetFields(),x.eidtLoginDialog.showAddDialog=!1},U=async()=>{await z.value.validate((a,e)=>{if(a){let a=null;x.eidtLoginDialog.btnLoading=!0;let e=null;"修改登录密码"==x.eidtLoginDialog.title?(e=x.eidtLoginDialog.values,a=v):(e={old_pay_password:x.eidtLoginDialog.values.old_password,new_pay_password:x.eidtLoginDialog.values.new_password,confirm_pay_password:x.eidtLoginDialog.values.confirm_password},a=y),a(e).then(a=>{h.success(x.eidtLoginDialog.title+"成功"),x.eidtLoginDialog.showAddDialog=!1,x.eidtLoginDialog.btnLoading=!1}).catch(()=>{x.eidtLoginDialog.btnLoading=!1})}})};return(a,e)=>{const o=p,l=b,h=w,v=m,y=f,F=i("click-debounce");return t(),s("div",null,[(t(),d(L,{type:"account-information",columns:c(x).columns,searchFields:c(x).searchFields,"onUpdate:searchFields":e[0]||(e[0]=a=>c(x).searchFields=a),data:c(x).tableData,showRightRefreshSlot:!1,paginationSlot:!1,onGetTableData:A,loading:c(x).loading,name:"account-information",key:"account-information"},{status_slot:r(({row:a})=>[0===a.status?(t(),d(o,{key:0,size:"small",type:"success",disabled:""},{default:r(()=>e[6]||(e[6]=[u("禁用")])),_:1,__:[6]})):_("",!0),1===a.status?(t(),d(o,{key:1,type:"warning",size:"small",disabled:""},{default:r(()=>e[7]||(e[7]=[u("启用")])),_:1,__:[7]})):_("",!0)]),can_confirm_order_slot:r(({row:a})=>[0===a.can_confirm_order?(t(),d(o,{key:0,size:"small",type:"success",disabled:""},{default:r(()=>e[8]||(e[8]=[u("否")])),_:1,__:[8]})):_("",!0),1===a.can_confirm_order?(t(),d(o,{key:1,type:"warning",size:"small",disabled:""},{default:r(()=>e[9]||(e[9]=[u("是")])),_:1,__:[9]})):_("",!0)]),operate:r(({row:a,$index:l})=>[g("div",k,[n(o,{size:"small",type:"primary",onClick:a=>(x.eidtLoginDialog.title="修改登录密码",void(x.eidtLoginDialog.showAddDialog=!0))},{default:r(()=>e[10]||(e[10]=[u(" 修改登录密码 ")])),_:2,__:[10]},1032,["onClick"]),n(o,{size:"small",type:"danger",onClick:a=>(x.eidtLoginDialog.title="修改支付密码",void(x.eidtLoginDialog.showAddDialog=!0))},{default:r(()=>e[11]||(e[11]=[u(" 修改支付密码 ")])),_:2,__:[11]},1032,["onClick"])])]),_:1},8,["columns","searchFields","data","loading"])),n(y,{title:c(x).eidtLoginDialog.title,"model-value":c(x)
|