Przeglądaj źródła

提交库存帐

caojunjie 2 lat temu
rodzic
commit
56b25e9dc4

+ 11 - 4
src/views/InventoryManagement/inventoryAccount/index.vue

@@ -13,6 +13,7 @@
         @search-criteria-switch="searchCriteriaSwitch"
         @resetColumn="resetColumn"
         @saveColumn="saveColumn"
+        @refresh-change="refreshChange"
     >
       <template slot="cname" slot-scope="{row,index}">
         {{row.goodsName}}
@@ -46,7 +47,8 @@ export default {
         total: 0,
         pageSizes: [10, 50, 100, 200, 300]
       },
-      option: {
+      option:{},
+      optionList: {
         align: 'center',
         stripe: true,
         index: true,
@@ -173,7 +175,9 @@ export default {
       }
     }
   },
-  created() {
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(200), this.optionList);
+    this.key++
     let i = 0;
     this.option.column.forEach(item => {
       if (item.search) i++
@@ -230,7 +234,7 @@ export default {
        * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
        * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
        */
-      const inSave = await this.saveColumnData(this.getColumnName(85.7), this.option);
+      const inSave = await this.saveColumnData(this.getColumnName(200), this.option);
       if (inSave) {
         this.$message.success("保存成功");
         //关闭窗口
@@ -240,12 +244,15 @@ export default {
     //自定义列重置
     async resetColumn() {
       this.option = this.optionList;
-      const inSave = await this.delColumnData(this.getColumnName(85.7), this.optionList);
+      const inSave = await this.delColumnData(this.getColumnName(200), this.optionList);
       if (inSave) {
         this.$message.success("重置成功");
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
     },
+    refreshChange() {
+      this.onLoad(this.page, this.search);
+    },
   }
 }
 </script>