12 changed files with 1944 additions and 80 deletions
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询劳资专管员列表
|
|||
export function listLaborManagement(query) { |
|||
return request({ |
|||
url: '/build/laborManagement/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询劳资专管员详细
|
|||
export function getLaborManagement(id) { |
|||
return request({ |
|||
url: '/build/laborManagement/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增劳资专管员
|
|||
export function addLaborManagement(data) { |
|||
return request({ |
|||
url: '/build/laborManagement', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改劳资专管员
|
|||
export function updateLaborManagement(data) { |
|||
return request({ |
|||
url: '/build/laborManagement', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除劳资专管员
|
|||
export function delLaborManagement(id) { |
|||
return request({ |
|||
url: '/build/laborManagement/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出劳资专管员
|
|||
export function exportLaborManagement(query) { |
|||
return request({ |
|||
url: '/build/laborManagement/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询劳资专管员列表
|
|||
export function listManagement(query) { |
|||
return request({ |
|||
url: '/build/management/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询劳资专管员详细
|
|||
export function getManagement(id) { |
|||
return request({ |
|||
url: '/build/management/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增劳资专管员
|
|||
export function addManagement(data) { |
|||
return request({ |
|||
url: '/build/management', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改劳资专管员
|
|||
export function updateManagement(data) { |
|||
return request({ |
|||
url: '/build/management', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除劳资专管员
|
|||
export function delManagement(id) { |
|||
return request({ |
|||
url: '/build/management/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出劳资专管员
|
|||
export function exportManagement(query) { |
|||
return request({ |
|||
url: '/build/management/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询项目管理人员列表
|
|||
export function listProjectManagement(query) { |
|||
return request({ |
|||
url: '/build/projectManagement/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询项目管理人员详细
|
|||
export function getProjectManagement(id) { |
|||
return request({ |
|||
url: '/build/projectManagement/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增项目管理人员
|
|||
export function addProjectManagement(data) { |
|||
return request({ |
|||
url: '/build/projectManagement', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改项目管理人员
|
|||
export function updateProjectManagement(data) { |
|||
return request({ |
|||
url: '/build/projectManagement', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除项目管理人员
|
|||
export function delProjectManagement(id) { |
|||
return request({ |
|||
url: '/build/projectManagement/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出项目管理人员
|
|||
export function exportProjectManagement(query) { |
|||
return request({ |
|||
url: '/build/projectManagement/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,53 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 查询工资统计列表
|
|||
export function listSalary(query) { |
|||
return request({ |
|||
url: '/statistics/salary/list', |
|||
method: 'post', |
|||
data: query |
|||
}) |
|||
} |
|||
|
|||
// 查询工资统计详细
|
|||
export function getSalary(id) { |
|||
return request({ |
|||
url: '/statistics/salary/' + id, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 新增工资统计
|
|||
export function addSalary(data) { |
|||
return request({ |
|||
url: '/statistics/salary', |
|||
method: 'post', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 修改工资统计
|
|||
export function updateSalary(data) { |
|||
return request({ |
|||
url: '/statistics/salary', |
|||
method: 'put', |
|||
data: data |
|||
}) |
|||
} |
|||
|
|||
// 删除工资统计
|
|||
export function delSalary(id) { |
|||
return request({ |
|||
url: '/statistics/salary/' + id, |
|||
method: 'delete' |
|||
}) |
|||
} |
|||
|
|||
// 导出工资统计
|
|||
export function exportSalary(query) { |
|||
return request({ |
|||
url: '/statistics/salary/export', |
|||
method: 'get', |
|||
params: query |
|||
}) |
|||
} |
@ -0,0 +1,479 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input |
|||
v-model="queryParams.cv.value" |
|||
placeholder="请输入姓名" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> |
|||
<!-- <el-form-item label="身份证号" prop="idNo"> |
|||
<el-input |
|||
v-model="queryParams.data.idNo" |
|||
placeholder="请输入身份证号" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> --> |
|||
<!-- <el-form-item label="职务" prop="post"> |
|||
<el-select |
|||
v-model="queryParams.data.post" |
|||
placeholder="请选择职务" |
|||
clearable |
|||
size="small" |
|||
@change="handleQuery" |
|||
> |
|||
<el-option |
|||
v-for="dict in postOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
/> |
|||
</el-select> |
|||
</el-form-item> --> |
|||
<el-form-item> |
|||
<!-- <el-button |
|||
type="cyan" |
|||
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" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['build:projectManagement:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['build:projectManagement:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['build:projectManagement:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['build:projectManagement:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> --> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="projectManagementList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" fixed /> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="姓名" |
|||
align="center" |
|||
prop="name" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="手机号码" |
|||
align="center" |
|||
prop="phone" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="身份证号" |
|||
align="center" |
|||
prop="idNo" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="职务" |
|||
align="center" |
|||
prop="post" |
|||
:formatter="postFormat" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['build:projectManagement:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['build:projectManagement: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" |
|||
/> |
|||
|
|||
<!-- 添加或修改项目管理人员对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input v-model="form.name" 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="idNo"> |
|||
<el-input v-model="form.idNo" placeholder="请输入身份证号" /> |
|||
</el-form-item> |
|||
<el-form-item label="职务" prop="post"> |
|||
<el-select |
|||
v-model="form.post" |
|||
placeholder="请选择职务" |
|||
style="width: 100%" |
|||
> |
|||
<el-option |
|||
v-for="dict in postOptions" |
|||
:key="dict.dictValue" |
|||
:label="dict.dictLabel" |
|||
:value="dict.dictValue" |
|||
></el-option> |
|||
</el-select> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listProjectManagement, |
|||
getProjectManagement, |
|||
delProjectManagement, |
|||
addProjectManagement, |
|||
updateProjectManagement, |
|||
exportProjectManagement, |
|||
} from "@/api/build/projectManagement"; |
|||
|
|||
export default { |
|||
name: "ProjectManagement", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 项目管理人员表格数据 |
|||
projectManagementList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 职务字典 |
|||
postOptions: [], |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
post: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
cv: { name: "name", value: "", type: "like" }, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
name: [{ required: true, message: "请输入姓名", trigger: "blur" }], |
|||
phone: [{ required: true, message: "请输入手机号", trigger: "blur" }], |
|||
idNo: [{ required: true, message: "请输入身份证", trigger: "blur" }], |
|||
}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
this.getDicts("project_management_position").then((response) => { |
|||
this.postOptions = response.data; |
|||
}); |
|||
}, |
|||
methods: { |
|||
/** 查询项目管理人员列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proNo = this.proNo; |
|||
this.queryParams.data.proCode = this.proCode; |
|||
listProjectManagement(this.queryParams).then((response) => { |
|||
this.projectManagementList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 职务字典翻译 |
|||
postFormat(row, column) { |
|||
return this.selectDictLabel(this.postOptions, row.post); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
post: null, |
|||
proNo: null, |
|||
prCodeo: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
id: null, |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
post: null, |
|||
proNo: null, |
|||
prCodeo: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
cv: { name: "name", value: "", type: "like" }, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
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 = "添加项目管理人员"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getProjectManagement(id).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改项目管理人员"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updateProjectManagement(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.proNo = this.proNo; |
|||
this.form.proCode = this.proCode; |
|||
addProjectManagement(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delProjectManagement(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportProjectManagement(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
//::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 10vh !important; |
|||
// } |
|||
//} |
|||
</style> |
@ -0,0 +1,469 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input |
|||
v-model="queryParams.cv.value" |
|||
placeholder="请输入姓名" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> |
|||
|
|||
<!-- <el-form-item label="身份证号" prop="idNo"> |
|||
<el-input |
|||
v-model="queryParams.data.idNo" |
|||
placeholder="请输入身份证号" |
|||
clearable |
|||
size="small" |
|||
@keyup.enter.native="handleQuery" |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
slot="append" |
|||
icon="el-icon-search" |
|||
size="small" |
|||
@click="handleQuery" |
|||
></el-button> |
|||
</el-input> |
|||
</el-form-item> --> |
|||
|
|||
<el-form-item> |
|||
<!-- <el-button |
|||
type="cyan" |
|||
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" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['build:laborManagement:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['build:laborManagement:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['build:laborManagement:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<!-- <el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['build:laborManagement:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> --> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table |
|||
v-loading="loading" |
|||
:data="laborManagementList" |
|||
@selection-change="handleSelectionChange" |
|||
> |
|||
<el-table-column type="selection" width="55" align="center" fixed /> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="姓名" |
|||
align="center" |
|||
prop="name" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="手机号码" |
|||
align="center" |
|||
prop="phone" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="身份证号" |
|||
align="center" |
|||
prop="idNo" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="劳资专管员任命文件" |
|||
align="center" |
|||
prop="attachment" |
|||
min-width="120" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<div |
|||
v-for="(item, index) in JSON.parse( |
|||
scope.row.attachment ? scope.row.attachment : JSON.stringify({}) |
|||
)" |
|||
:key="item + index" |
|||
> |
|||
<i class="el-icon-document"></i> |
|||
{{ item.name }} |
|||
<i |
|||
class="el-icon-download" |
|||
@click="$myDownLoadFile(item)" |
|||
style="cursor: pointer" |
|||
></i> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['build:laborManagement:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['build:laborManagement: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" |
|||
/> |
|||
|
|||
<!-- 添加或修改劳资专管员对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="姓名" prop="name"> |
|||
<el-input v-model="form.name" 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="idNo"> |
|||
<el-input v-model="form.idNo" placeholder="请输入身份证号" /> |
|||
</el-form-item> |
|||
<el-form-item label="劳资专管员任命文件" prop="attachment"> |
|||
<MyUpload :fileList="fileList" /> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listLaborManagement, |
|||
getLaborManagement, |
|||
delLaborManagement, |
|||
addLaborManagement, |
|||
updateLaborManagement, |
|||
exportLaborManagement, |
|||
} from "@/api/build/laborManagement"; |
|||
|
|||
export default { |
|||
name: "LaborManagement", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 劳资专管员表格数据 |
|||
laborManagementList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
attachment: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
cv: { name: "name", value: "", type: "like" }, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: { |
|||
name: [{ required: true, message: "请输入姓名", trigger: "blur" }], |
|||
phone: [{ required: true, message: "请输入手机号", trigger: "blur" }], |
|||
idNo: [{ required: true, message: "请输入身份证", trigger: "blur" }], |
|||
}, |
|||
fileList: [], |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询劳资专管员列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proNo = this.proNo; |
|||
this.queryParams.data.proCode = this.proCode; |
|||
listLaborManagement(this.queryParams).then((response) => { |
|||
this.laborManagementList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.fileList = []; |
|||
this.form = { |
|||
id: null, |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
attachment: null, |
|||
proNo: null, |
|||
proCode: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
id: null, |
|||
name: null, |
|||
phone: null, |
|||
idNo: null, |
|||
attachment: null, |
|||
proNo: null, |
|||
proCode: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
cv: { name: "name", value: "", type: "like" }, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
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 = "添加劳资专管员"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getLaborManagement(id).then((response) => { |
|||
this.form = response.data; |
|||
if (this.form.attachment) { |
|||
this.fileList = JSON.parse(this.form.attachment); |
|||
} |
|||
this.open = true; |
|||
this.title = "修改劳资专管员"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
console.log(2222, this.fileList); |
|||
this.form.attachment = |
|||
this.fileList.length > 0 ? JSON.stringify(this.fileList) : null; |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updateLaborManagement(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
this.form.proNo = this.proNo; |
|||
this.form.proCode = this.proCode; |
|||
addLaborManagement(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delLaborManagement(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportLaborManagement(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
//::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 10vh !important; |
|||
// } |
|||
//} |
|||
</style> |
@ -0,0 +1,3 @@ |
|||
<template> |
|||
<div>333</div> |
|||
</template> |
@ -0,0 +1,428 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<el-form |
|||
:model="queryParams" |
|||
ref="queryForm" |
|||
:inline="true" |
|||
v-show="showSearch" |
|||
> |
|||
<el-form-item label="统计年月" prop="statisticsDate"> |
|||
<el-date-picker |
|||
clearable |
|||
size="small" |
|||
style="width: 200px" |
|||
v-model="queryParams.data.statisticsDate" |
|||
type="month" |
|||
value-format="yyyy-MM" |
|||
placeholder="选择统计年月" |
|||
@change="handleQuery" |
|||
> |
|||
</el-date-picker> |
|||
</el-form-item> |
|||
<el-form-item> |
|||
<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" |
|||
icon="el-icon-plus" |
|||
size="mini" |
|||
@click="handleAdd" |
|||
v-hasPermi="['statistics:salary:add']" |
|||
>新增</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="success" |
|||
icon="el-icon-edit" |
|||
size="mini" |
|||
:disabled="single" |
|||
@click="handleUpdate" |
|||
v-hasPermi="['statistics:salary:edit']" |
|||
>修改</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="danger" |
|||
icon="el-icon-delete" |
|||
size="mini" |
|||
:disabled="multiple" |
|||
@click="handleDelete" |
|||
v-hasPermi="['statistics:salary:remove']" |
|||
>删除</el-button |
|||
> |
|||
</el-col> |
|||
<el-col :span="1.5"> |
|||
<el-button |
|||
type="warning" |
|||
icon="el-icon-download" |
|||
size="mini" |
|||
@click="handleExport" |
|||
v-hasPermi="['statistics:salary:export']" |
|||
>导出</el-button |
|||
> |
|||
</el-col> --> |
|||
<right-toolbar |
|||
:showSearch.sync="showSearch" |
|||
@queryTable="getList" |
|||
></right-toolbar> |
|||
</el-row> |
|||
|
|||
<el-table v-loading="loading" :data="salaryList"> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
width="50" |
|||
align="center" |
|||
fixed |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="统计年月" |
|||
align="center" |
|||
prop="statisticsDate" |
|||
min-width="120" |
|||
/> |
|||
|
|||
<el-table-column |
|||
label="当期应发" |
|||
align="center" |
|||
prop="currentPayable" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="当期实发" |
|||
align="center" |
|||
prop="currentNetPay" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="当期拖欠金额" |
|||
align="center" |
|||
prop="currentArrears" |
|||
min-width="120" |
|||
/> |
|||
<el-table-column |
|||
label="累计拖欠金额" |
|||
align="center" |
|||
prop="cumulativeArrears" |
|||
min-width="120" |
|||
/> |
|||
<!-- <el-table-column |
|||
label="操作" |
|||
align="center" |
|||
class-name="small-padding fixed-width" |
|||
width="180" |
|||
fixed="right" |
|||
> |
|||
<template slot-scope="scope"> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-edit" |
|||
@click="handleUpdate(scope.row)" |
|||
v-hasPermi="['statistics:salary:edit']" |
|||
>修改</el-button |
|||
> |
|||
<el-button |
|||
size="mini" |
|||
type="text" |
|||
icon="el-icon-delete" |
|||
@click="handleDelete(scope.row)" |
|||
v-hasPermi="['statistics:salary: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" |
|||
/> |
|||
|
|||
<!-- 添加或修改工资统计对话框 --> |
|||
<el-dialog |
|||
:title="title" |
|||
:visible.sync="open" |
|||
width="1200px" |
|||
append-to-body |
|||
:close-on-click-modal="false" |
|||
> |
|||
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|||
<el-form-item label="累计拖欠金额" prop="proNo"> |
|||
<el-input v-model="form.proNo" placeholder="请输入累计拖欠金额" /> |
|||
</el-form-item> |
|||
<el-form-item label="累计拖欠金额" prop="proCode"> |
|||
<el-input v-model="form.proCode" placeholder="请输入累计拖欠金额" /> |
|||
</el-form-item> |
|||
<el-form-item label="当期应发" prop="currentPayable"> |
|||
<el-input |
|||
v-model="form.currentPayable" |
|||
placeholder="请输入当期应发" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="当期实发" prop="currentNetPay"> |
|||
<el-input v-model="form.currentNetPay" placeholder="请输入当期实发" /> |
|||
</el-form-item> |
|||
<el-form-item label="当期拖欠金额" prop="currentArrears"> |
|||
<el-input |
|||
v-model="form.currentArrears" |
|||
placeholder="请输入当期拖欠金额" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="累计拖欠金额" prop="cumulativeArrears"> |
|||
<el-input |
|||
v-model="form.cumulativeArrears" |
|||
placeholder="请输入累计拖欠金额" |
|||
/> |
|||
</el-form-item> |
|||
</el-form> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<el-button type="primary" @click="submitForm">确 定</el-button> |
|||
<el-button @click="cancel">取 消</el-button> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { |
|||
listSalary, |
|||
getSalary, |
|||
delSalary, |
|||
addSalary, |
|||
updateSalary, |
|||
exportSalary, |
|||
} from "@/api/build/salary"; |
|||
|
|||
export default { |
|||
name: "Salary", |
|||
props: ["proNo", "proCode"], |
|||
data() { |
|||
return { |
|||
// 遮罩层 |
|||
loading: true, |
|||
// 选中数组 |
|||
ids: [], |
|||
// 非单个禁用 |
|||
single: true, |
|||
// 非多个禁用 |
|||
multiple: true, |
|||
// 显示搜索条件 |
|||
showSearch: true, |
|||
// 总条数 |
|||
total: 0, |
|||
// 工资统计表格数据 |
|||
salaryList: [], |
|||
// 弹出层标题 |
|||
title: "", |
|||
// 是否显示弹出层 |
|||
open: false, |
|||
// 查询参数 |
|||
queryParams: { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
ids: null, |
|||
data: { |
|||
proNo: null, |
|||
proCode: null, |
|||
currentPayable: null, |
|||
currentNetPay: null, |
|||
currentArrears: null, |
|||
cumulativeArrears: null, |
|||
statisticsDate: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}, |
|||
// 表单参数 |
|||
form: {}, |
|||
// 表单校验 |
|||
rules: {}, |
|||
}; |
|||
}, |
|||
created() { |
|||
this.getList(); |
|||
}, |
|||
methods: { |
|||
/** 查询工资统计列表 */ |
|||
getList() { |
|||
this.loading = true; |
|||
this.queryParams.data.proNo = this.proNo; |
|||
this.queryParams.data.proCode = this.proCode; |
|||
listSalary(this.queryParams).then((response) => { |
|||
this.salaryList = response.records; |
|||
this.total = response.total; |
|||
this.loading = false; |
|||
}); |
|||
}, |
|||
// 取消按钮 |
|||
cancel() { |
|||
this.open = false; |
|||
this.reset(); |
|||
}, |
|||
// 表单重置 |
|||
reset() { |
|||
this.form = { |
|||
id: null, |
|||
proNo: null, |
|||
proCode: null, |
|||
currentPayable: null, |
|||
currentNetPay: null, |
|||
currentArrears: null, |
|||
cumulativeArrears: null, |
|||
statisticsDate: null, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
// 查询表单重置 |
|||
resetQueryForm() { |
|||
this.queryParams = { |
|||
pageNum: 1, |
|||
pageSize: 10, |
|||
data: { |
|||
id: null, |
|||
proNo: null, |
|||
proCode: null, |
|||
currentPayable: null, |
|||
currentNetPay: null, |
|||
currentArrears: null, |
|||
cumulativeArrears: null, |
|||
statisticsDate: null, |
|||
}, |
|||
// 排序方式 |
|||
params: { |
|||
// 按哪个字段排序 |
|||
orderBy: "create_time", |
|||
// desc降序,升序asc |
|||
sortBy: "desc", |
|||
}, |
|||
}; |
|||
this.resetForm("form"); |
|||
}, |
|||
/** 搜索按钮操作 */ |
|||
handleQuery() { |
|||
this.queryParams.pageNum = 1; |
|||
this.getList(); |
|||
}, |
|||
/** 重置按钮操作 */ |
|||
resetQuery() { |
|||
this.resetQueryForm(); |
|||
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 = "添加工资统计"; |
|||
}, |
|||
/** 修改按钮操作 */ |
|||
handleUpdate(row) { |
|||
this.reset(); |
|||
const id = row.id || this.ids; |
|||
getSalary(id).then((response) => { |
|||
this.form = response.data; |
|||
this.open = true; |
|||
this.title = "修改工资统计"; |
|||
}); |
|||
}, |
|||
/** 提交按钮 */ |
|||
submitForm() { |
|||
this.$refs["form"].validate((valid) => { |
|||
if (valid) { |
|||
if (this.form.id != null) { |
|||
updateSalary(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("修改成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} else { |
|||
addSalary(this.form).then((response) => { |
|||
if (response.code === 200) { |
|||
this.msgSuccess("新增成功"); |
|||
this.open = false; |
|||
this.getList(); |
|||
} |
|||
}); |
|||
} |
|||
} |
|||
}); |
|||
}, |
|||
/** 删除按钮操作 */ |
|||
handleDelete(row) { |
|||
const ids = row.id || this.ids; |
|||
if (ids) { |
|||
this.$confirm("是否删除选中的数据?", "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return delSalary(ids); |
|||
}) |
|||
.then(() => { |
|||
this.getList(); |
|||
this.msgSuccess("删除成功"); |
|||
}) |
|||
.catch(function () {}); |
|||
} else { |
|||
this.$message.warning("请选择要删除的数据!!"); |
|||
} |
|||
}, |
|||
/** 导出按钮操作 */ |
|||
handleExport() { |
|||
const queryParams = this.queryParams; |
|||
let message = "是否确认导出所有的数据项?"; |
|||
if (this.ids) { |
|||
message = "是否确认导出选中的数据项?"; |
|||
queryParams.ids = this.ids; |
|||
} |
|||
this.$confirm(message, "警告", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}) |
|||
.then(function () { |
|||
return exportSalary(queryParams); |
|||
}) |
|||
.then((response) => { |
|||
this.downloadFile(response, true, response.msg); |
|||
// this.download(response.msg); |
|||
}) |
|||
.catch(function () {}); |
|||
}, |
|||
}, |
|||
}; |
|||
</script> |
|||
<style lang="scss" scoped> |
|||
@import "@/assets/css/dialog.scss"; |
|||
//::v-deep { |
|||
// .el-dialog { |
|||
// margin-top: 10vh !important; |
|||
// } |
|||
//} |
|||
</style> |
Loading…
Reference in new issue