Browse Source

Merge branch 'dev' of http://47.108.105.48:3000/java_project/logpm_page into dev

fix_bug_pro20231227
13208366016 1 year ago
parent
commit
edd4f203e3
  1. 16
      src/api/warehouse/warehouseWaybill.js
  2. 31
      src/views/warehouse/warehouseWaybill.vue

16
src/api/warehouse/warehouseWaybill.js

@ -12,6 +12,22 @@ export const getList = (current, size, params) => {
})
}
/**
* 导出
* @param row
* @returns {AxiosPromise}
*/
export const getWarehouseWaybillExport = row => {
return request({
url: '/logpm-warehouse/warehouseWaybill/export-exportWarehouseWaybill',
method: 'get',
params: {
...row
},
responseType: 'blob',
})
};
export const getDetail = (id) => {
return request({
url: '/logpm-warehouse/warehouseWaybill/detail',

31
src/views/warehouse/warehouseWaybill.vue

@ -26,6 +26,15 @@
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"> </el-button>
<el-button type="danger" icon="el-icon-delete" @click="handleDelete" plain> </el-button>
</div> -->
<el-button
type="danger"
icon="el-icon-download"
@click="handleExportInfo"
plain
>导出
</el-button>
<div></div>
<!-- 头部右侧按钮模块 -->
<div class="avue-crud__right">
@ -389,10 +398,11 @@ import {
add,
update,
remove,
splitOrder,
splitOrder, getWarehouseWaybillExport
} from '@/api/warehouse/warehouseWaybill';
import option from '@/option/warehouse/warehouseWaybill';
import { mapGetters } from 'vuex';
import { downloadXls } from '@/utils/util';
export default {
data() {
@ -895,6 +905,24 @@ export default {
},
},
methods: {
/**
* 导出
* */
handleExportInfo(){
let row = {};
if (!!this.ids) {
row.ids = this.ids;
}
// const ids = this.selectionList.join(',');
// row.ids = ids;
console.log("<><><>>",row.ids);
getWarehouseWaybillExport(row).then(res => {
// console.log(res.data);
downloadXls(res.data, '在库运单数据.xlsx');
});
},
showdrawer(value) {
this.drawerShow = value;
},
@ -917,6 +945,7 @@ export default {
},
selectionsc(value) {
console.log(value);
this.selectionList = value.map(item => item.id);
},
delectsolt(scope) {
const { row } = scope;

Loading…
Cancel
Save