update 企标稽查计划
This commit is contained in:
@@ -217,6 +217,8 @@ const saveInspectPlan = (params) => postAction('/process/esInspectPlanFlow/flowS
|
||||
const addInspectPlanTable = (params) => postAction('/process/processEsInspectPlan/add', params)
|
||||
// 稽查计划表-编辑
|
||||
const editInspectPlanTable = (params) => postAction('/process/processEsInspectPlan/edit', params)
|
||||
// 稽查计划表-填写意见
|
||||
const fillInOpinionInspectPlanTable = (params) => postAction('/process/processEsInspectPlanOpinion/fillInOpinion', params)
|
||||
|
||||
export {
|
||||
getProcessNodeList,
|
||||
@@ -327,5 +329,6 @@ export {
|
||||
transferInspectPlan,
|
||||
saveInspectPlan,
|
||||
addInspectPlanTable,
|
||||
editInspectPlanTable
|
||||
editInspectPlanTable,
|
||||
fillInOpinionInspectPlanTable
|
||||
}
|
||||
|
||||
+16
-6
@@ -247,6 +247,7 @@ export default {
|
||||
loadPage (params) {
|
||||
this.currentNode = this.$route.query.nodeId
|
||||
this.projectId = this.$route.query.projectId
|
||||
this.initPersonInfoData(this.currentNode === EsInspectionPlan.initiate.value)
|
||||
switch (this.currentNode) {
|
||||
case EsInspectionPlan.initiate.value:
|
||||
this.btn = EsInspectionPlan.initiate.btn
|
||||
@@ -264,6 +265,7 @@ export default {
|
||||
this.btn = EsInspectionPlan.liaisonLeaderApproval.btn
|
||||
break
|
||||
}
|
||||
this.loading = true
|
||||
getInspectPlanDetail(params).then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
@@ -274,6 +276,8 @@ export default {
|
||||
prcMes: data.processAll.prcMes
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
switchChange (value) {
|
||||
@@ -361,6 +365,10 @@ export default {
|
||||
continueTurnTo () {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
// const params = {
|
||||
// taskId: this.$route.query.taskId,
|
||||
// userId: this.$route.query.taskId,
|
||||
// }
|
||||
this.getPageParams().then(res => {
|
||||
console.log(res)
|
||||
return transferInspectPlan(res)
|
||||
@@ -402,12 +410,14 @@ export default {
|
||||
if (this.loading) return
|
||||
this.loading = true
|
||||
let fn
|
||||
if (this.currentNode === EsInspectionPlan.initiate.value) {
|
||||
fn = startInspectPlan
|
||||
} else if (this.currentNode === EsInspectionPlan.fillInComments.value) {
|
||||
fn = approvalInspectPlan
|
||||
} else if (this.currentNode === EsInspectionPlan.liaisonCollect.value) {
|
||||
fn = approvalInspectPlan
|
||||
switch (this.currentNode) {
|
||||
case EsInspectionPlan.initiate.value:
|
||||
fn = startInspectPlan
|
||||
break
|
||||
case EsInspectionPlan.fillInComments.value:
|
||||
case EsInspectionPlan.liaisonCollect.value:
|
||||
fn = approvalInspectPlan
|
||||
break
|
||||
}
|
||||
this.getPageParams().then(res => {
|
||||
console.log(res)
|
||||
|
||||
+19
-12
@@ -17,6 +17,7 @@
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
rowKey="id"
|
||||
:pagination="false"
|
||||
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
|
||||
:scroll="{x: '100%'}"
|
||||
@change="tableOnChange">
|
||||
@@ -51,7 +52,7 @@
|
||||
</template>
|
||||
<!-- 意见 or 填写意见:节点2非自己创建的就是意见和填写意见 -->
|
||||
<template v-else-if="currentNode === EsInspectionPlan.fillInComments.value">
|
||||
<a v-if="!!record.opinion" @click="handleShowOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.opinion') }}</a>
|
||||
<a v-if="record.processEsInspectPlanOpinionList.length" @click="handleShowOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.opinion') }}</a>
|
||||
<a v-else @click="handleWriteOpinion(record, index)" >{{ $t('workCenter.esInspectionPlan.writeOpinion') }}</a>
|
||||
</template>
|
||||
</template>
|
||||
@@ -61,10 +62,10 @@
|
||||
|
||||
<!-- 新增/编辑稽查计划 -->
|
||||
<inspection-plan-drawer ref="modalForm" @ok="modalFormOk" :project-id="projectId"/>
|
||||
<!-- 填写意见、意见回显 -->
|
||||
<write-opinion-modal ref="writeOpinionModal" @ok="modalFormOk"/>
|
||||
<!-- 节点2:填写意见、意见回显 -->
|
||||
<write-opinion-modal ref="writeOpinionModal" v-if="currentNode === EsInspectionPlan.fillInComments.value" @ok="modalFormOk"/>
|
||||
<!-- 节点3:所属部门意见-查看 -->
|
||||
<show-opinion-modal ref="showOpinionModal" @ok="modalFormOk"/>
|
||||
<show-opinion-modal ref="showOpinionModal" v-if="currentNode === EsInspectionPlan.liaisonCollect.value" @ok="modalFormOk"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -133,21 +134,21 @@ export default {
|
||||
title: this.$t('workCenter.esInspectionPlan.planInspectionObjects'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectObject',
|
||||
dataIndex: 'inspectObject_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主责标准化工作组
|
||||
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
dataIndex: 'standardizationWorkGroup',
|
||||
dataIndex: 'standardizationWorkGroup_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 所属部门
|
||||
title: this.$t('workCenter.esInspectionPlan.department'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'belongDept',
|
||||
dataIndex: 'belongDept_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 计划稽查日期
|
||||
@@ -161,14 +162,14 @@ export default {
|
||||
title: this.$t('workCenter.esInspectionPlan.inspectionDirector'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'inspectUser',
|
||||
dataIndex: 'inspectUser_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 标准化组对接人
|
||||
title: this.$t('workCenter.esInspectionPlan.standardizationGroupContactPerson'),
|
||||
align: 'center',
|
||||
width: 140,
|
||||
dataIndex: 'standardizationDockingUser',
|
||||
dataIndex: 'standardizationDockingUser_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 所属部门人员
|
||||
@@ -226,9 +227,15 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
// 列表查询带上项目id
|
||||
projectId () {
|
||||
this.filters.projectId = this.projectId
|
||||
this.loadData()
|
||||
projectId: {
|
||||
immediate: true,
|
||||
handler () {
|
||||
this.filters.projectId = this.projectId
|
||||
if (this.currentNode === EsInspectionPlan.fillInComments.value) {
|
||||
this.filters.nodeId = this.$route.query.nodeId
|
||||
}
|
||||
this.loadData()
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
+22
-13
@@ -14,6 +14,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:can-drag="true"
|
||||
:pagination="false"
|
||||
rowKey="id"
|
||||
ref="table"
|
||||
size="middle"
|
||||
@@ -29,12 +30,12 @@
|
||||
</a-tooltip>
|
||||
</template>
|
||||
</j-table>
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
||||
<a-form-model ref="form" :model="formData" :rules="validatorRules">
|
||||
<a-form-model-item
|
||||
prop="opinion"
|
||||
:label="$t('workCenter.esInspectionPlan.opinion')">
|
||||
<a-textarea :max-length="500" :rows="4" :disabled="disabled"
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionPlan.opinion')" v-model="model.opinion"/>
|
||||
:placeholder="$t('pleaseEnter') + $t('workCenter.esInspectionPlan.opinion')" v-model="formData.opinion"/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
@@ -44,6 +45,7 @@
|
||||
<script>
|
||||
|
||||
import JTable from '@comp/jero/JTable'
|
||||
import { fillInOpinionInspectPlanTable } from '@api/workCenter'
|
||||
export default {
|
||||
name: 'WriteOpinionModal',
|
||||
components: { JTable },
|
||||
@@ -60,47 +62,50 @@ export default {
|
||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('workCenter.esInspectionPlan.opinion'), trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
formData: {
|
||||
opinion: ''
|
||||
},
|
||||
columns: [
|
||||
{ // 稽查依据标准号
|
||||
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: 'inspectObject_dictText',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{ // 主责标准化工作组
|
||||
title: this.$t('workCenter.esInspectionPlan.mainDutyStandardizationGroup'),
|
||||
align: 'center',
|
||||
width: 150,
|
||||
dataIndex: 'mainDutyStandardizationGroup',
|
||||
dataIndex: 'standardizationWorkGroup_dictText',
|
||||
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' }
|
||||
}
|
||||
],
|
||||
@@ -111,6 +116,9 @@ export default {
|
||||
show (record, disabled) {
|
||||
// 是否禁用表单
|
||||
this.disabled = disabled
|
||||
if (disabled) {
|
||||
this.formData.opinion = (record.processEsInspectPlanOpinionList.find(item => item.createBy === this.$store.getters.userInfo.username) || {}).opinion
|
||||
}
|
||||
this.dataSource = [record]
|
||||
this.model = Object.assign({}, record)
|
||||
this.visible = true
|
||||
@@ -122,18 +130,19 @@ export default {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (valid) {
|
||||
that.confirmLoading = true
|
||||
const fun = () => {}
|
||||
const formData = Object.assign({}, this.model)
|
||||
fun(formData).then((res) => {
|
||||
const formData = Object.assign({}, {
|
||||
inspectPlanId: this.model.id
|
||||
}, this.formData)
|
||||
fillInOpinionInspectPlanTable(formData).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false
|
||||
that.close()
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -146,8 +155,8 @@ export default {
|
||||
},
|
||||
close () {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.$refs.form.resetFields()
|
||||
this.visible = false
|
||||
},
|
||||
// 跳转详情
|
||||
detailClick (record) {
|
||||
|
||||
Reference in New Issue
Block a user