Browse Source

更新库存品批量打印勾选报错

fix_bug_pro20231227
zhangsiyu 1 year ago
parent
commit
83ab240359
  1. 56
      src/views/distribution/stockup/distributionStockupDetailsSelf.vue
  2. 3
      vite.config.js

56
src/views/distribution/stockup/distributionStockupDetailsSelf.vue

@ -181,7 +181,7 @@
</div>
</el-tab-pane>
<el-tab-pane label="库存品" name="enter">
<el-button @click="handleBatchDetail('2')">批量打印</el-button>
<el-button @click="handleBatchDetail1('2')">批量打印</el-button>
<tablecmt
:columnList="columnList4"
:tableData="data2"
@ -190,7 +190,7 @@
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
@selection="selectionChange1"
>
<template #default="slotProps">
<el-text
@ -1203,6 +1203,7 @@ export default {
hide: false,
},
],
selectionList1:[]
};
},
mounted() {
@ -1374,6 +1375,52 @@ export default {
});
}
},
//
handleBatchDetail1(type) {
console.log('selectionList', this.selectionList1);
if (this.selectionList1.length == 0) {
this.$message.warning('至少选择一条数据!!');
return;
}
if (type == '1') {
//
let checkcode = [];
this.selectionList1.map(item => {
console.log('item>>>', item);
checkcode.push(item.id);
});
let qr = {
ids: checkcode.join(','),
type: '2',
};
getPrintDetail(qr).then(res => {
console.log(',./');
this.dialogVisible = true;
this.html = '';
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
} else if (type == '2') {
//
let myMap = [];
this.selectionList1.map(item => {
if (!!item.stocklist) {
myMap.push(item.stocklist);
}
});
let qr = {
ids: myMap.join(','),
type: '3',
};
console.log('><><>>', qr);
//
getPrintDetail(qr).then(res => {
// console.log(",./");
this.dialogVisible = true;
this.html = '';
this.html = this.getHtmls(res.data.data.dataList, res.data.data.templateHtml);
});
}
},
//
handlePrintDetail(row) {
console.log('单个答应》》》', row);
@ -1752,8 +1799,13 @@ export default {
// console.log("",list);
this.selectionList = list;
},
selectionChange1(list) {
// console.log("",list);
this.selectionList1 = list;
},
selectionClear() {
this.selectionList = [];
this.checkselect=[]
// this.$refs.table.clearSelection();
},
currentChange(currentPage) {

3
vite.config.js

@ -13,7 +13,8 @@ export default ({ mode, command }) => {
proxy: {
'/api': {
// target: 'http://192.168.10.126:8889',
target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.123:8889',
target: 'http://192.168.10.75:8777',
// target: 'http://192.168.10.29:13000',
//target: 'http://test3.javablade.com',
changeOrigin: true,

Loading…
Cancel
Save