|
@@ -741,13 +741,33 @@ export default {
|
|
|
this.drawer = true;
|
|
|
console.log("scope:",scope);
|
|
|
this.index=scope.$index;
|
|
|
+ this.resultForeignShipName=scope.row.sendStation+scope.row.unloadPoint;
|
|
|
+ this.onclick();
|
|
|
},
|
|
|
//修改选中
|
|
|
orderChange(selection) {
|
|
|
console.log("order:",selection);
|
|
|
this.batchId=selection.batchId;
|
|
|
this.purchaseOrderId=selection.purchaseOrderId;
|
|
|
- console.log("temp",this.tableData[0]);
|
|
|
+ let selected=this.tableData[this.index];
|
|
|
+ // 选中多个
|
|
|
+ let selects = this.$refs.importExcel.selection;
|
|
|
+ // //查询多个:查询所有品名、发货单位、发站、卸货地点相同的行
|
|
|
+ // let selects = this.tableData.filter((item)=>{
|
|
|
+ // return item.productName==selected.productName && item.sendStation==selected.sendStation && item.unloadPoint==selected.unloadPoint
|
|
|
+ // });
|
|
|
+ //多个配单
|
|
|
+ selects.forEach((item)=>{
|
|
|
+ item.batchId=selection.batchId;
|
|
|
+ item.purchaseOrderId=selection.purchaseOrderId;
|
|
|
+ item.supplierId=selection.supplierId;
|
|
|
+ item.supplierName=selection.supplierName;
|
|
|
+ item.materialId=selection.materialId;
|
|
|
+ item.materialName=selection.materialName;
|
|
|
+ item.purchaseOrderNo=selection.purchaseOrderNo;
|
|
|
+ item.unloadPoint=selection.resultForeignShipName;
|
|
|
+ });
|
|
|
+ // 单个配单
|
|
|
this.tableData[this.index].batchId=selection.batchId;
|
|
|
this.tableData[this.index].purchaseOrderId=selection.purchaseOrderId;
|
|
|
this.tableData[this.index].supplierId=selection.supplierId;
|
|
@@ -760,6 +780,8 @@ export default {
|
|
|
},
|
|
|
handleClose(done) {
|
|
|
this.$refs.ordertable.$refs.mainTable.setCurrentRow();//清除选项
|
|
|
+ //清空选中
|
|
|
+ this.$refs.importExcel.clearSelection();
|
|
|
done();
|
|
|
}
|
|
|
}
|