Compare commits

...

11 Commits

@ -74,4 +74,27 @@ export function updateInv(data) {
data: data
});
}
//获取当前登陆人用户信息
export function selectUser(query) {
return axios({
url: "/admin/auth/admin/selectUser",
method: "get",
params: query
});
}
export function modifyPasswd(data) {
return axios({
url: "/admin/auth/admin/updateUser",
method: "post",
data: data
});
}
export function filterByUser(query) {
return axios({
url: "/admin/auth/admin/selectUser",
method: "get",
params: query
});
}

@ -9,9 +9,8 @@
<template v-if="device!=='mobile'">
<div class="inv-hos-title">
<!-- <span style="font-weight: bold;color: #303133;">协和医院平潭分院</span>-->
<span
style="margin-left:8px;color: #2d8cf0;font-size: 14px;">部门:{{ deptName }}</span>
<span
style="margin-left:8px;color: #2d8cf0;font-size: 14px;">部门:{{ deptName }}</span>
<span
style="margin-right: 18px;margin-left:8px;color: #2d8cf0;font-size: 14px;">仓库:{{ inv }}</span>
<span style="font-weight: 500;color:rgb(51 48 48); font-size: 14px;">用户:{{ this.companyName }}</span>
@ -41,6 +40,9 @@
<el-dropdown-item divided @click.native="changeInv">
<span>切换仓库</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="modifyPassword">
<span>修改密码</span>
</el-dropdown-item>
<el-dropdown-item divided @click.native="logout">
<span>退出登录</span>
</el-dropdown-item>
@ -103,6 +105,78 @@
</el-form>
</el-dialog>
<el-dialog
title="修改密码"
:visible.sync="isVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="35%"
v-if="isVisible"
>
<el-form :model="inputQuery" label-width="100px" :rules="formRules" ref="dataForm">
<el-row :gutter="20">
<el-col :span="20">
<el-form-item prop="userName" label="用户账号:">
<el-input
size="small"
placeholder="请输入登录用户账号"
v-model="inputQuery.userName"
@input="change()"
:disabled="true"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item prop="passWord" label="当前密码:">
<el-input
size="small"
placeholder="请输入当前密码"
type="password"
v-model="inputQuery.passWord"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item prop="newPassword" label="新密码:">
<el-input
size="small"
placeholder="请输入新密码"
type="password"
v-model="inputQuery.newPassword"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="20">
<el-form-item prop="confirmPassword" label="确认密码:">
<el-input
size="small"
placeholder="请输入确认密码"
type="password"
v-model="inputQuery.confirmPassword"
@input="change()"
></el-input>
</el-form-item>
</el-col>
</el-row>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button type="primary" @click="onSubmit"></el-button>
<el-button @click="closeDialog"></el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
@ -119,21 +193,37 @@ import RuoYiDoc from '@/components/RuoYi/Doc'
import store from "@/store";
import {filterAllByUser} from "@/api/system/invWarehouse";
import {filterSubByInv, findByDeptUser} from "@/api/system/invSubWarehouse";
import {updateInv} from "@/api/auth/authAdmin";
import {updateInv, modifyPasswd,filterByUser} from "@/api/auth/authAdmin";
import {isRelogin} from "@/utils/request";
import router from "@/router";
export default {
data() {
// let validatePass2 = (rule, value, callback) => {
// if (value === "") {
// callback(new Error(""));
// } else if (value !== this.inputQuery.password) {
// callback(new Error("!"));
// } else {
// callback();
// }
// };
return {
deptName: store.getters.locDeptName,
inv: store.getters.locInvName,
deptName: store.getters.locDeptName,
selInvVisible: false,
isVisible: false,
userInfo: {},
inputQuery: {
passWord: "",
newPassword: "",
confirmPassword: "",
userName: "",
locInvCode: "",
},
deptList: [],
invList: [],
userName: '',
companyName: '',
formRules: {
locDeptCode: [
{required: true, message: "请选择当前部门", trigger: "blur"}
@ -141,6 +231,19 @@ export default {
locInvCode: [
{required: true, message: "请选择当前仓库", trigger: "blur"}
],
password: [{required: true, message: "请输入密码", trigger: "blur"}],
newPassword: [{required: true, message: "请输入密码", trigger: "blur"}],
confirmPassword: [
{required: true, message: "请确认密码", trigger: "blur"},
// {validator: validatePass2, trigger: "blur"},
],
},
rules: {
password: [{required: true, message: "请输入密码", trigger: "blur"}],
confirmPassword: [
{required: true, message: "请确认密码", trigger: "blur"},
// {validator: validatePass2, trigger: "blur"},
],
},
};
@ -179,6 +282,41 @@ export default {
}
},
methods: {
onSubmit() {
if (this.inputQuery.newPassword != this.inputQuery.confirmPassword) {
this.$message.error("新密码与确认密码不一致!!!!");
return
}
if (this.inputQuery.passWord == this.inputQuery.newPassword) {
this.$message.error("旧密码与新密码不能相同!!!!");
return
}
this.$refs["dataForm"].validate((valid) => {
if (valid) {
this.loading = true;
modifyPasswd(this.inputQuery).then((response) => {
if (response.code === 20000) {
this.loading = false;
this.$confirm('密码重置成功,请点击确定重新登录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = process.env.VUE_APP_CONTEXT_PATH;
})
}).catch(() => {
});
} else {
this.$message.error(response.message);
}
});
} else {
return false;
}
});
},
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
},
@ -197,7 +335,9 @@ export default {
changeInv() {
this.selInvVisible = true;
this.getDeptList();
},
modifyPassword() {
this.isVisible = true;
},
getDeptList() {
@ -210,6 +350,16 @@ export default {
.catch(() => {
});
},
// getInputQuery() {
// this.inputQuery = [];
// filterByUser()
// .then((response) => {
// this.inputQuery = response.data || [];
// // this.getInvList();
// })
// .catch(() => {
// });
// },
deptChange() {
this.getInvList();
@ -219,8 +369,7 @@ export default {
getInvList() {
this.invList = [];
let query = {
deptCode: this.userInfo.locDeptCode,
type:1
deptCode: this.userInfo.locDeptCode
};
findByDeptUser(query)
.then((response) => {
@ -266,6 +415,8 @@ export default {
closeDialog() {
this.selInvVisible = false;
this.isVisible = false;
this.getDeptList()
this.resetForm();
},
@ -283,14 +434,17 @@ export default {
},
created() {
this.userName = this.$store.getters.name;
this.companyName = this.$store.getters.companyName;
this.userInfo = {
id: store.getters.adminId,
locInvCode: store.getters.locInvCode,
locDeptCode: store.getters.locDeptCode,
};
this.inputQuery = {
userName: this.userName,
id: this.userInfo.id,
};
// this.getInputQuery();
this.getDeptList();
//this.getInvList()

@ -122,8 +122,9 @@
<el-col :span="12" type="flex">
<el-form-item label="往来单位名称" prop="name">
<el-input v-model="editQuery.name" size="small" style="width: 90%" auto-complete="off" @input="change()"
splaceholder="请输入往来单位名称"></el-input>
placeholder="请输入往来单位名称" :maxlength="40"></el-input>
</el-form-item>
</el-col>
<el-col :span="12" type="flex">
<el-form-item label="往来单位编码" prop="erpId">

@ -17,7 +17,7 @@
:model="inputQuery"
:rules="rules"
ref="inputQuery"
style="margin-left: 20%"
style="margin-left: 20%"
>
<el-row :gutter="20">
<el-col :span="4">

@ -123,7 +123,7 @@
>
{{ choiceFile }}
</el-button>
<div>只能上传 jpg,png,pdf,doc 文件且不超过 10 MB</div>
<div>只能上传 jpg,png文件且不超过 10 MB</div>
</el-upload>
</el-form-item>
</el-col>

@ -200,6 +200,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">
<el-button type="text" :disabled="scope.row.checkStatus==1 " v-if="showSup" size="small"

@ -145,6 +145,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">

@ -114,6 +114,8 @@
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column label="校验状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{-->

@ -135,6 +135,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button

@ -122,6 +122,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="160">
<template slot-scope="scope">

@ -139,6 +139,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button

@ -137,6 +137,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button

@ -137,6 +137,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button

@ -130,6 +130,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">

@ -137,6 +137,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="150" fixed="right">
<template slot-scope="scope">
<el-button

@ -198,6 +198,8 @@
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="250" fixed="right">
<template slot-scope="scope">

@ -217,6 +217,8 @@
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="scope">

@ -129,6 +129,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<el-table-column label="操作" width="140" fixed="right">
<template slot-scope="scope">
<el-button

@ -164,6 +164,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column label="验收状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->

@ -148,6 +148,8 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="备注" prop="remark" width="180" show-overflow-tooltip>
</el-table-column>
<!-- <el-table-column label="验收状态" prop="status" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="statusFilterType(scope.row.status)">{{-->

@ -15,7 +15,7 @@
</el-col>
<el-col :span="8">
<el-form-item prop="name">
<el-input v-model="formData.name" auto-complete="off" :disabled="formData.auditStatus == 1"></el-input>
<el-input v-model="formData.name" auto-complete="off" :disabled="formData.auditStatus == 1" :maxlength="30"></el-input>
</el-form-item>
</el-col>

@ -30,7 +30,7 @@
type="primary"
size="mini"
icon="search"
v-if="inputQuery.auditStatus == 0 || inputQuery.auditStatus == 6"
v-if=" inputQuery.auditStatus == 1"
@click="onModifySubmit(6)"
>提交审核
</el-button>
@ -40,9 +40,9 @@
size="mini"
icon="search"
v-if="
inputQuery.auditStatus == 3 ||
inputQuery.auditStatus == 1 ||
inputQuery.auditStatus == 2
inputQuery.auditStatus == 0 ||
inputQuery.auditStatus == 2 ||
inputQuery.auditStatus == 3
"
@click="onModifySubmit(3)"
>提交审核
@ -580,9 +580,9 @@ export default {
//
if (val == 0) {
var str = "是否确定草稿保存?";
} else if (val == 6) {
} else if (val == 1) {
var str = "是否确定提交审核?";
} else if (val == 2) {
} else if (val == 2||val == 3|| val ==0) {
var str = "企业信息已拒绝审核,是否确认重新提交审核?";
} else {
var str = "企业信息已通过审核,是否确认重新提交审核?";

@ -117,7 +117,7 @@
>文件预览
</el-button
>
<div>只能上传 jpg,png,pdf,doc 文件且不超过 10 MB</div>
<div>只能上传 jpg,png文件且不超过 10 MB</div>
</el-upload>

@ -1,38 +1,42 @@
<template>
<div>
<el-card>
<el-form :inline="true" :model="query" size="mini">
<el-form-item label="用户账号:">
<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="请选择账号状态:">
<el-option label="全部" value=""></el-option>
<el-option label="禁用" value="0"></el-option>
<el-option label="正常" value="1"></el-option>
</el-select>
</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="el-icon-search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" @click.native="handleForm(null, null)" icon="el-icon-plus"
:disabled="!configParms.sysUser && query.customerId == 110"
v-hasPermi="['system:user:add']"
>新增
</el-button
>
</el-button-group>
</el-form-item>
<el-form :inline="true" :model="query" size="mini" v-show="showSearch">
<el-row>
<el-col :span="8">
<el-form-item label="用户账号:">
<el-input v-model="query.userName" placeholder="用户账号" clearable></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" label="账号状态:">
<el-select v-model="query.userFlag" placeholder="请选择账号状态:">
<el-option label="全部" value=""></el-option>
<el-option label="禁用" value="0"></el-option>
<el-option label="正常" value="1"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属部门:">
<el-input v-model="query.deptName" placeholder="所属部门" clearable></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<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" @click.native="handleForm(null, null)" icon="el-icon-plus"
:disabled="!configParms.sysUser && query.customerId == 110"
v-hasPermi="['system:user:add']">新增</el-button>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list"
style="width: 100%"
border highlight-current-row>
@ -71,7 +75,7 @@
</el-button>
<el-button
type="text"
:disabled="scope.row.id === 1 || !configParms.sysUser"
:disabled="scope.row.id === '1' || !configParms.sysUser"
@click.native="handleDel(scope.$index, scope.row)"
v-hasPermi="['system:user:remove']"
>删除
@ -102,13 +106,14 @@
<el-row type="flex">
<el-col :span="11" type="flex">
<el-form-item label="用户账号" prop="userName">
<el-input v-model="formData.userName" size="small" style="width: 90%"></el-input>
<el-input v-model="formData.userName" size="small" style="width: 90%"
:disabled="formData.id == 1"></el-input>
</el-form-item>
</el-col>
<el-col :span="11" class="el-col">
<el-form-item label="用户名称" prop="employeeName">
<el-input v-model="formData.employeeName" size="small"
style="width: 90%"></el-input>
style="width: 90%" :disabled="formData.id == 1"></el-input>
</el-form-item>
</el-col>
</el-row>
@ -167,46 +172,46 @@
</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">
<el-radio-group v-model="formData.userFlag" :disabled="formData.id == 1">
<el-radio :label="1">正常</el-radio>
<el-radio :label="0">禁用</el-radio>
</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-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="11" type="flex">
<el-form-item label="角色">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id === 1" >
<el-form-item label="角色" prop="roles">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1">
<el-checkbox
v-for="item in roles"
:key="item.roleId"
@ -258,7 +263,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, selectInvById,getDeptById} from '@/api/system/invWarehouse'
import {filterList, selectInvById, getDeptById} from '@/api/system/invWarehouse'
const formJson = {
id: "",
@ -291,10 +296,12 @@ export default {
}
};
return {
showSearch: true,
roles: [],
query: {
userName: "",
userFlag: "",
userFlag: "1",
deptName: "",
page: 1,
limit: 10,
roleId: "",
@ -340,6 +347,12 @@ export default {
depts: [
{required: true, message: "请选择所属部门", trigger: "change"}
],
roles: [
{required: true, message: "请选择用户角色"}
],
employeeName: [
{required: true, message: "请输入用户名称", trigger: "blur"}
]
},
editRules: {
userName: [
@ -356,13 +369,20 @@ export default {
};
},
methods: {
getDeptList(){
},
hideSearch() {
this.showSearch = !this.showSearch;
},
onReset() {
this.$router.push({
path: ""
});
this.query = {
userName: "",
userFlag: "",
userFlag: "1",
deptName: null,
page: 1,
limit: 10,
roleId: "",
@ -378,7 +398,7 @@ export default {
this.query.page = 1;
this.getList();
},
change(){
change() {
this.$forceUpdate();
},
findInv(val) {
@ -397,7 +417,7 @@ export default {
},
getList() {
this.loading = true;
this.query.key='key';
this.query.key = 'key';
authAdminList(this.query)
.then(response => {
this.loading = false;
@ -459,7 +479,7 @@ export default {
roles: row.roles,
depts: row.depts,
dept: row.dept,
locInvCode:row.locInvCode
locInvCode: row.locInvCode
};
}
this.formName = "add";
@ -564,10 +584,10 @@ export default {
};
filterList(query)
.then((response) => {
var deptList=[];
var deptList = [];
this.loading = false;
for(var i=0;i<response.data.list.length;i++){
if(response.data.list[i].id!=1){
for (var i = 0; i < response.data.list.length; i++) {
if (response.data.list[i].id != 1) {
deptList.push(response.data.list[i]);
}
}
@ -617,7 +637,6 @@ export default {
this.getSyncConfig();
this.findDeptMethod();
//
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {

Loading…
Cancel
Save