flx:安全/质量 新增违章人员

This commit is contained in:
Rain 2024-08-10 19:08:17 +08:00
parent 805996f577
commit 2bd0fe61e0
2 changed files with 106 additions and 4 deletions

View File

@ -774,6 +774,10 @@
item.status == 2 ? '合格' : '不合格'
}}</span>
</p>
<p class="grid-content" v-if="item.type == 1 && item.violatorId">
<span class="label">违章人员</span
><span class="value">{{ personList.find(ele => ele.id == item.violatorId).workerName }}</span>
</p>
<p class="grid-content" v-if="item.status == 1">
<span class="label">驳回说明</span
><span class="value">{{ item.additionalRemarks }}</span>
@ -855,6 +859,38 @@
</div>
</el-col>
</el-row>
<el-row :gutter="20" v-if="detailData.status == 2">
<el-col :span="24">
<div class="grid-content">
<span
class="label"
style="line-height: 30px; width: 90px"
>
<span style="color: red">*&nbsp;</span>违章人员</span
>
<span
class="value"
style="width: calc(100% - 90px); margin-left: 0px"
>
<el-select
v-model="replyData.violatorId"
filterable
size="mini"
placeholder="请选择"
>
<el-option
v-for="item in personList"
:key="item.id"
:label="item.workerName"
:value="item.id"
>
</el-option>
</el-select>
</span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content">
@ -984,7 +1020,7 @@ import {
selectRectifyRecordListApi,
addQualityRectifyRecordApi
} from '@/assets/js/api/quality.js'
import { getProjectChilderSystemUserListApi } from '@/assets/js/api/configManage.js'
import { getProjectChilderSystemUserListApi, getLaborManagementInfoListApi } from '@/assets/js/api/configManage.js'
import { VueCropper } from 'vue-cropper'
import {
getSubdivisionProjectApi //
@ -1004,7 +1040,9 @@ export default {
fileUrl: '',
additionalRemarks: '',
qualityId: '',
violatorId: "",
},//
personList: [],
dialogDetil: false,
detailData: {},
fileListRectification: [],
@ -1175,6 +1213,14 @@ export default {
},
mounted() { },
methods: {
//
loadPersonList(sn) {
getLaborManagementInfoListApi({
projectSn: sn,
}).then((res) => {
this.personList = res.result;
});
},
//
closeBtn() {
this.isShow = false
@ -1207,8 +1253,10 @@ export default {
rectifyTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
fileUrl: '',
additionalRemarks: '',
violatorId: "",
}
this.fileListRectification = []
this.loadPersonList(item.projectSn);
},
//
rectifAdd(valId, statusType, type) {
@ -1255,7 +1303,10 @@ export default {
this.$message.error('请选择整改时间')
return;
}
if (this.replyData.violatorId == "" && type == 1 && statusType == 2) {
this.$message.error("请选择违章人员");
return;
}
this.replyData.qualityId = valId
this.replyData.createUser = this.userIdInfo
console.log('整改提交的表单数据:::', this.replyData);

View File

@ -773,6 +773,10 @@
><span class="value">{{
item.status == 2 ? '合格' : '不合格'
}}</span>
</p>
<p class="grid-content" v-if="item.type == 1 && item.violatorId">
<span class="label">违章人员</span
><span class="value">{{ personList.find(ele => ele.id == item.violatorId).workerName }}</span>
</p>
<p class="grid-content" v-if="item.status == 1">
<span class="label">驳回说明</span
@ -855,6 +859,38 @@
</div>
</el-col>
</el-row>
<el-row :gutter="20" v-if="detailData.status == 2">
<el-col :span="24">
<div class="grid-content">
<span
class="label"
style="line-height: 30px; width: 90px"
>
<span style="color: red">*&nbsp;</span>违章人员</span
>
<span
class="value"
style="width: calc(100% - 90px); margin-left: 0px"
>
<el-select
v-model="replyData.violatorId"
filterable
size="mini"
placeholder="请选择"
>
<el-option
v-for="item in personList"
:key="item.id"
:label="item.workerName"
:value="item.id"
>
</el-option>
</el-select>
</span>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<div class="grid-content">
@ -984,7 +1020,7 @@ import {
selectSafeRectifyRecordListApi,
addSafeQualityRectifyRecordApi
} from '@/assets/js/api/quality.js'
import { getProjectChilderSystemUserListApi } from '@/assets/js/api/configManage.js'
import { getProjectChilderSystemUserListApi, getLaborManagementInfoListApi } from '@/assets/js/api/configManage.js'
import { VueCropper } from 'vue-cropper'
import {
getSubdivisionProjectApi //
@ -1004,7 +1040,9 @@ export default {
fileUrl: '',
additionalRemarks: '',
qualityId: '',
violatorId: "",
},//
personList: [],
dialogDetil: false,
detailData: {},
fileListRectification: [],
@ -1175,6 +1213,14 @@ export default {
},
mounted() { },
methods: {
//
loadPersonList(sn) {
getLaborManagementInfoListApi({
projectSn: sn,
}).then((res) => {
this.personList = res.result;
});
},
//
closeBtn() {
this.isShow = false
@ -1207,8 +1253,10 @@ export default {
rectifyTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
fileUrl: '',
additionalRemarks: '',
violatorId: "",
}
this.fileListRectification = []
this.loadPersonList(item.projectSn);
},
//
rectifAdd(valId, statusType, type) {
@ -1255,7 +1303,10 @@ export default {
this.$message.error('请选择整改时间')
return;
}
if (this.replyData.violatorId == "" && type == 1 && statusType == 2) {
this.$message.error("请选择违章人员");
return;
}
this.replyData.qualityId = valId
this.replyData.createUser = this.userIdInfo
console.log('整改提交的表单数据:::', this.replyData);