Explorar o código

处理台账不能将楼层置空问题

zhangyu %!s(int64=5) %!d(string=hai) anos
pai
achega
2d8245591b

+ 4 - 4
src/components/ledger/handsontables/assets.vue

@@ -613,16 +613,16 @@ export default {
       //生成要修改字段列表
       change.map(item => {
         let key = item[1].split(".")[0]
+        if (key == "flowBuild" && keyList.indexOf(key) == -1) {
+          keyList.push("BuildingId","FloorId")
+          param.Projection.push("BuildingId","FloorId")
+        }
         if (item[1] && keyList.indexOf(key) == -1) {
           keyList.push(key)
         }
         if (item[1] && item[3] == "" && param.Projection.indexOf(key) == -1) {
           param.Projection.push(key)
         }
-        if (key == "flowBuild" && keyList.indexOf(key) == -1) {
-          keyList.push("BuildingId","FloorId")
-          param.Projection.push("BuildingId","FloorId")
-        }
       })
       //生成对应修改数据
       data.map((item, index) => {

+ 1 - 1
src/utils/handsontable/buildFloorData.js

@@ -68,7 +68,7 @@ const buildFloor = {
       data.forEach(item => {
         if (item.children && item.children.length) {
           item.children.forEach(child => {
-            if (child.value = "") {
+            if (child.value != "") {
               buildFloorData.push({
                 Code: item.value + "-" + child.value,
                 Name: item.label + "-" + child.label