浏览代码

列设置

QuKatie 3 年之前
父节点
当前提交
4272cd044b

+ 25 - 3
src/components/fee-info/main.vue

@@ -2,7 +2,12 @@
   <div>
     <containerTitle title="费用明细"></containerTitle>
     <basic-container>
-      <avue-crud :ref="feeCrud" :data="feeData" :option="feeOption">
+      <avue-crud
+        ref="feeCrud"
+        :data="feeData"
+        :option="feeOption"
+        @saveColumn="saveColumn"
+      >
         <template slot="menuLeft">
           <el-button
             type="primary"
@@ -144,7 +149,7 @@ export default {
   data() {
     return {
       option: option,
-      feeOption: feeOption,
+      feeOption:{},
       feeDialog: false,
       treeOption: {
         nodeKey: "id",
@@ -204,6 +209,12 @@ export default {
       return micrometerFormat(val);
     }
   },
+  async created() {
+    this.feeOption = await this.getColumnData(
+      this.getColumnName(33),
+      feeOption
+    );
+  },
   methods: {
     rowDel(row, index) {
       console.log(row, index);
@@ -366,6 +377,17 @@ export default {
     },
     submitData() {
       return this.feeData;
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(33),
+        this.feeOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.feeCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   },
   watch: {
@@ -377,7 +399,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.feeName{
+.feeName {
   display: flex;
   justify-content: space-between;
   align-items: center;

+ 17 - 2
src/components/upload-file/main.vue

@@ -11,6 +11,7 @@
         @row-update="rowUpdate"
         @row-del="rowDel"
         :upload-after="uploadAfter"
+        @saveColumn="saveColumn"
       >
         <template slot="menuLeft">
           <el-button
@@ -54,7 +55,7 @@ export default {
     return {
       form: {},
       fileData: [],
-      option: option
+      option: {}
     };
   },
   props: {
@@ -72,6 +73,9 @@ export default {
       type: String
     }
   },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(35), option);
+  },
   methods: {
     //新增附件上传保存触发
     rowSave(row, done, loading) {
@@ -91,7 +95,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          updateListRemove(row.id,this.delUrl).then(res => {
+          updateListRemove(row.id, this.delUrl).then(res => {
             this.$message({
               type: "success",
               message: "删除成功!"
@@ -118,6 +122,17 @@ export default {
     //提交数据的返回值
     submitData() {
       return this.fileData;
+    },
+    async saveColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(35),
+        this.option
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crud.$refs.dialogColumn.columnBox = false;
+      }
     }
   },
   watch: {

+ 17 - 1
src/views/exportTrade/customerInquiry/detailsPage.vue

@@ -241,6 +241,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>
@@ -484,7 +485,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption:{},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -509,6 +510,10 @@ export default {
       this.getColumnName(1),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(26),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -790,6 +795,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(26),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 1 - 0
src/views/exportTrade/invoice/detailsPage.vue

@@ -179,6 +179,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>

+ 1 - 0
src/views/exportTrade/purchaseContract/detailsPage.vue

@@ -189,6 +189,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>

+ 1 - 0
src/views/exportTrade/purchaseInquiry/detailsPage.vue

@@ -173,6 +173,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>

+ 1 - 0
src/views/exportTrade/receipt/detailsPage.vue

@@ -179,6 +179,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>

+ 17 - 1
src/views/exportTrade/salesContract/detailsPage.vue

@@ -221,6 +221,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>
@@ -544,7 +545,7 @@ export default {
         total: 0
       },
       loading: false,
-      goodsOption: goodsOption,
+      goodsOption: {},
       data: [],
       goodsList: [],
       selectionList: [],
@@ -570,6 +571,10 @@ export default {
       this.getColumnName(5),
       tableOption
     );
+    this.goodsOption = await this.getColumnData(
+      this.getColumnName(28),
+      goodsOption
+    );
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
@@ -854,6 +859,17 @@ export default {
         //关闭窗口
         this.$refs.crud.$refs.dialogColumn.columnBox = false;
       }
+    },
+    async saveGoodsColumn() {
+      const inSave = await this.saveColumnData(
+        this.getColumnName(28),
+        this.goodsOption
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.goodsCrud.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 1 - 0
src/views/exportTrade/shippingInquiry/detailsPage.vue

@@ -103,6 +103,7 @@
               @row-click="rowClick"
               :page.sync="page"
               @on-load="onLoad"
+              @saveColumn="saveGoodsColumn"
             ></avue-crud>
           </el-col>
         </el-row>