2 lines
5.7 KiB
JavaScript
2 lines
5.7 KiB
JavaScript
import{ag as a,r as e,o,cF as l,bW as i,c as s,e as d,m as t,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.DMuoDWpw.js";import{_ as L}from"./index.D46A469w.js";import{c as v,d as y}from"./service.BSqHl6ja.js";import"./el-col.COx331AE.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 d(),s("div",null,[(d(),t(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?(d(),t(o,{key:0,size:"small",type:"success",disabled:""},{default:r(()=>e[6]||(e[6]=[u("禁用")])),_:1,__:[6]})):_("",!0),1===a.status?(d(),t(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?(d(),t(o,{key:0,size:"small",type:"success",disabled:""},{default:r(()=>e[8]||(e[8]=[u("否")])),_:1,__:[8]})):_("",!0),1===a.can_confirm_order?(d(),t(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).eidtLoginDialog.showAddDialog,onClose:C,"destroy-on-close":!0,"close-on-click-modal":!1,center:"",style:{"max-width":"600px"}},{footer:r(()=>[g("span",V,[n(o,{onClick:e[5]||(e[5]=a=>c(x).eidtLoginDialog.showAddDialog=!1)},{default:r(()=>e[12]||(e[12]=[u("取消")])),_:1,__:[12]}),D((d(),t(o,{type:"primary",loading:c(x).eidtLoginDialog.btnLoading},{default:r(()=>e[13]||(e[13]=[u("确定")])),_:1,__:[13]},8,["loading"])),[[F,U]])])]),default:r(()=>[n(v,{"label-width":"auto",rules:c(x).eidtLoginDialog.rules,model:c(x).eidtLoginDialog.values,ref_key:"eidtLoginDialogFormRef",ref:z},{default:r(()=>[n(h,{label:"登录账号"},{default:r(()=>[n(l,{modelValue:c(x).tableData[0].name,"onUpdate:modelValue":e[1]||(e[1]=a=>c(x).tableData[0].name=a),disabled:!0},null,8,["modelValue"])]),_:1}),n(h,{label:"修改登录密码"===c(x).eidtLoginDialog.title?"旧密码登录":"旧支付密码",prop:"old_password"},{default:r(()=>[n(l,{modelValue:c(x).eidtLoginDialog.values.old_password,"onUpdate:modelValue":e[2]||(e[2]=a=>c(x).eidtLoginDialog.values.old_password=a),type:"password"},null,8,["modelValue"])]),_:1},8,["label"]),n(h,{label:"新密码",prop:"new_password"},{default:r(()=>[n(l,{modelValue:c(x).eidtLoginDialog.values.new_password,"onUpdate:modelValue":e[3]||(e[3]=a=>c(x).eidtLoginDialog.values.new_password=a),type:"password"},null,8,["modelValue"])]),_:1}),n(h,{label:"确认密码",prop:"confirm_password"},{default:r(()=>[n(l,{modelValue:c(x).eidtLoginDialog.values.confirm_password,"onUpdate:modelValue":e[4]||(e[4]=a=>c(x).eidtLoginDialog.values.confirm_password=a),type:"password"},null,8,["modelValue"])]),_:1})]),_:1},8,["rules","model"])]),_:1},8,["title","model-value"])])}}};export{F as default};
|