同步 部门信息 仓库信息 用户管理 角色管理

prod
wangwei 2 years ago
parent 827cb58f0c
commit 1a96e7259e

@ -1,59 +1,59 @@
import axios from "@/utils/request";
export function getBussinessType(query) {
return axios({
url: "/udiwms/bussinessType/filter",
method: "get",
params: query
});
return axios({
url: "/udiwms/bussinessType/filter",
method: "get",
params: query
});
}
export function getJoinBussinessType(query) {
return axios({
url: "/udiwms/bussinessType/joinFilter",
method: "get",
params: query
});
return axios({
url: "/udiwms/bussinessType/joinFilter",
method: "get",
params: query
});
}
export function deleteBussinessType(query) {
return axios({
url: "/udiwms/bussinessType/delete",
method: "post",
data: query
});
return axios({
url: "/udiwms/bussinessType/delete",
method: "post",
data: query
});
}
export function updateBussinessType(query) {
return axios({
url: "/udiwms/bussinessType/update",
method: "post",
data: query
});
return axios({
url: "/udiwms/bussinessType/update",
method: "post",
data: query
});
}
export function insertBussinessType(query) {
return axios({
url: "/udiwms/bussinessType/insert",
method: "post",
data: query
});
return axios({
url: "/udiwms/bussinessType/insert",
method: "post",
data: query
});
}
export function getCandidateBussinessType(query) {
return axios({
url: "/warehouse/bussinessType/candidateBussinessType",
method: 'get',
params: query
});
return axios({
url: "/warehouse/bussinessType/candidateBussinessType",
method: 'get',
params: query
});
}
export function exportFile(query) {
return axios({
url: "/udiwms/busstiness/file/export",
method: "post",
data: query,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
return axios({
url: "/udiwms/busstiness/file/export",
method: "post",
data: query,
headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'},
responseType: 'arraybuffer', //一定要设置响应类型否则页面会是空白pdf
});
}

@ -1,4 +1,4 @@
import axios from "../../utils/request";
import axios from "@/utils/request";
export function filterSelectInvUser(query) {

@ -1,4 +1,4 @@
import axios from "../../utils/request";
import axios from "@/utils/request";
export function getInvSpaceList(params) {
return axios({

@ -1,5 +1,6 @@
import axios from "@/utils/request";
export function filterLog(query) {
return axios({
url: "/spssync/basic/udiinfo/filter",
@ -42,12 +43,3 @@ export function updateConfig(query) {
});
}
export function testConnect(query) {
return axios({
url: "/spssync/basic/connect/test",
method: "get",
params: query
});
}

@ -1,12 +1,12 @@
import axios from "../../utils/request";
import axios from "@/utils/request";
export function filterSubAll(query) {
return axios({
url: "/spms/sub/inv/warehouse/filter",
method: "get",
params: query
});
return axios({
url: "/spms/sub/inv/warehouse/filter",
method: "get",
params: query
});
}
@ -30,11 +30,11 @@ export function findByFrom(query) {
export function filterSubByInv(query) {
return axios({
url: "/spms/sub/inv/warehouse/findByInv",
method: "get",
params: query
});
return axios({
url: "/spms/inv/warehouse/findByUser",
method: "get",
params: query
});
}
@ -48,68 +48,68 @@ export function findByDeptUser(query) {
export function filterSub(query) {
return axios({
url: "/spms/sub/inv/warehouse/filterSub",
method: "get",
params: query
});
return axios({
url: "/spms/sub/inv/warehouse/filterSub",
method: "get",
params: query
});
}
// 保存
export function saveSubWarehouse(data, formName, method = "post") {
let url =
formName !== "edit"
? "/spms/sub/inv/warehouse/save"
: "/spms/sub/inv/warehouse/edit";
return axios({
url: url,
method: method,
data: data
});
let url =
formName !== "edit"
? "/spms/sub/inv/warehouse/save"
: "/spms/sub/inv/warehouse/edit";
return axios({
url: url,
method: method,
data: data
});
}
// 删除
export function deleteSubWarehouse(data) {
return axios({
url: "/spms/sub/inv/warehouse/delete",
method: "post",
data: data
});
return axios({
url: "/spms/sub/inv/warehouse/delete",
method: "post",
data: data
});
}
//查询第三方系统和仓库数据关联信息
export function getSubThrsysDetail(params) {
return axios({
url: "/spms/sub/inv/warehouse/thridSys/detail",
method: "get",
params: params
});
return axios({
url: "/spms/sub/inv/warehouse/thridSys/detail",
method: "get",
params: params
});
}
//绑定第三方仓库
export function bindThrSubWarehouse(params) {
return axios({
url: "/spms/sub/inv/warehouse/bindThrWarehouse",
method: "post",
params: params
});
return axios({
url: "/spms/sub/inv/warehouse/bindThrWarehouse",
method: "post",
params: params
});
}
//解绑第三方仓库
export function unbindSubThrWarehouse(params) {
return axios({
url: "/spms/sub/inv/warehouse/unbindThrWarehouse",
method: "post",
params: params
});
return axios({
url: "/spms/sub/inv/warehouse/unbindThrWarehouse",
method: "post",
params: params
});
}
export function getInvWarehouseList(params) {
return axios({
url: "/spms/sub/inv/warehouse/filterSubInvList",
method: "get",
params: params
});
return axios({
url: "/spms/sub/inv/warehouse/filterSubInvList",
method: "get",
params: params
});
}

@ -1,4 +1,4 @@
import axios from "../../utils/request";
import axios from "@/utils/request";
// 获取列表
@ -243,4 +243,21 @@ export function getInvListByUser(params) {
}
export function selectInvById(params) {
return axios({
url: "/spms/inv/warehouse/selectInvById",
method: "post",
data: params
});
}
export function getDeptById(params) {
return axios({
url: "/warehouse/inout/getDeptById",
method: "post",
data: params
});
}

@ -2,8 +2,8 @@
<div>
<el-form :inline="true" :model="filterQuery" size="mini">
<el-row style="width: 100%">
<el-form-item class="query-form-item" label="货位号/名称">
<el-input v-model="filterQuery.key" placeholder="请输入货位号/名称:" clearable></el-input>
<el-form-item class="query-form-item" label="货位号/名称:">
<el-input v-model="filterQuery.key" placeholder="请输入货位号/名称" clearable></el-input>
</el-form-item>
<el-form-item>
<el-button-group>
@ -11,7 +11,7 @@
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
>重置</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>
@ -72,13 +72,13 @@
<el-col :span="11">
<el-form-item prop="code" label="货位编码">
<el-input v-model="formData.code" auto-complete="off" style="width: 90%"
placeholder="请输入货位编码"></el-input>
placeholder="请输入货位编码" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item prop="name" label="货位名称">
<el-input v-model="formData.name" auto-complete="off" style="width: 90%"
placeholder="请输入货位名称"></el-input>
placeholder="请输入货位名称" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
@ -86,7 +86,7 @@
<el-col :span="11">
<el-form-item prop="remark" label="货位分类">
<el-input v-model="formData.type" auto-complete="off" style="width: 90%"
placeholder="请输入货位分类"></el-input>
placeholder="请输入货位分类" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="11">
@ -125,6 +125,7 @@ import store from "../../store";
import {filterUplLocInv} from "@/api/system/invWarehouse";
import {filterSubByInv} from "@/api/system/invSubWarehouse";
import {getInvSpaceList, saveSpace, deleteSpace} from "@/api/inventory/invSpace";
import {isBlank} from "@/utils/strUtil";
export default {
name: "invInfo",
@ -276,6 +277,10 @@ export default {
this.formData = row;
},
addSpace() {
if (isBlank(this.invInfo.invStorageCode)) {
this.$message.warning("请先选择仓库!");
return;
}
this.modifySpaceVisible = true;
this.formName = "add";
this.resetForm();

@ -2,7 +2,12 @@
<div>
<!-- 部门信息相关-->
<el-card>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-form
:inline="true"
:model="filterQuery"
class="query-form"
size="mini"
>
<el-row>
<el-form-item class="query-form-item" label="部门名称:">
<el-input
@ -12,7 +17,11 @@
></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="状态:">
<el-select v-model="filterQuery.status" placeholder="请选择状态:" clearable>
<el-select
v-model="filterQuery.status"
placeholder="请选择状态:"
clearable
>
<el-option label="全部" value=""></el-option>
<el-option label="禁用" :value="0"></el-option>
<el-option label="正常" :value="1"></el-option>
@ -20,22 +29,17 @@
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
<el-button type="primary" icon="el-icon-refresh" @click="onReset"
>重置
</el-button>
<el-button type="primary" @click="onSubmit"
icon="el-icon-search"
<el-button type="primary" @click="onSubmit" icon="el-icon-search"
>查询
</el-button
>
<el-button type="primary" @click="addDeptDialog"
icon="el-icon-plus"
>新增
</el-button
>
</el-button>
<!-- <el-button type="primary" @click="addDeptDialog"-->
<!-- icon="el-icon-plus"-->
<!-- >新增-->
<!-- </el-button-->
<!-- >-->
<el-button
type="primary"
icon="el-icon-sort"
@ -46,71 +50,84 @@
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%"
highlight-current-row
border
v-if="refreshTable"
row-key="id"
@current-change="handleDeptChange"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
ref="deptTableRef"
highlight-current-row
border
v-if="refreshTable"
row-key="id"
@current-change="handleDeptChange"
:default-expand-all="isExpandAll"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="部门名称"
prop="name"
></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="code"></el-table-column>
<el-table-column label="状态" prop="status">
<template slot-scope="scope">
<el-tag :type="scope.row.status | statusFilterType">{{
scope.row.status | statusFilterName
}}
<el-tag :type="scope.row.status | statusFilterType"
>{{ scope.row.status | statusFilterName }}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark">
<el-table-column label="允许供应商使用" prop="spUse">
<template slot-scope="scope">
<el-tag :type="scope.row.spUse | spUerFilterType"
>{{ scope.row.spUse | spUerFilterName }}
</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"
:disabled="scope.row.status == 0"
@click.native.stop="subAddDeptDialog(scope.row)"
>新增
</el-button
>
</el-button>
<el-button
type="text"
@click.native.stop="updateDeptDialog(scope.row)"
>编辑
</el-button
>
</el-button>
<el-button
type="text"
@click.native.stop="deleteDialog(scope.row)"
<el-button type="text" @click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</el-button>
</template>
</el-table-column>
</el-table>
<el-dialog :title="formMap[formName]" :visible.sync="formVisible" width="45%">
<el-form :model="formData" ref="dataForm" :rules="rules">
<el-dialog
:title="formMap[formName]"
:before-close="cancelDialog"
:visible.sync="formVisible"
width="45%"
>
<el-form
:model="formData"
ref="dataForm"
:rules="rules"
label-width="150px"
>
<el-row>
<el-form-item label="上级部门:" label-width="100px" v-if="formData.pid != 0">
<treeselect v-model="formData.pcode" :options="deptOptions" :normalizer="normalizer"
:disabled="isShow"
style="width: 90%"
placeholder="选择上级部门"/>
<el-form-item label="上级部门:" v-if="formData.pid != 0">
<treeselect
v-model="formData.pcode"
:options="deptOptions"
:normalizer="normalizer"
:disabled="isShow"
style="width: 90%"
placeholder="选择上级部门"
/>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="部门名称:" label-width="100px" prop="name">
<el-form-item label="部门名称:" prop="name">
<el-input
v-model="formData.name"
style="width: 90%"
@ -120,15 +137,29 @@
</el-form-item>
</el-row>
<el-row>
<el-form-item label="状态:" prop="status" label-width="100px">
<el-radio-group v-model="formData.status">
<el-form-item label="状态:" prop="status">
<el-radio-group
:disabled="formData.pid == 0"
v-model="formData.status"
>
<el-radio :label="1">正常</el-radio>
<el-radio :label="0">禁用</el-radio>
</el-radio-group>
</el-form-item>
</el-row>
<el-form-item
label="是否能被供应商使用"
prop="spUse"
class="query-form-item"
>
<el-radio-group v-model="formData.spUse">
<el-radio :label="true"></el-radio>
<el-radio :label="false"></el-radio>
</el-radio-group>
</el-form-item>
<el-row>
<el-form-item label="备注:" prop="remark" label-width="100px">
<el-form-item label="备注:" prop="remark">
<el-input
v-model="formData.remark"
size="small"
@ -154,14 +185,12 @@
></el-tree>
</el-form-item>
</el-row>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" size="small" @click.native="formSubmit()"
>提交
</el-button
>
</el-button>
<el-button @click.native="cancelDialog" size="small">取消</el-button>
</div>
</el-dialog>
@ -170,7 +199,12 @@
<!-- 部门绑定用户列表-->
<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="userQuery"
class="query-form"
size="mini"
>
<el-form-item class="query-form-item" label="用户名称/账号:">
<el-input
v-model="userQuery.key"
@ -187,45 +221,48 @@
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="onUserSubmit"
icon="el-icon-search"
<el-button
type="primary"
@click="onUserSubmit"
icon="el-icon-search"
>查询
</el-button
</el-button>
<el-tooltip
content="请移步至权限管理-用户管理-编辑界面选择所属部门信息"
placement="top"
style="margin-left: 20px"
>
<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="userloading" :data="userlist" style="width: 100%" border
row-key="id"
<el-table
v-loading="userloading"
:data="userlist"
style="width: 100%"
border
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="用户名称"
prop="employeeName"
></el-table-column>
<el-table-column
label="用户账号"
prop="userName"
></el-table-column>
<el-table-column label="备注" prop="comments">
</el-table-column>
<el-table-column label="用户账号" prop="userName"></el-table-column>
<el-table-column label="备注" prop="comments"> </el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="removeUserDialog(scope.row)"
>移除
</el-button
>
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="userTotal>0"
v-show="userTotal > 0"
:total="userTotal"
:page.sync="userQuery.page"
:limit.sync="userQuery.limit"
@ -233,11 +270,15 @@
/>
</el-tab-pane>
<!-- 部门绑定仓库信息-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-仓库列表</span>
<el-form :inline="true" :model="invQuery" 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="invQuery.key"
@ -254,32 +295,33 @@
@click="onInvReset"
>重置
</el-button>
<el-button type="primary" @click="onInvSubmit"
icon="el-icon-search"
<el-button
type="primary"
@click="onInvSubmit"
icon="el-icon-search"
>查询
</el-button
</el-button>
<el-tooltip
content="请移步至系统管理-组织管理-仓库信息管理界面绑定仓库信息"
placement="top"
style="margin-left: 20px"
>
<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="invLoading" :data="invlist" style="width: 100%" border
row-key="id"
<el-table
v-loading="invLoading"
:data="invlist"
style="width: 100%"
border
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="仓库名称"
prop="name"
></el-table-column>
<el-table-column
label="仓库编码"
prop="code"
></el-table-column>
<el-table-column label="备注" prop="remark">
</el-table-column>
<el-table-column label="仓库名称" prop="name"></el-table-column>
<el-table-column label="仓库编码" prop="code"></el-table-column>
<el-table-column label="备注" prop="remark"> </el-table-column>
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
@ -292,9 +334,8 @@
<!-- </el-table-column>-->
</el-table>
<pagination
v-show="invTotal>0"
v-show="invTotal > 0"
:total="invTotal"
:page.sync="invQuery.page"
:limit.sync="invQuery.limit"
@ -302,20 +343,21 @@
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {
filterList,
deleteWarehouse,
saveWarehouse,
} from "@/api/system/invWarehouse";
import {filterList, deleteWarehouse, saveWarehouse} from "@/api/system/invWarehouse";
import {treeList, treeSelectedList} from "@/api/system/dataStatus";
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, removeUser} from "@/api/system/deptUser";
import {filterSubAll} from "@/api/system/invSubWarehouse";
import { listDeptUser, removeUser } from "@/api/system/deptUser";
import { filterSubAll } from "@/api/system/invSubWarehouse";
export default {
data() {
@ -325,10 +367,10 @@ export default {
companyName: "",
checkType: "",
},
isShow:null,
isShow: null,
loading: false,
formVisible: false,
isExpandAll: false,
isExpandAll: true,
refreshTable: true,
userflag: {
0: "禁用",
@ -345,21 +387,19 @@ export default {
deptOptions: [],
rules: {
name: [
{required: true, message: "部门名称不能为空", trigger: "blur"}
],
status: [
{required: true, message: "状态不能为空", trigger: "blur"}
{ required: true, message: "部门名称不能为空", trigger: "blur" },
],
status: [{ required: true, message: "状态不能为空", trigger: "blur" }],
},
menuExpand: false,
menuNodeAll: false,
menuOptions: [],
defaultProps: {
children: "children",
label: "label"
label: "label",
},
currentRow: {
name: "部门"
name: "部门",
},
//
@ -378,15 +418,14 @@ export default {
selectUserQuery: {
code: null,
page: 1,
limit: 10
limit: 10,
},
//
invQuery: {
key: null,
page: 1,
limit: 10
limit: 10,
},
invlist: [],
invTotal: 0,
@ -410,6 +449,21 @@ export default {
};
return statusMap[status];
},
spUerFilterType(status) {
const upUerMap = {
true: "success",
false: "danger",
};
return upUerMap[status];
},
spUerFilterName(status) {
const upUerMap = {
true: "允许",
false: "不允许",
};
return upUerMap[status];
},
},
methods: {
onReset() {
@ -417,12 +471,12 @@ export default {
path: "",
});
this.filterQuery = {
name: ""
name: "",
};
this.getList();
},
formSubmit() {
this.$refs["dataForm"].validate(valid => {
this.$refs["dataForm"].validate((valid) => {
if (valid) {
if (this.$isBlank(this.formData.name)) {
this.$message.error("部门名称不能为空!");
@ -441,7 +495,7 @@ export default {
message: "添加成功!",
});
} else {
this.$message.warning("添加失败!");
this.$message.warning("添加失败," + response.message);
}
})
.catch(() => {
@ -460,7 +514,7 @@ export default {
message: "更新成功!",
});
} else {
this.$message.warning("更新失败");
this.$message.warning(response.message);
}
})
.catch(() => {
@ -470,8 +524,6 @@ export default {
}
}
});
},
onSubmit() {
this.getList();
@ -492,14 +544,15 @@ export default {
subAddDeptDialog(row) {
this.formName = "add";
this.formVisible = true;
this.isShow=false;
this.isShow = true;
this.formData = {
pid: row.id,
pcode: row.code,
status: 1
}
status: 1,
spUse: false,
};
// this.getStatusTreeselect();
filterList().then(response => {
filterList().then((response) => {
let depList = response.data.list || [];
this.deptOptions = this.handleTree(depList, "code", "pcode");
});
@ -517,13 +570,17 @@ export default {
this.resetForm();
this.formName = "edit";
this.formVisible = true;
this.isShow=true;
this.isShow = true;
this.formData = row;
// const roleMenu = this.getDeptStatusMenuTreeselect(this.formData.id);
filterList().then(response => {
filterList().then((response) => {
let depList = response.data.list || [];
this.deptOptions = this.handleTree(depList, "code", "pcode");
});
console.log(row.id);
// this.$nextTick(() => {
// this.$refs.deptTableRef.setCurrentRow(this.list[row.pid]);
// });
},
getList() {
this.loading = true;
@ -532,6 +589,10 @@ export default {
this.loading = false;
let depList = response.data.list || [];
this.list = this.handleTree(depList, "code", "pcode");
this.$nextTick(() => {
this.$refs.deptTableRef.setCurrentRow(this.list[0]);
});
console.log(this.list);
})
.catch(() => {
this.loading = false;
@ -560,11 +621,9 @@ export default {
} else {
this.$message.error(res.message);
}
});
})
.catch(() => {
});
.catch(() => {});
},
toggleExpandAll() {
this.refreshTable = false;
@ -581,7 +640,7 @@ export default {
return {
id: node.code,
label: node.name,
children: node.children
children: node.children,
};
},
// /
@ -597,13 +656,13 @@ export default {
},
/** 查询菜单树结构 */
getStatusTreeselect() {
treeList().then(response => {
treeList().then((response) => {
this.menuOptions = response.data;
});
},
getDeptStatusMenuTreeselect(deptId) {
let query = {deptId: deptId};
return treeSelectedList(query).then(response => {
let query = { deptId: deptId };
return treeSelectedList(query).then((response) => {
this.menuOptions = response.data.menus;
return response;
});
@ -622,7 +681,6 @@ export default {
this.onInvSubmit();
},
//
handleUserSelectionChange(val) {
this.selectAddUser = val;
@ -638,7 +696,7 @@ export default {
},
onUserSubmit() {
this.userQuery.deptId = this.currentRow.id;
this.userQuery.page=1;
this.userQuery.page = 1;
this.getUerList();
},
getUerList() {
@ -659,7 +717,7 @@ export default {
key: "",
parentId: this.currentRow.code,
page: 1,
limit: 20
limit: 20,
};
this.onInvSubmit();
},
@ -682,11 +740,9 @@ export default {
}
});
})
.catch(() => {
});
.catch(() => {});
},
//
getInvList() {
filterSubAll(this.invQuery)
@ -705,7 +761,7 @@ export default {
this.getInvList();
},
},
components: {Treeselect},
components: { Treeselect },
mounted() {
},
created() {

@ -125,10 +125,10 @@ export default {
transferChange(value, direction, keyArr) {
this.keyArr=value;
console.log(value);
console.log(direction);
console.log(keyArr);
this.keyArr=value;
},
cancelDialog() {

@ -16,7 +16,7 @@
@click="onUserReset"
>重置
</el-button>
<el-button type="primary" @click="search"
<el-button type="primary" @click="loadUserList"
icon="el-icon-search"
>查询
</el-button
@ -69,7 +69,7 @@
type="text"
:disabled="!configParms.basicInv"
@click.native="relBusttype(scope.row)">
管理单据类型
用户可用单据
</el-button>
</template>
</el-table-column>
@ -144,6 +144,7 @@
import {addWarehouseUser, deleteWarehouseUser, warehouseUserList} from "@/api/system/invWarehouse";
import {selectNotSelectUser} from "@/api/auth/authUser";
import InvUserRelBusTypes from "@/views/system/dept/invUserRelBusTypes";
import {isBlank} from "@/utils/strUtil";
export default {
name: "invRelUsers",
@ -207,10 +208,6 @@ export default {
};
this.loadUserList();
},
search() {
this.userQuery.page = 1;
this.loadUserList();
},
loadUserList() { //
// if (val != null) {
// this.userQuery.page = val;
@ -226,6 +223,10 @@ export default {
},
addUser() { //
if (isBlank(this.inputQuery.parentId)) {
this.$message.warning("请先选择仓库");
return;
}
this.currentCode = this.inputQuery.code;
this.userFormVisible = true;
this.selectUserQuery.parentId=this.inputQuery.parentId;
@ -315,7 +316,12 @@ export default {
this.relBusUserVisile = false;
},
},
watch: {
inputQuery: function () {
this.userQuery.code = this.inputQuery.code;
this.loadUserList();
},
},
created() {
this.userQuery.code = this.inputQuery.code;
this.loadUserList();

@ -47,37 +47,51 @@
label="上级仓库"
>
</el-table-column>
<!--<el-table-column label="允许供应商使用" prop="spUse">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="scope.row.spUse | spUerFilterType">{{-->
<!-- scope.row.spUse | spUerFilterName-->
<!-- }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!--</el-table-column>-->
<el-table-column label="操作" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="handleSubForm( scope.row, 'edit')"
>编辑
:disabled="!configParms.basicInv || scope.row.advanceType =='2' || scope.row.advanceType =='3'"
@click.native.stop="handleSubForm( scope.row, 'add')"
>新增
</el-button
>
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="popInvRelUser( scope.row)"
>用户管理
:disabled="!configParms.basicInv "
@click.native.stop="handleSubForm( scope.row, 'edit')"
>编辑
</el-button
>
<!-- <el-button-->
<!-- type="text"-->
<!-- :disabled="!configParms.basicInv"-->
<!-- @click.native.stop="popInvRelUser( scope.row)"-->
<!-- >用户管理-->
<!-- </el-button-->
<!-- >-->
<el-button
type="text"
:disabled="!configParms.basicInv"
@click.native.stop="popInvRelBustype(scope.row)"
>单据类型
>仓库可用单据
</el-button
>
<el-button
type="text"
:disabled="!configParms.basicInv"
:disabled="!configParms.basicInv || scope.row.advanceType =='2' || scope.row.advanceType =='3' "
@click.native.stop="handleDelInv(scope.row)"
>删除
</el-button
@ -103,7 +117,7 @@
width="60%"
top="5vh"
>
<el-form :model="subData" ref="dataForm" :rules="formRules" label-width="80px">
<el-form :model="subData" ref="dataForm" :rules="formRules" label-width="130px">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="所属部门" prop="parentId">
@ -154,15 +168,33 @@
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<el-form-item label="寄售仓库" prop="advanceType" class="query-form-item">
<el-radio-group v-model="subData.advanceType">
<el-radio :label="false">非寄售</el-radio>
<el-radio :label="true">寄售</el-radio>
</el-radio-group>
<el-form-item label="仓库类型" prop="advanceType" >
<el-select v-model="subData.advanceType" :disabled="invWouse != null" placeholder="请选择仓库类型" style="width: 80%">
<el-option label="入账库" value="1"/>
<el-option label="寄售库" value="2"/>
<el-option label="预验收库" value="3"/>
</el-select>
</el-form-item>
<!--<el-form-item label="寄售仓库" prop="advanceType" class="query-form-item">-->
<!-- <el-radio-group :disabled="isAdvanceTypeShow" v-model="subData.advanceType">-->
<!-- <el-radio :label="false">非寄售</el-radio>-->
<!-- <el-radio :label="true">寄售</el-radio>-->
<!-- </el-radio-group>-->
<!--</el-form-item>-->
</el-col>
<!--<el-col :span="12" class="el-col">-->
<!-- <el-form-item label="是否能被供应商使用" prop="spUse" class="query-form-item">-->
<!-- <el-radio-group v-model="subData.spUse">-->
<!-- <el-radio :label="true"></el-radio>-->
<!-- <el-radio :label="false"></el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!--</el-col>-->
</el-row>
<el-row class="el-row" type="flex">
<el-col class="el-col">
<el-form-item label="备注" prop="remark" class="query-form-item">
@ -312,9 +344,14 @@
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<!-- <el-tab-pane>-->
<!-- <span slot="label">{{ currentRow.name }}-用户列表</span>-->
<!-- </el-tab-pane>-->
<el-tab-pane>
<span slot="label">{{ currentRow.name }}-用户列表</span>
<inv-rel-users :inputQuery="currentRow"
:configParms="configParms"
></inv-rel-users>
</el-tab-pane>
<!-- <el-tab-pane>-->
<!-- <span slot="label">{{ currentRow.name }}-单据类型</span>-->
<!-- </el-tab-pane>-->
@ -333,20 +370,13 @@ import {
filterSubAll, saveSubWarehouse, deleteSubWarehouse,
getSubThrsysDetail, bindThrSubWarehouse, unbindSubThrWarehouse,
} from "@/api/system/invSubWarehouse";
import {getHospitalUserList, selectNotSelectUser} from "@/api/auth/authUser";
import {getJoinBussinessType} from "@/api/basic/bussinessType";
import {findConfig} from "@/api/sync/spsSyncStatus";
import {selectSysParamByKey} from "@/api/system/param/systemParamConfig";
import invSpaceManage from "@/views/inventory/InvSpaceManage";
import {
addWarehouseUser,
deleteWarehouseBussinessType,
deleteWarehouseUser,
filterInvWarehouse,
filterList,
filterThridSubByInv,
warehouseBussinessTypeList,
warehouseUserList
} from "@/api/system/invWarehouse";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import Treeselect from "@riophae/vue-treeselect";
@ -365,7 +395,8 @@ export default {
// page: 1,
// limit: 10,
},
isShow: null,
isAdvanceTypeShow:false,
isShow:false,
loading: true,
list: [],
isExpandAll: true,
@ -374,6 +405,7 @@ export default {
add: "仓库信息-新增",
edit: "仓库信息-编辑"
},
invWouse:{},
formName: null,
configParms: {},
currentCode: null,
@ -429,6 +461,14 @@ export default {
status: "",
};
this.getList();
//
this.currentRow = {name: "仓库"};
this.currentInvInfo = {
invStorageCode: null,
invWarehouseCode: null
};
},
onSubmit() { //
@ -437,13 +477,12 @@ export default {
getList() { //
this.loading = true;
this.list = [];
filterSubAll(this.query)
.then((response) => {
this.loading = false;
//this.total = response.data.total;
let invlist = response.data || [];
this.list = this.handleTree(invlist, "code", "parentCode");
})
.catch(() => {
this.loading = false;
@ -452,19 +491,54 @@ export default {
});
},
handleSubForm(data, formName) { //
if(data != null ){
this.invWouse=data;
}
this.formName = formName;
if (formName === "edit") {
this.subData = JSON.parse(JSON.stringify(data));
this.isShow = true;
this.subData.advanceType=this.subData.advanceType.toString();
if(this.subData.parentCode!=null && this.subData.parentCode!=""){
this.isAdvanceTypeShow=true;
this.isShow=false;
}else{
this.isAdvanceTypeShow=false;
this.isShow=true
this.subData.parentCode=null;
}
} else if (formName === "add") {
this.subData = {advanceType: false,};
this.isShow = false;
this.isShow=true
if(data==null){
this.isAdvanceTypeShow=false;
this.subData = {advanceType: '1', spUse: false,parentCode:null};
}else{
this.isAdvanceTypeShow=true;
this.subData = {advanceType: data.advanceType.toString(), spUse: false,parentCode:data.code};
}
}
this.subFormVisible = true;
this.getSubThrsysDetailData();
if(this.subData.parentCode!=null && this.subData.parentCode!=""){
filterSubAll(this.query)
.then((response) => {
let invList = response.data || [];
this.invOptions = this.handleTree(invList, "code", "parentCode");
})
.catch(() => {
});
}
filterSubAll(this.query)
.then((response) => {
let invList = response.data || [];
//
if (invList.length > 0) {
for (let i = 0; i < invList.length; i++) {
if (invList[i].code === this.subData.code) {
invList.splice(i, 1);
break;
}
}
}
this.invOptions = this.handleTree(invList, "code", "parentCode");
})
.catch(() => {
@ -492,19 +566,17 @@ export default {
this.$refs["dataForm"].validate(valid => {
if (valid) {
saveSubWarehouse(this.subData, this.formName).then((response) => {
this.subFormVisible = false;
if (response.code == 20000) {
this.loadSubData(this.subData.parentId);
this.subFormVisible = false;
this.getList();
} else {
this.$message.error(response.message);
this.subFormVisible = false;
}
}).catch(() => {
this.subFormVisible = false;
});
}
});
this.getList();
},
findDeptMethod() { //---
let query = {
@ -735,7 +807,6 @@ export default {
}
this.getList();
this.$message.success("删除成功");
this.loadSubData(row.parentId);
})
.catch(() => {
this.deleteLoading = false;
@ -746,8 +817,22 @@ export default {
});
}
},
},
filters: {
spUerFilterType(status) {
const upUerMap = {
true: "success",
false: "danger",
};
return upUerMap[status];
},
spUerFilterName(status) {
const upUerMap = {
true: "允许",
false: "不允许",
};
return upUerMap[status];
},
},
mounted() {
},

@ -3,7 +3,7 @@
<el-card>
<el-form :inline="true" :model="query" size="mini">
<el-form-item label="用户账号:">
<el-input v-model="query.userName" placeholder="用户账号"></el-input>
<el-input v-model="query.userName" placeholder="用户账号" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item" label="账号状态:">
<el-select v-model="query.userFlag" placeholder="请选择账号状态:">
@ -38,10 +38,9 @@
border highlight-current-row>
<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-column label="所属部门" prop="deptName">
</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="所属仓库" prop="warehouseName"></el-table-column>-->
<el-table-column label="状态">
<template slot-scope="scope">
<el-tag :type="scope.row.userFlag | statusFilterType">{{
@ -137,7 +136,7 @@
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="所属部门" prop="depts">
<el-form-item label="所属部门">
<el-select
v-model="formData.depts"
filterable
@ -150,6 +149,7 @@
placeholder="请选择"
:remote-method="findDeptMethod"
:loading="loading"
@change="findInv"
>
<el-option
v-for="item in fromDeptOptions"
@ -165,7 +165,6 @@
</el-form-item>
</el-col>
<el-col :span="11" type="flex">
<el-form-item label="状态" prop="userFlag">
<el-radio-group v-model="formData.userFlag" :disabled="formData.id === 1">
@ -175,11 +174,39 @@
</el-radio-group>
</el-form-item>
</el-col>
<!-- <el-col :span="11" type="flex">
<el-form-item label="所属仓库" prop="locInvCode">
<el-select
v-model="formData.locInvCode"
filterable
remote
clearable="true"
style="width: 90%"
size="small"
reserve-keyword
placeholder="请选择"
:loading="loading"
@change="change"
>
<el-option
v-for="item in fromWarehouseOptions"
:key="item.code"
:label="item.name"
:value="item.code">
<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-col :span="11" type="flex">
<el-form-item label="角色">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id === 1">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id === 1" >
<el-checkbox
v-for="item in roles"
:key="item.roleId"
@ -190,6 +217,7 @@
</el-checkbox-group>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex">
<el-col :span="23" type="flex">
@ -230,7 +258,7 @@ import {findConfig} from "@/api/sync/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import {listRole} from "@/api/system/role";
import {selectSysParamByKey} from "@/api/system/systemParamConfig";
import {filterList} from "@/api/system/invWarehouse";
import {filterList, selectInvById,getDeptById} from '@/api/system/invWarehouse'
const formJson = {
id: "",
@ -287,6 +315,7 @@ export default {
formData: formJson,
selectDeptList: [],
fromDeptOptions: [],
fromWarehouseOptions: [],
configParms: {},
formRules: {},
addRules: {
@ -349,12 +378,26 @@ export default {
this.query.page = 1;
this.getList();
},
change(){
this.$forceUpdate();
},
findInv(val) {
//
selectInvById(val)
.then((res) => {
if (res.code == 20000) {
this.fromWarehouseOptions = res.data || [];
}
})
},
handleCurrentChange(val) {
this.query.page = val;
this.getList();
},
getList() {
this.loading = true;
this.query.key='key';
authAdminList(this.query)
.then(response => {
this.loading = false;
@ -416,6 +459,7 @@ export default {
roles: row.roles,
depts: row.depts,
dept: row.dept,
locInvCode:row.locInvCode
};
}
this.formName = "add";
@ -425,7 +469,13 @@ export default {
this.formName = "edit";
this.formRules = this.editRules;
}
if (row.depts != null && row.depts.length > 0) {
this.findInv(row.depts);
}
},
formSubmit() {
if (isBlank(this.formData.userName)) {
this.$message.error("用户账号不能为空");
@ -514,8 +564,14 @@ export default {
};
filterList(query)
.then((response) => {
var deptList=[];
this.loading = false;
this.fromDeptOptions = response.data.list || [];
for(var i=0;i<response.data.list.length;i++){
if(response.data.list[i].id!=1){
deptList.push(response.data.list[i]);
}
}
this.fromDeptOptions = deptList || [];
})
.catch(() => {
this.loading = false;

Loading…
Cancel
Save