update 稽查流程完善
This commit is contained in:
+5
-16
@@ -59,7 +59,7 @@ import { getFileInfo } from '@/api/api'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getFileByInspectId, getInspectProcessProjectId } from '@api/workCenter'
|
||||
import { getFileByInspectId } from '@api/workCenter'
|
||||
import moment from 'moment/moment'
|
||||
|
||||
const Base64 = require('js-base64').Base64
|
||||
@@ -178,14 +178,8 @@ export default {
|
||||
if (!param.createTime) {
|
||||
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
this.confirmLoading = true
|
||||
getInspectProcessProjectId().then(res => {
|
||||
param.id = res + ''
|
||||
this.$emit('ok', param, this.index)
|
||||
this.form.resetFields()
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
this.$emit('ok', param, this.index)
|
||||
this.form.resetFields()
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -196,13 +190,8 @@ export default {
|
||||
if (!param.createTime) {
|
||||
param.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
getInspectProcessProjectId().then(res => {
|
||||
param.id = res + ''
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
this.$emit('ok', param, this.index)
|
||||
this.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
+17
-4
@@ -122,7 +122,8 @@
|
||||
:label="$t('workCenter.esInspectionProcess.rectificationDirector')"
|
||||
prop="responseUser">
|
||||
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.rectificationDirector')"
|
||||
type="radio" v-model="form.responseUser" :nameStr="form.responseUserDictText"/>
|
||||
@nameChange="nameChangeCallback($event, 'responseUserDictText')"
|
||||
type="radio" v-model="form.responseUser" :nameStr="form.responseUserDictText" />
|
||||
</a-form-model-item>
|
||||
<!-- 计划完成日期 -->
|
||||
<a-form-model-item
|
||||
@@ -148,6 +149,7 @@ import UploadFile from '@comp/UploadFile'
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
import moment from 'moment'
|
||||
import { getInspectProcessProjectId } from '@api/workCenter'
|
||||
import { getDictItemsFromCache } from '@api/api'
|
||||
export default {
|
||||
name: 'InspectionProcessRectificationPlanModal',
|
||||
components: { UserSelection, UploadFile },
|
||||
@@ -229,10 +231,9 @@ export default {
|
||||
this.index = index
|
||||
// 获取章节条款下拉
|
||||
this.initSectionClauseList()
|
||||
const { id, inspectContentId, standardRequire, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {}
|
||||
const { inspectContentId, standardRequire, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {}
|
||||
this.form = Object.assign({}, record, {
|
||||
inspectContentId,
|
||||
inspectReportId: id,
|
||||
standardRequire,
|
||||
executionStatus,
|
||||
attachment,
|
||||
@@ -252,17 +253,25 @@ export default {
|
||||
}
|
||||
// 是否整改isRectify 1是 0否
|
||||
// 判断整改状态rectifyStatus 1整改中 4无需整改
|
||||
const dictList = getDictItemsFromCache('inspect_rectify_status')
|
||||
switch (params.isRectify + '') {
|
||||
case '0':
|
||||
params.rectifyStatus = '4'
|
||||
params.rectifyStatus_dictText = (dictList.find(item => item.value === '4')).text
|
||||
break
|
||||
case '1':
|
||||
params.rectifyStatus = '1'
|
||||
params.rectifyStatus_dictText = (dictList.find(item => item.value === '1')).text
|
||||
break
|
||||
}
|
||||
if (!params.createTime) {
|
||||
params.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
if (params.id) {
|
||||
this.$emit('ok', params, this.index)
|
||||
this.close()
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
getInspectProcessProjectId().then(res => {
|
||||
params.id = res + ''
|
||||
@@ -291,6 +300,10 @@ export default {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
// 选择用户名字修改回调
|
||||
nameChangeCallback (name, field) {
|
||||
this.form[field] = name
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload () {
|
||||
this.$refs.uploadFile.open(this.form.attachment)
|
||||
@@ -346,7 +359,7 @@ export default {
|
||||
const reportList = this.data.enterpriseStandardInspectReportList || []
|
||||
const content = contentList.find(item => item.id === val) || {}
|
||||
const report = reportList.find(item => item.inspectContentId === val) || {}
|
||||
this.form.inspectReportId = report.inspectReportId
|
||||
this.form.inspectReportId = report.id
|
||||
this.form.standardRequire = content.requirement
|
||||
this.form.executionStatus = report.executionStatus
|
||||
this.form.attachment = report.attachment
|
||||
|
||||
+15
-2
@@ -80,6 +80,7 @@
|
||||
<script>
|
||||
import UploadFile from '@comp/UploadFile'
|
||||
import moment from 'moment'
|
||||
import { getInspectProcessProjectId } from '@api/workCenter'
|
||||
export default {
|
||||
name: 'InspectionProcessReportModal',
|
||||
components: { UploadFile },
|
||||
@@ -150,8 +151,20 @@ export default {
|
||||
if (!params.createTime) {
|
||||
params.createTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
}
|
||||
this.$emit('ok', params, this.index)
|
||||
this.close()
|
||||
// 如果有id就直接返回,否则获取一个id
|
||||
if (params.id) {
|
||||
this.$emit('ok', params, this.index)
|
||||
this.close()
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
getInspectProcessProjectId().then(res => {
|
||||
params.id = res + ''
|
||||
this.$emit('ok', params, this.index)
|
||||
this.close()
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user