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