Ver código fonte

Merge branch 'main' of http://git.cc-lotus.info/Information/cxyy-admin

lrf 7 meses atrás
pai
commit
536608cdc6
1 arquivos alterados com 6 adições e 3 exclusões
  1. 6 3
      src/views/information/parts/platform/match.vue

+ 6 - 3
src/views/information/parts/platform/match.vue

@@ -173,6 +173,7 @@ const dictDataStore = DictDataStore()
 const tagsStore = TagsStore()
 const sectorStore = SectorStore()
 const processStore = ProcessStore()
+const match_id = ref('')
 const data = ref([])
 const searchForm = ref({})
 const fields = [
@@ -398,9 +399,10 @@ const toSave = async () => {
   if (get(data, 'id')) res = await store.update({ ...data, ...other })
   else res = await store.create({ ...data, ...other })
   if ($checkRes(res, true)) {
-    toProcessSave()
-    search({ skip, limit })
-    toClose()
+    if (res.data.id) match_id.value = res.data.id
+    await toProcessSave()
+    await search({ skip, limit })
+    await toClose()
   }
 }
 // 审核
@@ -437,6 +439,7 @@ const toProcessSave = async () => {
   for (const val of processList.value) {
     const data = cloneDeep(val)
     delete data.sid
+    if (!val.match) val.match = match_id.value
     if (get(data, 'id')) await processStore.update(data)
     else await processStore.create(data)
   }