新增部门,单据类型关联用户,代码备份

featFunction
anthonywj 3 years ago
parent 7b30d8d568
commit c1b226883f

@ -0,0 +1,33 @@
import axios from "../../utils/axios";
export function filterDepts(query) {
return axios({
url: "/udi/auth/dept/filter",
method: "get",
params: query
});
}
export function addDept(data) {
return axios({
url: "/udi/auth/dept/add",
method: "post",
data: data
});
}
export function updateDept(data) {
return axios({
url: "/udi/auth/dept/update",
method: "post",
data: data
});
}
export function deleteDept(data) {
return axios({
url: "/udi/auth/dept/delete",
method: "post",
data: data
});
}

@ -0,0 +1,22 @@
import axios from "../../utils/axios";
export function filterSelectInvUser(query) {
return axios({
url: "/spms/bus/user/select/filter",
method: "get",
params: query
});
}
export function updateInvUser(query) {
return axios(
{
url: "/spms/bus/user/warehouse/update",
method: "post",
data: query
}
)
}

@ -17,6 +17,7 @@ import adminRouter from "../views/userManage/admin/router.vue";
import authAdmin from "../views/userManage/admin/authAdmin.vue";
import authRole from "../views/userManage/admin/authRole.vue";
import authPermissionRule from "../views/userManage/admin/authPermissionRule.vue";
import authDept from "../views/userManage/authDept.vue";
import systemParamConfig from "../views/userManage/param/systemParamConfig.vue";
import registerManage from "../views/userManage/registerManage.vue";
import phoneRegisterManage from "../views/userManage/phoneRegisterManage.vue";
@ -283,6 +284,15 @@ export const asyncRouterMap = [
authRule: ["authMange/auth_permission_rule"]
}
},
{
path: "authDept",
component: authDept,
name: "部门管理",
icon: "",
meta: {
authRule: ["authMange/authDept"]
}
},
]
},

@ -195,11 +195,6 @@
<div>
<el-card style="width: 49%; float: left; margin-right: 0px;">
<!-- <div slot="header" class="clearfix" style="margin-bottom: 20px;">-->
<!-- <el-button style="float: right;" type="primary" @click="addUser()"-->
<!-- :disabled="currentRow.status == 0 || !configParms.basicInv">添加用户-->
<!-- </el-button>-->
<!-- </div>-->
<el-table
:data="userData"
key="row.id"
@ -220,19 +215,20 @@
min-width="30%"
>
<template slot-scope="scope">
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native="updateDirector(scope.row)">-->
<!-- {{ directorMap[scope.row.director] }}-->
<!-- </el-button>-->
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native="delWarehouseUser(scope.row.id)">
移除
</el-button>
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native="relBusttype(scope.row)">
关联单据类型
</el-button>
</template>
</el-table-column>
</el-table>
@ -247,11 +243,6 @@
</el-card>
<el-card style="width: 49%; float: right; margin-left: 0px;">
<!-- <div slot="header" class="clearfix" style="margin-bottom: 20px;">-->
<!-- <el-button style="float: right;" @click="addBussinessType()" type="primary"-->
<!-- :disabled="currentRow.status == 0 || !configParms.basicInv">添加单据类型-->
<!-- </el-button>-->
<!-- </div>-->
<el-table
:data="bussinessTypeData"
key="row.id"
@ -469,7 +460,7 @@
</div>
</el-dialog>
<!-- 添加仓库弹窗-->
<!-- 添加仓库弹窗-->
<el-dialog
:title="formMap[formName]"
:close-on-click-modal="false"
@ -671,8 +662,6 @@
</el-button>
</div>
</el-dialog>
<el-dialog title="关联分库" :visible.sync="thrSubWareHouseVisible">
<el-form :inline="true" :model="thirdSubQuery" class="query-form" size="mini">
<el-form-item class="query-form-item">
@ -732,6 +721,18 @@
</div>
</el-dialog>
<!--用戶關聯單據類型-->
<el-dialog
title="业务类型关联"
:visible.sync="relBusUserVisile"
width="70%"
:close-on-click-modal="false"
:close-on-press-escape="false"
v-if="relBusUserVisile"
>
<relBusUserDialog :inputQuery="curSeleUser" :closeDialog="cancelRelBusDiaolog"></relBusUserDialog>
</el-dialog>
</div>
</template>
@ -757,6 +758,7 @@ import axios from "axios";
import store from "@/store";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import relBusUserDialog from "./invWarehouseRelBusTypes";
const formJson = {
id: null,
@ -830,6 +832,7 @@ export default {
userList: null,
bussinessTypeList: null,
userFormVisible: false,
relBusUserVisile: false,
currentCode: null,
superRow: null,
currentRow: {status: 1},
@ -888,7 +891,8 @@ export default {
page: 1,
limit: 10
},
bussinessTypeTotal: 0
bussinessTypeTotal: 0,
curSeleUser: null,
};
},
methods: {
@ -1330,6 +1334,9 @@ export default {
this.getHospitalUser();
}
},
cancelRelBusDiaolog() {
this.relBusUserVisile = false;
},
getHospitalUser(val) {
if (val != null) {
this.hospitalUserQuery.page = val;
@ -1497,6 +1504,12 @@ export default {
this.$message.error("移除失败");
})
},
relBusttype(row) {
this.curSeleUser = row;
this.relBusUserVisile = true;
},
delWarehouseBussinessType(id) {
let params = {id: id};
deleteWarehouseBussinessType(params).then((res) => {
@ -1674,6 +1687,9 @@ export default {
mounted() {
}
,
components: {
relBusUserDialog,
},
created() {
//
this.init();

@ -0,0 +1,134 @@
<template>
<div>
<el-table
:data="bussinessTypeData"
key="row.id"
ref="fileTable"
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55"
></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
prop="action"
label="单据类型编码"
min-width="30%">
</el-table-column>
<el-table-column
prop="name"
label="单据类型名称"
min-width="30%">
</el-table-column>
</el-table>
<div style="text-align: center;margin-top: 20px">
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
>提交
</el-button
>
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
>取消
</el-button
>
</div>
</div>
</template>
<script>
import {
filterSelectInvUser, updateInvUser
} from "../../api/inventory/invRelBusTypes";
export default {
name: "inputQuery",
props: {
inputQuery: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
filterQuery: {
subInvCode: null,
userId: null,
},
bussinessTypeData: null,
multipleSelection: []
}
},
methods: {
getList() {
this.filterQuery = {
subInvCode: this.inputQuery.code,
userId: this.inputQuery.userid,
};
filterSelectInvUser(this.filterQuery).then((res) => {
if (res.code == 20000) {
this.bussinessTypeData = res.data;
this.$nextTick(() => {
for (let i = 0; i < this.bussinessTypeData.length; i++) {
this.$refs.fileTable.toggleRowSelection(this.bussinessTypeData[i], this.bussinessTypeData[i].select)
}
});
} else {
this.$message.error(res.message);
}
}).catch((error) => {
});
},
checkSelectable(row) {
return !row.select;
},
cancelDialog() {
this.closeDialog();
},
onAddSubmit() {
let postRequesty = {
subInvCode: this.inputQuery.code,
userId: this.inputQuery.userid,
invBusUserEntities: [],
};
let datas = [];
this.multipleSelection.forEach((obj) => {
datas.push(obj);
});
postRequesty.invBusUserEntities = datas;
updateInvUser(postRequesty).then((res) => {
if (res.code == 20000) {
this.closeDialog();
} else {
this.$message.error(res.message);
}
});
},
handleSelectionChange(val) {
this.multipleSelection = val;
}
},
created() {
this.getList();
},
};
</script>

@ -102,7 +102,7 @@
<el-col :span="10" class="el-col" type="flex">
<div class="text item">
<el-form-item label="用户账号" prop="userName">
<el-input v-model="formData.userName" size="small"></el-input>
<el-input v-model="formData.userName" size="small" style="width: 80%"></el-input>
</el-form-item>
</div>
</el-col>
@ -110,7 +110,8 @@
<div class="text item">
<div class="text item">
<el-form-item label="用户名称" prop="employeeName">
<el-input v-model="formData.employeeName" size="small"></el-input>
<el-input v-model="formData.employeeName" size="small"
style="width: 80%"></el-input>
</el-form-item>
</div>
</div>
@ -122,7 +123,7 @@
<div class="text item">
<el-form-item label="登录密码" prop="passWord">
<el-input
type="password"
type="password" style="width: 80%"
size="small"
v-model="formData.passWord"
></el-input>
@ -135,7 +136,7 @@
<el-form-item label="确认密码" prop="checkPassword">
<el-input
type="password"
size="small"
size="small" style="width: 80%"
v-model="formData.checkPassword"
></el-input>
</el-form-item>
@ -146,12 +147,10 @@
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col" type="flex">
<div class="text item">
<el-form-item label="备注" prop="comments">
<el-input v-model="formData.comments" size="small"></el-input>
<el-form-item label="备&nbsp&nbsp注" prop="comments">
<el-input v-model="formData.comments" size="small" style="width: 80%"></el-input>
</el-form-item>
</div>
</el-col>
</el-row>

@ -0,0 +1,326 @@
<template>
<div>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
style="width: 400px"
v-model="filterQuery.name"
placeholder="部门名称"
></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="addDeptDialog"
>添加
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%">
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="部门编码"
prop="code"
width="230"
></el-table-column>
<el-table-column
label="部门名称"
prop="name"
width="230"
></el-table-column>
<el-table-column label="状态" prop="flage" width="120">
<template slot-scope="scope">
<el-tag :type="scope.row.flag | statusFilterType">{{
scope.row.flag | statusFilterName
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="120">
</el-table-column>
<el-table-column label="操作" fixed="right" width="120">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="updateDeptDialog(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog :title="formMap[formName]" :visible.sync="formVisible" width="60%">
<el-form :model="formData" ref="dataForm">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col" type="flex">
<div class="text item">
<el-form-item label="部门名称" prop="name">
<el-input
v-model="formData.name"
style="width: 60%"
size="small"
></el-input>
</el-form-item>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="text item">
<el-form-item label="备注" prop="remark">
<el-input
v-model="formData.remark"
size="small"
style="width: 60%"
></el-input>
</el-form-item>
</div>
</div>
</el-col>
</el-row>
<el-form-item label="状态:" prop="flag">
<el-radio-group v-model="formData.flag">
<el-radio :label="0">禁用</el-radio>
<el-radio :label="1">正常</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click.native="cancelDialog" size="small">取消</el-button>
<el-button type="primary" size="small" @click.native="formSubmit()"
>提交
</el-button
>
</div>
</el-dialog>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
></el-pagination>
</div>
</template>
<script>
import {filterDepts, addDept, updateDept, deleteDept} from "../../api/auth/authDept";
export default {
data() {
return {
filterQuery: {
companyName: "",
checkType: "",
page: 1,
limit: 20,
},
total: 0,
loading: false,
formVisible: false,
userflag: {
0: "禁用",
1: "正常",
2: "未验证",
},
list: [],
isTip: {
0: "否",
1: "是",
},
formData: {},
formMap: {
add: "新增",
edit: "编辑",
},
formName: null,
};
},
filters: {
statusFilterType(status) {
const statusMap = {
0: "gray",
1: "success",
2: "danger",
};
return statusMap[status];
},
statusFilterName(status) {
const statusMap = {
0: "禁用",
1: "正常",
2: "未验证",
};
return statusMap[status];
},
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
name: "",
page: 1,
limit: 20,
};
this.getList();
},
formSubmit() {
if (this.formName == "add") {
addDept(this.formData)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
if (response.code === 20000) {
this.$message({
type: "success",
message: "添加成功!",
});
} else {
this.$message.warning("添加失败!");
}
})
.catch(() => {
this.cancelDialog();
this.loading = false;
});
} else if (this.formName == "edit") {
updateDept(this.formData)
.then((response) => {
this.loading = false;
this.cancelDialog();
this.getList();
if (response.code === 20000) {
this.$message({
type: "success",
message: "更新成功!",
});
} else {
this.$message.warning("更新失败");
}
})
.catch(() => {
this.cancelDialog();
this.loading = false;
});
}
},
onSubmit() {
this.getList();
},
addDeptDialog() {
this.formName = "add";
this.formVisible = true;
this.formData = {
name: "",
flag: 1,
remark: "",
};
},
updateDeptDialog(row) {
this.formName = "edit";
this.formVisible = true;
this.formData = row;
},
getList() {
this.loading = true;
filterDepts(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
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();
},
closeCustomerDialog() {
this.currentCustomer = null;
},
deleteDialog(row) {
this.$confirm("是否删除该部门?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let tQuery = {
id: row.id,
};
deleteDept(tQuery).then(() => {
this.getList();
});
})
.catch(() => {
});
},
},
components: {},
mounted() {
},
created() {
this.getList();
},
};
</script>

@ -178,6 +178,7 @@
placeholder="请输入病人住院号"
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
@ -202,6 +203,39 @@
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
<span>所属部门</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="corpName"
>
<el-select
v-model="formData.corpName"
filterable
clearable="true"
reserve-keyword
placeholder="请选择部门信息"
:remote-method="findDeptMethod"
:loading="loading"
@focus="findDeptMethod('')"
@change="deptChange"
>
<el-option
v-for="item in fromDeptOptions"
:key="item.id"
:label="item.name"
:value="item"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20" class="el-col">
@ -431,6 +465,7 @@ import selectRlDialog from "./DialogSelectRl";
import editCodeDialog from "./editCode";
import A from "../../plugin/KeyScaner"
import {deleteLog} from "@/api/basic/udiinfolog";
import {filterDepts} from "@/api/auth/authDept";
export default {
@ -521,6 +556,7 @@ export default {
checkSuccess: false,
codeDetail: null,
editTitle: "编辑条码",
fromDeptOptions: [],
};
},
components: {
@ -878,7 +914,7 @@ export default {
this.formData.vailInv = this.curAction.vailInv;
this.formData.codeFillCheck = this.curAction.codeFillCheck;
} else {
this.curAction = {corpType:0,genUnit: false,changeEnable:false,};
this.curAction = {corpType: 0, genUnit: false, changeEnable: false,};
this.formData.action = null;
}
@ -945,6 +981,26 @@ export default {
});
},
findDeptMethod() {
let query = {
flag: 1
};
filterDepts(query)
.then((response) => {
this.loading = false;
this.fromDeptOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromDeptOptions = [];
});
},
deptChange(row) {
this.formData.corpId = row.code;
this.formData.corpName = row.name;
},
findStorageMethod() {
if (this.formData.locStorageCode == null)
return;

@ -149,7 +149,6 @@
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
</el-option>
</el-select>
@ -161,6 +160,31 @@
placeholder="请输入病人住院号"
></el-input>
</el-form-item>
<el-form-item class="query-form-item" prop="corpName"
v-if="curAction.corpType ==4">
<el-select
v-model="formData.corpName"
filterable
remote :disabled="codeArray.length>0"
clearable="true"
reserve-keyword
placeholder="请输入往来单位"
:remote-method="findDeptMethod"
:loading="loading"
@focus="findDeptMethod('')"
@change="deptChange"
>
<el-option
v-for="item in fromDeptOptions"
:key="item.id"
:label="item.name"
:value="item"
>
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
@ -423,6 +447,7 @@ import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehou
import dialogInvProduct from "../inventory/DialogInvProduct"
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {isBlank} from "@/utils/strUtil";
import {filterDepts} from "@/api/auth/authDept";
export default {
name: "idQuery",
@ -523,6 +548,7 @@ export default {
storageList: [],
invQueryData: {},
subInvList: [],
fromDeptOptions: [],
};
},
components: {
@ -560,17 +586,9 @@ export default {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0');
}
// if (this.$isBlank(this.codeArray[i].batchNo)) {
// if (!this.codeArray[i].allowNoBatch) {
// return this.$message.error('');
// }
// }
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期与失效日期不能全部为空');
}
// if (this.$isBlank(this.codeArray[i].expireDate)) {
// return this.$message.error('');
// }
}
@ -580,14 +598,6 @@ export default {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0');
}
// if (!this.$isBlank(this.codeArray[i].productDate && this.codeArray[i].productDate.length != 6)) {
// return this.$message.error('');
// }
// if (!this.$isBlank(this.codeArray[i].expireDate && this.codeArray[i].expireDate.length != 6)) {
// return this.$message.error('');
// }
}
}
@ -647,7 +657,7 @@ export default {
}
}
},
findStorageMethod(query) {
findStorageMethod() {
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@ -662,12 +672,32 @@ export default {
this.fromStorageOptions.push(temp[i]);
}
}
})
.catch(() => {
});
},
findDeptMethod() {
let query = {
flag: 1
};
filterDepts(query)
.then((response) => {
this.loading = false;
this.fromDeptOptions = response.data.list || [];
})
.catch(() => {
this.loading = false;
this.fromDeptOptions = [];
});
},
deptChange(row) {
this.formData.corpId = row.code;
this.formData.corpName = row.name;
},
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.corpId,

Loading…
Cancel
Save