update 企标稽查计划
This commit is contained in:
+3
-5
@@ -55,7 +55,7 @@
|
||||
|
||||
<!-- 业务基本信息 -->
|
||||
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
|
||||
<inspection-plan-table ref="inspectionPlanTable" :current-node="currentNode" />
|
||||
<inspection-plan-table ref="inspectionPlanTable" :current-node="currentNode" :project-id="projectId"/>
|
||||
<!-- 会签表单 -->
|
||||
<a-form :form="countersignForm" v-if="currentNode === EsInspectionPlan.liaisonCollect.value">
|
||||
<a-row type="flex">
|
||||
@@ -288,9 +288,7 @@ export default {
|
||||
}
|
||||
}
|
||||
// 获取表格数据
|
||||
const params = {
|
||||
processEsInspectPlanList: this.$refs.inspectionPlanTable.getData()
|
||||
}
|
||||
const params = {}
|
||||
if (isValidate) {
|
||||
this.validateFormList(
|
||||
this.processInfoForm,
|
||||
@@ -298,7 +296,7 @@ export default {
|
||||
this.approvalInfoForm
|
||||
).then(res => {
|
||||
params.processAll = res[0]
|
||||
if (params.processAll.dueTime && params.processAll.dueTime.includes(' 00:00:00')) {
|
||||
if (params.processAll.dueTime && !params.processAll.dueTime.includes(' 00:00:00')) {
|
||||
params.processAll.dueTime = params.processAll.dueTime + ' 00:00:00'
|
||||
}
|
||||
params.processAll.projectId = this.projectId
|
||||
|
||||
+23
-4
@@ -104,9 +104,17 @@ import StandardSelection from '@comp/selection/StandardSelection'
|
||||
import UserSelection from '@comp/selection/UserSelection'
|
||||
import { getWorkGroupTreeList } from '@api/api'
|
||||
import WorkGroupSelection from '@comp/selection/WorkGroupSelection'
|
||||
import { addInspectPlanTable, editInspectPlanTable } from '@api/workCenter'
|
||||
|
||||
export default {
|
||||
name: 'InspectionPlanDrawer',
|
||||
props: {
|
||||
// 项目id
|
||||
projectId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
components: { WorkGroupSelection, UserSelection, StandardSelection },
|
||||
data () {
|
||||
return {
|
||||
@@ -240,11 +248,22 @@ export default {
|
||||
if (this.confirmLoading) return
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
const value = Object.assign({}, this.model, values)
|
||||
const params = Object.assign({
|
||||
projectId: this.projectId
|
||||
}, this.model, values)
|
||||
this.confirmLoading = true
|
||||
this.$emit('ok', value)
|
||||
this.confirmLoading = false
|
||||
this.close()
|
||||
const fn = params.id ? editInspectPlanTable : addInspectPlanTable
|
||||
fn(params).then(res => {
|
||||
if (res.success) {
|
||||
this.$emit('ok', params)
|
||||
this.$message.success(res.message)
|
||||
this.close()
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
+17
-20
@@ -61,7 +61,7 @@
|
||||
</div>
|
||||
|
||||
<!-- 新增/编辑稽查计划 -->
|
||||
<inspection-plan-drawer ref="modalForm" @ok="addOrEditOk"/>
|
||||
<inspection-plan-drawer ref="modalForm" @ok="modalFormOk" :project-id="projectId"/>
|
||||
<!-- 填写意见、意见回显 -->
|
||||
<write-opinion-modal ref="writeOpinionModal" @ok="modalFormOk"/>
|
||||
<!-- 节点3:所属部门意见-查看 -->
|
||||
@@ -86,6 +86,11 @@ export default {
|
||||
currentNode: {
|
||||
type: String,
|
||||
required: true
|
||||
},
|
||||
// 项目id
|
||||
projectId: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data () {
|
||||
@@ -93,7 +98,10 @@ export default {
|
||||
EsInspectionPlan,
|
||||
disableMixinCreated: true,
|
||||
url: {
|
||||
list: '/process/processEsInspectPlan/page'
|
||||
list: '/process/processEsInspectPlan/page',
|
||||
delete: '/process/processEsInspectPlan/delete',
|
||||
importExcelUrl: '/process/processEsInspectPlan/importExcel',
|
||||
deleteBatch: '/process/processEsInspectPlan/deleteBatch'
|
||||
},
|
||||
model: {},
|
||||
dataSource: [],
|
||||
@@ -168,7 +176,7 @@ export default {
|
||||
title: this.$t('workCenter.esInspectionPlan.departmentPersonnel'),
|
||||
align: 'center',
|
||||
width: 120,
|
||||
dataIndex: 'departmentPersonnel',
|
||||
dataIndex: 'objectOfConsultation',
|
||||
showCodeList: [EsInspectionPlan.initiate.value],
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
@@ -217,6 +225,12 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 列表查询带上项目id
|
||||
projectId () {
|
||||
this.filters.projectId = this.projectId
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 是否发起节点和联络人汇总节点
|
||||
isInitiateOrLiaisonCollect () {
|
||||
@@ -242,23 +256,6 @@ export default {
|
||||
getData () {
|
||||
return this.dataSource
|
||||
},
|
||||
// 表单提交
|
||||
addOrEditOk (formData) {
|
||||
console.log(formData)
|
||||
if (formData.id) {
|
||||
// 编辑
|
||||
for (let i = 0; i < this.dataSource.length; i++) {
|
||||
if (this.dataSource[i].id === formData.id) {
|
||||
this.dataSource.splice(i, 1, formData)
|
||||
return
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 添加
|
||||
formData.id = this.dataSource.length
|
||||
this.dataSource.push(formData)
|
||||
}
|
||||
},
|
||||
// 更新表格数据
|
||||
updateData (list) {
|
||||
this.dataSource = list || []
|
||||
|
||||
Reference in New Issue
Block a user