提交代码
parent
08bf19fc38
commit
5210d86ae1
|
@ -1,6 +1,6 @@
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 查询项目部门在册人员列表
|
// 查询在岗人员列表
|
||||||
export function listProjectDeptWroks(query) {
|
export function listProjectDeptWroks(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectDeptWroks/list',
|
url: '/project/projectDeptWroks/list',
|
||||||
|
@ -25,7 +25,7 @@ export function unitList(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询项目部门在册人员详细
|
// 查询在岗人员详细
|
||||||
export function getProjectDeptWroks(id) {
|
export function getProjectDeptWroks(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectDeptWroks/' + id,
|
url: '/project/projectDeptWroks/' + id,
|
||||||
|
@ -33,7 +33,7 @@ export function getProjectDeptWroks(id) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 新增项目部门在册人员
|
// 新增在岗人员
|
||||||
export function addProjectDeptWroks(data) {
|
export function addProjectDeptWroks(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectDeptWroks',
|
url: '/project/projectDeptWroks',
|
||||||
|
@ -42,7 +42,7 @@ export function addProjectDeptWroks(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 修改项目部门在册人员
|
// 修改在岗人员
|
||||||
export function updateProjectDeptWroks(data) {
|
export function updateProjectDeptWroks(data) {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectDeptWroks',
|
url: '/project/projectDeptWroks',
|
||||||
|
@ -51,7 +51,7 @@ export function updateProjectDeptWroks(data) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 删除项目部门在册人员
|
// 删除在岗人员
|
||||||
export function delProjectDeptWroks(id) {
|
export function delProjectDeptWroks(id) {
|
||||||
return request({
|
return request({
|
||||||
url: '/project/projectDeptWroks/' + id,
|
url: '/project/projectDeptWroks/' + id,
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="项目主键" prop="projectId">
|
<el-form-item label="项目主键" prop="projectId">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.projectId"
|
v-model="queryParams.projectId"
|
||||||
|
@ -18,7 +25,9 @@
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -32,7 +41,8 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['project:projectDeptWroks:add']"
|
v-hasPermi="['project:projectDeptWroks:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -43,7 +53,8 @@
|
||||||
:disabled="single"
|
:disabled="single"
|
||||||
@click="handleUpdate"
|
@click="handleUpdate"
|
||||||
v-hasPermi="['project:projectDeptWroks:edit']"
|
v-hasPermi="['project:projectDeptWroks:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -54,7 +65,8 @@
|
||||||
:disabled="multiple"
|
:disabled="multiple"
|
||||||
@click="handleDelete"
|
@click="handleDelete"
|
||||||
v-hasPermi="['project:projectDeptWroks:remove']"
|
v-hasPermi="['project:projectDeptWroks:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -64,12 +76,17 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleExport"
|
@click="handleExport"
|
||||||
v-hasPermi="['project:projectDeptWroks:export']"
|
v-hasPermi="['project:projectDeptWroks:export']"
|
||||||
>导出</el-button>
|
>导出</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="projectDeptWroksList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
|
v-loading="loading"
|
||||||
|
:data="projectDeptWroksList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键" align="center" prop="id" />
|
<el-table-column label="主键" align="center" prop="id" />
|
||||||
<el-table-column label="项目主键" align="center" prop="projectId" />
|
<el-table-column label="项目主键" align="center" prop="projectId" />
|
||||||
|
@ -86,27 +103,29 @@
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['project:projectDeptWroks:edit']"
|
v-hasPermi="['project:projectDeptWroks:edit']"
|
||||||
>修改</el-button>
|
>修改</el-button
|
||||||
|
>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['project:projectDeptWroks:remove']"
|
v-hasPermi="['project:projectDeptWroks:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目部门在册人员对话框 -->
|
<!-- 添加或修改在岗人员对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<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 ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="项目主键" prop="projectId">
|
<el-form-item label="项目主键" prop="projectId">
|
||||||
|
@ -137,7 +156,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listProjectDeptWroks, getProjectDeptWroks, delProjectDeptWroks, addProjectDeptWroks, updateProjectDeptWroks } from "@/api/project/projectDeptWroks";
|
import {
|
||||||
|
listProjectDeptWroks,
|
||||||
|
getProjectDeptWroks,
|
||||||
|
delProjectDeptWroks,
|
||||||
|
addProjectDeptWroks,
|
||||||
|
updateProjectDeptWroks,
|
||||||
|
} from "@/api/project/projectDeptWroks";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ProjectDeptWroks",
|
name: "ProjectDeptWroks",
|
||||||
|
@ -155,7 +180,7 @@ export default {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 项目部门在册人员表格数据
|
// 在岗人员表格数据
|
||||||
projectDeptWroksList: [],
|
projectDeptWroksList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
|
@ -172,23 +197,19 @@ export default {
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
projectId: [
|
projectId: [{ required: true, message: "项目主键不能为空", trigger: "blur" }],
|
||||||
{ required: true, message: "项目主键不能为空", trigger: "blur" }
|
deptId: [{ required: true, message: "部门主键不能为空", trigger: "blur" }],
|
||||||
],
|
},
|
||||||
deptId: [
|
|
||||||
{ required: true, message: "部门主键不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询项目部门在册人员列表 */
|
/** 查询在岗人员列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listProjectDeptWroks(this.queryParams).then(response => {
|
listProjectDeptWroks(this.queryParams).then((response) => {
|
||||||
this.projectDeptWroksList = response.rows;
|
this.projectDeptWroksList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -212,7 +233,7 @@ export default {
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
remark: null
|
remark: null,
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
|
@ -228,38 +249,38 @@ export default {
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map((item) => item.id);
|
||||||
this.single = selection.length!==1
|
this.single = selection.length !== 1;
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length;
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加项目部门在册人员";
|
this.title = "添加在岗人员";
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids;
|
||||||
getProjectDeptWroks(id).then(response => {
|
getProjectDeptWroks(id).then((response) => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目部门在册人员";
|
this.title = "修改在岗人员";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateProjectDeptWroks(this.form).then(response => {
|
updateProjectDeptWroks(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addProjectDeptWroks(this.form).then(response => {
|
addProjectDeptWroks(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -271,19 +292,27 @@ export default {
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除项目部门在册人员编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal
|
||||||
|
.confirm('是否确认删除在岗人员编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
return delProjectDeptWroks(ids);
|
return delProjectDeptWroks(ids);
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
}).catch(() => {});
|
})
|
||||||
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
this.download('project/projectDeptWroks/export', {
|
this.download(
|
||||||
...this.queryParams
|
"project/projectDeptWroks/export",
|
||||||
}, `projectDeptWroks_${new Date().getTime()}.xlsx`)
|
{
|
||||||
}
|
...this.queryParams,
|
||||||
}
|
},
|
||||||
|
`projectDeptWroks_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -416,7 +416,7 @@
|
||||||
command="handleProjectDeptWroks"
|
command="handleProjectDeptWroks"
|
||||||
icon="el-icon-s-custom"
|
icon="el-icon-s-custom"
|
||||||
v-hasPermi="['project:projectDeptWroks:list']"
|
v-hasPermi="['project:projectDeptWroks:list']"
|
||||||
>在册人员管理</el-dropdown-item
|
>在岗人员管理</el-dropdown-item
|
||||||
>
|
>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
command="handleProjectAttendance"
|
command="handleProjectAttendance"
|
||||||
|
|
|
@ -202,6 +202,11 @@
|
||||||
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
|
<dict-tag :options="dict.type.sys_common_isdel" :value="scope.row.isDel" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="办理时间" align="center" prop="createTime" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -244,13 +249,15 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改项目保险对话框 -->
|
<!-- 添加或修改项目保险对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="680px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="部门主键" prop="deptId">
|
|
||||||
<el-input v-model="form.deptId" placeholder="请输入部门主键" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="保险类型" prop="insuranceType">
|
<el-form-item label="保险类型" prop="insuranceType">
|
||||||
<el-select v-model="form.insuranceType" placeholder="请选择保险类型">
|
<el-select
|
||||||
|
v-model="form.insuranceType"
|
||||||
|
placeholder="请选择保险类型"
|
||||||
|
:disabled="form.id != null"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.sur_project_insurance_type"
|
v-for="dict in dict.type.sur_project_insurance_type"
|
||||||
:key="dict.value"
|
:key="dict.value"
|
||||||
|
@ -259,41 +266,15 @@
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="保险公司" prop="companyName">
|
||||||
|
<el-input v-model="form.companyName" placeholder="请输入保险公司" />
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="保保单号" prop="insuranceNumber">
|
<el-form-item label="保保单号" prop="insuranceNumber">
|
||||||
<el-input v-model="form.insuranceNumber" placeholder="请输入保保单号" />
|
<el-input v-model="form.insuranceNumber" placeholder="请输入保保单号" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险合同" prop="insuranceFile">
|
<el-form-item label="保险合同" prop="insuranceFile">
|
||||||
<file-upload v-model="form.insuranceFile" />
|
<file-upload v-model="form.insuranceFile" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险状态" prop="insuranceState">
|
|
||||||
<el-input v-model="form.insuranceState" placeholder="请输入保险状态" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="保险生效时间" prop="beginDate">
|
|
||||||
<el-date-picker
|
|
||||||
clearable
|
|
||||||
v-model="form.beginDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择保险生效时间"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="保险截至时间" prop="endDate">
|
|
||||||
<el-date-picker
|
|
||||||
clearable
|
|
||||||
v-model="form.endDate"
|
|
||||||
type="date"
|
|
||||||
value-format="yyyy-MM-dd"
|
|
||||||
placeholder="请选择保险截至时间"
|
|
||||||
>
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="保险公司" prop="companyName">
|
|
||||||
<el-input v-model="form.companyName" placeholder="请输入保险公司" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="数据状态" prop="isDel">
|
|
||||||
<el-input v-model="form.isDel" placeholder="请输入数据状态" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="备注" prop="remark">
|
<el-form-item label="备注" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -369,6 +350,7 @@ export default {
|
||||||
insuranceNumber: [
|
insuranceNumber: [
|
||||||
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
insuranceFile: [{ required: true, message: "请上传保险合同", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
<el-table-column label="保险单号" align="center" prop="insuranceNumber" />
|
<el-table-column label="保险单号" align="center" prop="insuranceNumber" />
|
||||||
<el-table-column label="办理时间" align="center" prop="createTime" width="180">
|
<el-table-column label="办理时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.endDate, "{y}-{m}-{d} {H}:{i}") }}</span>
|
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d} {h}:{i}") }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -120,6 +120,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="保险类型" prop="insuranceType">
|
<el-form-item label="保险类型" prop="insuranceType">
|
||||||
<el-select
|
<el-select
|
||||||
|
:disabled="form.id != null"
|
||||||
v-model="form.insuranceType"
|
v-model="form.insuranceType"
|
||||||
placeholder="请选择保险类型"
|
placeholder="请选择保险类型"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@ -187,6 +188,7 @@ export default {
|
||||||
insuranceNumber: [
|
insuranceNumber: [
|
||||||
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
{ required: true, message: "请输入保险单编号", trigger: "blur" },
|
||||||
],
|
],
|
||||||
|
insuranceFile: [{ required: true, message: "请上传保险合同", trigger: "blur" }],
|
||||||
},
|
},
|
||||||
surProjectInsuranceList: [],
|
surProjectInsuranceList: [],
|
||||||
activeName: "",
|
activeName: "",
|
||||||
|
@ -320,15 +322,15 @@ export default {
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getSurProjectInsurance(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
this.form.projectName = this.project.projectName;
|
this.form.projectName = this.project.projectName;
|
||||||
this.nodes.forEach((item) => {
|
this.nodes.forEach((item) => {
|
||||||
if (item.unitId == this.activeName) {
|
if (item.unitId == this.activeName) {
|
||||||
this.form.deptName = item.unitName;
|
this.form.deptName = item.unitName;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
const id = row.id || this.ids;
|
|
||||||
getSurProjectInsurance(id).then((response) => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改项目保险";
|
this.title = "修改项目保险";
|
||||||
});
|
});
|
||||||
|
@ -355,12 +357,16 @@ export default {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addSurProjectInsurance(this.form).then((response) => {
|
addSurProjectInsurance(this.form).then((response) => {
|
||||||
if (response.code == 200) {
|
if (
|
||||||
|
response.code == 200 &&
|
||||||
|
response.data &&
|
||||||
|
response.data.resultCode == "-1"
|
||||||
|
) {
|
||||||
|
this.$message.error("当前项目单位已办理该保险,请勿重复办理!!");
|
||||||
|
} else {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
} else {
|
|
||||||
this.$message.error("当前项目单位已办理该保险,请勿重复办理!!");
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.yanzhu.jh.project.controller;
|
package com.yanzhu.jh.project.controller;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
|
@ -103,7 +105,14 @@ public class SurProjectInsuranceController extends BaseController
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SurProjectInsurance surProjectInsurance)
|
public AjaxResult add(@RequestBody SurProjectInsurance surProjectInsurance)
|
||||||
{
|
{
|
||||||
return toAjax(surProjectInsuranceService.insertSurProjectInsurance(surProjectInsurance));
|
int res = surProjectInsuranceService.insertSurProjectInsurance(surProjectInsurance);
|
||||||
|
if(res<0){
|
||||||
|
Map<String,Object> data = new HashMap<>();
|
||||||
|
data.put("resultCode",res);
|
||||||
|
return success(data);
|
||||||
|
}else{
|
||||||
|
return toAjax(res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -76,4 +76,12 @@ public interface SurProjectInsuranceMapper
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSurProjectInsuranceByIds(Long[] ids);
|
public int deleteSurProjectInsuranceByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询保险是否已办理
|
||||||
|
*
|
||||||
|
* @param surProjectInsurance 查询条件
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int findInsuranceByParams(SurProjectInsurance surProjectInsurance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,13 +88,8 @@ public class SurProjectInsuranceServiceImpl implements ISurProjectInsuranceServi
|
||||||
surProjectInsurance.setIsDel(PublicStateEnum.OK.getCode());
|
surProjectInsurance.setIsDel(PublicStateEnum.OK.getCode());
|
||||||
int res = -1;
|
int res = -1;
|
||||||
//效验保险是否已办理
|
//效验保险是否已办理
|
||||||
SurProjectInsurance _search = new SurProjectInsurance();
|
int total = surProjectInsuranceMapper.findInsuranceByParams(surProjectInsurance);
|
||||||
_search.setIsDel(surProjectInsurance.getIsDel());
|
if(total>0){
|
||||||
_search.setInsuranceType(surProjectInsurance.getInsuranceType());
|
|
||||||
_search.setProjectId(surProjectInsurance.getProjectId());
|
|
||||||
_search.setDeptId(surProjectInsurance.getDeptId());
|
|
||||||
List<SurProjectInsurance> list = surProjectInsuranceMapper.selectSurProjectInsuranceList(_search);
|
|
||||||
if(list!=null && list.size()>0){
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
return surProjectInsuranceMapper.insertSurProjectInsurance(surProjectInsurance);
|
return surProjectInsuranceMapper.insertSurProjectInsurance(surProjectInsurance);
|
||||||
|
|
|
@ -61,19 +61,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<select id="selectBgscreenDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
|
<select id="selectBgscreenDeptWroksList" parameterType="SurProjectDeptWroks" resultMap="SurProjectDeptWroksResult">
|
||||||
SELECT
|
SELECT
|
||||||
<if test="projectId != null ">spdw.project_id,</if>
|
<if test="projectId != null ">spdw.project_id,</if>
|
||||||
<if test="deptId != null and projectId == null ">spdw.dept_id,</if>
|
<if test="deptId != null and projectId == null ">sp.deptId as dept_id,</if>
|
||||||
SUM(spdw.service_personnel) AS service_personnel,
|
SUM(spdw.service_personnel) AS service_personnel,
|
||||||
SUM(spdw.supervisor_personnel) AS supervisor_personnel,
|
SUM(spdw.supervisor_personnel) AS supervisor_personnel,
|
||||||
SUM(spdw.contractor_personnel) AS contractor_personnel
|
SUM(spdw.contractor_personnel) AS contractor_personnel
|
||||||
FROM
|
FROM
|
||||||
sur_project_dept_wroks spdw
|
sur_project_dept_wroks spdw
|
||||||
|
left join sur_project sp on spdw.project_id=sp.id
|
||||||
<where>
|
<where>
|
||||||
and spdw.is_del=0
|
and spdw.is_del=0
|
||||||
<if test="projectId != null "> and spdw.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spdw.project_id = #{projectId}</if>
|
||||||
<if test="deptId != null "> and spdw.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and sp.deptId = #{deptId}</if>
|
||||||
</where>
|
</where>
|
||||||
<if test="projectId != null "> group by spdw.project_id</if>
|
<if test="projectId != null "> group by spdw.project_id</if>
|
||||||
<if test="deptId != null and projectId == null"> group by spdw.dept_id</if>
|
<if test="deptId != null and projectId == null"> group by sp.deptId</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSurProjectDeptWroksById" parameterType="Long" resultMap="SurProjectDeptWroksResult">
|
<select id="selectSurProjectDeptWroksById" parameterType="Long" resultMap="SurProjectDeptWroksResult">
|
||||||
|
|
|
@ -225,4 +225,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<select id="findInsuranceByParams" parameterType="SurProjectInsurance" resultType="int">
|
||||||
|
select count(1) as total from sur_project_insurance where is_del=0 and project_id = #{projectId} and dept_id = #{deptId} and insurance_type = #{insuranceType}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
|
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deptId != null "> and spwa.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and spwa.dept_id = #{deptId}</if>
|
||||||
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
<if test="deptName != null and deptName != ''"> and d.dept_name like concat('%', #{deptName}, '%')</if>
|
||||||
<if test="params.beginWorkDate != null and params.beginWorkDate != '' and params.endWorkDate != null and params.endWorkDate != ''"> and spwa.work_date between #{params.beginWorkDate} and #{params.endWorkDate}</if>
|
<if test="params.beginWorkDate != null and params.beginWorkDate != '' and params.endWorkDate != null and params.endWorkDate != ''"> and spwa.work_date between #{params.beginWorkDate} and #{params.endWorkDate}</if>
|
||||||
<if test="workDate != null"> and DATE_FORMAT(spwa.work_date,'%Y-%m-%d')=DATE_FORMAT(#{workDate},'%Y-%m-%d')</if>
|
<if test="workDate != null"> and date(spwa.work_date)=date(#{workDate})</if>
|
||||||
<!-- 查询条件-项目部门 -->
|
<!-- 查询条件-项目部门 -->
|
||||||
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
<if test="projectDeptId != null "> and sp.deptId = #{projectDeptId}</if>
|
||||||
<!--子部门数据-->
|
<!--子部门数据-->
|
||||||
|
|
|
@ -59,8 +59,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
<!--监理单位/总包公司/分包单位查询当前关联数据-->
|
||||||
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
<if test='nowRole == "5" or nowRole == "6" or nowRole == "7"'> and sp.id in (select DISTINCT spui.projectId from sur_project_unit_info spui where spui.unitId = #{nowDept})</if>
|
||||||
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
<if test='nowRole == "99"'> and sp.id in (select DISTINCT spu.project_id from sur_project_userinfo spu where spu.user_id = #{nowUser} and spu.is_del=0)</if>
|
||||||
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())</if>
|
<if test='activeName == "wgq"'> and date(spwp.credential_expiration_time) <![CDATA[ > ]]> date(NOW())</if>
|
||||||
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())</if>
|
<if test='activeName == "ygq"'> and date(spwp.credential_expiration_time) <![CDATA[ <= ]]> date(NOW())</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sur_project sp on sp.id = spwp.project_id
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
<where>
|
<where>
|
||||||
and spwp.is_del=0
|
and spwp.is_del=0
|
||||||
and date(spwp.credential_expiration_time) <![CDATA[ < ]]> date(NOW())
|
and date(spwp.credential_expiration_time) <![CDATA[ <= ]]> date(NOW())
|
||||||
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||||
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||||
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||||
|
@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sur_project sp on sp.id = spwp.project_id
|
left join sur_project sp on sp.id = spwp.project_id
|
||||||
<where>
|
<where>
|
||||||
and spwp.is_del=0
|
and spwp.is_del=0
|
||||||
and date(spwp.credential_expiration_time) <![CDATA[ >= ]]> date(NOW())
|
and date(spwp.credential_expiration_time) <![CDATA[ > ]]> date(NOW())
|
||||||
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
<if test="projectId != null "> and spwp.project_id = #{projectId}</if>
|
||||||
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
<if test="deptId != null "> and spwp.dept_id = #{deptId}</if>
|
||||||
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and spwp.name like concat('%', #{name}, '%')</if>
|
||||||
|
|
Loading…
Reference in New Issue