|
@@ -151,12 +151,30 @@ Page({
|
|
|
title: '商户主账号不可停用',
|
|
|
icon: "none"
|
|
|
});
|
|
|
- const checked = !this.data.checked,
|
|
|
- fisused = (checked) ? 1 : 0
|
|
|
- this.setData({
|
|
|
- checked,
|
|
|
- fisused
|
|
|
- })
|
|
|
+ const that = this;
|
|
|
+ if (this.data.tenterprise_userid != 0) {
|
|
|
+ wx.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: (this.data.checked) ? '是否停用“' + this.data.fname + '”,停用后该角色将暂时无法登陆' : '是否启用“' + this.data.fname + '”',
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ const checked = !that.data.checked,
|
|
|
+ fisused = (checked) ? 1 : 0
|
|
|
+ that.setData({
|
|
|
+ checked,
|
|
|
+ fisused
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ const checked = !that.data.checked,
|
|
|
+ fisused = (checked) ? 1 : 0
|
|
|
+ that.setData({
|
|
|
+ checked,
|
|
|
+ fisused
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
/**
|
|
|
* 生命周期函数--监听页面初次渲染完成
|