update 稽查延期申请
This commit is contained in:
+29
-1
@@ -261,6 +261,25 @@ const addInspectionRectificationPlanTable = (params) => postAction('/laws.enterp
|
||||
const editInspectionRectificationPlanTable = (params) => postAction('/laws.enterprise/enterpriseStandardInspectRectifyPlan/edit', params)
|
||||
// 稽查流程表-通过稽查内容id查寻稽查报告
|
||||
const queryByInspectContentId = (params) => getAction('/laws.enterprise/EnterpriseStandardInspectReport/queryByInspectContentId', params)
|
||||
|
||||
/* 稽查延期申请 */
|
||||
// 生成项目id
|
||||
const getInspectExtensionProjectId = (params) => getAction('/process/esInspectDelayApplyFlow/getProjectId', params)
|
||||
// 详情信息
|
||||
const getInspectExtensionDetail = (params) => getAction('/process/esInspectDelayApplyFlow/queryDetailByProjectId', params)
|
||||
// 发起
|
||||
const startInspectExtension = (params) => postAction('/process/esInspectDelayApplyFlow/flowStart', params)
|
||||
// 审批
|
||||
const approvalInspectExtension = (params) => postAction('/process/esInspectDelayApplyFlow/flowApproval', params)
|
||||
// 转办
|
||||
const transferInspectExtension = (params) => getAction('/process/esInspectDelayApplyFlow/flowTransfer', params)
|
||||
// 保存
|
||||
const saveInspectExtension = (params) => postAction('/process/esInspectDelayApplyFlow/flowSave', params)
|
||||
// 延期申请流程表-添加
|
||||
const addInspectExtensionTable = (params) => postAction('/esinspectdelayapply/processEsInspectDelayApply/add', params)
|
||||
// 延期申请流程表-编辑
|
||||
const editInspectExtensionTable = (params) => postAction('/esinspectdelayapply/processEsInspectDelayApply/edit', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
|
||||
@@ -392,5 +411,14 @@ export {
|
||||
editInspectionReportTable,
|
||||
addInspectionRectificationPlanTable,
|
||||
editInspectionRectificationPlanTable,
|
||||
queryByInspectContentId
|
||||
queryByInspectContentId,
|
||||
|
||||
getInspectExtensionProjectId,
|
||||
getInspectExtensionDetail,
|
||||
startInspectExtension,
|
||||
approvalInspectExtension,
|
||||
transferInspectExtension,
|
||||
saveInspectExtension,
|
||||
addInspectExtensionTable,
|
||||
editInspectExtensionTable
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ export const ProcessKey = {
|
||||
// 企标稽查流程
|
||||
ES_INSPECTION_PROCESS: { text: 'inspect_process', value: 'inspect_process' },
|
||||
// 稽查延期申请流程
|
||||
INSPECTION_EXTENSION_REQUEST_PROCESS: { text: 'inspect_plan', value: 'inspect_process' },
|
||||
INSPECTION_EXTENSION_REQUEST_PROCESS: { text: 'inspect_delay_apply_process', value: 'inspect_delay_apply_process' },
|
||||
// 企标稽查整改
|
||||
ES_INSPECTION_RECTIFICATION: { text: 'inspect_plan', value: 'inspect_process' }
|
||||
}
|
||||
@@ -276,10 +276,10 @@ export const EsInspectionProcess = new EsEnums({
|
||||
|
||||
// 稽查延期申请流程
|
||||
export const InspectionExtensionRequestProcess = new EsEnums({
|
||||
initiate: { text: '稽查负责人申请延期', value: '1', btn: 6 },
|
||||
directorLeaderApproval: { text: '负责人主管级领导审批', value: '2', btn: 27 },
|
||||
contactEvaluation: { text: '稽查联络人评估', value: '3', btn: 27 },
|
||||
directorSuperiorLeaderApproval: { text: '负责人主管级上一级领导审批', value: '4', btn: 27 }
|
||||
initiate: { text: '稽查负责人申请延期', value: 'responsible_start', btn: 6 },
|
||||
directorLeaderApproval: { text: '负责人主管级领导审批', value: 'leader_approval', btn: 27 },
|
||||
contactEvaluation: { text: '稽查联络人评估', value: 'liaisons_assess', btn: 27 },
|
||||
directorSuperiorLeaderApproval: { text: '负责人主管级上一级领导审批', value: 'leader_up_level', btn: 27 }
|
||||
})
|
||||
|
||||
// 企标稽查整改
|
||||
|
||||
+11
-4
@@ -95,7 +95,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>
|
||||
@@ -162,6 +162,8 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
},
|
||||
// 流程key
|
||||
processKey: ProcessKey.ES_INSPECTION_PLAN.value,
|
||||
// 当前流程信息
|
||||
EsInspectionPlan,
|
||||
info: {},
|
||||
@@ -234,9 +236,14 @@ export default {
|
||||
this.currentNode = nodeId || EsInspectionPlan.initiate.value
|
||||
this.currentNodeName = taskName || EsInspectionPlan.initiate.text
|
||||
this.projectId = projectId
|
||||
this.btn = EsInspectionPlan.propertyOfValue('btn', this.currentNode)
|
||||
this.btn = EsInspectionPlan.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionPlan.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(ProcessKey.ES_INSPECTION_PLAN.value, () => {
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.currentNode === EsInspectionPlan.initiate.value)
|
||||
})
|
||||
// 如果是待办进来,就获取详情数据
|
||||
@@ -315,7 +322,7 @@ export default {
|
||||
}
|
||||
// 通过表格中的所属部门人员获取稽查征求意见对象
|
||||
const userList = this.$refs.inspectionPlanTable.dataSource.map(item => item.objectOfConsultation.split(',')).flat(Infinity)
|
||||
personnelObj.opinionFillList = Array.from(new Set(userList))
|
||||
personnelObj.opinionFillList = Array.from(new Set(userList)).filter(item => item)
|
||||
}
|
||||
return personnelObj
|
||||
},
|
||||
|
||||
+2
-2
@@ -63,9 +63,9 @@
|
||||
<!-- 新增/编辑稽查计划 -->
|
||||
<inspection-plan-drawer ref="modalForm" @ok="modalFormOk" :project-id="projectId"/>
|
||||
<!-- 节点2:填写意见、意见回显 -->
|
||||
<write-opinion-modal ref="writeOpinionModal" v-if="currentNode === EsInspectionPlan.fillInComments.value" @ok="modalFormOk"/>
|
||||
<write-opinion-modal ref="writeOpinionModal" @ok="modalFormOk"/>
|
||||
<!-- 节点3:所属部门意见-查看 -->
|
||||
<show-opinion-modal ref="showOpinionModal" v-if="currentNode === EsInspectionPlan.liaisonCollect.value" @ok="modalFormOk"/>
|
||||
<show-opinion-modal ref="showOpinionModal" @ok="modalFormOk"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
+11
-5
@@ -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,7 @@ import ProcessDetailList from '@comp/ProcessDetailList'
|
||||
import InspectionProcessTable
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessTable'
|
||||
import UserSelectModal from '@comp/selection/UserSelectModal'
|
||||
import { EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { EsInspectionPlan, EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import {
|
||||
approvalInspectProcess,
|
||||
@@ -141,6 +141,8 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
},
|
||||
// 流程key
|
||||
processKey: ProcessKey.ES_INSPECTION_PROCESS.value,
|
||||
// 当前流程信息
|
||||
EsInspectionProcess,
|
||||
info: {},
|
||||
@@ -192,9 +194,14 @@ export default {
|
||||
this.currentNode = nodeId || EsInspectionProcess.initiate.value
|
||||
this.currentNodeName = taskName || EsInspectionProcess.initiate.text
|
||||
this.projectId = projectId
|
||||
this.btn = EsInspectionProcess.propertyOfValue('btn', this.currentNode)
|
||||
this.btn = EsInspectionProcess.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionPlan.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(ProcessKey.ES_INSPECTION_PROCESS.value, () => {
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.currentNode === EsInspectionProcess.initiate.value)
|
||||
})
|
||||
// 如果是待办进来,就获取详情数据
|
||||
@@ -225,7 +232,6 @@ export default {
|
||||
*/
|
||||
loadPage () {
|
||||
const { projectId, taskId } = this.$route.query
|
||||
this.btn = EsInspectionProcess.propertyOfValue('btn', this.currentNode)
|
||||
this.loading = true
|
||||
getInspectProcessDetail({
|
||||
projectId,
|
||||
|
||||
+1
-1
@@ -142,7 +142,7 @@ export default {
|
||||
const url = previewPdf(file.id)
|
||||
this.iframeSrc = url
|
||||
} else if (fileSuffix === 'docx') {
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
const fileFullUrl = `${window._CONFIG.domianWebSocketURL}/sys/common/view/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.fileName}`
|
||||
// word文件仍使用KKFile进行预览
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
|
||||
this.iframeSrc = url
|
||||
|
||||
+1
@@ -211,6 +211,7 @@ export default {
|
||||
},
|
||||
edit (data, record) {
|
||||
this.data = Object.assign({}, data)
|
||||
this.model = Object.assign({}, record)
|
||||
// 获取章节条款下拉
|
||||
this.initSectionClauseList()
|
||||
const { inspectContentId, requirement, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {}
|
||||
|
||||
+1
@@ -116,6 +116,7 @@ export default {
|
||||
},
|
||||
edit (data, record) {
|
||||
this.data = Object.assign({}, data)
|
||||
this.model = Object.assign({}, record)
|
||||
this.form = Object.assign({}, record)
|
||||
// 获取章节条款下拉
|
||||
this.initSectionClauseList()
|
||||
|
||||
+1
-4
@@ -100,7 +100,7 @@ import InspectionProcessReport
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReport'
|
||||
import InspectionProcessRectificationPlan
|
||||
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlan'
|
||||
import { EsInspectionPlan, EsInspectionProcess } from '@/enums/commonEnums'
|
||||
import { EsInspectionProcess } from '@/enums/commonEnums'
|
||||
import { editInspectProcessTable } from '@api/workCenter'
|
||||
import { getAction } from '@api/manage'
|
||||
export default {
|
||||
@@ -267,9 +267,6 @@ export default {
|
||||
return
|
||||
}
|
||||
this.filters.projectId = this.projectId
|
||||
if (this.currentNode === EsInspectionPlan.fillInComments.value) {
|
||||
this.filters.nodeId = this.$route.query.nodeId
|
||||
}
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -128,10 +128,9 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
this.filters.inspectStatus = '1'
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
|
||||
+27
-18
@@ -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>
|
||||
@@ -107,9 +107,13 @@ 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 { InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { EsInspectionPlan, InspectionExtensionRequestProcess, ProcessKey } from '@/enums/commonEnums'
|
||||
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
|
||||
import { getInspectPlanDetail, getInspectPlanProjectId } from '@api/workCenter'
|
||||
import {
|
||||
approvalInspectExtension,
|
||||
getInspectExtensionDetail,
|
||||
getInspectExtensionProjectId, saveInspectExtension, startInspectExtension, transferInspectExtension
|
||||
} from '@api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'InspectionExtensionRequestProcess',
|
||||
@@ -136,6 +140,8 @@ export default {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 22 }
|
||||
},
|
||||
// 流程key
|
||||
processKey: ProcessKey.INSPECTION_EXTENSION_REQUEST_PROCESS.value,
|
||||
// 当前流程信息
|
||||
InspectionExtensionRequestProcess,
|
||||
info: {},
|
||||
@@ -187,9 +193,14 @@ export default {
|
||||
this.currentNode = nodeId || InspectionExtensionRequestProcess.initiate.value
|
||||
this.currentNodeName = taskName || InspectionExtensionRequestProcess.initiate.text
|
||||
this.projectId = projectId
|
||||
this.btn = InspectionExtensionRequestProcess.propertyOfValue('btn', this.currentNode)
|
||||
this.btn = InspectionExtensionRequestProcess.propertyOfValue('btn', this.currentNode) || 0
|
||||
// 如果有nodeId,但是匹配不到任何节点,就是是增加的审批节点
|
||||
if (nodeId && !EsInspectionPlan.keyOfValue(nodeId)) {
|
||||
// 审批和同意按钮
|
||||
this.btn = 24
|
||||
}
|
||||
// 查询人员信息
|
||||
this.getPersonInfoStructure(ProcessKey.INSPECTION_EXTENSION_REQUEST_PROCESS.value, () => {
|
||||
this.getPersonInfoStructure(this.processKey, () => {
|
||||
this.initPersonInfoData(this.currentNode === InspectionExtensionRequestProcess.initiate.value)
|
||||
})
|
||||
// 如果是待办进来,就获取详情数据
|
||||
@@ -207,7 +218,7 @@ export default {
|
||||
getProjectId () {
|
||||
this.loading = true
|
||||
// 否则就是创建一个新的流程
|
||||
getInspectPlanProjectId().then(res => {
|
||||
getInspectExtensionProjectId().then(res => {
|
||||
if (res) {
|
||||
this.projectId = res + ''
|
||||
}
|
||||
@@ -220,9 +231,8 @@ export default {
|
||||
*/
|
||||
loadPage () {
|
||||
const { projectId, taskId } = this.$route.query
|
||||
this.btn = InspectionExtensionRequestProcess.propertyOfValue('btn', this.currentNode)
|
||||
this.loading = true
|
||||
getInspectPlanDetail({
|
||||
getInspectExtensionDetail({
|
||||
projectId,
|
||||
taskId
|
||||
}).then(res => {
|
||||
@@ -267,15 +277,14 @@ 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))
|
||||
const liaisonsList = this.$refs.extensionRequestTable.dataSource.map(item => item.liaisons)
|
||||
personnelObj.liaisonsList = Array.from(new Set(liaisonsList)).filter(item => item)
|
||||
}
|
||||
return personnelObj
|
||||
},
|
||||
// 获取页面参数
|
||||
async getPageParams (isValidate = true) {
|
||||
if (this.$refs.inspectionPlanTable.dataSource.length === 0) {
|
||||
if (this.$refs.extensionRequestTable.dataSource.length === 0) {
|
||||
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
|
||||
throw new Error('base')
|
||||
}
|
||||
@@ -328,7 +337,7 @@ export default {
|
||||
taskId: this.$route.query.taskId,
|
||||
userId
|
||||
}
|
||||
Promise.resolve(params).then(res => {
|
||||
transferInspectExtension(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.goBack()
|
||||
@@ -347,7 +356,7 @@ export default {
|
||||
this.loading = true
|
||||
this.getPageParams(false).then(res => {
|
||||
console.log(res)
|
||||
return Promise.resolve(res)
|
||||
return saveInspectExtension(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -370,10 +379,10 @@ export default {
|
||||
let fn
|
||||
switch (this.currentNode) {
|
||||
case InspectionExtensionRequestProcess.initiate.value:
|
||||
fn = Promise.resolve
|
||||
fn = startInspectExtension
|
||||
break
|
||||
default:
|
||||
fn = Promise.resolve
|
||||
fn = approvalInspectExtension
|
||||
break
|
||||
}
|
||||
this.getPageParams().then(res => {
|
||||
@@ -400,7 +409,7 @@ export default {
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = true
|
||||
return Promise.resolve(res)
|
||||
return approvalInspectExtension(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
@@ -422,7 +431,7 @@ export default {
|
||||
this.loading = true
|
||||
this.getPageParams().then(res => {
|
||||
res.map.pass = false
|
||||
return Promise.resolve(res)
|
||||
return approvalInspectExtension(res)
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
|
||||
+88
-13
@@ -11,6 +11,7 @@
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
@@ -28,7 +29,7 @@
|
||||
<!-- 稽查联络人 -->
|
||||
<template v-slot:inspectionContactPerson="{text, record}">
|
||||
<div class="table-form" v-if="isInitiate">
|
||||
<a-select v-model="record.inspectionContactPerson" style="width: 100%" allowClear
|
||||
<a-select v-model="record.liaisons" style="width: 100%" allowClear @change="changeRowData(record, 'liaisons')"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.incExtensionRequest.inspectionContactPerson')">
|
||||
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
|
||||
</a-select>
|
||||
@@ -45,7 +46,7 @@
|
||||
<!-- 节点1,显示申请延期和删除,后续不显示操作列 -->
|
||||
<a @click="handleRequestExtension(record, index)" >{{ $t('workCenter.incExtensionRequest.requestExtension') }}</a>
|
||||
<a-divider type="vertical" />
|
||||
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
|
||||
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
|
||||
</template>
|
||||
</j-table>
|
||||
</div>
|
||||
@@ -64,6 +65,8 @@ import ExtensionRequestTableModal
|
||||
from '@views/workCenter/inspectionExtensionRequestProcess/modules/ExtensionRequestTableModal'
|
||||
import RequestExtensionModal from '@views/workCenter/inspectionExtensionRequestProcess/modules/RequestExtensionModal'
|
||||
import { InspectionExtensionRequestProcess } from '@/enums/commonEnums'
|
||||
import { editInspectExtensionTable } from '@api/workCenter'
|
||||
import { getAction } from '@api/manage'
|
||||
export default {
|
||||
name: 'ExtensionRequestTable',
|
||||
components: { RequestExtensionModal, ExtensionRequestTableModal, JTable },
|
||||
@@ -73,12 +76,19 @@ export default {
|
||||
currentNode: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// 项目id
|
||||
projectId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
disableMixinCreated: true,
|
||||
url: {
|
||||
list: ''
|
||||
list: '/esinspectdelayapply/processEsInspectDelayApply/queryByList',
|
||||
delete: '/esinspectdelayapply/processEsInspectDelayApply/delete'
|
||||
},
|
||||
model: {},
|
||||
userList: [],
|
||||
@@ -98,56 +108,56 @@ export default {
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardNumber',
|
||||
dataIndex: 'inspectNo',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 稽查依据标准名称
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardName',
|
||||
dataIndex: 'inspectName',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 计划稽查对象
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionObjects',
|
||||
dataIndex: 'planInspectObject_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划稽查日期
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionDate'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
dataIndex: 'planInspectDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 稽查负责人
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectionDirector',
|
||||
dataIndex: 'inspectUserDictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 状态
|
||||
title: this.$t('workCenter.incExtensionRequest.state'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'state',
|
||||
dataIndex: 'inspectStatus_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 申请延期日期
|
||||
title: this.$t('workCenter.incExtensionRequest.requestExtensionDate'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'requestExtensionDate',
|
||||
dataIndex: 'requestDelayDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 延期说明
|
||||
title: this.$t('workCenter.incExtensionRequest.extensionDescription'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'extensionDescription',
|
||||
dataIndex: 'delayDescription',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 稽查联络人
|
||||
@@ -157,7 +167,7 @@ export default {
|
||||
],
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'inspectionContactPerson',
|
||||
dataIndex: 'liaisons',
|
||||
scopedSlots: { customRender: 'inspectionContactPerson' }
|
||||
},
|
||||
{
|
||||
@@ -204,12 +214,41 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 列表查询带上项目id
|
||||
projectId: {
|
||||
immediate: true,
|
||||
handler (val) {
|
||||
if (!val) {
|
||||
return
|
||||
}
|
||||
this.filters.projectId = this.projectId
|
||||
if (this.currentNode === InspectionExtensionRequestProcess.contactEvaluation.value) {
|
||||
this.filters.nodeId = this.$route.query.nodeId
|
||||
}
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
if (this.isInitiate) {
|
||||
this.getUserList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 修改:稽查联络人
|
||||
changeRowData (record, field) {
|
||||
editInspectExtensionTable({
|
||||
id: record.id,
|
||||
[field]: record[field]
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
// 申请延期
|
||||
handleRequestExtension (record) {
|
||||
this.$refs.requestExtensionModal.edit(record)
|
||||
@@ -245,7 +284,43 @@ export default {
|
||||
return this.getNumParentNode(el.parentNode, n - 1)
|
||||
},
|
||||
handleAdd () {
|
||||
this.$refs.extensionRequestTableModal.show()
|
||||
this.$refs.extensionRequestTableModal.show({
|
||||
projectId: this.projectId
|
||||
})
|
||||
},
|
||||
loadData (arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.warning('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
// 加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
const params = this.getQueryParams()// 查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
// update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
const data = res.result.records || res.result
|
||||
this.dataSource = data.map(item => {
|
||||
return {
|
||||
...item,
|
||||
liaisons: item.liaisons || undefined
|
||||
}
|
||||
})
|
||||
if (res.result.total) {
|
||||
this.ipagination.total = res.result.total
|
||||
} else {
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
// update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+37
-16
@@ -3,12 +3,12 @@
|
||||
:title="title"
|
||||
:width="drawerWidth"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
:confirmLoading="loading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
:cancelText="$t('close')">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-spin :spinning="loading">
|
||||
<!--查询区域-->
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
@@ -58,6 +58,7 @@
|
||||
<script>
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { addInspectExtensionTable } from '@api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'ExtensionRequestTableModal',
|
||||
@@ -70,59 +71,58 @@ export default {
|
||||
drawerWidth: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: ''
|
||||
list: '/enterprise/inspect/queryByPage'
|
||||
},
|
||||
dataSource: [{}],
|
||||
dataSource: [],
|
||||
columns: [
|
||||
{ // 稽查依据标准号
|
||||
title: this.$t('workCenter.esInspectionProcess.esNumber'),
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardNumber'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardNumber',
|
||||
dataIndex: 'inspectNo',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 稽查依据标准名称
|
||||
title: this.$t('workCenter.esInspectionProcess.esName'),
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionBasisStandardName'),
|
||||
align: 'center',
|
||||
width: 180,
|
||||
dataIndex: 'inspectionBasisStandardName',
|
||||
dataIndex: 'inspectName',
|
||||
scopedSlots: { customRender: 'standard' }
|
||||
},
|
||||
{ // 计划稽查对象
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionObjects',
|
||||
dataIndex: 'planInspectObject_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主责标准化工作组
|
||||
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
dataIndex: 'mainDutyStandardizationGroup',
|
||||
dataIndex: 'standardizationWorkGroup',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 所属部门
|
||||
title: this.$t('workCenter.esInspectionPlan.department'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'department',
|
||||
dataIndex: 'belongDept_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划稽查日期
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionDate'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'planInspectionDate',
|
||||
dataIndex: 'planInspectDate',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 稽查负责人
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectionDirector',
|
||||
dataIndex: 'inspectUserDictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
]
|
||||
@@ -130,20 +130,41 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
show (record) {
|
||||
// this.filters.inspectStatus = '1,2,4'
|
||||
// this.filters.inspectUser = this.$store.getters.userInfo.id
|
||||
this.loadData()
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
console.log(this.selectedRowKeys)
|
||||
this.close()
|
||||
if (this.loading || !this.selectionRows.length) {
|
||||
this.$message.warn(this.$t('selectARecord'))
|
||||
return
|
||||
}
|
||||
const params = Object.assign({
|
||||
ids: this.selectedRowKeys.join(',')
|
||||
}, this.model)
|
||||
this.loading = true
|
||||
addInspectExtensionTable(params).then((res) => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 关闭
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.dataSource = []
|
||||
this.onClearSelected()
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
+31
-8
@@ -14,22 +14,22 @@
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="requestExtensionDate"
|
||||
prop="requestDelayDate"
|
||||
:label="$t('workCenter.incExtensionRequest.requestExtensionDate')">
|
||||
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day"
|
||||
:placeholder="$t('pleaseSelect') + $t('workCenter.incExtensionRequest.requestExtensionDate')"
|
||||
v-model="form.requestExtensionDate" />
|
||||
v-model="form.requestDelayDate" />
|
||||
</a-form-model-item>
|
||||
<!-- 执行情况 -->
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="extensionDescription"
|
||||
prop="delayDescription"
|
||||
:label="$t('workCenter.incExtensionRequest.extensionDescription')">
|
||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.incExtensionRequest.extensionDescription')"
|
||||
:maxLength="500"
|
||||
:rows="4"
|
||||
v-model="form.extensionDescription"/>
|
||||
v-model="form.delayDescription"/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
@@ -37,6 +37,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { editInspectExtensionTable } from '@api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'RequestExtensionModal',
|
||||
data () {
|
||||
@@ -58,10 +60,10 @@ export default {
|
||||
// 章节条款下拉
|
||||
sectionClauseList: [],
|
||||
rules: {
|
||||
requestExtensionDate: [
|
||||
requestDelayDate: [
|
||||
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.incExtensionRequest.requestExtensionDate'), trigger: 'change' }
|
||||
]
|
||||
// extensionDescription: [
|
||||
// delayDescription: [
|
||||
// { required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.incExtensionRequest.extensionDescription'), trigger: 'blur' }
|
||||
// ]
|
||||
}
|
||||
@@ -72,13 +74,34 @@ export default {
|
||||
this.edit({})
|
||||
},
|
||||
edit (record) {
|
||||
this.model = Object.assign({}, record)
|
||||
this.form = Object.assign({}, record)
|
||||
this.visible = true
|
||||
},
|
||||
// 确定
|
||||
handleOk () {
|
||||
this.$refs.form.validate((err) => {
|
||||
console.log(err)
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const params = Object.assign({}, {
|
||||
id: this.model.id,
|
||||
requestDelayDate: this.form.requestDelayDate,
|
||||
delayDescription: this.form.delayDescription
|
||||
})
|
||||
this.confirmLoading = true
|
||||
editInspectExtensionTable(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$message.success(res.message)
|
||||
this.$emit('ok')
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
// this.close()
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user