|
@@ -60,9 +60,7 @@
|
|
</el-button>
|
|
</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" @click="dispatchSome(), showDialog()"
|
|
|
|
- >多拼派车</el-button
|
|
|
|
- >
|
|
|
|
|
|
+ <el-button type="primary" @click="showDialog">多拼派车</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
</div>
|
|
</div>
|
|
@@ -445,15 +443,20 @@ export default {
|
|
this.getSendStations();
|
|
this.getSendStations();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- dispatchSome() {
|
|
|
|
- console.log(this.tableData);
|
|
|
|
- //首先过滤掉已派车的数据
|
|
|
|
- let arr = this.tableData.filter(item => {
|
|
|
|
- return item.capacityIds == 0;
|
|
|
|
- });
|
|
|
|
- console.log(arr);
|
|
|
|
- this.s
|
|
|
|
- },
|
|
|
|
|
|
+ // dispatchSome() {
|
|
|
|
+ // console.log(this.tableData);
|
|
|
|
+ // //首先过滤掉已派车的数据
|
|
|
|
+ // let arr = this.tableData.filter(item => {
|
|
|
|
+ // return item.capacityIds == 0;
|
|
|
|
+ // });
|
|
|
|
+ // if (arr.length == 0) {
|
|
|
|
+ // ths.$message.error("没有符合条件的分录可供拼装");
|
|
|
|
+ // return;
|
|
|
|
+ // }
|
|
|
|
+ // console.log(arr);
|
|
|
|
+ // this.selection = arr;
|
|
|
|
+ // this.updateMulCapacity();
|
|
|
|
+ // },
|
|
//禁用已派车
|
|
//禁用已派车
|
|
selectInit(row) {
|
|
selectInit(row) {
|
|
console.log(row);
|
|
console.log(row);
|
|
@@ -646,16 +649,12 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//多拼弹出层绑定车牌号
|
|
//多拼弹出层绑定车牌号
|
|
- handleMulSelect(row, index) {
|
|
|
|
- this.capacityList.forEach(item => {
|
|
|
|
- if (item.capacityNumber === row.capacityNo) {
|
|
|
|
- this.selection.forEach(selected => {
|
|
|
|
- selected.newsCapacityId = item.capacityId;
|
|
|
|
- selected.capacityNo = row.capacityNo;
|
|
|
|
- });
|
|
|
|
- this.newsCapacityId = item.capacityId;
|
|
|
|
- this.capacityNo = row.capacityNo;
|
|
|
|
- console.log("newCapacityId:", this.newsCapacityId);
|
|
|
|
|
|
+ handleMulSelect(item) {
|
|
|
|
+ console.log(item);
|
|
|
|
+ this.capacityList.forEach(e => {
|
|
|
|
+ if (item.capacityNumber === e.capacityNumber) {
|
|
|
|
+ this.capacityNumber = e.capacityNumber;
|
|
|
|
+ this.capacityId = e.capacityId;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -775,11 +774,15 @@ export default {
|
|
|
|
|
|
//多拼派车
|
|
//多拼派车
|
|
updateMulCapacity() {
|
|
updateMulCapacity() {
|
|
|
|
+ let i = 0;
|
|
|
|
+ if (this.capacityId == null) {
|
|
|
|
+ this.$message.error("请选择车牌号后再派发");
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
this.selection.forEach(item => {
|
|
this.selection.forEach(item => {
|
|
item.isIwardSteel = 4;
|
|
item.isIwardSteel = 4;
|
|
item.saleOrderMaterialId = item.saleOrderId;
|
|
item.saleOrderMaterialId = item.saleOrderId;
|
|
- item.capacityId = this.capacityId;
|
|
|
|
- item.capacityNumber = this.capacityNo;
|
|
|
|
|
|
+ item.capacityNumber = this.capacityNumber;
|
|
});
|
|
});
|
|
if (this.selection[0].sendStation == "达州站") {
|
|
if (this.selection[0].sendStation == "达州站") {
|
|
this.selection.forEach(item => {
|
|
this.selection.forEach(item => {
|
|
@@ -820,16 +823,22 @@ export default {
|
|
this.$message.success("派车成功!");
|
|
this.$message.success("派车成功!");
|
|
this.getSteelReport();
|
|
this.getSteelReport();
|
|
loading.close();
|
|
loading.close();
|
|
|
|
+ this.capacityId = null;
|
|
|
|
+ this.dialogTableVisible = false;
|
|
} else {
|
|
} else {
|
|
this.$message.error("派车失败,请联系管理员");
|
|
this.$message.error("派车失败,请联系管理员");
|
|
this.getSteelReport();
|
|
this.getSteelReport();
|
|
loading.close();
|
|
loading.close();
|
|
|
|
+ this.capacityId = null;
|
|
|
|
+ this.dialogTableVisible = false;
|
|
}
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message.error("派车失败,请联系管理员");
|
|
this.$message.error("派车失败,请联系管理员");
|
|
this.getSteelReport();
|
|
this.getSteelReport();
|
|
loading.close();
|
|
loading.close();
|
|
|
|
+ this.capacityId = null;
|
|
|
|
+ this.dialogTableVisible = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|