From d8d63125e2f579fa5cf699bf622f285e71bb6b39 Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Wed, 22 Feb 2023 14:32:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=BD=A6=E8=BE=86=E9=94=80?= =?UTF-8?q?=E5=94=AE=E5=8F=B0=E8=B4=A6--=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/cheliang/cheliangxiaoshou.js | 12 +++++ anrui-scm/anrui-scm-ui/src/utils/request.js | 16 +++--- .../cheliangxiaoshouguanli.vue | 49 ++++++++++++++++++- 3 files changed, 68 insertions(+), 9 deletions(-) diff --git a/anrui-scm/anrui-scm-ui/src/api/cheliang/cheliangxiaoshou.js b/anrui-scm/anrui-scm-ui/src/api/cheliang/cheliangxiaoshou.js index ba62a3caf7..7a2a0d86ab 100644 --- a/anrui-scm/anrui-scm-ui/src/api/cheliang/cheliangxiaoshou.js +++ b/anrui-scm/anrui-scm-ui/src/api/cheliang/cheliangxiaoshou.js @@ -1,4 +1,5 @@ import request from '@/utils/request' +import qs from 'qs' // 车辆销售(出库)列表 export function pagerList(data) { @@ -36,3 +37,14 @@ export function createPdf(data) { }) } +// 导出 +export function exportExcel(data) { + return request({ + url: '/base/v1/basevehicleout/exportExcel', + method: 'post', + responseType: 'blob' , // 表明返回服务器返回的数据类型 + data: data, + headers: { 'Content-Type': 'application/json' } + }) +} + diff --git a/anrui-scm/anrui-scm-ui/src/utils/request.js b/anrui-scm/anrui-scm-ui/src/utils/request.js index 12093fa629..b4985573f3 100644 --- a/anrui-scm/anrui-scm-ui/src/utils/request.js +++ b/anrui-scm/anrui-scm-ui/src/utils/request.js @@ -77,14 +77,14 @@ service.interceptors.response.use( } return Promise.reject(new Error(res.message || 'Error')) } else { - if (!res.success) { - Message({ - message: res.msg || 'Error', - type: 'error', - showClose: true, - duration: 5 * 1000 - }) - } + if (!res.success && res.success !== null && res.success !== undefined) { + Message({ + message: res.msg || 'Error', + type: 'error', + showClose: true, + duration: 5 * 1000 + }) + } return res } }, diff --git a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshouguanli.vue b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshouguanli.vue index f7bd066e04..111d14d7d9 100644 --- a/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshouguanli.vue +++ b/anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangxiaoshou/cheliangxiaoshouguanli.vue @@ -185,6 +185,12 @@ {{ scope.row.innerName }} + + + +
@@ -220,7 +226,7 @@