部门仓库相关

prod
anthonywj 2 years ago
parent 9a767c2299
commit ede717166f

@ -1,5 +1,7 @@
<template>
<div>
<!-- 部门信息相关-->
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
@ -23,7 +25,8 @@
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
>重置
</el-button>
<el-button type="primary" @click="onSubmit"
icon="el-icon-search"
>查询
@ -171,10 +174,43 @@
/>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<!-- 部门绑定用户列表-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }} 用户列表</span>
<span slot="label">{{ currentRow.name }}-用户列表</span>
<el-table v-loading="loading" :data="userlist" style="width: 100%" border
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="用户名称/账号:">
<el-input
v-model="userQuery.key"
placeholder="请输入用户名称或用户账号"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="onUserReset"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="onUserSelect"
icon="el-icon-plus"
>选入用户
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="userloading" :data="userlist" style="width: 100%" border
row-key="id"
@current-change="handleDeptChange"
>
@ -202,10 +238,89 @@
</el-table-column>
</el-table>
<pagination
v-show="userTotal>0"
:total="userTotal"
:page.sync="userQuery.page"
:limit.sync="userQuery.limit"
@pagination="getUerList"
/>
</el-tab-pane>
<!--部门添加用户弹窗-->
<el-dialog
v-if="userFormVisible"
title="仓库信息-添加用户"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="userFormVisible"
>
<el-table v-loading="userloading" :data="selectUserList"
ref="selectUserList"
@selection-change="handleUserSelectionChange"
border
style="width: 100%">
<el-table-column
type="selection"
:reserve-selection="false"
width="55">
</el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="账号" prop="userName"></el-table-column>
<el-table-column label="用户名" prop="employeeName"></el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click.native="userFormVisible = !userFormVisible"
>取消
</el-button
>
<el-button
type="primary"
@click.native="selectUserData()"
>选入
</el-button>
</div>
<pagination
v-show="selectUserToatl>0"
:total="selectUserToatl"
:page.sync="selectUserQuery.page"
:limit.sync="selectUserQuery.limit"
@pagination="getSelectUser"
/>
</el-dialog>
<!-- 部门绑定仓库信息-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }} 仓库信息</span>
<span slot="label">{{ currentRow.name }}-仓库信息</span>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="仓库名称/编码:">
<el-input
v-model="userQuery.key"
placeholder="请输入仓库名称或仓库编码"
clearable
></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="onUserSubmit"
icon="el-icon-search"
>查询
</el-button
>
<el-tooltip content="请移步至系统管理-组织管理-仓库信息管理界面绑定仓库信息" placement="top" style="margin-left: 20px">
<i class="el-icon-question">帮助</i>
</el-tooltip>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userlist" style="width: 100%" border
row-key="id"
@current-change="handleDeptChange"
@ -233,7 +348,6 @@
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
@ -247,6 +361,7 @@ import {filterList, deleteWarehouse, saveWarehouse} from "@/api/system/invWareho
import {treeList, treeSelectedList} from "@/api/system/dataStatus";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {selectNotSelectUser} from "@/api/auth/authUser";
export default {
data() {
@ -269,10 +384,6 @@ export default {
2: "未验证",
},
list: [],
isTip: {
0: "否",
1: "是",
},
formData: {},
formMap: {
add: "部门管理-新增",
@ -295,7 +406,28 @@ export default {
children: "children",
label: "label"
},
currentRow: {},
currentRow: {
name: "部门"
},
userQuery: {
key: null,
page: 1,
limit: 10,
},
userlist: [],
userFormVisible: false,
userloading: false,
userTotal: 0,
selectUserList: [],
selectAddUser: [],
selectUserToatl: 0,
selectUserQuery: {
code: null,
page: 1,
limit: 10
}
};
},
@ -356,8 +488,6 @@ export default {
this.cancelDialog();
this.loading = false;
});
} else if (this.formName == "edit") {
saveWarehouse(this.formData, "edit")
.then((response) => {
@ -378,7 +508,6 @@ export default {
this.loading = false;
});
}
}
});
@ -437,22 +566,18 @@ export default {
this.list = [];
this.total = 0;
});
}
,
},
cancelDialog() {
this.formVisible = false;
}
,
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
}
,
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
}
,
},
deleteDialog(row) {
this.$confirm("是否删除该部门?", "提示", {
confirmButtonText: "确定",
@ -474,18 +599,14 @@ export default {
})
.catch(() => {
});
}
,
},
toggleExpandAll() {
this.refreshTable = false;
this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => {
this.refreshTable = true;
});
}
,
},
/** 转换部门数据结构 */
normalizer(node) {
if (node.children && !node.children.length) {
@ -496,43 +617,31 @@ export default {
label: node.name,
children: node.children
};
}
,
},
// /
handleCheckedTreeExpand(value) {
let treeList = this.menuOptions;
for (let i = 0; i < treeList.length; i++) {
this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
}
}
,
},
// /
handleCheckedTreeNodeAll(value) {
this.$refs.menu.setCheckedNodes(value ? this.menuOptions : []);
}
,
},
/** 查询菜单树结构 */
getStatusTreeselect() {
treeList().then(response => {
this.menuOptions = response.data;
});
}
,
},
getDeptStatusMenuTreeselect(deptId) {
let query = {deptId: deptId};
return treeSelectedList(query).then(response => {
this.menuOptions = response.data.menus;
return response;
});
}
,
},
getMenuAllCheckedKeys() {
//
let checkedKeys = this.$refs.menu.getCheckedKeys();
@ -540,13 +649,50 @@ export default {
let halfCheckedKeys = this.$refs.menu.getHalfCheckedKeys();
checkedKeys.unshift.apply(checkedKeys, halfCheckedKeys);
return checkedKeys;
}
,
},
handleDeptChange(row) {
this.currentRow = row;
}
},
//
handleUserSelectionChange(val) {
this.selectAddUser = val;
},
getSelectUser() {
selectNotSelectUser(this.selectUserQuery).then((res) => {
this.selectUserList = res.data.list;
this.selectUserToatl = res.data.total;
}).catch((error) => {
this.$message.error("用户数据加载失败")
});
},
onUserReset() {
this.userQuery = {
key: null,
page: 1,
limit: 10,
};
this.getUerList();
},
onUserSubmit() {
this.getUerList();
},
onUserSelect(){
this.userQuery = {
key: null,
page: 1,
limit: 10,
};
this.getUerList();
},
getUerList() {
},
selectUserData(){
},
},

@ -88,7 +88,6 @@
</el-table-column>
</el-table>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-用户列表</span>
@ -169,8 +168,6 @@
<invSpaceManage :invInfo="currentInvInfo"></invSpaceManage>
</el-tab-pane>
</el-tabs>
<!--添加用户弹窗-->
<el-dialog
v-if="userFormVisible"
@ -322,7 +319,6 @@
</el-select>
</el-form-item>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="分库编码" prop="title" class="query-form-item">

Loading…
Cancel
Save