浏览代码

条码查询

zhouhao 2 年之前
父节点
当前提交
8611339982

+ 36 - 0
src/api/stock.js

@@ -203,4 +203,40 @@ export function workerTemplateExcel(data, name) {
     data,
     name
   });
+}
+
+
+
+
+// 出库条码管理列表
+export function getSalseList(params) {
+  return request({
+    url: `/sale/code/list?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+// 下载模板
+export function salseCodeDownload(data, name) {
+  return getBlob({
+    url: "/sale/code/download",
+    data,
+    name
+  });
+}
+
+// 导入
+export function salseImport(data) {
+  return handleImport("/sale/code/importData", data.formdata, data.id || "");
+}
+
+
+// 出库条码管理导出
+export function salseExport(data, name) {
+  return postBlob({
+    url: '/sale/code/list/export',
+    data,
+    name
+  })
 }

+ 2 - 2
src/views/deposit_commerce/refund_list.vue

@@ -839,7 +839,7 @@ export default {
       this.examine = v
       this.getDataList({
         pageSize: this.pageSize,
-        pageNum: this.currentPage,
+        pageNum: 1,
         enginOrderType: this.enginOrderType,
         ...this.screenForm,
         examineStatus: this.examine
@@ -872,7 +872,7 @@ export default {
     searchFn() {
       this.getDataList({
         pageSize: this.pageSize,
-        pageNum: this.currentPage,
+        pageNum: 1,
         confirmName: '',
         createName: '',
         enginOrderNo: '',

+ 2 - 2
src/views/deposit_home/refund_list.vue

@@ -833,7 +833,7 @@ export default {
       this.examine = v
       this.getDataList({
         pageSize: this.pageSize,
-        pageNum: this.currentPage,
+        pageNum: 1,
         enginOrderType: this.enginOrderType,
         ...this.screenForm,
         examineStatus: this.examine
@@ -866,7 +866,7 @@ export default {
     searchFn() {
       this.getDataList({
         pageSize: this.pageSize,
-        pageNum: this.currentPage,
+        pageNum: 1,
         confirmName: '',
         createName: '',
         enginOrderNo: '',

+ 136 - 0
src/views/supply/pickup/barcode.vue

@@ -0,0 +1,136 @@
+<template>
+    <div>
+      <template-page
+        style="width: 100%;
+        height: 100%;"
+        ref="pageRef"
+        :getList="getList"
+        :exportList="exportList"
+        :columnParsing="columnParsing"
+        :optionsEvensGroup="optionsEvensGroup"
+      >
+      </template-page>
+    </div>
+  </template>
+  
+  <script>
+  import TemplatePage from '@/components/template/template-page-1.vue'
+  import import_mixin from '@/components/template/import_mixin.js'
+  
+  import { getSalseList, salseExport,salseImport, salseCodeDownload } from '@/api/stock'
+  export default {
+    components: { TemplatePage },
+    mixins: [import_mixin],
+    data() {
+      return {
+        // 事件组合
+        optionsEvensGroup: [
+        [
+            [
+            {
+                name: "下载模板",
+                click: () => {
+                  salseCodeDownload({}, `${this.$route.meta.title}`)
+                    .then(res => {
+                      console.log('chengg');
+                      this.$message({
+                        message: "下载成功",
+                        type: "success"
+                      });
+                    })
+                    .catch(err => {
+                      this.$message.error("下载失败");
+                    });
+                },
+                // isRole: this.$checkBtnRole("import",this.$route.meta.roles)
+              }
+            ]
+          ],
+          [
+            [
+              {
+                name: '',
+                render:this.importButton(salseImport),
+                // isRole: this.$checkBtnRole("import",this.$route.meta.roles)
+              }
+            ]
+          ]
+         
+        ],
+        // 表格属性
+        tableAttributes: {
+          // 启用勾选列
+          selectColumn: true
+        },
+        // 表格事件
+        tableEvents: {
+          'selection-change': this.selectionChange
+        },
+        recordSelected: []
+      }
+    },
+    methods: {
+      // 列表请求函数
+      getList(...p) {
+        this.recordSelected = []
+        return getSalseList(...p)
+      },
+      // 列表导出函数
+      exportList: salseExport,
+      // 表格列解析渲染数据更改
+      columnParsing(item, defaultData) {
+        return defaultData
+      },
+      // 监听勾选变化
+      selectionChange(data) {
+        this.recordSelected = data
+      }
+      // 批量删除
+      // dels() {
+      //   if (this.recordSelected.length) {
+      //     this.$confirm('此操作将删除数据, 是否继续?', '提示', {
+      //       confirmButtonText: '确定',
+      //       cancelButtonText: '取消',
+      //       type: 'warning'
+      //     })
+      //       .then(() => {
+      //         partsOldOutDel({
+      //           ids: this.recordSelected.map(item => item.id).join(',')
+      //         })
+      //           .then(res => {
+      //             this.$refs.pageRef.refreshList()
+      //             this.$message({
+      //               type: 'success',
+      //               message: '删除成功!'
+      //             })
+      //           })
+      //           .catch(() => {
+      //             this.$message({
+      //               type: 'error',
+      //               message: '删除失败'
+      //             })
+      //           })
+      //       })
+      //       .catch(() => {
+      //         this.$message({
+      //           type: 'info',
+      //           message: '已取消删除'
+      //         })
+      //       })
+      //   } else {
+      //     this.$message({
+      //       type: 'info',
+      //       message: '请先勾选需要删除的数据!'
+      //     })
+      //   }
+      // }
+    }
+  }
+  </script>
+  
+  <style lang="scss" scoped>
+  ::v-deep .el-table__body-wrapper {
+    height: 100% !important;
+  }
+  </style>
+