优化
This commit is contained in:
@ -134,6 +134,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
// 添加CORS filter
|
// 添加CORS filter
|
||||||
httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
|
httpSecurity.addFilterBefore(corsFilter, JwtAuthenticationTokenFilter.class);
|
||||||
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
|
httpSecurity.addFilterBefore(corsFilter, LogoutFilter.class);
|
||||||
|
// httpSecurity.sessionManagement().maximumSessions(1)
|
||||||
|
// .maxSessionsPreventsLogin(true); // 禁止后来者登录
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
package com.ruoyi.bgt.domain.dto;
|
package com.ruoyi.bgt.domain.dto;
|
||||||
|
|
||||||
|
import com.ruoyi.wgz.domain.WgzPayCalculationFiles;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 工资结算分页查询对象 wgz_pay_calculation
|
* 工资结算分页查询对象 wgz_pay_calculation
|
||||||
*
|
*
|
||||||
@ -28,5 +31,7 @@ public class BgtPayCalculationUpdateDTO {
|
|||||||
@ApiModelProperty("审核意见")
|
@ApiModelProperty("审核意见")
|
||||||
private String auditorOpinion;
|
private String auditorOpinion;
|
||||||
|
|
||||||
|
@ApiModelProperty("附件实体数据")
|
||||||
|
private List<WgzPayCalculationFiles> payCalculation;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -56,5 +56,6 @@ public class BgtPayCalculationDetailBaseVO {
|
|||||||
private Long taskId;
|
private Long taskId;
|
||||||
|
|
||||||
@ApiModelProperty("务工者Id")
|
@ApiModelProperty("务工者Id")
|
||||||
|
@JsonFormat(shape = JsonFormat.Shape.STRING)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
}
|
}
|
||||||
|
@ -682,7 +682,7 @@ public class BgtProjectRecruitApplyServiceImpl extends ServicePlusImpl<BgtProjec
|
|||||||
public BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId) {
|
public BgtProjectRecruitApply getOneByUserIdAndRecruitId(Long userId, Long recruitId) {
|
||||||
|
|
||||||
List<BgtProjectRecruitApply> list = baseMapper.selectList(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
List<BgtProjectRecruitApply> list = baseMapper.selectList(Wrappers.<BgtProjectRecruitApply>lambdaQuery()
|
||||||
.eq(BgtProjectRecruitApply::getRemark, recruitId)
|
.eq(BgtProjectRecruitApply::getRecruitId, recruitId)
|
||||||
.eq(BgtProjectRecruitApply::getUserId, userId)
|
.eq(BgtProjectRecruitApply::getUserId, userId)
|
||||||
.in(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.getWorkStatus())
|
.in(BgtProjectRecruitApply::getStatus, RecruitApplyStatus.getWorkStatus())
|
||||||
.orderByDesc(BgtProjectRecruitApply::getCreateTime));
|
.orderByDesc(BgtProjectRecruitApply::getCreateTime));
|
||||||
|
@ -26,6 +26,7 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
|||||||
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.enums.AuditStatus;
|
import com.ruoyi.common.enums.AuditStatus;
|
||||||
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.PageUtils;
|
import com.ruoyi.common.utils.PageUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.fbs.domain.FbsProjectTask;
|
import com.ruoyi.fbs.domain.FbsProjectTask;
|
||||||
@ -402,6 +403,10 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
iWgzPayCalculationMiddleService.removeByIds(list.stream().map(WgzPayCalculationMiddle::getId).collect(Collectors.toList()));
|
iWgzPayCalculationMiddleService.removeByIds(list.stream().map(WgzPayCalculationMiddle::getId).collect(Collectors.toList()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//添加附件
|
||||||
|
if(CollectionUtils.isNotEmpty(dto.getPayCalculation())){
|
||||||
|
iWgzPayCalculationFilesService.saveBatch(dto.getPayCalculation());
|
||||||
|
}
|
||||||
|
|
||||||
//发消息
|
//发消息
|
||||||
HashMap<String, String> mp = new HashMap<>();
|
HashMap<String, String> mp = new HashMap<>();
|
||||||
@ -525,6 +530,15 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
updateBatchById(payList);
|
updateBatchById(payList);
|
||||||
|
|
||||||
|
//存附件
|
||||||
|
List<WgzPayCalculationFiles> files = dto.getPayCalculation();
|
||||||
|
if(CollectionUtil.isNotEmpty(files)){
|
||||||
|
files.forEach(file -> {
|
||||||
|
file.setCalculationId(payCalculation.getId());
|
||||||
|
});
|
||||||
|
iWgzPayCalculationFilesService.saveBatch(files);
|
||||||
|
}
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,9 +576,18 @@ public class WgzPayCalculationServiceImpl extends ServicePlusImpl<WgzPayCalculat
|
|||||||
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
int sum = list.stream().mapToInt(WgzPayCalculation::getNum).sum();
|
||||||
i = i - sum;
|
i = i - sum;
|
||||||
}
|
}
|
||||||
|
if(i<=0){
|
||||||
|
throw new BaseException("工资已全部结算完毕");
|
||||||
|
}
|
||||||
vo.setNum(i);
|
vo.setNum(i);
|
||||||
|
|
||||||
//个人信息
|
//个人信息
|
||||||
|
WgzUser wgzUser = wgzUserService.findByUserId(userId);
|
||||||
|
vo.setUserId(userId);
|
||||||
|
vo.setUserName(wgzUser.getUsername());
|
||||||
|
vo.setPhone(wgzUser.getPhone());
|
||||||
|
vo.setBank(wgzUser.getBank());
|
||||||
|
vo.setCardNo(wgzUser.getCardNo());
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
CASE
|
CASE
|
||||||
WHEN wa.leave_mark_id = 1 THEN '请假'
|
WHEN wa.leave_mark_id = 1 THEN '请假'
|
||||||
WHEN wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0 THEN '正常'
|
WHEN wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0 THEN '正常'
|
||||||
WHEN wa.late = 1 or wa.early_leave = 1 or wa.missed_in = 1 or wa.missed_out = 1 THEN '异常'
|
WHEN wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null THEN '异常'
|
||||||
ELSE '异常'
|
ELSE '异常'
|
||||||
END AS attendance_status
|
END AS attendance_status
|
||||||
FROM bgt_project_recruit_apply bpra
|
FROM bgt_project_recruit_apply bpra
|
||||||
@ -131,7 +131,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
and (wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0) and leave_mark_id is null
|
and (wa.late = 0 and wa.early_leave = 0 and wa.missed_in = 0 and wa.missed_out = 0) and leave_mark_id is null
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.attendanceType !=null and dto.attendanceType ==2 ">
|
<if test="dto.attendanceType !=null and dto.attendanceType ==2 ">
|
||||||
and (wa.late = 1 or wa.early_leave = 1 or wa.missed_in = 1 or wa.missed_out = 1) and leave_mark_id is null
|
and (wa.late = 1 or wa.early_leave = 1 or wa.clock_in_time is null or wa.clock_out_time is null) and leave_mark_id is null
|
||||||
</if>
|
</if>
|
||||||
<if test="dto.attendanceType !=null and dto.attendanceType ==3 ">
|
<if test="dto.attendanceType !=null and dto.attendanceType ==3 ">
|
||||||
and wa.leave_mark_id = 1
|
and wa.leave_mark_id = 1
|
||||||
|
53
ruoyi-ui/src/api/bgt/user.js
Normal file
53
ruoyi-ui/src/api/bgt/user.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询APP包工头列表
|
||||||
|
export function listUser(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询APP包工头详细
|
||||||
|
export function getUser(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增APP包工头
|
||||||
|
export function addUser(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改APP包工头
|
||||||
|
export function updateUser(data) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除APP包工头
|
||||||
|
export function delUser(id) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出APP包工头
|
||||||
|
export function exportUser(query) {
|
||||||
|
return request({
|
||||||
|
url: '/bgt/user/export',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
582
ruoyi-ui/src/views/bgt/user/index.vue
Normal file
582
ruoyi-ui/src/views/bgt/user/index.vue
Normal file
@ -0,0 +1,582 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
<!-- <el-form-item label="唯一标识" prop="userId">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.userId"-->
|
||||||
|
<!-- placeholder="请输入唯一标识"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="姓名" prop="username">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.username"
|
||||||
|
placeholder="请输入姓名"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="性别" prop="gender">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.gender"-->
|
||||||
|
<!-- placeholder="请输入性别"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="民族" prop="nation">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.nation"-->
|
||||||
|
<!-- placeholder="请输入民族"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="出生日期" prop="birthdate">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.birthdate"-->
|
||||||
|
<!-- placeholder="请输入出生日期"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="身份证号码" prop="identityCard">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.identityCard"-->
|
||||||
|
<!-- placeholder="请输入身份证号码"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="所在区域" prop="area">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.area"-->
|
||||||
|
<!-- placeholder="请输入所在区域"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="地址" prop="site">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.site"-->
|
||||||
|
<!-- placeholder="请输入地址"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.phone"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
clearable
|
||||||
|
size="small"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- <el-form-item label="银行" prop="bank">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.bank"-->
|
||||||
|
<!-- placeholder="请输入银行"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="银行卡号" prop="cardNo">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.cardNo"-->
|
||||||
|
<!-- placeholder="请输入银行卡号"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="头像地址" prop="avatarName">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.avatarName"-->
|
||||||
|
<!-- placeholder="请输入头像地址"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="密码" prop="password">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.password"-->
|
||||||
|
<!-- placeholder="请输入密码"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="身份证正面图路径" prop="frontPath">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.frontPath"-->
|
||||||
|
<!-- placeholder="请输入身份证正面图路径"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="身份证反面图路径" prop="reverseSidePath">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.reverseSidePath"-->
|
||||||
|
<!-- placeholder="请输入身份证反面图路径"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<!-- <el-form-item label="银行卡图路径" prop="bankCardPath">-->
|
||||||
|
<!-- <el-input-->
|
||||||
|
<!-- v-model="queryParams.bankCardPath"-->
|
||||||
|
<!-- placeholder="请输入银行卡图路径"-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
|
<!-- />-->
|
||||||
|
<!-- </el-form-item>-->
|
||||||
|
<el-form-item label="帐号状态" prop="status">
|
||||||
|
<el-select v-model="queryParams.status" placeholder="请选择帐号状态" clearable size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictLabel"
|
||||||
|
:value="dict.dictValue"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['bgt:user:add']"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['bgt:user:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['bgt:user:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
:loading="exportLoading"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['bgt:user:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键ID" align="center" prop="id" v-if="false"/>
|
||||||
|
<!-- <el-table-column label="唯一标识" align="center" prop="userId" />-->
|
||||||
|
<el-table-column label="姓名" align="center" prop="username" />
|
||||||
|
<!-- <el-table-column label="性别" align="center" prop="gender" :formatter="genderFormat" />-->
|
||||||
|
<!-- <el-table-column label="民族" align="center" prop="nation" />-->
|
||||||
|
<el-table-column label="出生日期" align="center" prop="birthdate" />
|
||||||
|
<!-- <el-table-column label="身份证号码" align="center" prop="identityCard" />-->
|
||||||
|
<!-- <el-table-column label="所在区域" align="center" prop="area" />-->
|
||||||
|
<el-table-column label="地址" align="center" prop="site" />
|
||||||
|
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||||
|
<!-- <el-table-column label="银行" align="center" prop="bank" />-->
|
||||||
|
<!-- <el-table-column label="银行卡号" align="center" prop="cardNo" />-->
|
||||||
|
<!-- <el-table-column label="头像地址" align="center" prop="avatarName" />-->
|
||||||
|
<!-- <el-table-column label="密码" align="center" prop="password" />-->
|
||||||
|
<!-- <el-table-column label="身份证正面图路径" align="center" prop="frontPath" />-->
|
||||||
|
<!-- <el-table-column label="身份证反面图路径" align="center" prop="reverseSidePath" />-->
|
||||||
|
<!-- <el-table-column label="银行卡图路径" align="center" prop="bankCardPath" />-->
|
||||||
|
<el-table-column label="帐号状态" align="center" prop="status" :formatter="statusFormat" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['bgt:user:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['bgt:user:remove']"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改APP包工头对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="唯一标识" prop="userId">
|
||||||
|
<el-input v-model="form.userId" placeholder="请输入唯一标识" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="姓名" prop="username">
|
||||||
|
<el-input v-model="form.username" placeholder="请输入姓名" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="性别" prop="gender">
|
||||||
|
<el-input v-model="form.gender" placeholder="请输入性别" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="民族" prop="nation">
|
||||||
|
<el-input v-model="form.nation" placeholder="请输入民族" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="出生日期" prop="birthdate">
|
||||||
|
<el-input v-model="form.birthdate" placeholder="请输入出生日期" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证号码" prop="identityCard">
|
||||||
|
<el-input v-model="form.identityCard" placeholder="请输入身份证号码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="所在区域" prop="area">
|
||||||
|
<el-input v-model="form.area" placeholder="请输入所在区域" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地址" prop="site">
|
||||||
|
<el-input v-model="form.site" placeholder="请输入地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="联系电话" prop="phone">
|
||||||
|
<el-input v-model="form.phone" placeholder="请输入联系电话" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="银行" prop="bank">
|
||||||
|
<el-input v-model="form.bank" placeholder="请输入银行" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="银行卡号" prop="cardNo">
|
||||||
|
<el-input v-model="form.cardNo" placeholder="请输入银行卡号" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="头像地址" prop="avatarName">
|
||||||
|
<el-input v-model="form.avatarName" placeholder="请输入头像地址" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="密码" prop="password">
|
||||||
|
<el-input v-model="form.password" placeholder="请输入密码" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证正面图路径" prop="frontPath">
|
||||||
|
<el-input v-model="form.frontPath" placeholder="请输入身份证正面图路径" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="身份证反面图路径" prop="reverseSidePath">
|
||||||
|
<el-input v-model="form.reverseSidePath" placeholder="请输入身份证反面图路径" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="银行卡图路径" prop="bankCardPath">
|
||||||
|
<el-input v-model="form.bankCardPath" placeholder="请输入银行卡图路径" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="帐号状态">
|
||||||
|
<el-radio-group v-model="form.status">
|
||||||
|
<el-radio
|
||||||
|
v-for="dict in statusOptions"
|
||||||
|
:key="dict.dictValue"
|
||||||
|
:label="dict.dictValue"
|
||||||
|
>{{dict.dictLabel}}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="删除标志" prop="delFlag">
|
||||||
|
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建者" prop="createBy">
|
||||||
|
<el-input v-model="form.createBy" placeholder="请输入创建者" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createTime">
|
||||||
|
<el-date-picker clearable size="small"
|
||||||
|
v-model="form.createTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新者" prop="updateBy">
|
||||||
|
<el-input v-model="form.updateBy" placeholder="请输入更新者" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新时间" prop="updateTime">
|
||||||
|
<el-date-picker clearable size="small"
|
||||||
|
v-model="form.updateTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择更新时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button :loading="buttonLoading" type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listUser, getUser, delUser, addUser, updateUser, exportUser } from "@/api/bgt/user";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "User",
|
||||||
|
components: {
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
//按钮loading
|
||||||
|
buttonLoading: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 导出遮罩层
|
||||||
|
exportLoading: false,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// APP包工头表格数据
|
||||||
|
userList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 性别字典
|
||||||
|
genderOptions: [],
|
||||||
|
// 帐号状态字典
|
||||||
|
statusOptions: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
userId: undefined,
|
||||||
|
username: undefined,
|
||||||
|
gender: undefined,
|
||||||
|
nation: undefined,
|
||||||
|
birthdate: undefined,
|
||||||
|
identityCard: undefined,
|
||||||
|
area: undefined,
|
||||||
|
site: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
bank: undefined,
|
||||||
|
cardNo: undefined,
|
||||||
|
avatarName: undefined,
|
||||||
|
password: undefined,
|
||||||
|
frontPath: undefined,
|
||||||
|
reverseSidePath: undefined,
|
||||||
|
bankCardPath: undefined,
|
||||||
|
status: undefined,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
userId: [
|
||||||
|
{ required: true, message: "唯一标识不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
password: [
|
||||||
|
{ required: true, message: "密码不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
status: [
|
||||||
|
{ required: true, message: "帐号状态不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
this.getDicts("sys_user_sex").then(response => {
|
||||||
|
this.genderOptions = response.data;
|
||||||
|
});
|
||||||
|
this.getDicts("sys_normal_disable").then(response => {
|
||||||
|
this.statusOptions = response.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询APP包工头列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listUser(this.queryParams).then(response => {
|
||||||
|
this.userList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 性别字典翻译
|
||||||
|
genderFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.genderOptions, row.gender);
|
||||||
|
},
|
||||||
|
// 帐号状态字典翻译
|
||||||
|
statusFormat(row, column) {
|
||||||
|
return this.selectDictLabel(this.statusOptions, row.status);
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: undefined,
|
||||||
|
userId: undefined,
|
||||||
|
username: undefined,
|
||||||
|
gender: undefined,
|
||||||
|
nation: undefined,
|
||||||
|
birthdate: undefined,
|
||||||
|
identityCard: undefined,
|
||||||
|
area: undefined,
|
||||||
|
site: undefined,
|
||||||
|
phone: undefined,
|
||||||
|
bank: undefined,
|
||||||
|
cardNo: undefined,
|
||||||
|
avatarName: undefined,
|
||||||
|
password: undefined,
|
||||||
|
frontPath: undefined,
|
||||||
|
reverseSidePath: undefined,
|
||||||
|
bankCardPath: undefined,
|
||||||
|
status: "0",
|
||||||
|
delFlag: undefined,
|
||||||
|
createBy: undefined,
|
||||||
|
createTime: undefined,
|
||||||
|
updateBy: undefined,
|
||||||
|
updateTime: undefined,
|
||||||
|
remark: undefined
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加APP包工头";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.loading = true;
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getUser(id).then(response => {
|
||||||
|
this.loading = false;
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改APP包工头";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.buttonLoading = true;
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateUser(this.form).then(response => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
this.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addUser(this.form).then(response => {
|
||||||
|
this.buttonLoading = false;
|
||||||
|
this.msgSuccess("新增成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$confirm('是否确认删除APP包工头编号为"' + ids + '"的数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = true;
|
||||||
|
return delUser(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.loading = false;
|
||||||
|
this.getList();
|
||||||
|
this.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
const queryParams = this.queryParams;
|
||||||
|
this.$confirm('是否确认导出所有APP包工头数据项?', "警告", {
|
||||||
|
confirmButtonText: "确定",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning"
|
||||||
|
}).then(() => {
|
||||||
|
this.exportLoading = true;
|
||||||
|
return exportUser(queryParams);
|
||||||
|
}).then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
this.exportLoading = false;
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Reference in New Issue
Block a user