update 企标稽查流程

This commit is contained in:
danshihao
2023-11-28 11:36:19 +08:00
parent e277f6488b
commit bbcd8486c2
14 changed files with 582 additions and 177 deletions
+51 -4
View File
@@ -215,8 +215,6 @@ const getInspectPlanProjectId = (params) => getAction('/process/esInspectPlanFlo
const getInspectPlanDetail = (params) => getAction('/process/esInspectPlanFlow/queryDetailByProjectId', params)
// 发起
const startInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowStart', params)
// 驳回
const refusalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowRefusal', params)
// 审批
const approvalInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowApproval', params)
// 转办
@@ -230,6 +228,39 @@ const editInspectPlanTable = (params) => postAction('/process/processEsInspectPl
// 稽查计划表-填写意见
const fillInOpinionInspectPlanTable = (params) => postAction('/process/processEsInspectPlanOpinion/fillInOpinion', params)
/* 企标稽查流程 */
// 生成项目id
const getInspectProcessProjectId = (params) => getAction('/esinspect/esInspectFlowController/getProjectId', params)
// 详情信息
const getInspectProcessDetail = (params) => getAction('/esinspect/esInspectFlowController/queryDetailByProjectId', params)
// 发起
const startInspectProcess = (params) => postAction('/esinspect/esInspectFlowController/flowStart', params)
// 审批
const approvalInspectProcess = (params) => postAction('/esinspect/esInspectFlowController/flowApproval', params)
// 转办
const transferInspectProcess = (params) => getAction('/esinspect/esInspectFlowController/flowTransfer', params)
// 保存
const saveInspectProcess = (params) => postAction('/esinspect/esInspectFlowController/flowSave', params)
// 稽查流程表-添加
const addInspectProcessTable = (params) => postAction('/esinspect/processEsInspect/add', params)
// 稽查流程表-编辑
const editInspectProcessTable = (params) => postAction('/esinspect/processEsInspect/edit', params)
// 稽查流程表-稽查内容-添加
const addInspectionContentTable = (params) => postAction('/enterprise/InspectContent/add', params)
// 稽查流程表-稽查内容-编辑
const editInspectionContentTable = (params) => postAction('/enterprise/InspectContent/edit', params)
// 稽查流程表-稽查内容-列表(下拉)
const getInspectionContentTable = (params) => getAction('/enterprise/InspectContent/queryClauseByEsInspectId', params)
// 稽查流程表-稽查报告-添加
const addInspectionReportTable = (params) => postAction('/laws.enterprise/EnterpriseStandardInspectReport/add', params)
// 稽查流程表-稽查报告-编辑
const editInspectionReportTable = (params) => postAction('/laws.enterprise/EnterpriseStandardInspectReport/edit', params)
// 稽查流程表-整改计划-添加
const addInspectionRectificationPlanTable = (params) => postAction('/laws.enterprise/enterpriseStandardInspectRectifyPlan/add', params)
// 稽查流程表-整改计划-编辑
const editInspectionRectificationPlanTable = (params) => postAction('/laws.enterprise/enterpriseStandardInspectRectifyPlan/edit', params)
// 稽查流程表-通过稽查内容id查寻稽查报告
const queryByInspectContentId = (params) => getAction('/laws.enterprise/EnterpriseStandardInspectReport/queryByInspectContentId', params)
export {
getProcessNodeList,
@@ -339,11 +370,27 @@ export {
getInspectPlanProjectId,
getInspectPlanDetail,
startInspectPlan,
refusalInspectPlan,
approvalInspectPlan,
transferInspectPlan,
saveInspectPlan,
addInspectPlanTable,
editInspectPlanTable,
fillInOpinionInspectPlanTable
fillInOpinionInspectPlanTable,
getInspectProcessProjectId,
getInspectProcessDetail,
startInspectProcess,
approvalInspectProcess,
transferInspectProcess,
saveInspectProcess,
addInspectProcessTable,
editInspectProcessTable,
addInspectionContentTable,
editInspectionContentTable,
getInspectionContentTable,
addInspectionReportTable,
editInspectionReportTable,
addInspectionRectificationPlanTable,
editInspectionRectificationPlanTable,
queryByInspectContentId
}
+5 -5
View File
@@ -267,11 +267,11 @@ export const EsInspectionPlan = new EsEnums({
// 企标稽查流程
export const EsInspectionProcess = new EsEnums({
initiate: { text: '稽查负责人发起', value: '1', btn: 6 },
directorLeaderApprovalOne: { text: '负责人主管级领导审批', value: '2', btn: 27 },
inputInspectionReport: { text: '稽查负责人上传稽查报告和整改计划', value: '3', btn: 7 },
directorLeaderApprovalTwo: { text: '负责人主管级领导审批', value: '4', btn: 27 },
relevantPersonnelCountersign: { text: '相关人员会签', value: '5', btn: 27 }
initiate: { text: '稽查负责人发起', value: 'responsible_start', btn: 6 },
directorLeaderApprovalOne: { text: '负责人主管级领导审批', value: 'leader_approval', btn: 27 },
inputInspectionReport: { text: '稽查负责人上传稽查报告和整改计划', value: 'responsible_upload', btn: 7 },
directorLeaderApprovalTwo: { text: '负责人主管级领导审批', value: 'leader_approval_again', btn: 27 },
relevantPersonnelCountersign: { text: '相关人员会签', value: 'involve_countersign', btn: 27 }
})
// 稽查延期申请流程
@@ -48,7 +48,7 @@
<template v-if="isInitiateOrLiaisonCollect || (currentNode === EsInspectionPlan.fillInComments.value && $store.getters.userInfo.username === record.createBy)">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
</template>
<!-- 意见 or 填写意见节点2非自己创建的就是意见和填写意见 -->
<template v-else-if="currentNode === EsInspectionPlan.fillInComments.value">
@@ -110,7 +110,11 @@ import InspectionProcessTable
import UserSelectModal from '@comp/selection/UserSelectModal'
import { EsInspectionProcess, ProcessKey } from '@/enums/commonEnums'
import { WorkCenterMixin } from '@/mixins/WorkCenterMixin'
import { getInspectPlanDetail, getInspectPlanProjectId } from '@api/workCenter'
import {
approvalInspectProcess,
getInspectProcessDetail,
getInspectProcessProjectId, saveInspectProcess, startInspectProcess, transferInspectProcess
} from '@api/workCenter'
export default {
name: 'EnterpriseStandardInspectionProcess',
@@ -208,7 +212,7 @@ export default {
getProjectId () {
this.loading = true
// 否则就是创建一个新的流程
getInspectPlanProjectId().then(res => {
getInspectProcessProjectId().then(res => {
if (res) {
this.projectId = res + ''
}
@@ -223,7 +227,7 @@ export default {
const { projectId, taskId } = this.$route.query
this.btn = EsInspectionProcess.propertyOfValue('btn', this.currentNode)
this.loading = true
getInspectPlanDetail({
getInspectProcessDetail({
projectId,
taskId
}).then(res => {
@@ -268,15 +272,12 @@ 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) {
if (this.$refs.inspectionProcessTable.dataSource.length === 0) {
this.$message.warning(this.$t('addAtLeastOneRowOfData'))
throw new Error('base')
}
@@ -329,7 +330,7 @@ export default {
taskId: this.$route.query.taskId,
userId
}
Promise.resolve(params).then(res => {
transferInspectProcess(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()
@@ -348,7 +349,7 @@ export default {
this.loading = true
this.getPageParams(false).then(res => {
console.log(res)
return Promise.resolve(res)
return saveInspectProcess(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -369,16 +370,22 @@ export default {
if (this.loading) return
this.loading = true
let fn
let pass
switch (this.currentNode) {
case EsInspectionProcess.initiate.value:
fn = Promise.resolve
fn = startInspectProcess
break
default:
fn = Promise.resolve
fn = approvalInspectProcess
pass = true
break
}
this.getPageParams().then(res => {
console.log(res)
// 如果是审批,就默认pass为true
if (pass && res.map) {
res.map.pass = pass
}
return fn && fn(res)
}).then(res => {
if (res.success) {
@@ -401,7 +408,7 @@ export default {
this.loading = true
this.getPageParams().then(res => {
res.map.pass = true
return Promise.resolve(res)
return approvalInspectProcess(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -423,7 +430,7 @@ export default {
this.loading = true
this.getPageParams().then(res => {
res.map.pass = false
return Promise.resolve(res)
return approvalInspectProcess(res)
}).then(res => {
if (res.success) {
this.$message.success(res.message)
@@ -20,7 +20,7 @@
:can-drag="true"
rowKey="id"
:row-selection="null"
:pagination="ipagination"
:pagination="false"
:scroll="{x: '100%'}"
@change="tableOnChange">
@@ -38,7 +38,7 @@
<template slot="action" slot-scope="{text, record, index}">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
</template>
</j-table>
@@ -70,14 +70,14 @@ export default {
title: this.$t('workCenter.esInspectionProcess.accordingToTerms'),
align: 'center',
width: 140,
dataIndex: 'planInspectionDate',
dataIndex: 'standardNo',
scopedSlots: { customRender: 'text' }
},
{ // 标准内容或要求
title: this.$t('workCenter.esInspectionProcess.standardContentOrDemand'),
align: 'center',
width: 200,
dataIndex: 'inspectionDirector',
dataIndex: 'requirement',
scopedSlots: { customRender: 'text' }
},
{
@@ -98,22 +98,26 @@ export default {
model: {},
confirmLoading: false,
url: {
list: ''
list: '/enterprise/InspectContent/queryClauseByEsInspectId',
delete: '/enterprise/InspectContent/delete'
},
dataSource: [{}],
dataSource: [],
columns: columns.slice(0, this.disabled ? 2 : 3)
}
},
methods: {
show (record) {
this.filters = {}
this.filters = {
processEsInspectId: record.id
}
this.loadData()
this.model = Object.assign({}, record)
this.visible = true
},
// 确定
handleOk () {
console.log(this.selectedRowKeys)
// console.log(this.selectedRowKeys)
this.$emit('ok')
this.close()
},
// 关闭
@@ -141,13 +145,23 @@ export default {
},
handleAdd () {
this.$refs.inspectionProcessContentModal.title = this.$t('add') + this.$t('workCenter.esInspectionProcess.opinion')
this.$refs.inspectionProcessContentModal.add()
this.$refs.inspectionProcessContentModal.add(this.model)
},
handleEdit (record, index) {
const { file } = record
this.$refs.inspectionProcessContentModal.title = this.$t('edit') + this.$t('workCenter.esInspectionProcess.opinion')
this.$refs.inspectionProcessContentModal.edit(file, record, index)
this.$refs.inspectionProcessContentModal.edit(this.model, record, index)
}
// 意见新增编辑完成
// modalFormOk (value, index) {
// console.log(value, index)
// if (index || index === 0) {
// // 有下标,说明是编辑
// this.dataSource.splice(index, 1, value)
// } else {
// // 没有下标, 是新增
// this.dataSource.push(value)
// }
// }
}
}
</script>
@@ -22,14 +22,14 @@
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.sectionNumber')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'sectionNumber', validatorRules.sectionNumber ]" />
v-decorator.trim="[ 'standardNo', validatorRules.sectionNumber ]" />
</a-form-item>
<!-- 标准内容或要求 -->
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.standardContentOrDemand')"
:maxLength="50"
@change="event => event.target.value = event.target.value.trim()"
v-decorator.trim="[ 'standardContentOrDemand', validatorRules.standardContentOrDemand ]" />
v-decorator.trim="[ 'requirement', validatorRules.standardContentOrDemand ]" />
</a-form-item>
</a-form>
</a-spin>
@@ -53,11 +53,11 @@
</template>
<script>
import pick from 'lodash.pick'
import { getFileInfo } from '@/api/api'
import { previewPdf } from '@/utils/previewPdf'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { addInspectionContentTable, editInspectionContentTable } from '@api/workCenter'
const Base64 = require('js-base64').Base64
@@ -69,6 +69,9 @@ export default {
visible: false,
confirmLoading: false,
form: this.$form.createForm(this),
// 父表的当前行数据
data: {},
// 当前表的当前行数据
model: {},
labelCol: {
xs: { span: 24 },
@@ -99,23 +102,25 @@ export default {
}
},
methods: {
add (file) {
this.getFileInfo(file).then(res => {
add (data) {
this.data = Object.assign({}, data)
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
})
this.visible = true
this.form.resetFields()
},
edit (file, record, index) {
this.getFileInfo(file).then(res => {
edit (data, record, index) {
this.getFileInfo(data.file).then(res => {
this.handlePreview(res)
})
this.visible = true
this.index = index
this.form.resetFields()
this.data = Object.assign({}, data)
this.model = Object.assign({}, record)
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model, 'sectionNumber', 'standardContentOrDemand'))
this.form.setFieldsValue(this.model)
})
},
getFileInfo (fileId) {
@@ -158,12 +163,24 @@ export default {
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
const param = Object.assign({}, this.model, values)
if (!param.processEsInspectId) {
param.processEsInspectId = this.data.id
}
console.log(param)
this.$emit('ok', param, this.index)
this.form.resetFields()
this.model = {}
this.confirmLoading = false
const fn = param.id ? editInspectionContentTable : addInspectionContentTable
fn(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok', param, this.index)
this.form.resetFields()
this.model = {}
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
}
})
},
@@ -172,11 +189,23 @@ export default {
this.form.validateFields((err, values) => {
if (!err) {
this.confirmLoading = true
const param = Object.assign({}, values)
const param = Object.assign({}, this.model, values)
if (!this.model.processEsInspectId) {
param.processEsInspectId = this.data.id
}
console.log(param)
this.$emit('ok', param, this.index)
this.close()
this.confirmLoading = false
const fn = param.id ? editInspectionContentTable : addInspectionContentTable
fn(param).then(res => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok', param, this.index)
this.close()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
}
})
}
@@ -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">
<p>
{{ $t('workCenter.esInspectionProcess.enterpriseStandard') }}
{{model.inspectNo}}
@@ -25,7 +25,7 @@
:can-drag="true"
rowKey="id"
:row-selection="null"
:pagination="ipagination"
:pagination="false"
:scroll="{x: '100%'}"
@change="tableOnChange">
@@ -43,7 +43,7 @@
<template slot="action" slot-scope="{text, record, index}">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
</template>
</j-table>
@@ -75,42 +75,42 @@ export default {
title: this.$t('workCenter.esInspectionProcess.nonCompliantDescription'),
align: 'center',
width: 120,
dataIndex: 'nonCompliantDescription',
dataIndex: 'issue',
scopedSlots: { customRender: 'text' }
},
{ // 整改措施
title: this.$t('workCenter.esInspectionProcess.rectificationMeasures'),
align: 'center',
width: 180,
dataIndex: 'rectificationMeasures',
dataIndex: 'rectifyMeasure',
scopedSlots: { customRender: 'text' }
},
{ // 整改负责人
title: this.$t('workCenter.esInspectionProcess.rectificationDirector'),
align: 'center',
width: 180,
dataIndex: 'rectificationDirector',
dataIndex: 'responseUserDictText',
scopedSlots: { customRender: 'text' }
},
{ // 整改计划完成时间
title: this.$t('workCenter.esInspectionProcess.rectificationPlanDoneDate'),
align: 'center',
width: 140,
dataIndex: 'rectificationPlanDoneDate',
width: 120,
dataIndex: 'planCompleteDate',
scopedSlots: { customRender: 'text' }
},
{ // 整改实际完成时间
title: this.$t('workCenter.esInspectionProcess.rectificationRealityDoneDate'),
align: 'center',
width: 100,
dataIndex: 'rectificationRealityDoneDate',
width: 120,
dataIndex: 'actualCompleteDate',
scopedSlots: { customRender: 'text' }
},
{ // 整改状态
title: this.$t('workCenter.esInspectionProcess.rectificationStatus'),
align: 'center',
width: 100,
dataIndex: 'rectificationStatus',
dataIndex: 'rectifyStatus_dictText',
scopedSlots: { customRender: 'text' }
},
{
@@ -129,17 +129,19 @@ export default {
drawerWidth: 1000,
visible: false,
model: {},
confirmLoading: false,
url: {
list: ''
list: '/laws.enterprise/enterpriseStandardInspectRectifyPlan/queryByProcessEsInspectId',
delete: '/laws.enterprise/enterpriseStandardInspectRectifyPlan/delete'
},
dataSource: [{}],
dataSource: [],
columns: columns.slice(0, this.disabled ? 6 : 7)
}
},
methods: {
show (record) {
this.filters = {}
this.filters = {
processEsInspectId: record.id
}
this.loadData()
this.model = Object.assign({}, record)
this.visible = true
@@ -171,6 +173,16 @@ export default {
this.orderByField = sorter.columnKey
this.ipagination = pagination
this.getTableList()
},
handleAdd () {
this.$refs.modalForm.add(this.model)
this.$refs.modalForm.title = this.$t('newlyAdded')
this.$refs.modalForm.disableSubmit = false
},
handleEdit (record) {
this.$refs.modalForm.edit(this.model, record)
this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.disableSubmit = false
}
}
}
@@ -14,30 +14,31 @@
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="sectionClause"
prop="inspectContentId"
:label="$t('workCenter.esInspectionProcess.sectionClause')">
<a-select v-model="form.sectionClause"
<a-select v-model="form.inspectContentId"
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.sectionClause')"
show-search
@change="changeSectionClause"
:filter-option="filterOption">
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.name }}</a-select-option>
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.standardNo }}</a-select-option>
</a-select>
</a-form-model-item>
<!-- 标准内容或要求 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="standardContentOrDemand"
prop="standardRequire"
:label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
<a-input :max-length="50" v-model="form.standardContentOrDemand" disabled class="readonly-transparent" />
<a-input :max-length="50" v-model="form.standardRequire" disabled class="readonly-transparent" />
</a-form-model-item>
<!-- 执行情况 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="implementation"
prop="executionStatus"
:label="$t('workCenter.esInspectionProcess.implementation')">
<a-input :max-length="50" v-model="form.implementation" disabled
<a-input :max-length="50" v-model="form.executionStatus" disabled
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.implementation')" />
</a-form-model-item>
<!-- 附件 -->
@@ -45,16 +46,22 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.file')"
prop="file">
<a-input :max-length="50" v-model="form.file" disabled class="readonly-transparent" />
prop="attachment">
<a-button type="primary" class="button-text" @click="clickButtonToUpload">
{{
(form.attachment === 'null' || form.attachment === '' || form.attachment === null || form.attachment === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
</a-button>
</a-form-model-item>
<!-- 评分 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="score">
<a-input-number v-model="form.score" :min="1" :max="200" disabled
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200" disabled
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -63,23 +70,23 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.isNeedRectification')"
prop="isNeedRectification">
prop="isRectify">
<j-dict-select-tag :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.isNeedRectification')"
type="radio"
dictCode="yn"
@change="changeIsNeedRectification"
v-model="form.isNeedRectification" />
v-model="form.isRectify" />
</a-form-model-item>
<!-- 不符合项描述 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.nonCompliantDescription')"
prop="nonCompliantDescription">
prop="issue">
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.nonCompliantDescription')"
:maxLength="500"
:rows="4"
v-model="form.nonCompliantDescription"/>
v-model="form.issue"/>
</a-form-model-item>
<template v-if="isNeedRectification">
<!-- 整改措施 -->
@@ -87,44 +94,45 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.rectificationMeasures')"
prop="rectificationMeasures">
prop="rectifyMeasure">
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.rectificationMeasures')"
:maxLength="500"
:rows="4"
v-model="form.rectificationMeasures"/>
v-model="form.rectifyMeasure"/>
</a-form-model-item>
<!-- 整改单位 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.rectificationUnit')"
prop="rectificationUnit">
prop="responseDepart">
<j-select-depart :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.rectificationUnit')"
v-model="form.rectificationUnit" />
v-model="form.responseDepart" />
</a-form-model-item>
<!-- 整改负责人 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.rectificationDirector')"
prop="rectificationDirector">
prop="responseUser">
<user-selection :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.rectificationDirector')"
type="radio" v-model="form.rectificationDirector"/>
type="radio" v-model="form.responseUser" :nameStr="form.responseUserDictText"/>
</a-form-model-item>
<!-- 计划完成日期 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.planDoneDate')"
prop="planDoneDate">
<j-date date-format="YYYY-MM-DD" style="width: 100%" showType="day"
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.planDoneDate')"
v-model="form.planDoneDate" />
prop="planCompleteDate">
<a-date-picker :placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.planDoneDate')"
style="width: 100%"
value-format="YYYY-MM-DD hh:mm:ss"
v-model="form.planCompleteDate" />
</a-form-model-item>
</template>
</a-form-model>
</a-spin>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false"></upload-file>
<upload-file ref="uploadFile" @change="uploadFileChange" :return-url="false" disabled></upload-file>
</j-modal>
</template>
@@ -132,6 +140,11 @@
import UploadFile from '@comp/UploadFile'
import UserSelection from '@comp/selection/UserSelection'
import {
addInspectionRectificationPlanTable, editInspectionRectificationPlanTable,
getInspectionContentTable,
queryByInspectContentId
} from '@api/workCenter'
export default {
name: 'InspectionProcessRectificationPlanModal',
components: { UserSelection, UploadFile },
@@ -141,6 +154,9 @@ export default {
drawerWidth: 600,
visible: false,
form: {},
// 父表中当前行
data: {},
// 当前表中当前行
model: {},
confirmLoading: false,
labelCol: {
@@ -157,27 +173,27 @@ export default {
isNeedRectification: null,
rules: {
// 是否需要整改
isNeedRectification: [
isRectify: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.isNeedRectification'), trigger: 'change' }
],
// 不符合项描述
nonCompliantDescription: [
issue: [
{ required: false, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.nonCompliantDescription'), trigger: 'blur' }
],
// 整改措施
rectificationMeasures: [
rectifyMeasure: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.rectificationMeasures'), trigger: 'blur' }
],
// 整改单位
rectificationUnit: [
responseDepart: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.rectificationUnit'), trigger: 'change' }
],
// 整改负责人
rectificationDirector: [
responseUser: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.rectificationDirector'), trigger: 'change' }
],
// 计划完成日期
planDoneDate: [
planCompleteDate: [
{ required: true, message: this.$t('pleaseSelect') + this.$t('workCenter.esInspectionProcess.planDoneDate'), trigger: 'change' }
]
}
@@ -186,21 +202,62 @@ export default {
watch: {
// 是否需要整改 改变时,修改 不符合项描述 必填状态
isNeedRectification (val) {
this.rules.nonCompliantDescription[0].required = val
this.rules.issue[0].required = val
}
},
methods: {
add () {
this.edit({})
add (data) {
this.edit(data, {})
},
edit (record) {
this.form = Object.assign({}, record)
edit (data, record) {
this.data = Object.assign({}, data)
// 获取章节条款下拉
this.initSectionClauseList()
const { inspectContentId, requirement, executionStatus, attachment, evaluateScore } = record.enterpriseStandardInspectReport || {}
this.form = Object.assign({}, record, {
inspectContentId,
standardRequire: requirement,
executionStatus,
attachment,
evaluateScore
})
this.changeIsNeedRectification(record.isRectify)
// this.changeSectionClause(record.inspectContentId)
this.visible = true
},
// 确定
handleOk () {
this.$refs.form.validate((err, value) => {
console.log(err, value)
this.$refs.form.validate(valid => {
if (valid) {
const params = Object.assign({}, this.model, this.form)
const fn = params.id ? editInspectionRectificationPlanTable : addInspectionRectificationPlanTable
if (!params.processEsInspectId) {
params.processEsInspectId = this.data.id
}
// 根据是否整改,判断整改状态 1整改中 4无需整改
switch (params.isRectify + '') {
case '0':
params.rectifyStatus = '1'
break
case '1':
params.rectifyStatus = '4'
break
}
this.confirmLoading = true
fn(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.close()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
} else {
return false
}
})
// this.close()
},
@@ -218,8 +275,8 @@ export default {
this.visible = false
},
// 点击点击上传按钮
clickButtonToUpload (item) {
this.$refs.uploadFile.open(item.fileId)
clickButtonToUpload () {
this.$refs.uploadFile.open(this.form.attachment)
// this.uploadName = item.dbFieldName
},
// 修改事件:是否需要整改
@@ -241,7 +298,7 @@ export default {
})
}
/** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',')
this.form.attachment = attIdList.join(',')
},
// 正则替换小数点
limitNumber (value) {
@@ -252,6 +309,41 @@ export default {
} else {
return 0
}
},
// 初始化章节条款下拉
initSectionClauseList () {
getInspectionContentTable({
processEsInspectId: this.data.id
}).then(res => {
if (res.success) {
this.sectionClauseList = res.result || []
}
})
},
// 章节条款改变
changeSectionClause (val) {
if (val) {
// const obj = this.sectionClauseList.find(item => item.id === val)
queryByInspectContentId({
inspectContentId: val
}).then(res => {
if (res.success) {
const { id, standardRequire, executionStatus, attachment, evaluateScore } = res.result || {}
this.form.inspectReportId = id
this.form.standardRequire = standardRequire
this.form.executionStatus = executionStatus
this.form.attachment = attachment
this.form.evaluateScore = evaluateScore
this.$forceUpdate()
}
})
} else {
this.form.inspectReportId = undefined
this.form.standardRequire = undefined
this.form.executionStatus = undefined
this.form.attachment = undefined
this.form.evaluateScore = undefined
}
}
}
}
@@ -25,7 +25,7 @@
:can-drag="true"
rowKey="id"
:row-selection="null"
:pagination="ipagination"
:pagination="false"
:scroll="{x: '100%'}"
@change="tableOnChange">
@@ -39,17 +39,25 @@
</a-tooltip>
</template>
<!-- 附件 -->
<template v-slot:file="{text, record}">
<a v-if="text" @click="fileLook(record)">{{ $t('view') }}</a>
<div v-else class="table-text">{{ global.emptyLine }}</div>
</template>
<!-- 操作 -->
<template slot="action" slot-scope="{text, record, index}">
<a @click="handleEdit(record, index)" >{{ $t('edit') }}</a>
<a-divider type="vertical" />
<a @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
<a @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
</template>
</j-table>
</a-spin>
<!-- 新增编辑稽查报告 -->
<inspection-process-report-modal ref="modalForm" @ok="modalFormOk"/>
<!-- 上传回显 -->
<upload-file ref="uploadFile" disabled></upload-file>
</j-modal>
</template>
@@ -58,11 +66,12 @@ import JTable from '@comp/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import InspectionProcessReportModal
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReportModal'
import UploadFile from '@comp/UploadFile'
export default {
name: 'InspectionProcessReport',
mixins: [JeroListMixin],
components: { InspectionProcessReportModal, JTable },
components: { UploadFile, InspectionProcessReportModal, JTable },
props: {
disabled: {
type: Boolean,
@@ -85,35 +94,35 @@ export default {
title: this.$t('workCenter.esInspectionProcess.accordingToTerms'),
align: 'center',
width: 120,
dataIndex: 'planInspectionDate',
dataIndex: 'baseClause',
scopedSlots: { customRender: 'text' }
},
{ // 标准内容或要求
title: this.$t('workCenter.esInspectionProcess.standardContentOrDemand'),
align: 'center',
width: 180,
dataIndex: 'inspectionDirector',
dataIndex: 'standardRequire',
scopedSlots: { customRender: 'text' }
},
{ // 执行情况
title: this.$t('workCenter.esInspectionProcess.implementation'),
align: 'center',
width: 180,
dataIndex: 'implementation',
dataIndex: 'executionStatus',
scopedSlots: { customRender: 'text' }
},
{ // 附件
title: this.$t('workCenter.esInspectionProcess.file'),
align: 'center',
width: 140,
dataIndex: 'file',
scopedSlots: { customRender: 'text' }
dataIndex: 'attachmentName',
scopedSlots: { customRender: 'file' }
},
{ // 评分
title: this.$t('workCenter.esInspectionProcess.score'),
align: 'center',
width: 100,
dataIndex: 'score',
dataIndex: 'evaluateScore',
scopedSlots: { customRender: 'text' }
},
{
@@ -134,22 +143,26 @@ export default {
model: {},
confirmLoading: false,
url: {
list: ''
list: '/laws.enterprise/EnterpriseStandardInspectReport/queryByProcessEsInspectId',
delete: '/laws.enterprise/EnterpriseStandardInspectReport/delete'
},
dataSource: [{}],
dataSource: [],
columns: columns.slice(0, this.disabled ? 6 : 7)
}
},
methods: {
show (record) {
this.filters = {}
this.filters = {
processEsInspectId: record.id
}
this.loadData()
this.model = Object.assign({}, record)
this.visible = true
},
// 确定
handleOk () {
console.log(this.selectedRowKeys)
// console.log(this.selectedRowKeys)
this.$emit('ok')
this.close()
},
// 关闭
@@ -174,6 +187,20 @@ export default {
this.orderByField = sorter.columnKey
this.ipagination = pagination
this.getTableList()
},
handleAdd () {
this.$refs.modalForm.add(this.model)
this.$refs.modalForm.title = this.$t('newlyAdded')
this.$refs.modalForm.disableSubmit = false
},
handleEdit (record) {
this.$refs.modalForm.edit(this.model, record)
this.$refs.modalForm.title = this.$t('edit')
this.$refs.modalForm.disableSubmit = false
},
// 附件列的查看点击
fileLook (record) {
this.$refs.uploadFile.open(record.attachment)
}
}
}
@@ -14,30 +14,31 @@
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="sectionClause"
prop="inspectContentId"
:label="$t('workCenter.esInspectionProcess.sectionClause')">
<a-select v-model="form.sectionClause"
<a-select v-model="form.inspectContentId"
:placeholder="$t('pleaseSelect') + $t('workCenter.esInspectionProcess.sectionClause')"
show-search
@change="changeSectionClause"
:filter-option="filterOption">
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.name }}</a-select-option>
<a-select-option v-for="item in sectionClauseList" :value="item.id" :key="item.id">{{ item.standardNo }}</a-select-option>
</a-select>
</a-form-model-item>
<!-- 标准内容或要求 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="standardContentOrDemand"
prop="standardRequire"
:label="$t('workCenter.esInspectionProcess.standardContentOrDemand')">
<a-input :max-length="50" v-model="form.standardContentOrDemand" disabled class="readonly-transparent" />
<a-input :max-length="50" v-model="form.standardRequire" disabled class="readonly-transparent" />
</a-form-model-item>
<!-- 执行情况 -->
<a-form-model-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
prop="implementation"
prop="executionStatus"
:label="$t('workCenter.esInspectionProcess.implementation')">
<a-input :max-length="50" v-model="form.implementation"
<a-input :max-length="50" v-model="form.executionStatus"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.implementation')" />
</a-form-model-item>
<!-- 附件 -->
@@ -45,10 +46,10 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.file')"
prop="file">
prop="attachment">
<a-button type="primary" class="button-text" @click="clickButtonToUpload">
{{
(form.file === 'null' || form.file === '' || form.file === null || form.file === undefined)
(form.attachment === 'null' || form.attachment === '' || form.attachment === null || form.attachment === undefined)
? $t('uploadFile.clickUpload')
: $t('uploadFile.viewUploadedFiles')
}}
@@ -59,8 +60,8 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
:label="$t('workCenter.esInspectionProcess.score')"
prop="score">
<a-input-number v-model="form.score" :min="1" :max="200"
prop="evaluateScore">
<a-input-number v-model="form.evaluateScore" :min="1" :max="200"
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionProcess.score')"
style="width: 100%" :formatter="limitNumber" :parser="limitNumber" />
</a-form-model-item>
@@ -72,6 +73,7 @@
<script>
import UploadFile from '@comp/UploadFile'
import { addInspectionReportTable, editInspectionReportTable, getInspectionContentTable } from '@api/workCenter'
export default {
name: 'InspectionProcessReportModal',
components: { UploadFile },
@@ -81,6 +83,9 @@ export default {
drawerWidth: 600,
visible: false,
form: {},
// 父表中当前行
data: {},
// 当前表中当前行
model: {},
confirmLoading: false,
labelCol: {
@@ -94,27 +99,52 @@ export default {
// 章节条款下拉
sectionClauseList: [],
rules: {
// 执行情况
implementation: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.implementation'), trigger: 'blur' }
],
score: [
// 评分
evaluateScore: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionProcess.score'), trigger: 'blur' }
]
}
}
},
methods: {
add () {
this.edit({})
add (data) {
this.edit(data, {})
},
edit (record) {
edit (data, record) {
this.data = Object.assign({}, data)
this.form = Object.assign({}, record)
// 获取章节条款下拉
this.initSectionClauseList()
this.visible = true
},
// 确定
handleOk () {
this.$refs.form.validate((err) => {
console.log(err)
this.$refs.form.validate(valid => {
if (valid) {
const params = Object.assign({}, this.model, this.form)
const fn = params.id ? editInspectionReportTable : addInspectionReportTable
if (!params.processEsInspectId) {
params.processEsInspectId = this.data.id
}
this.confirmLoading = true
fn(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.$emit('ok')
this.close()
} else {
this.$message.warn(res.message)
}
}).finally(() => {
this.confirmLoading = false
})
} else {
return false
}
})
// this.close()
},
@@ -132,8 +162,8 @@ export default {
this.visible = false
},
// 点击点击上传按钮
clickButtonToUpload (item) {
this.$refs.uploadFile.open(item.fileId)
clickButtonToUpload () {
this.$refs.uploadFile.open(this.form.attachment)
// this.uploadName = item.dbFieldName
},
// 文件上传改变后的回调
@@ -145,7 +175,7 @@ export default {
})
}
/** 赋值给当前对应的表单文件 */
this.form.file = attIdList.join(',')
this.form.attachment = attIdList.join(',')
},
// 正则替换小数点
limitNumber (value) {
@@ -156,6 +186,25 @@ export default {
} else {
return 0
}
},
// 初始化章节条款下拉
initSectionClauseList () {
getInspectionContentTable({
processEsInspectId: this.data.id
}).then(res => {
if (res.success) {
this.sectionClauseList = res.result || []
}
})
},
// 章节条款改变
changeSectionClause (val) {
if (val) {
const obj = this.sectionClauseList.find(item => item.id === val)
this.form.standardRequire = obj.requirement
} else {
this.form.standardRequire = ''
}
}
}
}
@@ -11,6 +11,7 @@
:dataSource="dataSource"
:can-drag="true"
rowKey="id"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
@change="tableOnChange">
@@ -27,8 +28,14 @@
<!-- 实际稽查完成日期 -->
<template v-slot:actualInspectionCompletionDate="{text, record}">
<div class="table-form" v-if="isInputInspectionReport">
<j-date v-model="record.actualInspectionCompletionDate" :placeholder="$t('pleaseSelect')+$t('date')" showType="day"
style="width: 100%" :getCalendarContainer="(el) => getNumParentNode(el, 5)"></j-date>
<a-date-picker :placeholder="$t('pleaseSelect')+$t('date')"
style="width: 100%"
@change="changeRowData(record, 'completeDate')"
value-format="YYYY-MM-DD hh:mm:ss"
v-model="record.completeDate" />
<!--<j-date v-model="record.actualInspectionCompletionDate" showType="day"-->
<!-- @change="changeRowData(record)" value-format="YYYY-MM-DD hh:mm:ss"-->
<!-- style="width: 100%" :getCalendarContainer="(el) => getNumParentNode(el, 5)"></j-date>-->
</div>
<a-tooltip v-else overlay-class-name="tooltip-style">
<template slot="title">{{ text || text === 0 ? text : global.emptyLine }}</template>
@@ -40,7 +47,7 @@
<!-- 实际稽查人 -->
<template v-slot:actualInspector="{text, record}">
<div class="table-form" v-if="isInputInspectionReport">
<a-select v-model="record.actualInspector" style="width: 100%" allowClear
<a-select v-model="record.actualInspectUser" style="width: 100%" allowClear @change="changeRowData(record, 'actualInspectUser')"
:placeholder="$t('pleaseSelect')+$t('workCenter.esInspectionProcess.actualInspector')">
<a-select-option v-for="item in userList" :key="item.id" :value="item.id">{{ item.realname + '(' + item.username + ')' }}</a-select-option>
</a-select>
@@ -56,9 +63,9 @@
<template slot="action" slot-scope="{text, record, index}">
<!-- 节点1显示稽查内容和删除节点2显示稽查内容只读 -->
<template v-if="isInitiate || isDirectorLeaderApprovalOne">
<a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.num || 0}${$t('strip')})` }}</a>
<a-divider type="vertical" />
<a v-if="isInitiate" @click="handleDelete(record, index)" >{{ $t('delete') }}</a>
<a @click="handleInspectionContent(record, index)" >{{ $t('workCenter.esInspectionProcess.inspectionContent') + `(${record.standardInspectContentCount || 0}${$t('strip')})` }}</a>
<a-divider v-if="isInitiate" type="vertical" />
<a v-if="isInitiate" @click="handleDelete(record.id)" >{{ $t('delete') }}</a>
</template>
<!-- 后续节点都显示稽查报告和整改计划 -->
<template v-else>
@@ -71,7 +78,7 @@
</j-table>
</div>
<!-- 添加稽查计划 -->
<inspection-process-table-modal ref="inspectionProcessTableModal" @ok="modalFormOk"/>
<inspection-process-table-modal ref="inspectionProcessTableModal" @ok="modalFormOk" v-if="isInitiate"/>
<!-- 稽查内容节点2只查看后续不显示 -->
<inspection-process-content ref="inspectionProcessContent" @ok="modalFormOk" :disabled="!isInitiate"/>
<!-- 稽查报告节点3填写后续只查看 -->
@@ -93,7 +100,9 @@ import InspectionProcessReport
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessReport'
import InspectionProcessRectificationPlan
from '@views/workCenter/enterpriseStandardInspectionProcess/modules/InspectionProcessRectificationPlan'
import { EsInspectionProcess } from '@/enums/commonEnums'
import { EsInspectionPlan, EsInspectionProcess } from '@/enums/commonEnums'
import { editInspectProcessTable } from '@api/workCenter'
import { getAction } from '@api/manage'
export default {
name: 'InspectionProcessTable',
components: { InspectionProcessRectificationPlan, InspectionProcessReport, InspectionProcessContent, InspectionProcessTableModal, JTable },
@@ -103,12 +112,19 @@ export default {
currentNode: {
type: String,
required: true
},
// 项目id
projectId: {
type: String,
required: true
}
},
data () {
return {
disableMixinCreated: true,
url: {
list: ''
list: '/esinspect/processEsInspect/queryByList',
delete: '/esinspect/processEsInspect/delete'
},
model: {},
userList: [],
@@ -128,56 +144,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.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' }
},
{ // 实际稽查完成日期
title: this.$t('workCenter.esInspectionProcess.actualInspectionCompletionDate'),
align: 'center',
width: 200,
dataIndex: 'actualInspectionCompletionDate',
dataIndex: 'completeDate',
showCodeList: [
EsInspectionProcess.inputInspectionReport.value,
EsInspectionProcess.directorLeaderApprovalTwo.value,
@@ -189,7 +205,7 @@ export default {
title: this.$t('workCenter.esInspectionProcess.actualInspector'),
align: 'center',
width: 200,
dataIndex: 'actualInspector',
dataIndex: 'actualInspectUser',
showCodeList: [
EsInspectionProcess.inputInspectionReport.value,
EsInspectionProcess.directorLeaderApprovalTwo.value,
@@ -242,12 +258,41 @@ export default {
})
}
},
watch: {
// 列表查询带上项目id
projectId: {
immediate: true,
handler (val) {
if (!val) {
return
}
this.filters.projectId = this.projectId
if (this.currentNode === EsInspectionPlan.fillInComments.value) {
this.filters.nodeId = this.$route.query.nodeId
}
this.loadData()
}
}
},
mounted () {
if (this.isInputInspectionReport) {
this.getUserList()
}
},
methods: {
// 修改:实际稽查完成日期、实际稽查人
changeRowData (record, field) {
editInspectProcessTable({
id: record.id,
[field]: record[field]
}).then(res => {
if (res.success) {
this.$message.success(res.message)
} else {
this.$message.warn(res.message)
}
})
},
// 返回用户列表
getUserList () {
getUserList({ pageNo: -1, pageSize: -1, order: 'desc', column: 'createTime' }).then(res => {
@@ -262,7 +307,9 @@ export default {
},
// 添加计划
handleAdd () {
this.$refs.inspectionProcessTableModal.show()
this.$refs.inspectionProcessTableModal.show({
projectId: this.projectId
})
},
// 跳转详情
detailClick (record) {
@@ -279,9 +326,11 @@ export default {
this.ipagination = pagination
this.getTableList()
},
// 稽查报告
handleInspectionReport (record) {
this.$refs.inspectionProcessReport.show(record)
},
// 整改计划
handleRectificationPlan (record) {
this.$refs.inspectionProcessRectificationPlan.show(record)
},
@@ -291,6 +340,40 @@ export default {
return el.parentNode || document.body
}
return this.getNumParentNode(el.parentNode, n - 1)
},
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
return 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,
actualInspectUser: item.actualInspectUser || 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
})
}
}
}
@@ -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 JTable from '@comp/jero/JTable'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { addInspectProcessTable } from '@api/workCenter'
export default {
name: 'InspectionProcessTableModal',
@@ -70,64 +71,65 @@ 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' }
}
]
}
},
created () {
},
methods: {
show (record) {
this.loadData()
@@ -136,14 +138,33 @@ export default {
},
// 确定
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
addInspectProcessTable(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
},
@@ -165,6 +165,18 @@ export default {
case '16':
path = '/workCenter/EnterpriseStandardInspectionPlan'
break
// 企标稽查流程
case '17':
path = '/workCenter/EnterpriseStandardInspectionProcess'
break
// 稽查延期申请流程
case '18':
path = '/workCenter/InspectionExtensionRequestProcess'
break
// 企标稽查整改
case '19':
path = '/workCenter/EnterpriseStandardInspectionRectification'
break
}
this.$router.push({
path: path,
@@ -204,6 +204,18 @@ export default {
case '16':
path = '/workCenter/EnterpriseStandardInspectionPlan'
break
// 企标稽查流程
case '17':
path = '/workCenter/EnterpriseStandardInspectionProcess'
break
// 稽查延期申请流程
case '18':
path = '/workCenter/InspectionExtensionRequestProcess'
break
// 企标稽查整改
case '19':
path = '/workCenter/EnterpriseStandardInspectionRectification'
break
}
this.$router.push({
path: path,