Commit 3974d3927f2dbb4d6a351ba58ba3abf936542613

Authored by 谭毅彬
1 parent bcb26f06

库存查看页 快速出库选择修复

Signed-off-by: TanYibin <5491541@qq.com>
ant-design-vue-jeecg/src/views/system/inventory/InventoryHeaderList.vue
@@ -192,6 +192,7 @@ export default { @@ -192,6 +192,7 @@ export default {
192 description: '库存表管理页面', 192 description: '库存表管理页面',
193 zoneOptions:[], 193 zoneOptions:[],
194 firstLoad:0, 194 firstLoad:0,
  195 + querySource: {},
195 inventoryHeaderList:[], 196 inventoryHeaderList:[],
196 // 表头 197 // 表头
197 columns: [ 198 columns: [
@@ -452,36 +453,40 @@ export default { @@ -452,36 +453,40 @@ export default {
452 quickShipment() { 453 quickShipment() {
453 if (this.selectedRowKeys.length <= 0) { 454 if (this.selectedRowKeys.length <= 0) {
454 this.$message.warning('请选择一条记录!'); 455 this.$message.warning('请选择一条记录!');
455 - } else {  
456 - let zoneCodes = this.selectRecord.map(row => row.zoneCode);  
457 - if (new Set(zoneCodes).size !== 1) {  
458 - this.$message.warning('所选数据非同库区');  
459 - return;  
460 - }  
461 - this.inventoryHeaderList = this.selectionRows;  
462 - selectOutPort(this.selectionRows[0]).then(res => {  
463 - if (res.success) {  
464 - var portList = res.result;  
465 - if (portList.length == 1) {  
466 - this.loading = true;  
467 - this.inventoryHeaderList.forEach(x=>{  
468 - x["toPortCode"]= portList[0].code;  
469 - })  
470 - shipmentInventoryHeader(this.inventoryHeaderList).then((res) => {  
471 - this.loading = false;  
472 - if (res.success) {  
473 - this.$message.success(res.message);  
474 - } else {  
475 - this.$message.error(res.message);  
476 - }  
477 - });  
478 - } else {  
479 - this.$refs.quickShipmentModel.edit(this.selectRecord);  
480 - this.$refs.quickShipmentModel.title = '选择出库口';  
481 - }  
482 - }  
483 - }) 456 + return;
  457 + }
  458 + let zoneCodes = this.selectRecord.map(row => row.zoneCode);
  459 + if (new Set(zoneCodes).size !== 1) {
  460 + this.$message.warning('所选数据非同库区');
  461 + return;
484 } 462 }
  463 + debugger
  464 + this.inventoryHeaderList = this.selectionRows;
  465 + this.querySource.containerCode = this.selectRecord[0].containerCode;
  466 + this.querySource.zoneCode = this.selectRecord[0].zoneCode;
  467 + selectOutPort(this.querySource).then(res => {
  468 + if (res.success) {
  469 + debugger
  470 + var portList = res.result;
  471 + if (portList.length == 1) {
  472 + this.loading = true;
  473 + this.inventoryHeaderList.forEach(x=>{
  474 + x["toPortCode"]= portList[0].code;
  475 + })
  476 + shipmentInventoryHeader(this.inventoryHeaderList).then((res) => {
  477 + this.loading = false;
  478 + if (res.success) {
  479 + this.$message.success(res.message);
  480 + } else {
  481 + this.$message.error(res.message);
  482 + }
  483 + });
  484 + } else {
  485 + this.$refs.quickShipmentModel.edit(this.selectRecord);
  486 + this.$refs.quickShipmentModel.title = '选择出库口';
  487 + }
  488 + }
  489 + })
485 }, 490 },
486 together() { 491 together() {
487 if (this.selectedRowKeys.length <= 0) { 492 if (this.selectedRowKeys.length <= 0) {