|
|
@@ -114,7 +114,7 @@
|
|
|
<el-button
|
|
|
v-if="!isView"
|
|
|
size="small"
|
|
|
- @click="downLoad"
|
|
|
+ @click="downLoad('statistics')"
|
|
|
:loading="loading"
|
|
|
type="primary"
|
|
|
>统计导出</el-button
|
|
|
@@ -122,7 +122,7 @@
|
|
|
<el-button
|
|
|
v-if="!isView"
|
|
|
size="small"
|
|
|
- @click="downLoad"
|
|
|
+ @click="downLoad('detail')"
|
|
|
:loading="loading"
|
|
|
type="primary"
|
|
|
>明细导出</el-button
|
|
|
@@ -140,6 +140,7 @@
|
|
|
import ItemSearch from './components/item-search.vue';
|
|
|
import {
|
|
|
sendReceiveExcel,
|
|
|
+ sendReceiveDetailListExcel,
|
|
|
outintwoPage
|
|
|
} from '@/api/warehouseManagement/statisticalReports';
|
|
|
import storageApi from '@/api/warehouseManagement';
|
|
|
@@ -511,7 +512,7 @@
|
|
|
});
|
|
|
return `${obj.year}-${obj.month}-${obj.strDate}`;
|
|
|
},
|
|
|
- downLoad() {
|
|
|
+ downLoad(type) {
|
|
|
if (!this.formData.name) {
|
|
|
return this.$message.error('请输入名称');
|
|
|
}
|
|
|
@@ -525,7 +526,8 @@
|
|
|
params.endTime = params.time[1];
|
|
|
}
|
|
|
delete params.time;
|
|
|
- sendReceiveExcel(params).then((data) => {
|
|
|
+ const requestApi = type == 'statistics' ? sendReceiveExcel : sendReceiveDetailListExcel;
|
|
|
+ requestApi(params).then((data) => {
|
|
|
try {
|
|
|
let objectUrl1 = window.URL.createObjectURL(new Blob([data]));
|
|
|
let elink = document.createElement('a');
|