lichao 3 лет назад
Родитель
Сommit
1dd06234ec
1 измененных файлов с 27 добавлено и 1 удалено
  1. 27 1
      src/views/Warehousing/costModify/index.vue

+ 27 - 1
src/views/Warehousing/costModify/index.vue

@@ -536,6 +536,7 @@ export default {
   created() {
     this.setRowList = this.tableDate;
     this.getRowList = this.tableDate;
+    this.getRow()
     this.getList();
     this.getDicts("data_billtype_type").then((response) => {
       this.billTypeList = response.data;
@@ -842,7 +843,7 @@ export default {
     save() {
       this.showSetting = false;
       this.data = {
-        tableName: "船舶信息",
+        tableName: "费用变更",
         userId: Cookies.get("userName"),
         sysTableSetList: this.setRowList,
       };
@@ -850,6 +851,31 @@ export default {
         this.getRowList = this.setRowList.filter((e) => e.checked == 0);
       });
     },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "费用变更",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+              fixed: item.fixed,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
   }
 }
 </script>