chenrui 4 vuotta sitten
vanhempi
commit
a2a9b6ee29

+ 9 - 1
src/api/sparePartsPur.js

@@ -50,7 +50,15 @@ export const sparePartsPurDel = (params) => {
     method: 'get'
   })
 }
-
+//  散件采购(入库) 导出
+export const sparePartsPurExport = (params) => {
+  return axios({
+    url: '/sparePartsPur/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 //  散件采购(入库) 详情
 export const sparePartsPurDetail = (params) => {
   return axios({

+ 9 - 0
src/api/stock.js

@@ -19,6 +19,15 @@ export const stockCount = (params) => {
     method: 'post'
   })
 }
+//  库存 导出
+export const stockExport = (params) => {
+  return axios({
+    url: '/stock/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob'
+  })
+}
 //  库存 详情列表  分页
 export const stockDetailList = (params) => {
   const url = `/stock/detail/queryPage/${params.pageNo}/${params.pageSize}`

+ 16 - 8
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -64,13 +64,14 @@
             <span class="table-page-search-submitButtons" style="margin-top: 3px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderList-refresh">查询</a-button>
               <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="bulkWarehousingOrderList-reset">重置</a-button>
-              <!-- <a-button
+              <a-button
                 style="margin-left: 8px"
-                type="danger"
+                type="primary"
+                class="button-warning"
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="bulkWarehousingOrderList-export">导出</a-button> -->
+                id="bulkWarehousingOrderList-export">导出</a-button>
               <a @click="advanced=!advanced" style="margin-left: 8px">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
@@ -141,7 +142,7 @@
 import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
-import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut } from '@/api/sparePartsPur'
+import { sparePartsPurList, sparePartsPurCount, sparePartsPurDel, sparePartsPurPut, sparePartsPurExport } from '@/api/sparePartsPur'
 import { supplierAllList } from '@/api/supplier'
 export default {
   components: { STable, VSelect, basicInfoModal },
@@ -294,11 +295,18 @@ export default {
     //  导出
     handleExport () {
       const params = this.queryParam
+      if (this.createDate && this.createDate.length) {
+        params.beginDate = moment(this.createDate[0]).format('YYYY-MM-DD')
+        params.endDate = moment(this.createDate[1]).format('YYYY-MM-DD')
+      } else {
+        params.beginDate = ''
+        params.endDate = ''
+      }
       this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-      //   this.download(res)
-      // })
+      sparePartsPurExport(params).then(res => {
+        this.exportLoading = false
+        this.download(res)
+      })
     },
     download (data) {
       if (!data) { return }

+ 5 - 5
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -109,7 +109,7 @@
 
 <script>
 import moment from 'moment'
-import { stockList, stockCount } from '@/api/stock'
+import { stockList, stockCount, stockExport } from '@/api/stock'
 import { dealerProductTypeList } from '@/api/dealerProductType'
 import { dealerProductBrandQuery } from '@/api/dealerProductBrand'
 import { STable, VSelect } from '@/components'
@@ -240,10 +240,10 @@ export default {
     handleExport () {
       const params = this.queryParam
       this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-      //   this.download(res)
-      // })
+      stockExport(params).then(res => {
+        this.exportLoading = false
+        this.download(res)
+      })
     },
     download (data) {
       if (!data) { return }