仓库部门相关界面修改

prod
anthonywj 2 years ago
parent 400313e977
commit 8633ab58a0

@ -0,0 +1,12 @@
import request from '@/utils/request'
// 查询部门列表
export function listDeptUser(query) {
return request({
url: '/udi/auth/dept/user/filter',
method: 'get',
params: query
})
}

@ -1,60 +1,58 @@
<template>
<div>
<el-card>
<!-- <el-form :inline="true" :model="filterQuery" size="mini">-->
<!-- <el-row style="width: 100%">-->
<!-- <el-form-item class="query-form-item">-->
<!-- <el-input v-model="filterQuery.key" placeholder="请输入查询内容" clearable></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item>-->
<!-- <el-button-group>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-refresh"-->
<!-- @click="onReset"-->
<!-- ></el-button>-->
<!-- <el-button type="primary" icon="search" @click="onSubmit"></el-button>-->
<!-- <el-button type="primary" icon="search" @click="addSpace"></el-button>-->
<!-- </el-button-group>-->
<!-- </el-form-item>-->
<!-- </el-row>-->
<!-- </el-form>-->
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="货位号" prop="code" width="150"></el-table-column>
<el-table-column label="货位名称" prop="name" width="200"></el-table-column>
<el-table-column label="货位分类" prop="type" width="200"></el-table-column>
<el-table-column label="所属仓库" prop="invStorageName" width="200"
show-overflow-tooltip></el-table-column>
<el-table-column label="所属分库" prop="invSubStorageName"
show-overflow-tooltip width="150"></el-table-column>
<el-table-column label="状态" prop="status"
show-overflow-tooltip width="150">
<template slot-scope="scope">
<el-tag>
{{ statusMap[scope.row.status] }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="150"></el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row style="width: 100%">
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.key" placeholder="请输入查询内容" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="text"
size="small"
@click.native.stop="editSpace(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
</el-card>
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="addSpace"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="货位号" prop="code"></el-table-column>
<el-table-column label="货位名称" prop="name"></el-table-column>
<el-table-column label="货位分类" prop="type"></el-table-column>
<!-- <el-table-column label="所属仓库" prop="invStorageName" width="200"-->
<!-- show-overflow-tooltip></el-table-column>-->
<!-- <el-table-column label="所属分库" prop="invSubStorageName"-->
<!-- show-overflow-tooltip width="150"></el-table-column>-->
<!-- <el-table-column label="状态" prop="status"-->
<!-- show-overflow-tooltip width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag>-->
<!-- {{ statusMap[scope.row.status] }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" prop="remark"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editSpace(scope.row)"
>编辑
</el-button>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="filterQuery.page"
:page-size="filterQuery.limit"
@ -209,7 +207,7 @@ export default {
};
},
watch: {
invInfo:function (){
invInfo: function () {
this.getList();
},
},

@ -47,7 +47,9 @@
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row
border
v-if="refreshTable"
row-key="id"
@current-change="handleDeptChange"
@ -201,11 +203,9 @@
>查询
</el-button
>
<el-button type="primary" @click="onUserSelect"
icon="el-icon-plus"
>选入用户
</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>
@ -246,53 +246,12 @@
@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>
<el-form :inline="true" :model="userQuery" class="query-form" size="mini">
<el-form :inline="true" :model="invQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="仓库名称/编码:">
<el-input
v-model="userQuery.key"
@ -309,7 +268,7 @@
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="onUserSubmit"
<el-button type="primary" @click="onInvSubmit"
icon="el-icon-search"
>查询
</el-button
@ -320,8 +279,7 @@
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userlist" style="width: 100%" border
<el-table v-loading="invLoading" :data="invlist" style="width: 100%" border
row-key="id"
@current-change="handleDeptChange"
>
@ -348,6 +306,15 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="invTotal>0"
:total="invTotal"
:page.sync="invQuery.page"
:limit.sync="invQuery.limit"
@pagination="getInvList"
/>
</el-tab-pane>
</el-tabs>
@ -362,6 +329,8 @@ 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";
import {listDeptUser} from "@/api/system/deptUser";
import {filterSubAll} from "@/api/system/invSubWarehouse";
export default {
data() {
@ -410,14 +379,13 @@ export default {
name: "部门"
},
//
userQuery: {
key: null,
page: 1,
limit: 10,
},
userlist: [],
userFormVisible: false,
userloading: false,
userTotal: 0,
selectUserList: [],
@ -427,8 +395,18 @@ export default {
code: null,
page: 1,
limit: 10
}
},
//
invQuery: {
key: null,
page: 1,
limit: 10
},
invlist: [],
invTotal: 0,
invLoading: false,
};
},
filters: {
@ -652,6 +630,8 @@ export default {
},
handleDeptChange(row) {
this.currentRow = row;
this.onUserSubmit();
this.onInvSubmit();
},
@ -659,14 +639,6 @@ export default {
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,
@ -678,23 +650,44 @@ export default {
onUserSubmit() {
this.getUerList();
},
onUserSelect(){
this.userQuery = {
key: null,
page: 1,
limit: 10,
};
this.getUerList();
},
getUerList() {
let query = {
deptId: this.currentRow.id,
};
listDeptUser(query)
.then((response) => {
this.loading = false;
this.userlist = response.data.list || [];
this.userTotal = response.data.total;
})
.catch(() => {
this.loading = false;
this.userlist = [];
this.userTotal = 0;
});
},
selectUserData(){
},
//
getInvList() {
let query = {
parentId: this.currentRow.code,
};
filterSubAll(query)
.then((response) => {
this.loading = false;
this.invlist = response.data || [];
})
.catch(() => {
this.invlist = false;
this.list = [];
});
},
onInvSubmit() {
this.getInvList();
},
},
components: {Treeselect},
mounted() {

@ -20,6 +20,7 @@
<el-button-group style="margin-left: 10px;display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="onSubmit"></el-button>
<el-button type="primary" icon="el-icon-plus" @click="handleSubForm( null, 'add')">新增</el-button>
</el-button-group>
</el-form-item>
</el-form>
@ -47,27 +48,6 @@
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native.stop="addUser(scope.row)"
>新增用户
</el-button
>
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native.stop="selsectBussinessType(scope.row)"
>新增单据类型
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="invSpaceManage(scope.row)"
>新增货位
</el-button
>
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@ -91,25 +71,53 @@
<el-tabs type="border-card" style="margin: 15px">
<el-tab-pane>
<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="onUserReset"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-plus"
>选入用户
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table
:data="userData"
key="row.id"
border
style="width: 100%"
highlight-current-row
@current-change="loadUserBusType"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
prop="username"
label="账号"
min-width="20%">
</el-table-column>
<el-table-column
prop="employeeName"
label="用户名"
min-width="30%">
</el-table-column>
<el-table-column
prop="username"
label="账号"
min-width="20%">
</el-table-column>
<el-table-column
label="操作"
min-width="30%"
@ -129,8 +137,6 @@
@click.native="rmInvUser(scope.row)">
授权
</el-button>
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@ -143,9 +149,41 @@
</el-tab-pane>
<el-tab-pane>
<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="selsectBussinessType"
>重置
</el-button>
<el-button type="primary" @click="selsectBussinessType"
icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addUser()"
icon="el-icon-plus"
>选入单据类型
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="userBussinessTypeList" ref="typeList"
border
style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据类型名称" prop="name"></el-table-column>
<el-table-column label="单据类型编码" prop="action"></el-table-column>
<el-table-column label="操作">
@ -209,7 +247,6 @@
@pagination="getSelectUser"
/>
</el-dialog>
<!--添加单据类型弹窗-->
<el-dialog
title="仓库关联单据类型"
@ -238,7 +275,6 @@
</el-dialog>
<!--选入单据类型弹窗-->
<el-dialog
title="单据类型"
@ -598,10 +634,10 @@ export default {
},
//
addUser(row) {
this.currentCode = row.code;
addUser() {
this.currentCode = this.currentRow.code;
this.userFormVisible = true;
this.selectUserQuery.code = row.code;
this.selectUserQuery.code = this.currentRow.code;
this.selectUserQuery.page = 1;
this.getSelectUser();
},
@ -762,14 +798,12 @@ export default {
handleSubForm(data, formName) {
this.subFromName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
} else if (formName === "add") {
this.subData = {};
this.subData.parentId = data.code;
// this.subData.parentId = data.code;
}
;
this.subFormVisible = true;
this.getSubThrsysDetailData();
},

@ -38,6 +38,8 @@
<el-table-column label="用户账号" prop="userName"></el-table-column>
<el-table-column label="用户名称" prop="employeeName">
</el-table-column>
<el-table-column label="所属部门" prop="deptName">
</el-table-column>
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.userFlag | statusFilterType">{{
@ -133,26 +135,56 @@
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" type="flex">
<el-form-item prop="comments">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="formData.comments" size="small" style="width: 90%" type="textarea"
row="3"></el-input>
<el-col :span="11" type="flex">
<el-form-item label="所属部门" prop="userFlag">
<el-select
v-model="selectDeptList"
filterable
remote
clearable="true"
style="width: 90%"
multiple
size="small"
reserve-keyword
placeholder="请选择"
:remote-method="findDeptMethod"
:loading="loading"
>
<el-option
v-for="item in fromDeptOptions"
:key="item.code"
:label="item.name"
:value="item.id">
<span style="float: left">{{ item.code }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.name
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="23" type="flex">
<el-form-item label="状态" prop="userFlag">
<el-col :span="11" type="flex">
<el-form-item label="状态" prop="userFlag">
<el-radio-group v-model="formData.userFlag" :disabled="formData.id === 1">
<el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" type="flex">
<el-form-item prop="comments">
<label slot="label">&emsp;&emsp;</label>
<el-input v-model="formData.comments" size="small" style="width: 90%" type="textarea"
row="3"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" type="flex">
<el-col :span="23" type="flex">
<el-form-item label="角色">
@ -200,6 +232,7 @@ import {isBlank} from "@/utils/strUtil";
import {filterDepts} from "@/api/auth/authDept";
import {authRoleList, listRole} from "@/api/system/role";
import {selectSysParamByKey} from "@/api/system/systemParamConfig";
import {filterList} from "@/api/system/invWarehouse";
const formJson = {
id: "",
@ -210,7 +243,8 @@ const formJson = {
userFlag: 1,
comments: '',
dept: null,
roles: []
roles: [],
depts: [],
};
export default {
data() {
@ -253,6 +287,7 @@ export default {
formLoading: false,
formVisible: false,
formData: formJson,
selectDeptList: [],
fromDeptOptions: [],
configParms: {},
formRules: {},
@ -378,8 +413,10 @@ export default {
userFlag: row.userFlag,
comments: row.comments,
roles: row.roles,
depts: row.depts,
dept: row.dept,
};
this.selectDeptList = row.depts;
}
this.formName = "add";
this.formRules = this.addRules;
@ -403,10 +440,10 @@ export default {
this.$message.error("未指定角色!")
return;
}
this.$refs["dataForm"].validate(valid => {
if (valid) {
this.formLoading = true;
this.formData.depts = this.selectDeptList;
let data = Object.assign({}, this.formData);
authAdminSave(data, this.formName).then(response => {
this.formLoading = false;
@ -427,7 +464,6 @@ export default {
}
//
this.resetForm();
this.getList();
});
}
@ -473,12 +509,11 @@ export default {
});
},
findDeptMethod() {
let query = {
flag: 1
status: 1,
};
filterDepts(query)
filterList(query)
.then((response) => {
this.loading = false;
this.fromDeptOptions = response.data.list || [];
@ -494,7 +529,6 @@ export default {
this.formData.corpName = row.name;
},
},
filters: {
statusFilterType(status) {
@ -526,7 +560,7 @@ export default {
//
this.getRoleList();
this.getSyncConfig();
this.findDeptMethod();
//
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {

@ -35,7 +35,7 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.0.166:9991`,
target: `http://192.168.0.113:9991`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save