fix 标准征求意见流程、法规采购流程保存

This commit is contained in:
赵霄
2024-01-09 17:44:53 +08:00
parent a1e6820483
commit 293ebef0ab
2 changed files with 50 additions and 22 deletions
@@ -269,18 +269,19 @@ export default {
}
},
created () {
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value
this.initProcessInfo()
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
}
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
this.columns.push(this.operateColumn)
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
this.getPersonInfoStructure(this.processKey, () => {
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
if (this.$route.query.processInstanceId || this.$route.query.draftId) {
this.currentNode = this.$route.query.nodeId || ProcurementProcessNodes.initiate.value
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
this.initProcessInfo()
} else {
this.currentNode = ProcurementProcessNodes.initiate.value
this.initPersonInfoData(this.currentNode === ProcurementProcessNodes.initiate.value)
}
if (this.currentNode === ProcurementProcessNodes.initiate.value) {
this.columns.push(this.operateColumn)
}
this.btnList = ProcurementProcessNodes.propertyOfValue('btn', this.currentNode)
})
},
methods: {
@@ -337,7 +338,11 @@ export default {
}
queryProcurementProcessInfo(params).then(res => {
if (res.success) {
const { result } = res
let result = res.result || {}
if (result.infoJsonStr) {
result = JSON.parse(result.infoJsonStr)
this.draftInitPersonInfo(result.userInfoMap)
}
this.businessId = result.businessId
this.processInfo = Object.assign({}, result.basicProcessInfoDTO || {})
this.dataSource = result.businessInfoDTO || []
@@ -447,6 +452,16 @@ export default {
*/
handleSave () {
const formData = this.dealFormData(true)
if (!formData) {
return
}
formData.infoJsonStr = JSON.stringify(formData)
// saveSource:从待办进入保存--1;发起/草稿页面--2
if (this.$route.query.processInstanceId) {
formData.saveSource = 1
} else {
formData.saveSource = 2
}
this.loading = true
saveProcurementProcess(formData).then(res => {
if (res.success) {
@@ -582,4 +597,4 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
</style>