linwenxin 9 meses atrás
pai
commit
d1ab657b54

+ 5 - 2
src/api/inventoryManagement.js

@@ -16,6 +16,10 @@ export function websitStockListExport(data, name) {
   })
 }
 
+export function websitStockMakeImportM(data) {
+  return handleImport('/websit/stock/make/importM', data.formdata, data.id || '')
+}
+
 export function websitStockImportM(data) {
   return handleImport('/websit/stock/importM', data.formdata, data.id || '')
 }
@@ -112,7 +116,6 @@ export function workerStockAccListExport(data, name) {
   })
 }
 
-
 // --------------------------------------------------------
 
 export function workerStockListP(data) {
@@ -149,4 +152,4 @@ export function workerStockAccListPExport(data, name) {
     data,
     name
   })
-}
+}

+ 49 - 11
src/views/auxiliaryFittings/inventoryManagement/auxiliaryInventory/index.vue

@@ -1,14 +1,26 @@
 <template>
-  <template-page ref="pageRef" :get-list="getList" :table-attributes="tableAttributes" :table-events="tableEvents"
-    :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters" :column-parsing="columnParsing"
-    :exportList="exportList">
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :table-attributes="tableAttributes"
+    :table-events="tableEvents"
+    :options-evens-group="optionsEvensGroup"
+    :moreParameters="moreParameters"
+    :column-parsing="columnParsing"
+    :exportList="exportList"
+  >
   </template-page>
 </template>
 
 <script>
 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 {
+  websitStockList,
+  websitStockListExport,
+  websitStockImportM,
+  websitStockMakeImportM
+} from '@/api/inventoryManagement'
 import { commonTemplateDownload } from '@/api/common.js'
 import operation_mixin from '@/components/template/operation_mixin.js'
 export default {
@@ -26,7 +38,7 @@ export default {
         'selection-change': this.selectionChange
       },
       // 勾选选中行
-      recordSelected: [],
+      recordSelected: []
     }
   },
   computed: {
@@ -35,7 +47,7 @@ export default {
       return [
         [
           [
-            this.optionsEvensAuth("template", {
+            this.optionsEvensAuth('template', {
               click: () => {
                 commonTemplateDownload({ name: '辅材网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
@@ -48,25 +60,51 @@ export default {
                     this.$message.error('下载失败')
                   })
               }
-            }),
+            })
           ],
           [
-            this.optionsEvensAuth("imp", ({ moduleName }) => {
+            this.optionsEvensAuth('imp', ({ moduleName }) => {
               return {
                 name: moduleName,
                 render: () => {
                   return this.importButton(websitStockImportM, moduleName)
                 }
               }
-            }),
+            })
           ],
+          [
+            this.optionsEvensAuth('stockAuxiliaryMaterialsXz', {
+              click: () => {
+                commonTemplateDownload({ name: '辅材盘点网点库存.xlsx' }, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            })
+          ],
+          [
+            this.optionsEvensAuth('stockAuxiliaryMaterials', ({ moduleName }) => {
+              return {
+                name: moduleName,
+                render: () => {
+                  return this.importButton(websitStockMakeImportM, moduleName)
+                }
+              }
+            })
+          ]
         ]
       ]
     },
     // 更多参数
     moreParameters() {
       return []
-    },
+    }
   },
   methods: {
     // 列表请求函数
@@ -80,7 +118,7 @@ export default {
     // 监听勾选变化
     selectionChange(data) {
       this.recordSelected = data
-    },
+    }
   }
 }
 </script>