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