Просмотр исходного кода

网点辅材库存、网点辅材库存三级帐、网点配件库存、网点配件库存三级帐、师傅辅材库存、师傅辅材库存三级帐、师傅配件库存、师傅配件库存三级帐

linwenxin 1 год назад
Родитель
Сommit
1294de6dfd

+ 31 - 33
src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventory/index.vue

@@ -10,17 +10,32 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { websitStockList, websitStockListExport, websitStockImportM, } from "@/api/inventoryManagement";
 import { commonTemplateDownload } from '@/api/common.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
-      // 事件组合
-      optionsEvensGroup: [
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
         [
           [
-            {
-              name: '辅材网点库存模板',
+            this.optionsEvensAuth("template", {
               click: () => {
                 commonTemplateDownload({ name: '辅材网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -33,32 +48,21 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }
+            }),
           ],
           [
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(websitStockImportM, '导入模板')
+            this.optionsEvensAuth("imp", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(websitStockImportM, moduleName)
+                }
               }
-            }
+            }),
           ],
-        ],
-      ],
-      // 表格属性
-      tableAttributes: {
-        // 启用勾选列
-        selectColumn: false
-      },
-      // 表格事件
-      tableEvents: {
-        'selection-change': this.selectionChange
-      },
-      // 勾选选中行
-      recordSelected: [],
-    }
-  },
-  computed: {
+        ]
+      ]
+    },
     // 更多参数
     moreParameters() {
       return []
@@ -77,12 +81,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 0 - 6
src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventoryDetails/index.vue

@@ -49,12 +49,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 0 - 6
src/views/auxiliaryFittings/inventoryManagement/masterAuInvenDetails/index.vue

@@ -49,12 +49,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 31 - 33
src/views/auxiliaryFittings/inventoryManagement/masterAuxiliaryInven/index.vue

@@ -10,17 +10,32 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { workerStockList, workerStockListExport, workerStockImportM, } from "@/api/inventoryManagement";
 import { commonTemplateDownload } from '@/api/common.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin,operation_mixin],
   data() {
     return {
-      // 事件组合
-      optionsEvensGroup: [
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
         [
           [
-            {
-              name: '辅材师傅库存模板',
+            this.optionsEvensAuth("template", {
               click: () => {
                 commonTemplateDownload({ name: '辅材师傅库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -33,32 +48,21 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }
+            }),
           ],
           [
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(workerStockImportM, '导入模板')
+            this.optionsEvensAuth("imp", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(workerStockImportM, moduleName)
+                }
               }
-            }
+            }),
           ],
-        ],
-      ],
-      // 表格属性
-      tableAttributes: {
-        // 启用勾选列
-        selectColumn: false
-      },
-      // 表格事件
-      tableEvents: {
-        'selection-change': this.selectionChange
-      },
-      // 勾选选中行
-      recordSelected: [],
-    }
-  },
-  computed: {
+        ]
+      ]
+    },
     // 更多参数
     moreParameters() {
       return []
@@ -77,12 +81,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 0 - 6
src/views/auxiliaryFittings/inventoryManagement/masterPaInvenDetails/index.vue

@@ -49,12 +49,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 31 - 33
src/views/auxiliaryFittings/inventoryManagement/masterPartsInven/index.vue

@@ -10,17 +10,32 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { workerStockListP, workerStockListPExport, workerStockImportP, } from "@/api/inventoryManagement";
 import { commonTemplateDownload } from '@/api/common.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
-      // 事件组合
-      optionsEvensGroup: [
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
         [
           [
-            {
-              name: '配件师傅库存模板',
+            this.optionsEvensAuth("template", {
               click: () => {
                 commonTemplateDownload({ name: '配件师傅库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -33,32 +48,21 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }
+            }),
           ],
           [
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(workerStockImportP, '导入模板')
+            this.optionsEvensAuth("imp", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(workerStockImportP, moduleName)
+                }
               }
-            }
+            }),
           ],
-        ],
-      ],
-      // 表格属性
-      tableAttributes: {
-        // 启用勾选列
-        selectColumn: false
-      },
-      // 表格事件
-      tableEvents: {
-        'selection-change': this.selectionChange
-      },
-      // 勾选选中行
-      recordSelected: [],
-    }
-  },
-  computed: {
+        ]
+      ]
+    },
     // 更多参数
     moreParameters() {
       return []
@@ -77,12 +81,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 31 - 33
src/views/auxiliaryFittings/inventoryManagement/partsInventory/index.vue

@@ -10,17 +10,32 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import { websitStockListP, websitStockListPExport, websitStockImportP, } from "@/api/inventoryManagement";
 import { commonTemplateDownload } from '@/api/common.js'
+import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
   components: { TemplatePage },
-  mixins: [import_mixin],
+  mixins: [import_mixin, operation_mixin],
   data() {
     return {
-      // 事件组合
-      optionsEvensGroup: [
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 事件组合
+    optionsEvensGroup() {
+      return [
         [
           [
-            {
-              name: '配件网点库存模板',
+            this.optionsEvensAuth("template", {
               click: () => {
                 commonTemplateDownload({ name: '配件网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -33,32 +48,21 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }
+            }),
           ],
           [
-            {
-              name: '导入模板',
-              render: () => {
-                return this.importButton(websitStockImportP, '导入模板')
+            this.optionsEvensAuth("imp", ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(websitStockImportP, moduleName)
+                }
               }
-            }
+            }),
           ],
-        ],
-      ],
-      // 表格属性
-      tableAttributes: {
-        // 启用勾选列
-        selectColumn: false
-      },
-      // 表格事件
-      tableEvents: {
-        'selection-change': this.selectionChange
-      },
-      // 勾选选中行
-      recordSelected: [],
-    }
-  },
-  computed: {
+        ]
+      ]
+    },
     // 更多参数
     moreParameters() {
       return []
@@ -77,12 +81,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>

+ 0 - 6
src/views/auxiliaryFittings/inventoryManagement/partsInventoryDetails/index.vue

@@ -49,12 +49,6 @@ export default {
     selectionChange(data) {
       this.recordSelected = data
     },
-    // 表格操作列
-    operation(h, { row, index, column }) {
-      return (
-        <div class='operation-btns'></div>
-      )
-    },
   }
 }
 </script>