账户管理

master
Caps 6 years ago
parent 9d8b68a0db
commit 49c3aeb4c1

@ -54,7 +54,12 @@
<Option v-for="item in this.shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select>
</div>
<div style="margin-top: 40px" v-if="companySelectDisplay">
<span class="name-font" style="width: 80px;display: inline-block">零售公司</span>
<Select v-model="modifyFrom.companyId" filterable style="width: 300px;">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</div>
<!--确认返回-->
<div style="margin-top: 40px">
<Button type="primary" style="height: 39px;width: 101px" @click="modifyAccountConfirm()" >完成</Button>
@ -66,10 +71,14 @@
<script>
import accountManagementModify from '../../services/account/AccountManagementModify'
import accountManagement from '../../services/account/AccountManagement'
import IncreaseData from "../../services/generalize/IncreaseData";
export default {
data() {
return {
companyList: [],
companySelectDisplay:false,
name: "accountManagementModify",
modifyFrom: {
accountId: this.$route.query.accountId,
@ -80,7 +89,8 @@
confirmPassword: this.$route.query.password,
roleId: this.$route.query.roleId,
shopId: this.$route.query.shopId,
type:this.$route.query.type
type:this.$route.query.type,
companyId: this.$route.query.companyId,
},
passwordCheck:[
{required:true,message:'密码不能为空',trigger:'blur'},
@ -115,14 +125,22 @@
}
},
mounted: function () {
debugger
if(this.$route.query.roleCode === 'DZ-DIANZHANG'){
this.shopSelectDisplay = true;
this.modifyFrom.type = 1;
this.modifyFrom.companyId = null;
this.listShop();
} else if(this.$route.query.roleCode === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.modifyFrom.type = 4;
this.modifyFrom.companyId = null;
this.listShop();
}else if(this.$route.query.roleCode === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.modifyFrom.type = 2;
this.allCompany();
}
this.listRole();
},
@ -210,14 +228,24 @@
if(roleBean.code === 'DZ-DIANZHANG'){
this.shopSelectDisplay = true;
this.modifyFrom.type = 1;
this.companySelectDisplay = false;
this.modifyFrom.companyId = null;
this.listShop();
} else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.modifyFrom.type = 4;
this.companySelectDisplay = false;
this.modifyFrom.companyId = null;
this.listShop();
}else if(roleBean.code === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.modifyFrom.type = 2;
this.allCompany();
} else {
this.shopSelectDisplay = false;
this.modifyFrom.shopId = null;
this.modifyFrom.companyId = null;
}
},
//
@ -241,7 +269,26 @@
check(){
this.modifyValidate.password = this.passwordCheck;
this.modifyValidate.confirmPassword = this.confirmPasswordCheck;
}
},
allCompany(){
let that = this;
let request = {
userId:JSON.parse(sessionStorage.getItem("loginInfo")).userId
};
this.companyList = [];
IncreaseData.listOfRetailCompany(request,function (data) {
data = data.data;
if (data.code === '0001') {
that.$Message.error("查询零售公司出错!");
return;
}
if (data.code === '0000') {
data.results.forEach(da => {
that.companyList.push(da);
})
}
})
},
}
}

@ -121,6 +121,7 @@
},
on: {
click: () => {
debugger
this.$router.push({
path: '/account/management/modify',
query: {
@ -133,6 +134,7 @@
roleId: params.row.roleId,
roleCode: params.row.roleCode,
shopId: params.row.shopId,
companyId:params.row.orgId,
}
});
}
@ -267,7 +269,7 @@
let that = this;
that.data1 = [];
let roleId = that.changeRoleId;
if(that.changeRoleId === 0){
if(that.changeRoleId === "0"){
roleId = null;
}
let shopId = that.changeShopId;

@ -59,6 +59,13 @@
</Select>
</div>
<div style="margin-top: 40px" v-if="companySelectDisplay">
<span class="name-font" style="width: 80px;display: inline-block">零售公司</span>
<Select v-model="addFrom.companyId" filterable style="width: 300px;">
<Option v-for="item in companyList" :value="item.id" :key="item.id">{{ item.name }}</Option>
</Select>
</div>
<!--确认返回-->
<row style="margin-top: 40px">
<Button type="primary" style="height:39px;width:101px" @click="addAccountConfirm()"></Button>
@ -73,7 +80,7 @@
<script>
import accountManagementAdd from '../../services/account/AccountManagementAdd'
import accountManagement from "../../services/account/AccountManagement";
import IncreaseData from "../../services/generalize/IncreaseData";
export default {
data() {
return {
@ -85,7 +92,8 @@
password: null,
confirmPassword: null,
shopId: null,
type: null
type: null,
companyId: null,
},
addValidate: {
userName: [
@ -132,6 +140,8 @@
],
//
shopSelectDisplay: false,
companyList: [],
companySelectDisplay:false,
}
},
mounted: function () {
@ -139,6 +149,7 @@
this.bus.$emit('setHeader',{header:"添加账户"});
//-
this.listRoleInfo();
},
methods: {
//
@ -223,15 +234,25 @@
roleChange(roleBean) {
if (roleBean.code === 'DZ-DIANZHANG') {
this.shopSelectDisplay = true;
this.companySelectDisplay = false;
this.addFrom.companyId = null;
this.addFrom.type = 1;
this.listOfShop();
} else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true;
this.companySelectDisplay = false;
this.addFrom.companyId = null;
this.addFrom.type = 4;
this.listOfShop();
}else if(roleBean.code === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.addFrom.type = 2;
this.allCompany();
}else {
this.shopSelectDisplay = false;
this.addFrom.shopId = null;
this.addFrom.companyId = null;
}
},
//
@ -255,6 +276,25 @@
}
})
},
allCompany(){
let that = this;
let request = {
userId:JSON.parse(sessionStorage.getItem("loginInfo")).userId
};
this.companyList = [];
IncreaseData.listOfRetailCompany(request,function (data) {
data = data.data;
if (data.code === '0001') {
that.$Message.error("查询零售公司出错!");
return;
}
if (data.code === '0000') {
data.results.forEach(da => {
that.companyList.push(da);
})
}
})
},
}
}

@ -28,7 +28,7 @@ module.exports = {
hotOnly: false,
disableHostCheck: true,
/* 使用代理 后台接口路径 */
proxy: 'http://192.168.0.47:8312/'
proxy: 'http://192.168.0.54:8080/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
},
}

Loading…
Cancel
Save