|
@@ -59,13 +59,13 @@
|
|
|
|
|
|
<div class="mymain-container">
|
|
<div class="mymain-container">
|
|
<div class="table">
|
|
<div class="table">
|
|
- <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @selection-change="handleSelectionChange">
|
|
|
|
- <!-- <el-table-column align="center" type="selection" width="55"></el-table-column> -->
|
|
|
|
- <el-table-column align="center" label="操作" width="100" fixed="left">
|
|
|
|
|
|
+ <el-table ref="table" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe @select="handleSelect">
|
|
|
|
+ <el-table-column align="center" type="selection" width="55"></el-table-column>
|
|
|
|
+ <!-- <el-table-column align="center" label="操作" width="100" fixed="left">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button type="text" @click="toPrint(scope.row)">打印</el-button>
|
|
<el-button type="text" @click="toPrint(scope.row)">打印</el-button>
|
|
</template>
|
|
</template>
|
|
- </el-table-column>
|
|
|
|
|
|
+ </el-table-column> -->
|
|
<el-table-column align="center" label="状态" min-width="100" show-overflow-tooltip>
|
|
<el-table-column align="center" label="状态" min-width="100" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.printNum ? '已打单(' + scope.row.printNum + ')' : '未打单' }}
|
|
{{ scope.row.printNum ? '已打单(' + scope.row.printNum + ')' : '未打单' }}
|
|
@@ -109,7 +109,7 @@
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="pagination clearfix">
|
|
|
|
|
|
+ <!-- <div class="pagination clearfix">
|
|
<div class="fr">
|
|
<div class="fr">
|
|
<el-pagination
|
|
<el-pagination
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
@@ -121,13 +121,13 @@
|
|
:total="listTotal">
|
|
:total="listTotal">
|
|
</el-pagination>
|
|
</el-pagination>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
|
- <!-- <div class="page-footer">
|
|
|
|
|
|
+ <div class="page-footer">
|
|
<div class="footer">
|
|
<div class="footer">
|
|
- <el-button type="primary" @click="toPrint" :disabled="multipleSelection.length < 1">打印发货单</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="toPrint" :disabled="tableSelection.length < 1">打印发货单</el-button>
|
|
</div>
|
|
</div>
|
|
- </div> -->
|
|
|
|
|
|
+ </div>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -201,7 +201,7 @@ export default {
|
|
countDown: 60,
|
|
countDown: 60,
|
|
timer: null,
|
|
timer: null,
|
|
|
|
|
|
- multipleSelection: [],
|
|
|
|
|
|
+ tableSelection: [],
|
|
|
|
|
|
queryItem: {},
|
|
queryItem: {},
|
|
isShowPrint: false,
|
|
isShowPrint: false,
|
|
@@ -279,8 +279,8 @@ export default {
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
|
|
|
|
let params = {
|
|
let params = {
|
|
- pageNum: this.currentPage,
|
|
|
|
- pageSize: this.pageSize,
|
|
|
|
|
|
+ pageNum: 1,
|
|
|
|
+ pageSize: -1,
|
|
takerId: this.screenForm.manId,
|
|
takerId: this.screenForm.manId,
|
|
status: this.screenForm.status,
|
|
status: this.screenForm.status,
|
|
};
|
|
};
|
|
@@ -309,23 +309,57 @@ export default {
|
|
this.isShowPrint = false;
|
|
this.isShowPrint = false;
|
|
},
|
|
},
|
|
|
|
|
|
- handleSelectionChange(val) {
|
|
|
|
- this.multipleSelection = val;
|
|
|
|
|
|
+ handleSelect(selection, row) {
|
|
|
|
+ this.$refs.table.toggleRowSelection(row);
|
|
|
|
+ this.dataList.forEach(item => {
|
|
|
|
+ if (item.informationKey === row.informationKey) {
|
|
|
|
+ this.$refs.table.toggleRowSelection(item);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.tableSelection = this.$refs.table.selection;
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ // 检查是否一致
|
|
|
|
+ isAllEqual(array) {
|
|
|
|
+ if (array.length > 0) {
|
|
|
|
+ return !array.some(function(item, index) {
|
|
|
|
+ return item.informationKey !== array[0].informationKey;
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
|
|
|
|
// 点击打印
|
|
// 点击打印
|
|
- toPrint(item) {
|
|
|
|
- if(!item.printNum) {
|
|
|
|
- this.queryItem = item;
|
|
|
|
|
|
+ toPrint() {
|
|
|
|
+ if(!this.isAllEqual(this.tableSelection)) {
|
|
|
|
+ return this.$errorMsg('只能选择同一个提货订单');
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if(!this.tableSelection[0].printNum) {
|
|
|
|
+ this.queryItem = this.tableSelection;
|
|
this.isShowPrint = true;
|
|
this.isShowPrint = true;
|
|
}else {
|
|
}else {
|
|
- this.queryItem = item;
|
|
|
|
|
|
+ this.queryItem = this.tableSelection;
|
|
this.dialogForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
|
|
this.dialogForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
|
|
this.dialogForm.createDate = this.getDate();
|
|
this.dialogForm.createDate = this.getDate();
|
|
this.isShowDialog = true;
|
|
this.isShowDialog = true;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ // 点击打印
|
|
|
|
+ // toPrint(item) {
|
|
|
|
+ // if(!item.printNum) {
|
|
|
|
+ // this.queryItem = item;
|
|
|
|
+ // this.isShowPrint = true;
|
|
|
|
+ // }else {
|
|
|
|
+ // this.queryItem = item;
|
|
|
|
+ // this.dialogForm.createMan = JSON.parse(localStorage.getItem("supply_user")).nickName;
|
|
|
|
+ // this.dialogForm.createDate = this.getDate();
|
|
|
|
+ // this.isShowDialog = true;
|
|
|
|
+ // }
|
|
|
|
+ // },
|
|
|
|
+
|
|
// 关闭弹窗
|
|
// 关闭弹窗
|
|
cancelDialogForm(){
|
|
cancelDialogForm(){
|
|
this.isShowDialog = false;
|
|
this.isShowDialog = false;
|
|
@@ -337,7 +371,7 @@ export default {
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
this.$refs.dialogForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
let params = {
|
|
let params = {
|
|
- shipId: this.queryItem.invoiceId,
|
|
|
|
|
|
+ shipId: this.queryItem[0].invoiceId,
|
|
password: this.dialogForm.password
|
|
password: this.dialogForm.password
|
|
}
|
|
}
|
|
checkPassword(params).then(res => {
|
|
checkPassword(params).then(res => {
|