linwenxin 1 سال پیش
والد
کامیت
520ee0dbc9

+ 39 - 0
src/api/inventoryManagement.js

@@ -110,4 +110,43 @@ export function workerStockAccListExport(data, name) {
     data,
     name
   })
+}
+
+
+// --------------------------------------------------------
+
+export function workerStockListP(data) {
+  return request({
+    url: `/worker/stock/listP?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function workerStockListPExport(data, name) {
+  return postBlob({
+    url: '/worker/stock/listP/export',
+    data,
+    name
+  })
+}
+
+export function workerStockImportP(data) {
+  return handleImport('/worker/stock/importP', data.formdata, data.id || '')
+}
+
+export function workerStockAccListP(data) {
+  return request({
+    url: `/worker/stock/acc/listP?moduleId=${data.moduleId}`,
+    method: 'post',
+    data
+  })
+}
+
+export function workerStockAccListPExport(data, name) {
+  return postBlob({
+    url: '/worker/stock/acc/listP/export',
+    data,
+    name
+  })
 }

+ 2 - 2
src/views/auxiliaryFittings/inventoryManagement/masterAuxiliaryInven/index.vue

@@ -20,9 +20,9 @@ export default {
         [
           [
             {
-              name: '辅材网点库存模板',
+              name: '辅材师傅库存模板',
               click: () => {
-                commonTemplateDownload({ name: '辅材网点库存.xlsx' }, `${this.$route.meta.title}`)
+                commonTemplateDownload({ name: '辅材师傅库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
                     this.$message({
                       message: '下载成功',

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

@@ -0,0 +1,62 @@
+<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>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import { workerStockAccListP, workerStockAccListPExport, } from "@/api/inventoryManagement";
+import { commonTemplateDownload } from '@/api/common.js'
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList: workerStockAccListP,
+    // 列表导出函数
+    exportList: workerStockAccListPExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'></div>
+      )
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 90 - 0
src/views/auxiliaryFittings/inventoryManagement/masterPartsInven/index.vue

@@ -0,0 +1,90 @@
+<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>
+</template>
+
+<script>
+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'
+export default {
+  components: { TemplatePage },
+  mixins: [import_mixin],
+  data() {
+    return {
+      // 事件组合
+      optionsEvensGroup: [
+        [
+          [
+            {
+              name: '配件师傅库存模板',
+              click: () => {
+                commonTemplateDownload({ name: '配件师傅库存.xlsx' }, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(err => {
+                    this.$message.error('下载失败')
+                  })
+              }
+            }
+          ],
+          [
+            {
+              name: '导入模板',
+              render: () => {
+                return this.importButton(workerStockImportP, '导入模板')
+              }
+            }
+          ],
+        ],
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: false
+      },
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      // 勾选选中行
+      recordSelected: [],
+    }
+  },
+  computed: {
+    // 更多参数
+    moreParameters() {
+      return []
+    },
+  },
+  methods: {
+    // 列表请求函数
+    getList: workerStockListP,
+    // 列表导出函数
+    exportList: workerStockListPExport,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    // 表格操作列
+    operation(h, { row, index, column }) {
+      return (
+        <div class='operation-btns'></div>
+      )
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped></style>

+ 2 - 2
src/views/auxiliaryFittings/inventoryManagement/partsInventory/index.vue

@@ -20,9 +20,9 @@ export default {
         [
           [
             {
-              name: '辅材网点库存模板',
+              name: '配件网点库存模板',
               click: () => {
-                commonTemplateDownload({ name: '辅材网点库存.xlsx' }, `${this.$route.meta.title}`)
+                commonTemplateDownload({ name: '配件网点库存.xlsx' }, `${this.$route.meta.title}`)
                   .then(res => {
                     this.$message({
                       message: '下载成功',