代码更新

master
1178634255 2 years ago
parent 76bf1b4e3d
commit dd8870adb3

@ -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