duy пре 1 година
родитељ
комит
a1639464b9
2 измењених фајлова са 9 додато и 2 уклоњено
  1. 0 1
      src/views/data-fill/wbs.vue
  2. 9 1
      src/views/tentative/detect/components/ListItem.vue

+ 0 - 1
src/views/data-fill/wbs.vue

@@ -1853,7 +1853,6 @@ const tableFormSaveClick = async () => {
             window?.$message?.success('保存成功')
             // await bussPdfsClick()
              const activeKey = ListItemRef.value?.getActiveKey()
-             console.log(activeKey, 'activeKey')
             getTableDataAll(activeKey)
         }
     } else {

+ 9 - 1
src/views/tentative/detect/components/ListItem.vue

@@ -805,6 +805,12 @@ const uploadChartImgFile = async (base64) => {
 const newaddId = ref('')
 //保存表单数据
 const saveExcelBussData = async (item, index, showTip = true) => {
+    let saveItem = {}
+    formData.value.forEach((ele)=>{
+        if (ele.pkeyId === item.pKeyId) {
+            saveItem = ele
+        }
+    })
     if (!getObjVal(formRegExpJson.value)) {
         tableFormSaveLoading.value = true
         const InitObj = getFormDataInit(item)
@@ -818,11 +824,13 @@ const saveExcelBussData = async (item, index, showTip = true) => {
         if (newaddId.value.length > 0) {
             baseData.value.id = newaddId.value
         }
+
         const { error, code, data } = await dataApi.saveExcelBussData({
             ...baseData.value,
             isBatchSave: 0,
             dataInfo: {
-                orderList: [{ ...formData.value[index], ...InitObj }],
+                // orderList: [{ ...formData.value[index], ...InitObj }],
+                orderList: [{ ...saveItem, ...InitObj }],
             },
         })
         //处理数据