zh преди 2 години
родител
ревизия
0579713fa2
променени са 4 файла, в които са добавени 192 реда и са изтрити 10 реда
  1. 73 0
      src/api/barcode.js
  2. 23 4
      src/views/barcode/barcodeImport.vue
  3. 24 6
      src/views/barcode/barcodeVerification.vue
  4. 72 0
      src/views/barcode/utboundBarcode.vue

+ 73 - 0
src/api/barcode.js

@@ -0,0 +1,73 @@
+import request, { postBlob, handleImport, getBlob } from '@/utils/request'
+export function getListCodeV2(params) {
+  return request({
+    url: `/customer/code/list/v2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportListCodeV2(data, name) {
+  return postBlob({
+    url: '/customer/code/user/export/v2',
+    data,
+    name
+  })
+}
+
+export function getListCustomerCodeV2(params) {
+  return request({
+    url: `/customer/code/listCustomer/v2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportListCustomerCodeV2(data, name) {
+  return postBlob({
+    url: '/customer/code/listCustomer/export/v2',
+    data,
+    name
+  })
+}
+
+export function importListCustomerCodeV2(data) {
+  return handleImport('customer/code/import', data.formdata, data.id || '')
+}
+
+export function luBaoDownloadDownload(data, name) {
+  return getBlob({
+    url: '/customer/code/luBaoDownload',
+    data,
+    name
+  })
+}
+
+export function getListCustomerCheckV2(params) {
+  return request({
+    url: `/customer/code/listCustomerCheck/v2?moduleId=${params.moduleId}`,
+    method: 'post',
+    data: params
+  })
+}
+
+export function exportListCustomerCheck(data, name) {
+  return postBlob({
+    url: '/customer/code/listCustomerCheck/export/v2',
+    data,
+    name
+  })
+}
+
+export function importListCustomerCheck(data) {
+  return handleImport('customer/code/importCheck', data.formdata, data.id || '')
+}
+
+export function listCustomerCheckDownload(data, name) {
+  return getBlob({
+    url: '/customer/code/download',
+    data,
+    name
+  })
+}
+

+ 23 - 4
src/views/barcode/barcodeImport.vue

@@ -15,7 +15,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
-import { getDealerListV2, exportDealerListV2, importCustomerV2 } from '@/api/basic_data/dealer'
+import { getListCustomerCodeV2, exportListCustomerCodeV2, importListCustomerCodeV2, luBaoDownloadDownload } from '@/api/barcode'
 export default {
   components: { TemplatePage, Popu },
   mixins: [import_mixin, add_callback_mixin],
@@ -28,7 +28,26 @@ export default {
           [
             {
               name: '导入',
-              render: this.importButton(importCustomerV2)
+              render: this.importButton(importListCustomerCodeV2)
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '导入模版',
+              click: () => {
+                luBaoDownloadDownload({}, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(_err => {
+                    this.$message.error('下载失败')
+                  })
+              }
             }
           ]
         ]
@@ -50,10 +69,10 @@ export default {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getDealerListV2(...p)
+      return getListCustomerCodeV2(...p)
     },
     // 列表导出函数
-    exportList: exportDealerListV2,
+    exportList: exportListCustomerCodeV2,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData

+ 24 - 6
src/views/barcode/barcodeVerification.vue

@@ -15,7 +15,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import Popu from '@/components/template/popu.vue'
-import { getDealerListV2, exportDealerListV2, importCustomerV2 } from '@/api/basic_data/dealer'
+import { getListCustomerCheckV2, exportListCustomerCheck, importListCustomerCheck, listCustomerCheckDownload } from '@/api/barcode'
 export default {
   components: { TemplatePage, Popu },
   mixins: [import_mixin, add_callback_mixin],
@@ -28,7 +28,26 @@ export default {
           [
             {
               name: '导入',
-              render: this.importButton(importCustomerV2)
+              render: this.importButton(importListCustomerCheck)
+            }
+          ]
+        ],
+        [
+          [
+            {
+              name: '导入模版',
+              click: () => {
+                listCustomerCheckDownload({}, `${this.$route.meta.title}`)
+                  .then(res => {
+                    this.$message({
+                      message: '下载成功',
+                      type: 'success'
+                    })
+                  })
+                  .catch(_err => {
+                    this.$message.error('下载失败')
+                  })
+              }
             }
           ]
         ]
@@ -50,10 +69,10 @@ export default {
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
-      return getDealerListV2(...p)
+      return getListCustomerCheckV2(...p)
     },
     // 列表导出函数
-    exportList: exportDealerListV2,
+    exportList: exportListCustomerCheck,
     // 表格列解析渲染数据更改
     columnParsing(item, defaultData) {
       return defaultData
@@ -76,5 +95,4 @@ export default {
 }
 </script>
 
-  <style lang="scss" scoped></style>
-
+<style lang="scss" scoped></style>

+ 72 - 0
src/views/barcode/utboundBarcode.vue

@@ -0,0 +1,72 @@
+<template>
+  <template-page
+    ref="pageRef"
+    :get-list="getList"
+    :export-list="exportList"
+    :options-evens-group="optionsEvensGroup"
+    :column-parsing="columnParsing"
+  >
+    <Popu v-if="visible" />
+  </template-page>
+</template>
+
+<script>
+import TemplatePage from '@/components/template/template-page-1.vue'
+import import_mixin from '@/components/template/import_mixin.js'
+import add_callback_mixin from '@/components/template/add_callback_mixin.js'
+import Popu from '@/components/template/popu.vue'
+import { getListCodeV2, exportListCodeV2 } from '@/api/barcode'
+export default {
+  components: { TemplatePage, Popu },
+  mixins: [import_mixin, add_callback_mixin],
+  data() {
+    return {
+      visible: false,
+      // 事件组合
+      optionsEvensGroup: [
+      ],
+      // 表格属性
+      tableAttributes: {
+        // 启用勾选列
+        selectColumn: true
+      }, // 关闭新增弹窗
+
+      // 表格事件
+      tableEvents: {
+        'selection-change': this.selectionChange
+      },
+      recordSelected: []
+    }
+  },
+  methods: {
+    // 列表请求函数
+    getList(...p) {
+      this.recordSelected = []
+      return getListCodeV2(...p)
+    },
+    // 列表导出函数
+    exportList: exportListCodeV2,
+    // 表格列解析渲染数据更改
+    columnParsing(item, defaultData) {
+      return defaultData
+    },
+    // 监听勾选变化
+    selectionChange(data) {
+      this.recordSelected = data
+    },
+    operation() {
+      return (h, { row, index, column }) => {
+        return <div class='operation-btns'></div>
+      }
+    },
+    handleClose() {
+      this.addOff(() => {
+        this.visible = false
+      })()
+    }
+  }
+}
+</script>
+
+  <style lang="scss" scoped></style>
+