Selaa lähdekoodia

fix: cargo集货. 处理crm sdk发送数据异常.

peter 5 tuntia sitten
vanhempi
commit
5cb0f62012
1 muutettua tiedostoa jossa 4 lisäystä ja 4 poistoa
  1. 4 4
      src/pages/cargo-consolidation-request/index.vue

+ 4 - 4
src/pages/cargo-consolidation-request/index.vue

@@ -919,7 +919,7 @@ let customMapData2 = (a: any[]) =>
     editFlag: false,
     deleteFlag: false,
   }))
-let otherUsersList = ref([] as any[]) // 其他用户的sublist数据, user那个tab只显示当前用户的, 如果用sdk保存, 会变成删除除了当前用户外的其他所有用户数据.
+let otherUsersList:any[] = [] // 其他用户的sublist数据, user那个tab只显示当前用户的, 如果用sdk保存, 会变成删除除了当前用户外的其他所有用户数据.
 const generateSubList = () => {
   // clonedeep 是因为数据里面有 object array, 担心浅复制到表单变量会影响到原始数据
   subList.value = customMapData2(
@@ -929,7 +929,7 @@ const generateSubList = () => {
         (currentTab.value === 'my_request' ? i.Sales_Person === currentUserName.value : true),
     ),
   )
-  otherUsersList.value = customMapData2(
+  otherUsersList = customMapData2(
     cloneDeep(subListBackup).filter(
       (i: any) =>
         i.Parent_Id.id === currentRow.value.id &&
@@ -1336,8 +1336,8 @@ const commitWithSDK = async () => {
   }
 
   // 如果当前是my_request tab, 把其他用户的数据也加上, 否则会被crm删除
-  if (currentTab.value === 'my_request' && otherUsersList.value.length) {
-    formData = formData.concat(customMapData(otherUsersList.value))
+  if (currentTab.value === 'my_request' && otherUsersList.length) {
+    formData = formData.concat(customMapData(otherUsersList))
   }
   let params = {
     APIData: {