chenrui il y a 3 ans
Parent
commit
2d7c250573

+ 1 - 1
src/views/bulkManagement/bulkImport/list.vue

@@ -198,7 +198,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          const fileName = '散件导入错误项' + moment().format('YYYY_MMDD')
+          const fileName = '散件导入错误项' + moment().format('YYYYMMDDHHmmss')
           downloadExcel(res, fileName)
         }
       })

+ 1 - 1
src/views/inventoryManagement/inventoryImport/list.vue

@@ -192,7 +192,7 @@ export default {
           })
           reader.readAsText(res)
         } else {
-          const fileName = '库存导入错误项' + moment().format('YYYY_MMDD')
+          const fileName = '库存导入错误项' + moment().format('YYYYMMDDHHmmss')
           downloadExcel(res, fileName)
         }
       })

+ 8 - 5
src/views/productManagement/productOnlineInfo/list.vue

@@ -106,11 +106,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { productTypeQuery } from '@/api/productType'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { productList, productExport } from '@/api/product'
 export default {
   name: 'ProductJgList',
@@ -205,12 +206,14 @@ export default {
     // 导出
     handleExport () {
       const _this = this
-      _this.spinning = true
+      const params = _this.queryParam
       _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', productExport, this.queryParam, '产品上线信息', function () {
-        _this.spinning = false
+      _this.spinning = true
+      productExport(params).then(res => {
+        const fileName = '产品上线信息' + moment().format('YYYYMMDDHHmmss')
+        downloadExcel(res, fileName)
         _this.exportLoading = false
+        _this.spinning = false
       })
     },
     //  产品分类  change

+ 16 - 7
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptDetail.vue

@@ -98,11 +98,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportChainReceivingBillDetailList, reportChainReceivingBillDetailCount, reportReceivingBillDetailExport, linkageGroupList } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
@@ -242,12 +243,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillDetailExport, this.queryParam, '连锁采购入库明细报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillDetailExport(params).then(res => {
+            const fileName = '连锁采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     // 连锁店

+ 16 - 7
src/views/reportData/chainPurchaseReceiptReport/purchaseReceiptOrder.vue

@@ -73,9 +73,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportChainReceivingBillList, reportChainReceivingBillCount, reportReceivingBillExport, linkageGroupList } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
@@ -191,12 +192,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillExport, this.queryParam, '连锁采购入库单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillExport(params).then(res => {
+            const fileName = '连锁采购入库单报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     },
     // 连锁店

+ 16 - 7
src/views/reportData/purchaseReceiptReport/purchaseReceiptDetail.vue

@@ -84,11 +84,12 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportReceivingBillDetailList, reportReceivingBillDetailCount, reportReceivingBillDetailExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate, ProductType, ProductBrand },
@@ -219,12 +220,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillDetailExport, this.queryParam, '采购入库明细报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillDetailExport(params).then(res => {
+            const fileName = '采购入库明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     }
   },

+ 16 - 7
src/views/reportData/purchaseReceiptReport/purchaseReceiptOrder.vue

@@ -59,9 +59,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { reportReceivingBillList, reportReceivingBillCount, reportReceivingBillExport } from '@/api/reportData'
 export default {
   components: { STable, VSelect, rangeDate },
@@ -168,12 +169,20 @@ export default {
     //  导出
     handleExport () {
       const _this = this
-      _this.spinning = true
-      _this.exportLoading = true
-      // 打印或导出
-      hdPrint('', 'export', reportReceivingBillExport, this.queryParam, '采购入库单报表', function () {
-        _this.exportLoading = false
-        _this.spinning = false
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const params = _this.queryParam
+          _this.exportLoading = true
+          _this.spinning = true
+          reportReceivingBillExport(params).then(res => {
+            const fileName = '采购入库单报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
+            _this.exportLoading = false
+            _this.spinning = false
+          })
+        } else {
+          return false
+        }
       })
     }
   },

+ 8 - 4
src/views/reportData/salesDetailReport/list.vue

@@ -175,9 +175,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
@@ -332,11 +333,14 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinning = true
+          const params = _this.queryParam
           _this.exportLoading = true
-          hdPrint('', 'export', reportSalesBillDetailExport, this.queryParam, '销售明细报表', function () {
-            _this.spinning = false
+          _this.spinning = true
+          reportSalesBillDetailExport(params).then(res => {
+            const fileName = '销售明细报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
             _this.exportLoading = false
+            _this.spinning = false
           })
         } else {
           console.log('error submit!!')

+ 8 - 4
src/views/reportData/salesReport/list.vue

@@ -124,9 +124,10 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import { hdPrint } from '@/libs/JGPrint'
+import { downloadExcel } from '@/libs/JGPrint.js'
 import { getArea } from '@/api/data'
 import { custTypeFindAllList } from '@/api/custType'
 import { settleStyleFindAllList } from '@/api/customer'
@@ -251,11 +252,14 @@ export default {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
-          _this.spinning = true
+          const params = _this.queryParam
           _this.exportLoading = true
-          hdPrint('', 'export', reportSalesBillExport, this.queryParam, '销售报表', function () {
-            _this.spinning = false
+          _this.spinning = true
+          reportSalesBillExport(params).then(res => {
+            const fileName = '销售报表' + moment().format('YYYYMMDDHHmmss')
+            downloadExcel(res, fileName)
             _this.exportLoading = false
+            _this.spinning = false
           })
         } else {
           console.log('error submit!!')