账户管理修改

master
Caps 6 years ago
parent 93b5da6544
commit 5ee3359f4e

@ -80,6 +80,7 @@
confirmPassword: this.$route.query.password, confirmPassword: this.$route.query.password,
roleId: this.$route.query.roleId, roleId: this.$route.query.roleId,
shopId: this.$route.query.shopId, shopId: this.$route.query.shopId,
type:this.$route.query.type
}, },
modifyValidate: { modifyValidate: {
userName:[ userName:[
@ -112,9 +113,13 @@
} }
}, },
mounted: function () { mounted: function () {
debugger
if(this.$route.query.roleCode === 'DZ-DIANZHANG'){ if(this.$route.query.roleCode === 'DZ-DIANZHANG'){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.modifyFrom.type = 1;
this.listShop();
} else if(this.$route.query.roleCode === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.modifyFrom.type = 4;
this.listShop(); this.listShop();
} }
this.listRole(); this.listRole();
@ -158,7 +163,7 @@
return; return;
} }
if(this.shopSelectDisplay && !this.modifyFrom.shopId) { if(this.shopSelectDisplay && !this.modifyFrom.shopId) {
this.$Message.info("店长必须选择店铺"); this.$Message.info("必须选择店铺");
return; return;
} }
if(!this.modifyFrom.roleId) { if(!this.modifyFrom.roleId) {
@ -202,6 +207,11 @@
roleChange(roleBean) { roleChange(roleBean) {
if(roleBean.code === 'DZ-DIANZHANG'){ if(roleBean.code === 'DZ-DIANZHANG'){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.modifyFrom.type = 1;
this.listShop();
} else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.modifyFrom.type = 4;
this.listShop(); this.listShop();
} else { } else {
this.shopSelectDisplay = false; this.shopSelectDisplay = false;

@ -82,18 +82,14 @@
align: 'center' align: 'center'
}, },
{ {
title: '名', title: '用户名',
key: 'userName', key: 'userName',
width: '150px' width: '150px'
}, },
{ {
title: '员工ID', title: '系统账号',
key: 'staffCode', key: 'account',
width: '150px', width: '150px',
render: (h, params) => {
let that = this;
return h('span', {}, that.data1[params.index].staffCode === null ? '--' : that.data1[params.index].staffCode)
}
}, },
{ {
title: '系统角色', title: '系统角色',
@ -179,13 +175,13 @@
changeRoleId: null, changeRoleId: null,
updateAccountId: 0, updateAccountId: 0,
updateUserId: 0, updateUserId: 0,
item:null, item: null,
} }
}, },
mounted: function () { mounted: function () {
this.listRoleInfo(); this.listRoleInfo();
this.listOfShop(); this.listOfShop();
if(this.$route.query != null){ if (this.$route.query != null) {
this.item = this.$route.query; this.item = this.$route.query;
// //
this.changeRoleId = this.item.id; this.changeRoleId = this.item.id;

@ -72,7 +72,6 @@
<script> <script>
import accountManagementAdd from '../../services/account/AccountManagementAdd' import accountManagementAdd from '../../services/account/AccountManagementAdd'
import permission from '../../services/permission/Permission'
import accountManagement from "../../services/account/AccountManagement"; import accountManagement from "../../services/account/AccountManagement";
export default { export default {
@ -85,7 +84,8 @@
account: null, account: null,
password: null, password: null,
confirmPassword: null, confirmPassword: null,
shopId: null shopId: null,
type: null
}, },
addValidate: { addValidate: {
userName: [ userName: [
@ -221,8 +221,13 @@
roleChange(roleBean) { roleChange(roleBean) {
if (roleBean.code === 'DZ-DIANZHANG') { if (roleBean.code === 'DZ-DIANZHANG') {
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.addFrom.type = 1;
this.listOfShop(); this.listOfShop();
} else { } else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.addFrom.type = 4;
this.listOfShop();
}else {
this.shopSelectDisplay = false; this.shopSelectDisplay = false;
this.addFrom.shopId = null; this.addFrom.shopId = null;
} }

Loading…
Cancel
Save