update 企标稽查计划完善

This commit is contained in:
danshihao
2023-11-22 18:18:47 +08:00
parent 16678e037d
commit 61d4f22dc0
5 changed files with 45 additions and 29 deletions
@@ -226,9 +226,8 @@ export default {
// 查询人员信息
this.getPersonInfoStructure(ProcessKey.ES_Inspection_Plan.value)
// 如果是待办进来,就获取详情数据
const { projectId, taskId } = this.$route.query
if (projectId || taskId) {
this.loadPage({ projectId, taskId })
if (this.$route.query.projectId) {
this.loadPage()
return
}
this.getProjectId()
@@ -253,9 +252,14 @@ export default {
/**
* 获取页面详情
*/
loadPage (params) {
this.currentNode = this.$route.query.nodeId
this.projectId = this.$route.query.projectId
loadPage () {
let { projectId, taskId, nodeId } = this.$route.query
// 草稿进来没有nodeId,就默认发起节点
if (!nodeId) {
nodeId = EsInspectionPlan.initiate.value
}
this.currentNode = nodeId
this.projectId = projectId
this.initPersonInfoData(this.currentNode === EsInspectionPlan.initiate.value)
switch (this.currentNode) {
case EsInspectionPlan.initiate.value:
@@ -275,14 +279,25 @@ export default {
break
}
this.loading = true
getInspectPlanDetail(params).then(res => {
getInspectPlanDetail({
projectId,
taskId
}).then(res => {
if (res.success) {
const data = res.result || {}
this.info = data
this.processInfoForm.setFieldsValue({
prcName: data.processAll.prcName,
dueTime: data.processAll.dueTime,
prcMes: data.processAll.prcMes
this.$nextTick(() => {
this.processInfoForm.setFieldsValue({
prcName: data.processAll.prcName,
dueTime: data.processAll.dueTime,
prcMes: data.processAll.prcMes
})
})
this.$nextTick(() => {
this.approvalInfoForm.setFieldsValue({
commitText: data.processApprovalRecord.commitText,
commitFile: data.processApprovalRecord.commitFile
})
})
}
}).finally(() => {
@@ -334,6 +349,9 @@ export default {
if (params.map.pass) {
params.map.pass = params.map.pass + '' === '1'
}
if (params.map.involveList && typeof params.map.involveList === 'string') {
params.map.involveList = params.map.involveList.split(',')
}
resolve(params)
}).catch(err => {
reject(err)
@@ -354,7 +372,7 @@ export default {
personnelObj.opinionFillList = this.$refs.inspectionPlanTable.dataSource.map(item => item.objectOfConsultation)
}
params.processAll = Object.assign({}, this.info.processAll, this.processInfoForm.getFieldsValue())
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
@@ -365,6 +383,9 @@ export default {
if (params.map.pass) {
params.map.pass = params.map.pass + '' === '1'
}
if (params.map.involveList && typeof params.map.involveList === 'string') {
params.map.involveList = params.map.involveList.split(',')
}
resolve(params)
}
})
@@ -378,17 +399,14 @@ export default {
/**
* 转办
*/
continueTurnTo () {
continueTurnTo (userId) {
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)
}).then(res => {
const params = {
taskId: this.$route.query.taskId,
userId
}
transferInspectPlan(params).then(res => {
if (res.success) {
this.$message.success(res.message)
this.goBack()