update 企标稽查整改完善
This commit is contained in:
+19
-1
@@ -282,6 +282,18 @@ const addInspectExtensionTable = (params) => postAction('/esinspectdelayapply/pr
|
||||
// 延期申请流程表-编辑
|
||||
const editInspectExtensionTable = (params) => postAction('/esinspectdelayapply/processEsInspectDelayApply/edit', params)
|
||||
|
||||
/* 企标稽查整改 */
|
||||
// 详情信息
|
||||
const getInspectRectifyDetail = (params) => getAction('/process/esInspectRectifyFlow/queryDetailByProjectId', params)
|
||||
// 审批
|
||||
const approvalInspectRectify = (params) => postAction('/process/esInspectRectifyFlow/flowApproval', params)
|
||||
// 转办
|
||||
const transferInspectRectify = (params) => getAction('/process/esInspectRectifyFlow/flowTransfer', params)
|
||||
// 保存
|
||||
const saveInspectRectify = (params) => postAction('/process/esInspectRectifyFlow/flowSave', params)
|
||||
// 企标稽查整改业务数据
|
||||
const getInspectRectifyDataById = (params) => getAction('/esinspectreport/processEsInspectRectify/queryByProjectId', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
|
||||
@@ -423,5 +435,11 @@ export {
|
||||
transferInspectExtension,
|
||||
saveInspectExtension,
|
||||
addInspectExtensionTable,
|
||||
editInspectExtensionTable
|
||||
editInspectExtensionTable,
|
||||
|
||||
getInspectRectifyDetail,
|
||||
approvalInspectRectify,
|
||||
transferInspectRectify,
|
||||
saveInspectRectify,
|
||||
getInspectRectifyDataById
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ export const ProcessKey = {
|
||||
// 稽查延期申请流程
|
||||
INSPECTION_EXTENSION_REQUEST_PROCESS: { text: 'inspect_delay_apply_process', value: 'inspect_delay_apply_process' },
|
||||
// 企标稽查整改
|
||||
ES_INSPECTION_RECTIFICATION: { text: 'inspect_plan', value: 'inspect_process' }
|
||||
ES_INSPECTION_RECTIFICATION: { text: 'inspect_rectify', value: 'inspect_rectify' }
|
||||
}
|
||||
|
||||
// 标准性质
|
||||
@@ -285,9 +285,9 @@ export const InspectionExtensionRequestProcess = new EsEnums({
|
||||
|
||||
// 企标稽查整改
|
||||
export const EsInspectionRectification = new EsEnums({
|
||||
uploadRectificationResult: { text: '整改负责人上传整改结果', value: '1', btn: 7 },
|
||||
directorLeaderApproval: { text: '负责人主管级领导审批', value: '2', btn: 27 },
|
||||
directorToExamine: { text: '稽查负责人审核', value: '3', btn: 6 }
|
||||
uploadRectificationResult: { text: '整改负责人上传整改结果', value: 'responsible_start', btn: 7 },
|
||||
directorLeaderApproval: { text: '负责人主管级领导审批', value: 'leader_approval', btn: 27 },
|
||||
directorToExamine: { text: '稽查负责人审核', value: 'responsible_approval', btn: 6 }
|
||||
})
|
||||
|
||||
// 项目评估结果类型
|
||||
|
||||
+5
@@ -479,6 +479,11 @@ export default {
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.loading) return
|
||||
// 驳回需要填写备注
|
||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
|
||||
+7
-6
@@ -108,7 +108,7 @@ import ProcessDetailList from '@comp/ProcessDetailList'
|
||||
import InspectionProcessTable
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import { EsInspectionPlan, EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import {
|
||||
approvalInspectProcess,
|
||||
@@ -196,7 +196,7 @@ export default {
|
||||
this.projectId = projectId
|
||||
this.btn = EsInspectionProcess.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionPlan.keyOfValue(nodeId)) {
|
||||
if (nodeId && !EsInspectionProcess.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
@@ -240,7 +240,6 @@ export default {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
const processAll = data.processAll || {}
|
||||
const map = data.map || {}
|
||||
const processApprovalRecord = data.processApprovalRecord || {}
|
||||
this.info = data
|
||||
// 页面回显
|
||||
@@ -249,9 +248,6 @@ export default {
|
||||
dueTime: processAll.dueTime,
|
||||
prcMes: processAll.prcMes
|
||||
})
|
||||
this.countersignForm && this.countersignForm.setFieldsValue({
|
||||
pass: this.convertPass(map.pass)
|
||||
})
|
||||
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||
commitText: processApprovalRecord.commitText,
|
||||
commitFile: processApprovalRecord.commitFile
|
||||
@@ -433,6 +429,11 @@ export default {
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.loading) return
|
||||
// 驳回需要填写备注
|
||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
|
||||
+2
-1
@@ -176,7 +176,8 @@ export default {
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.attachment = attIdList.join(',')
|
||||
this.$set(this.form, 'attachment', attIdList.join(','))
|
||||
// this.form.attachment = attIdList.join(',')
|
||||
},
|
||||
// 正则替换小数点
|
||||
limitNumber (value) {
|
||||
|
||||
+56
-55
@@ -76,7 +76,7 @@
|
||||
</div>
|
||||
<!-- 人员信息 -->
|
||||
<div v-show="switchValue === 'user'" class="detail-page-scroll-content p-0">
|
||||
<process-detail-list>
|
||||
<process-detail-list :process-key="processKey">
|
||||
<template #personnelInfo>
|
||||
<personnel-info ref="personnelInfo" :data="personnelInfoData" :current-node="currentNodeName" />
|
||||
</template>
|
||||
@@ -108,7 +108,10 @@ import PersonnelInfo from '@comp/PersonnelInfo'
|
||||
import BaseInfoForm from '@views/workCenter/enterpriseStandardInspectionRectification/modules/BaseInfoForm'
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { getInspectPlanDetail, getInspectPlanProjectId } from '@api/workCenter'
|
||||
import {
|
||||
approvalInspectRectify, getInspectRectifyDataById,
|
||||
getInspectRectifyDetail, saveInspectRectify, transferInspectRectify
|
||||
} from '@api/workCenter'
|
||||
import { EsInspectionRectification, ProcessKey } from '@/enums/commonEnums'
|
||||
|
||||
export default {
|
||||
@@ -136,9 +139,12 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
},
|
||||
// 流程key
|
||||
processKey: ProcessKey.ES_INSPECTION_RECTIFICATION.value,
|
||||
// 当前流程信息
|
||||
EsInspectionRectification,
|
||||
info: {},
|
||||
formInfo: {},
|
||||
currentNode: '',
|
||||
currentNodeName: '',
|
||||
// 项目id
|
||||
@@ -175,7 +181,7 @@ export default {
|
||||
},
|
||||
// 节点标题
|
||||
nodeTitle () {
|
||||
return this.$route.query.taskName || EsInspectionRectification.initiate.text
|
||||
return this.$route.query.taskName || EsInspectionRectification.uploadRectificationResult.text
|
||||
},
|
||||
processDisabled () {
|
||||
return this.currentNode !== EsInspectionRectification.uploadRectificationResult.value
|
||||
@@ -184,52 +190,45 @@ export default {
|
||||
created () {
|
||||
const { projectId, nodeId, taskName } = this.$route.query
|
||||
// 发起、草稿进来没有nodeId,就默认发起节点
|
||||
this.currentNode = nodeId || EsInspectionRectification.initiate.value
|
||||
this.currentNodeName = taskName || EsInspectionRectification.initiate.text
|
||||
this.currentNode = nodeId || EsInspectionRectification.uploadRectificationResult.value
|
||||
this.currentNodeName = taskName || EsInspectionRectification.uploadRectificationResult.text
|
||||
this.projectId = projectId
|
||||
this.btn = EsInspectionRectification.propertyOfValue('btn', this.currentNode)
|
||||
this.btn = EsInspectionRectification.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionRectification.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(ProcessKey.ES_INSPECTION_RECTIFICATION.value, () => {
|
||||
this.initPersonInfoData(this.currentNode === EsInspectionRectification.initiate.value)
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.currentNode === EsInspectionRectification.uploadRectificationResult.value)
|
||||
})
|
||||
getInspectRectifyDataById({ projectId }).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.formInfo = data
|
||||
this.$refs.baseInfoForm.initData(data)
|
||||
}
|
||||
})
|
||||
// 如果是待办进来,就获取详情数据
|
||||
if (this.$route.query.projectId) {
|
||||
this.loadPage()
|
||||
return
|
||||
}
|
||||
// 如果是新建进来,就获取项目id
|
||||
this.getProjectId()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取项目id
|
||||
*/
|
||||
getProjectId () {
|
||||
this.loading = true
|
||||
// 否则就是创建一个新的流程
|
||||
getInspectPlanProjectId().then(res => {
|
||||
if (res) {
|
||||
this.projectId = res + ''
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 获取页面详情
|
||||
*/
|
||||
loadPage () {
|
||||
const { projectId, taskId } = this.$route.query
|
||||
this.btn = EsInspectionRectification.propertyOfValue('btn', this.currentNode)
|
||||
this.loading = true
|
||||
getInspectPlanDetail({
|
||||
getInspectRectifyDetail({
|
||||
projectId,
|
||||
taskId
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
const processAll = data.processAll || {}
|
||||
const map = data.map || {}
|
||||
const processApprovalRecord = data.processApprovalRecord || {}
|
||||
this.info = data
|
||||
// 页面回显
|
||||
@@ -238,9 +237,6 @@ export default {
|
||||
dueTime: processAll.dueTime,
|
||||
prcMes: processAll.prcMes
|
||||
})
|
||||
this.countersignForm && this.countersignForm.setFieldsValue({
|
||||
pass: this.convertPass(map.pass)
|
||||
})
|
||||
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||
commitText: processApprovalRecord.commitText,
|
||||
commitFile: processApprovalRecord.commitFile
|
||||
@@ -267,27 +263,22 @@ export default {
|
||||
personnelObj[key] = personnelObj[key].split(',')
|
||||
}
|
||||
}
|
||||
// 通过表格中的所属部门人员获取稽查征求意见对象
|
||||
const userList = this.$refs.inspectionPlanTable.dataSource.map(item => item.objectOfConsultation.split(',')).flat(Infinity)
|
||||
personnelObj.opinionFillList = Array.from(new Set(userList))
|
||||
}
|
||||
return personnelObj
|
||||
},
|
||||
// 获取页面参数
|
||||
async getPageParams (isValidate = true) {
|
||||
if (this.$refs.inspectionPlanTable.dataSource.length === 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
throw new Error('base')
|
||||
}
|
||||
const params = {}
|
||||
// 收集所有表单信息
|
||||
let formDataList = []
|
||||
if (isValidate) {
|
||||
formDataList = await this.validateFormList(this.processInfoForm, this.approvalInfoForm)
|
||||
formDataList[2] = await this.$refs.baseInfoForm.getDataValidate()
|
||||
} else {
|
||||
formDataList = [
|
||||
this.processInfoForm.getFieldsValue(),
|
||||
this.approvalInfoForm.getFieldsValue()
|
||||
this.approvalInfoForm.getFieldsValue(),
|
||||
this.$refs.baseInfoForm.getData()
|
||||
]
|
||||
}
|
||||
// 收集人员信息
|
||||
@@ -296,6 +287,14 @@ export default {
|
||||
throw new Error('user')
|
||||
}
|
||||
|
||||
// 自动发起特殊流程,单独把人员信息存一份
|
||||
params.userInfo = this.$refs.personnelInfo.stepsData.map(item => {
|
||||
return {
|
||||
id: item.id,
|
||||
linkUserIds: item.linkUserIds
|
||||
}
|
||||
})
|
||||
|
||||
// 开始处理信息
|
||||
// 流程信息
|
||||
params.processAll = Object.assign({}, this.info.processAll, formDataList[0], {
|
||||
@@ -310,6 +309,11 @@ export default {
|
||||
params.processApprovalRecord = Object.assign({}, this.info.processApprovalRecord, formDataList[1], {
|
||||
projectId: this.projectId
|
||||
})
|
||||
|
||||
// 流程业务信息
|
||||
params.processEsInspectRectify = Object.assign({}, formDataList[2], {
|
||||
id: this.formInfo.id
|
||||
})
|
||||
return params
|
||||
},
|
||||
/**
|
||||
@@ -328,7 +332,7 @@ export default {
|
||||
taskId: this.$route.query.taskId,
|
||||
userId
|
||||
}
|
||||
Promise.resolve(params).then(res => {
|
||||
transferInspectRectify(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
@@ -344,10 +348,10 @@ export default {
|
||||
*/
|
||||
handleSave () {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
// this.loading = true
|
||||
this.getPageParams(false).then(res => {
|
||||
console.log(res)
|
||||
return Promise.resolve(res)
|
||||
return saveInspectRectify(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -366,19 +370,11 @@ export default {
|
||||
*/
|
||||
handleSubmit () {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
let fn
|
||||
switch (this.currentNode) {
|
||||
case EsInspectionRectification.uploadRectificationResult.value:
|
||||
fn = Promise.resolve
|
||||
break
|
||||
default:
|
||||
fn = Promise.resolve
|
||||
break
|
||||
}
|
||||
// this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
console.log(res)
|
||||
return fn && fn(res)
|
||||
res.map.pass = true
|
||||
return approvalInspectRectify(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -400,7 +396,7 @@ export default {
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = true
|
||||
return Promise.resolve(res)
|
||||
return approvalInspectRectify(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -419,10 +415,15 @@ export default {
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.loading) return
|
||||
// 驳回需要填写备注
|
||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
return Promise.resolve(res)
|
||||
return approvalInspectRectify(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+66
-64
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-form-model :model="formInline" class="form-add" :rules="rules" ref="ruleForm">
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<div class="form-flex-box">
|
||||
<!-- 稽查依据 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -10,7 +10,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.inspectionBasis }}</span>
|
||||
<span>{{ model.standardName }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 依据条款 -->
|
||||
@@ -21,7 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.accordingToTerms }}</span>
|
||||
<span>{{ model.baseClause }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 标准内容或要求 -->
|
||||
@@ -32,7 +32,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.standardContentOrDemand }}</span>
|
||||
<span>{{ model.standardRequire }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改单位 -->
|
||||
@@ -43,7 +43,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationUnit }}</span>
|
||||
<span>{{ model.responseDepart_dictText }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 不符合项描述 -->
|
||||
@@ -54,7 +54,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.nonCompliantDescription }}</span>
|
||||
<span>{{ model.issue }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改措施 -->
|
||||
@@ -65,7 +65,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationMeasures }}</span>
|
||||
<span>{{ model.rectifyMeasure }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 整改负责人 -->
|
||||
@@ -76,7 +76,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.rectificationDirector }}</span>
|
||||
<span>{{ model.responseUserDictText }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 计划完成日期 -->
|
||||
@@ -87,13 +87,13 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model">
|
||||
<span>{{ formInline.planDoneDate }}</span>
|
||||
<span>{{ model.planCompleteDate }}</span>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapsible-panel-form">
|
||||
<div class="form-flex-box collapsible-panel-form-content collapsible-content-no-head">
|
||||
<div class="form-flex-box">
|
||||
<!-- 操作类型 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -109,7 +109,7 @@
|
||||
v-model="formInline.operationType"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.operationType')"
|
||||
:triggerChange="false"
|
||||
dictCode="yn" />
|
||||
dictCode="report_operation_type" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<template v-if="operationType === '1'">
|
||||
@@ -121,11 +121,11 @@
|
||||
{{ $t('workCenter.esInspectionRectification.rectificationResults') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="rectificationResults">
|
||||
<a-form-model-item class="item-model" prop="rectifyResult">
|
||||
<a-textarea :maxLength="500"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.rectificationResults')"
|
||||
:rows="4"
|
||||
v-model="formInline.rectificationResults" />
|
||||
v-model="formInline.rectifyResult" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 附件 -->
|
||||
@@ -135,10 +135,10 @@
|
||||
{{ $t('workCenter.esInspectionRectification.file') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="file">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" :disabled="disabled">
|
||||
<a-form-model-item class="item-model" prop="attachment">
|
||||
<a-button type="primary" class="button-text" @click="clickButtonToUpload" style="width: 100%">
|
||||
{{
|
||||
(formInline.file === 'null' || formInline.file === '' || formInline.file === null || formInline.file === undefined)
|
||||
(formInline.attachment === 'null' || formInline.attachment === '' || formInline.attachment === null || formInline.attachment === undefined)
|
||||
? $t('uploadFile.clickUpload')
|
||||
: $t('uploadFile.viewUploadedFiles')
|
||||
}}
|
||||
@@ -146,7 +146,7 @@
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="operationType === '0'">
|
||||
<template v-else-if="operationType === '2'">
|
||||
<!-- 申请延期日期 -->
|
||||
<div class="box-title-text form-flex-item">
|
||||
<div class="title-text">
|
||||
@@ -155,10 +155,10 @@
|
||||
{{ $t('workCenter.esInspectionRectification.requestExtensionDate') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="requestExtensionDate">
|
||||
<a-form-model-item class="item-model" prop="applyDelayDate">
|
||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day" :disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionRectification.requestExtensionDate')"
|
||||
v-model="formInline.requestExtensionDate" />
|
||||
v-model="formInline.applyDelayDate" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 延期说明 -->
|
||||
@@ -169,19 +169,19 @@
|
||||
{{ $t('workCenter.esInspectionRectification.extensionDescription') }}
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="extensionDescription">
|
||||
<a-form-model-item class="item-model" prop="delayDetail">
|
||||
<a-textarea :maxLength="500"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionRectification.extensionDescription')"
|
||||
:rows="4"
|
||||
:disabled="disabled"
|
||||
v-model="formInline.extensionDescription" />
|
||||
v-model="formInline.delayDetail" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 上传 -->
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
|
||||
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" :disabled="disabled"></upload-file>
|
||||
</a-form-model>
|
||||
</template>
|
||||
|
||||
@@ -201,6 +201,8 @@ export default {
|
||||
data () {
|
||||
return {
|
||||
formInline: {},
|
||||
// 当前数据
|
||||
model: {},
|
||||
// 操作类型
|
||||
operationType: null,
|
||||
rules: {
|
||||
@@ -213,7 +215,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 整改结果
|
||||
rectificationResults: [
|
||||
rectifyResult: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.rectificationResults') + this.$t('cannotEmpty'),
|
||||
@@ -221,7 +223,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 申请延期日期
|
||||
requestExtensionDate: [
|
||||
applyDelayDate: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.requestExtensionDate') + this.$t('cannotEmpty'),
|
||||
@@ -229,7 +231,7 @@ export default {
|
||||
}
|
||||
],
|
||||
// 延期说明
|
||||
extensionDescription: [
|
||||
delayDetail: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('workCenter.esInspectionRectification.extensionDescription') + this.$t('cannotEmpty'),
|
||||
@@ -242,41 +244,43 @@ export default {
|
||||
methods: {
|
||||
changeOperationType (val) {
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
this.operationType = val
|
||||
this.formInline = { operationType: this.formInline.operationType }
|
||||
this.operationType = val + ''
|
||||
},
|
||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
||||
initData (data) {
|
||||
this.data = data
|
||||
this.model = Object.assign({}, data,
|
||||
data.enterpriseStandardInspectRectifyPlan,
|
||||
data.enterpriseStandardInspectRectifyPlan && data.enterpriseStandardInspectRectifyPlan.enterpriseStandardInspectReport)
|
||||
this.operationType = data.operationType + ''
|
||||
// 给表单赋值
|
||||
// this.formInline =
|
||||
this.formInline = {
|
||||
operationType: data.operationType,
|
||||
rectifyResult: data.rectifyResult,
|
||||
attachment: data.attachment,
|
||||
applyDelayDate: data.applyDelayDate,
|
||||
delayDetail: data.delayDetail
|
||||
}
|
||||
},
|
||||
// 外层要获取数据
|
||||
getData () {
|
||||
// 把数据抛出,在线编辑不知道要不要抛
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
return data
|
||||
return { ...this.formInline }
|
||||
},
|
||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||
getDataValidate (callback) {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = {}
|
||||
data.formInline = this.formInline
|
||||
callback(data)
|
||||
}
|
||||
// 获取数据并验证
|
||||
getDataValidate () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
const data = { ...this.formInline }
|
||||
resolve(data)
|
||||
} else {
|
||||
reject(new Error('base'))
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 选完企标编号了,需要回显内容,返回流程名称
|
||||
listChange (value) {
|
||||
console.log(value)
|
||||
// 企标名称
|
||||
this.formInline.enStandardName = value[0].standardName
|
||||
this.$emit('processNameChange', (this.formInline.enStandardNo || '') + '-' + (this.formInline.enStandardName || '') + '-' + '废止')
|
||||
},
|
||||
// 点击点击上传按钮
|
||||
clickButtonToUpload (item) {
|
||||
this.$refs.uploadFile.open(item.fileId)
|
||||
clickButtonToUpload () {
|
||||
this.$refs.uploadFile.open(this.formInline.attachment)
|
||||
// this.uploadName = item.dbFieldName
|
||||
},
|
||||
// 文件上传改变后的回调
|
||||
@@ -288,7 +292,8 @@ export default {
|
||||
})
|
||||
}
|
||||
/** 赋值给当前对应的表单文件 */
|
||||
this.form.file = attIdList.join(',')
|
||||
this.$set(this.formInline, 'attachment', attIdList.join(','))
|
||||
// this.formInline.attachment = attIdList.join(',')
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -296,18 +301,15 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
.collapsible-content-no-head {
|
||||
border-top: 1px solid #E5E6EB;
|
||||
border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
|
||||
// 无边框无背景
|
||||
.readonly-transparent {
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
&:hover {
|
||||
cursor: default;
|
||||
background-color: transparent;
|
||||
border-color: transparent;
|
||||
}
|
||||
}
|
||||
//.readonly-transparent {
|
||||
// background-color: transparent;
|
||||
// border-color: transparent;
|
||||
// &:hover {
|
||||
// cursor: default;
|
||||
// background-color: transparent;
|
||||
// border-color: transparent;
|
||||
// }
|
||||
//}
|
||||
</style>
|
||||
|
||||
+12
-6
@@ -107,7 +107,7 @@ import PersonnelInfo from '@comp/PersonnelInfo'
|
||||
import ProcessDetailList from '@comp/ProcessDetailList'
|
||||
import ExtensionRequestTable from '@views/workCenter/inspectionExtensionRequestProcess/modules/ExtensionRequestTable'
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import { EsInspectionPlan, InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import {
|
||||
approvalInspectExtension,
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
this.projectId = projectId
|
||||
this.btn = InspectionExtensionRequestProcess.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionPlan.keyOfValue(nodeId)) {
|
||||
if (nodeId && !InspectionExtensionRequestProcess.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
@@ -239,7 +239,6 @@ export default {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
const processAll = data.processAll || {}
|
||||
const map = data.map || {}
|
||||
const processApprovalRecord = data.processApprovalRecord || {}
|
||||
this.info = data
|
||||
// 页面回显
|
||||
@@ -248,9 +247,6 @@ export default {
|
||||
dueTime: processAll.dueTime,
|
||||
prcMes: processAll.prcMes
|
||||
})
|
||||
this.countersignForm && this.countersignForm.setFieldsValue({
|
||||
pass: this.convertPass(map.pass)
|
||||
})
|
||||
this.approvalInfoForm && this.approvalInfoForm.setFieldsValue({
|
||||
commitText: processApprovalRecord.commitText,
|
||||
commitFile: processApprovalRecord.commitFile
|
||||
@@ -377,15 +373,20 @@ export default {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
let fn
|
||||
let pass
|
||||
switch (this.currentNode) {
|
||||
case InspectionExtensionRequestProcess.initiate.value:
|
||||
fn = startInspectExtension
|
||||
break
|
||||
default:
|
||||
fn = approvalInspectExtension
|
||||
pass = true
|
||||
break
|
||||
}
|
||||
this.getPageParams().then(res => {
|
||||
if (pass) {
|
||||
res.map.pass = pass
|
||||
}
|
||||
console.log(res)
|
||||
return fn && fn(res)
|
||||
}).then(res => {
|
||||
@@ -428,6 +429,11 @@ export default {
|
||||
*/
|
||||
handleReject () {
|
||||
if (this.loading) return
|
||||
// 驳回需要填写备注
|
||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||
return
|
||||
}
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
|
||||
+2
-2
@@ -130,8 +130,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
// this.filters.inspectStatus = '1,2,4'
|
||||
// this.filters.inspectUser = this.$store.getters.userInfo.id
|
||||
this.filters.inspectStatus = '1,2,4'
|
||||
this.filters.inspectUser = this.$store.getters.userInfo.id
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
|
||||
Reference in New Issue
Block a user