|
@@ -131,16 +131,12 @@
|
|
<el-form-item label="用户名" prop="nickName">
|
|
<el-form-item label="用户名" prop="nickName">
|
|
<el-input v-model="AccountForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
|
|
<el-input v-model="AccountForm.nickName" autocomplete="off" placeholder="请输入用户名"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
<el-form-item label="角色组" prop="role">
|
|
<el-form-item label="角色组" prop="role">
|
|
<el-select v-model="AccountForm.role" placeholder="请选择角色组" style="width: 100%;" filterable>
|
|
<el-select v-model="AccountForm.role" placeholder="请选择角色组" style="width: 100%;" filterable>
|
|
<el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
|
|
<el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="可用仓库" prop="">
|
|
|
|
- <el-select v-model="AccountForm.role" placeholder="请选择可用仓库" style="width: 100%;" filterable>
|
|
|
|
- <el-option :label="item.name" :value="item.adminRoleId" v-for="(item, index) in roleList" :key="index"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
<el-form-item label="部门" prop="department" v-show="roleObj.type === 0">
|
|
<el-form-item label="部门" prop="department" v-show="roleObj.type === 0">
|
|
<el-tree
|
|
<el-tree
|
|
:data="departmentList"
|
|
:data="departmentList"
|
|
@@ -179,6 +175,7 @@
|
|
<el-radio :label="false">否</el-radio>
|
|
<el-radio :label="false">否</el-radio>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
<el-form-item label="密码" prop="newPassword">
|
|
<el-form-item label="密码" prop="newPassword">
|
|
<el-input v-model="AccountForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码" :type="passwordType1"></el-input>
|
|
<el-input v-model="AccountForm.newPassword" ref="password1" autocomplete="off" placeholder="请输入密码" :type="passwordType1"></el-input>
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
<span class="show-pwd" @click="showPwd(1)">
|
|
@@ -191,6 +188,12 @@
|
|
<svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
|
|
<svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
|
|
</span>
|
|
</span>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="可用仓库" prop="correspondIds">
|
|
|
|
+ <el-select multiple v-model="AccountForm.correspondIds" placeholder="请选择可用仓库" style="width: 100%;" filterable>
|
|
|
|
+ <el-option :label="item.name" :value="item.id" v-for="(item, index) in stockList" :key="index"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
@@ -225,7 +228,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, changeAccountStatus, resetPassword } from '@/api/setting'
|
|
|
|
|
|
+import {getStockListStock, getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, changeAccountStatus, resetPassword } from '@/api/setting'
|
|
import { getDealerList } from '@/api/common'
|
|
import { getDealerList } from '@/api/common'
|
|
import { findElem, downloadFiles, handleImport } from '@/utils/util'
|
|
import { findElem, downloadFiles, handleImport } from '@/utils/util'
|
|
|
|
|
|
@@ -274,6 +277,7 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ stockList:[],//仓库列表
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
baseURL: process.env.VUE_APP_BASE_API,
|
|
dataList: null, // 列表数据
|
|
dataList: null, // 列表数据
|
|
moduleList: null, // 模块列表
|
|
moduleList: null, // 模块列表
|
|
@@ -295,6 +299,7 @@ export default {
|
|
merchant: '', // 商户
|
|
merchant: '', // 商户
|
|
dealer: '', //经销商
|
|
dealer: '', //经销商
|
|
role: '', // 角色组
|
|
role: '', // 角色组
|
|
|
|
+ correspondIds:[],//仓库
|
|
isGroup: false,
|
|
isGroup: false,
|
|
company: '',
|
|
company: '',
|
|
isDiscount: true,
|
|
isDiscount: true,
|
|
@@ -311,6 +316,9 @@ export default {
|
|
role: [
|
|
role: [
|
|
{ required: true, message: '请选择角色组', trigger: 'change' }
|
|
{ required: true, message: '请选择角色组', trigger: 'change' }
|
|
],
|
|
],
|
|
|
|
+ correspondIds: [
|
|
|
|
+ { required: true, message: '请选择可用仓库', trigger: 'change' }
|
|
|
|
+ ],
|
|
newPassword: [
|
|
newPassword: [
|
|
{ required: true, validator: validatePass3, trigger: 'blur' }
|
|
{ required: true, validator: validatePass3, trigger: 'blur' }
|
|
],
|
|
],
|
|
@@ -376,8 +384,15 @@ export default {
|
|
async created() {
|
|
async created() {
|
|
this.getTree();
|
|
this.getTree();
|
|
this.getList();
|
|
this.getList();
|
|
|
|
+ this.getStockList()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //获取仓库仓位对应关系列表
|
|
|
|
+ async getStockList(){
|
|
|
|
+ let res = await getStockListStock({pageSize:-1,pageNum:1})
|
|
|
|
+ this.stockList = res.data.records
|
|
|
|
+
|
|
|
|
+ },
|
|
// 查询按钮权限
|
|
// 查询按钮权限
|
|
checkBtnRole(value) {
|
|
checkBtnRole(value) {
|
|
// let btnRole = this.$route.meta.roles;
|
|
// let btnRole = this.$route.meta.roles;
|
|
@@ -527,6 +542,7 @@ export default {
|
|
if(type == 'edit') {
|
|
if(type == 'edit') {
|
|
this.editAccountId = id;
|
|
this.editAccountId = id;
|
|
getAccountDetail({adminUserId: id}).then(res => {
|
|
getAccountDetail({adminUserId: id}).then(res => {
|
|
|
|
+ console.log(res,78787);
|
|
this.AccountForm.account = res.data.userName;
|
|
this.AccountForm.account = res.data.userName;
|
|
this.AccountForm.role = res.data.roleId;
|
|
this.AccountForm.role = res.data.roleId;
|
|
this.AccountForm.nickName = res.data.nickName;
|
|
this.AccountForm.nickName = res.data.nickName;
|
|
@@ -535,6 +551,7 @@ export default {
|
|
this.AccountForm.isGroup = res.data.isGroupCompany;
|
|
this.AccountForm.isGroup = res.data.isGroupCompany;
|
|
this.AccountForm.company = res.data.parentCustomerId;
|
|
this.AccountForm.company = res.data.parentCustomerId;
|
|
this.AccountForm.isDiscount = res.data.isZr;
|
|
this.AccountForm.isDiscount = res.data.isZr;
|
|
|
|
+ this.AccountForm.correspondIds = res.data.stockCorrespondList;
|
|
this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
|
|
this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -550,6 +567,7 @@ export default {
|
|
|
|
|
|
// 提交 账号表单
|
|
// 提交 账号表单
|
|
submitAccountForm() {
|
|
submitAccountForm() {
|
|
|
|
+ console.log(this.AccountForm.correspondIds);
|
|
this.$refs.AccountForm.validate((valid) => {
|
|
this.$refs.AccountForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
let params = {
|
|
let params = {
|
|
@@ -557,6 +575,7 @@ export default {
|
|
nickName: this.AccountForm.nickName,
|
|
nickName: this.AccountForm.nickName,
|
|
roleId: this.AccountForm.role,
|
|
roleId: this.AccountForm.role,
|
|
password: this.AccountForm.newPassword,
|
|
password: this.AccountForm.newPassword,
|
|
|
|
+ correspondIds: this.AccountForm.correspondIds,
|
|
}
|
|
}
|
|
if(this.roleObj.type === 0) {
|
|
if(this.roleObj.type === 0) {
|
|
params.adminWebsitIds = this.$refs.tree.getCheckedKeys();
|
|
params.adminWebsitIds = this.$refs.tree.getCheckedKeys();
|