|
|
@@ -117,8 +117,8 @@
|
|
|
<right-toolbar :show-search.sync="showSearch" @queryTable="getList" />
|
|
|
</el-row>
|
|
|
|
|
|
- <!-- 列表 -->
|
|
|
- <el-table
|
|
|
+ <!-- 列表(含单选限制方法) -->
|
|
|
+ <!-- <el-table
|
|
|
v-loading="loading"
|
|
|
:data="list"
|
|
|
border
|
|
|
@@ -126,6 +126,14 @@
|
|
|
@selection-change="tableSelected"
|
|
|
@select="select"
|
|
|
@select-all="selectAll"
|
|
|
+ > -->
|
|
|
+ <!-- 列表(不含单选限制方法) -->
|
|
|
+ <el-table
|
|
|
+ v-loading="loading"
|
|
|
+ :data="list"
|
|
|
+ border
|
|
|
+ size="mini"
|
|
|
+ @selection-change="tableSelected"
|
|
|
>
|
|
|
<el-table-column
|
|
|
type="selection"
|
|
|
@@ -676,6 +684,7 @@ export default {
|
|
|
const list = this.currentRows.map((item) => item.deliveryOrderNo);
|
|
|
this.ids = list.join(",");
|
|
|
},
|
|
|
+ // select和selectAll两个方法在全选时只会选中第一条数据
|
|
|
select(selection, row) {
|
|
|
if (selection.length > 1) {
|
|
|
const del_row = selection.shift();
|
|
|
@@ -696,8 +705,13 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
console.log(this.currentRows);
|
|
|
- const { id, locationCode } = this.currentRows[0];
|
|
|
- const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${id}&code=${locationCode}`;
|
|
|
+ // 只能单个打印
|
|
|
+ // const { id, locationCode } = this.currentRows[0];
|
|
|
+ // const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${id}&code=${locationCode}`;
|
|
|
+ // 可以批量打印
|
|
|
+ const ids = this.currentRows.map((row) => row.id).join(",");
|
|
|
+ const codes = this.currentRows.map((row) => row.locationCode).join(",");
|
|
|
+ const src = `${this.baseUrl}/jmreport/view/${this.reportId}?token=${this.tokens}&id=${ids}&code=${codes}`;
|
|
|
this.$refs.issuePrint.title = "单据打印";
|
|
|
this.$refs.issuePrint.dialogVisible = true;
|
|
|
this.$refs.issuePrint.src = src;
|