update 稽查流程完善

This commit is contained in:
danshihao
2024-01-07 12:25:56 +08:00
parent 34f4afc43d
commit 9dd5474d8d
2 changed files with 30 additions and 11 deletions
@@ -59,7 +59,7 @@ import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf' import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getFileByInspectId } from '@api/workCenter' import { getFileByInspectId, getInspectProcessProjectId } from '@api/workCenter'
import moment from 'moment/moment' import moment from 'moment/moment'
const Base64 = require('js-base64').Base64 const Base64 = require('js-base64').Base64
@@ -178,8 +178,14 @@ export default {
if (!param.createTime) { if (!param.createTime) {
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss') param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
} }
this.$emit('ok', param, this.index) this.confirmLoading = true
this.form.resetFields() getInspectProcessProjectId().then(res => {
param.id = res + ''
this.$emit('ok', param, this.index)
this.form.resetFields()
}).finally(() => {
this.confirmLoading = false
})
} }
}) })
}, },
@@ -190,8 +196,13 @@ export default {
if (!param.createTime) { if (!param.createTime) {
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss') param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
} }
this.$emit('ok', param, this.index) getInspectProcessProjectId().then(res => {
this.close() param.id = res + ''
this.$emit('ok', param, this.index)
this.close()
}).finally(() => {
this.confirmLoading = false
})
} }
}) })
} }
@@ -147,6 +147,7 @@
import UploadFile from '@comp/UploadFile' import UploadFile from '@comp/UploadFile'
import UserSelection from '@comp/selection/UserSelection' import UserSelection from '@comp/selection/UserSelection'
import moment from 'moment' import moment from 'moment'
import { getInspectProcessProjectId } from '@api/workCenter'
export default { export default {
name: 'InspectionProcessRectificationPlanModal', name: 'InspectionProcessRectificationPlanModal',
components: { UserSelection, UploadFile }, components: { UserSelection, UploadFile },
@@ -228,9 +229,10 @@ export default {
this.index = index this.index = index
// 获取章节条款下拉 // 获取章节条款下拉
this.initSectionClauseList() this.initSectionClauseList()
const { standardRequire, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {} const { id, inspectContentId, standardRequire, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {}
this.form = Object.assign({}, record, { this.form = Object.assign({}, record, {
// inspectContentId, inspectContentId,
inspectReportId: id,
standardRequire, standardRequire,
executionStatus, executionStatus,
attachment, attachment,
@@ -261,8 +263,14 @@ export default {
if (!params.createTime) { if (!params.createTime) {
params.createTime = moment().format('YYYY-MM-DD HH:mm:ss') params.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
} }
this.$emit('ok', params, this.index) this.confirmLoading = true
this.close() getInspectProcessProjectId().then(res => {
params.id = res + ''
this.$emit('ok', params, this.index)
this.close()
}).finally(() => {
this.confirmLoading = false
})
} else { } else {
return false return false
} }
@@ -338,14 +346,14 @@ export default {
const reportList = this.data.enterpriseStandardInspectReportList || [] const reportList = this.data.enterpriseStandardInspectReportList || []
const content = contentList.find(item => item.id === val) || {} const content = contentList.find(item => item.id === val) || {}
const report = reportList.find(item => item.inspectContentId === val) || {} const report = reportList.find(item => item.inspectContentId === val) || {}
// this.form.inspectReportId = report.inspectReportId this.form.inspectReportId = report.inspectReportId
this.form.standardRequire = content.requirement this.form.standardRequire = content.requirement
this.form.executionStatus = report.executionStatus this.form.executionStatus = report.executionStatus
this.form.attachment = report.attachment this.form.attachment = report.attachment
this.form.evaluateScore = report.evaluateScore this.form.evaluateScore = report.evaluateScore
this.form.enterpriseStandardInspectReport = report this.form.enterpriseStandardInspectReport = report
} else { } else {
// this.form.inspectReportId = undefined this.form.inspectReportId = undefined
this.form.standardRequire = undefined this.form.standardRequire = undefined
this.form.executionStatus = undefined this.form.executionStatus = undefined
this.form.attachment = undefined this.form.attachment = undefined