账户管理

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> <Option v-for="item in this.shopList" :value="item.id" :key="item.id">{{item.name}}</Option>
</Select> </Select>
</div> </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"> <div style="margin-top: 40px">
<Button type="primary" style="height: 39px;width: 101px" @click="modifyAccountConfirm()" >完成</Button> <Button type="primary" style="height: 39px;width: 101px" @click="modifyAccountConfirm()" >完成</Button>
@ -66,10 +71,14 @@
<script> <script>
import accountManagementModify from '../../services/account/AccountManagementModify' import accountManagementModify from '../../services/account/AccountManagementModify'
import accountManagement from '../../services/account/AccountManagement' import accountManagement from '../../services/account/AccountManagement'
import IncreaseData from "../../services/generalize/IncreaseData";
export default { export default {
data() { data() {
return { return {
companyList: [],
companySelectDisplay:false,
name: "accountManagementModify", name: "accountManagementModify",
modifyFrom: { modifyFrom: {
accountId: this.$route.query.accountId, accountId: this.$route.query.accountId,
@ -80,7 +89,8 @@
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 type:this.$route.query.type,
companyId: this.$route.query.companyId,
}, },
passwordCheck:[ passwordCheck:[
{required:true,message:'密码不能为空',trigger:'blur'}, {required:true,message:'密码不能为空',trigger:'blur'},
@ -115,14 +125,22 @@
} }
}, },
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.modifyFrom.type = 1;
this.modifyFrom.companyId = null;
this.listShop(); this.listShop();
} else if(this.$route.query.roleCode === "DG-DAOGOU"){ } else if(this.$route.query.roleCode === "DG-DAOGOU"){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.modifyFrom.type = 4; this.modifyFrom.type = 4;
this.modifyFrom.companyId = null;
this.listShop(); this.listShop();
}else if(this.$route.query.roleCode === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.modifyFrom.type = 2;
this.allCompany();
} }
this.listRole(); this.listRole();
}, },
@ -210,14 +228,24 @@
if(roleBean.code === 'DZ-DIANZHANG'){ if(roleBean.code === 'DZ-DIANZHANG'){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.modifyFrom.type = 1; this.modifyFrom.type = 1;
this.companySelectDisplay = false;
this.modifyFrom.companyId = null;
this.listShop(); this.listShop();
} else if(roleBean.code === "DG-DAOGOU"){ } else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.modifyFrom.type = 4; this.modifyFrom.type = 4;
this.companySelectDisplay = false;
this.modifyFrom.companyId = null;
this.listShop(); this.listShop();
}else if(roleBean.code === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.modifyFrom.type = 2;
this.allCompany();
} else { } else {
this.shopSelectDisplay = false; this.shopSelectDisplay = false;
this.modifyFrom.shopId = null; this.modifyFrom.shopId = null;
this.modifyFrom.companyId = null;
} }
}, },
// //
@ -241,7 +269,26 @@
check(){ check(){
this.modifyValidate.password = this.passwordCheck; this.modifyValidate.password = this.passwordCheck;
this.modifyValidate.confirmPassword = this.confirmPasswordCheck; 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: { on: {
click: () => { click: () => {
debugger
this.$router.push({ this.$router.push({
path: '/account/management/modify', path: '/account/management/modify',
query: { query: {
@ -133,6 +134,7 @@
roleId: params.row.roleId, roleId: params.row.roleId,
roleCode: params.row.roleCode, roleCode: params.row.roleCode,
shopId: params.row.shopId, shopId: params.row.shopId,
companyId:params.row.orgId,
} }
}); });
} }
@ -267,7 +269,7 @@
let that = this; let that = this;
that.data1 = []; that.data1 = [];
let roleId = that.changeRoleId; let roleId = that.changeRoleId;
if(that.changeRoleId === 0){ if(that.changeRoleId === "0"){
roleId = null; roleId = null;
} }
let shopId = that.changeShopId; let shopId = that.changeShopId;

@ -59,6 +59,13 @@
</Select> </Select>
</div> </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"> <row style="margin-top: 40px">
<Button type="primary" style="height:39px;width:101px" @click="addAccountConfirm()"></Button> <Button type="primary" style="height:39px;width:101px" @click="addAccountConfirm()"></Button>
@ -73,7 +80,7 @@
<script> <script>
import accountManagementAdd from '../../services/account/AccountManagementAdd' import accountManagementAdd from '../../services/account/AccountManagementAdd'
import accountManagement from "../../services/account/AccountManagement"; import accountManagement from "../../services/account/AccountManagement";
import IncreaseData from "../../services/generalize/IncreaseData";
export default { export default {
data() { data() {
return { return {
@ -85,7 +92,8 @@
password: null, password: null,
confirmPassword: null, confirmPassword: null,
shopId: null, shopId: null,
type: null type: null,
companyId: null,
}, },
addValidate: { addValidate: {
userName: [ userName: [
@ -132,6 +140,8 @@
], ],
// //
shopSelectDisplay: false, shopSelectDisplay: false,
companyList: [],
companySelectDisplay:false,
} }
}, },
mounted: function () { mounted: function () {
@ -139,6 +149,7 @@
this.bus.$emit('setHeader',{header:"添加账户"}); this.bus.$emit('setHeader',{header:"添加账户"});
//- //-
this.listRoleInfo(); this.listRoleInfo();
}, },
methods: { methods: {
// //
@ -223,15 +234,25 @@
roleChange(roleBean) { roleChange(roleBean) {
if (roleBean.code === 'DZ-DIANZHANG') { if (roleBean.code === 'DZ-DIANZHANG') {
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.companySelectDisplay = false;
this.addFrom.companyId = null;
this.addFrom.type = 1; this.addFrom.type = 1;
this.listOfShop(); this.listOfShop();
} else if(roleBean.code === "DG-DAOGOU"){ } else if(roleBean.code === "DG-DAOGOU"){
this.shopSelectDisplay = true; this.shopSelectDisplay = true;
this.companySelectDisplay = false;
this.addFrom.companyId = null;
this.addFrom.type = 4; this.addFrom.type = 4;
this.listOfShop(); this.listOfShop();
}else if(roleBean.code === 'DG-YUNYING'){
this.companySelectDisplay = true;
this.shopSelectDisplay = false;
this.addFrom.type = 2;
this.allCompany();
}else { }else {
this.shopSelectDisplay = false; this.shopSelectDisplay = false;
this.addFrom.shopId = null; 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, hotOnly: false,
disableHostCheck: true, disableHostCheck: true,
/* 使用代理 后台接口路径 */ /* 使用代理 后台接口路径 */
proxy: 'http://192.168.0.47:8312/' proxy: 'http://192.168.0.54:8080/'
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/' // proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
}, },
} }

Loading…
Cancel
Save