|
@@ -75,6 +75,11 @@
|
|
|
<i class="el-icon-refresh"></i>
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="exportAllReportToExcel"
|
|
|
+ ><i class="el-icon-download"></i>Excel</el-button
|
|
|
+ >
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" @click="showDialog">多拼派车</el-button>、
|
|
|
<el-button type="primary" @click="mergeSplit()">
|
|
@@ -106,6 +111,10 @@
|
|
|
>
|
|
|
<template slot-scope="scope">{{ scope.row.group + 1 }}</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column prop="netWeight" label="净重" align="center">
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column prop="inwardSteelType" label="类型" align="center">
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
prop="consigneeName"
|
|
|
label="收货单位"
|
|
@@ -233,8 +242,7 @@
|
|
|
column-key="transInWarehouse"
|
|
|
>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="netWeight" label="净重" align="center">
|
|
|
- </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="carrierName"
|
|
|
label="承运商"
|
|
@@ -402,7 +410,7 @@ export default {
|
|
|
totalNumber: 0,
|
|
|
//合计车数
|
|
|
totalCapacity: 0,
|
|
|
- tableTitle: '销售统计报表',
|
|
|
+ tableTitle: '库存调拨派单',
|
|
|
capacityList: [],
|
|
|
carrierList: [],
|
|
|
// 线路
|
|
@@ -772,6 +780,10 @@ export default {
|
|
|
this.filterMap.materialName = row.materialName
|
|
|
this.onclick(this.filterMap)
|
|
|
}
|
|
|
+ if (column.property == 'inwardSteelType') {
|
|
|
+ this.filterMap.inwardSteelType = row.inwardSteelType
|
|
|
+ this.onclick(this.filterMap)
|
|
|
+ }
|
|
|
if (column.property == 'carrierName') {
|
|
|
this.$set(row, 'isCarrierShow', 1)
|
|
|
this.clickIndex = row.group
|
|
@@ -892,13 +904,12 @@ export default {
|
|
|
|
|
|
updateCapacity(row) {
|
|
|
row.isIwardSteel = 4
|
|
|
- row.saleOrderMaterialId = row.saleOrderId
|
|
|
row.capacityId = row.newsCapacityId
|
|
|
if (row.newsCapacityId == null) {
|
|
|
this.$message.warning('请先注册车牌号或者选中弹出后再提交!')
|
|
|
return
|
|
|
}
|
|
|
- if (!isVehicleNumber(row.capacityNo)) {
|
|
|
+ if (!isVehicleNumber(row.capacityNo) && row.capacityNo != '车皮一个') {
|
|
|
this.$message.error('请输入正确格式的车牌号!')
|
|
|
return
|
|
|
}
|
|
@@ -994,11 +1005,21 @@ export default {
|
|
|
.post('/api/v1/ams/dispatchInwardTruckOrderBySale', map)
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
- this.$message.success('派车成功!')
|
|
|
+ this.$message({
|
|
|
+ message: '派车成功',
|
|
|
+ duration: 2000,
|
|
|
+ offset: '250px',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
} else {
|
|
|
- this.$message.error('派车失败,请联系管理员')
|
|
|
+ this.$message({
|
|
|
+ message: res.data.data,
|
|
|
+ duration: 2000,
|
|
|
+ offset: '250px',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
}
|
|
@@ -1010,7 +1031,6 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
//多拼派车
|
|
|
updateMulCapacity() {
|
|
|
let i = 0
|
|
@@ -1020,7 +1040,8 @@ export default {
|
|
|
}
|
|
|
this.selection.forEach(item => {
|
|
|
item.isIwardSteel = 4
|
|
|
- item.saleOrderMaterialId = item.saleOrderId
|
|
|
+ item.saleOrderId = item.saleOrderId
|
|
|
+ item.saleOrderMaterialId = item.saleOrderMaterialId
|
|
|
item.capacityNumber = this.capacityNumber
|
|
|
})
|
|
|
if (this.selection[0].sendStation == '达州站') {
|
|
@@ -1060,13 +1081,23 @@ export default {
|
|
|
.post('/api/v1/ams/dispatchInwardTruckOrderBySale', map)
|
|
|
.then(res => {
|
|
|
if (res.data.code == '200') {
|
|
|
- this.$message.success('派车成功!')
|
|
|
+ this.$message({
|
|
|
+ message: '派车成功',
|
|
|
+ duration: 2000,
|
|
|
+ offset: '250px',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
this.capacityId = null
|
|
|
this.dialogTableVisible = false
|
|
|
} else {
|
|
|
- this.$message.error('派车失败,请联系管理员')
|
|
|
+ this.$message({
|
|
|
+ message: res.data.data,
|
|
|
+ duration: 2000,
|
|
|
+ offset: '250px',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
this.getSteelReport()
|
|
|
loading.close()
|
|
|
this.capacityId = null
|
|
@@ -1159,9 +1190,6 @@ export default {
|
|
|
},
|
|
|
//修改承运商授权
|
|
|
updateTruckCarrier(row) {
|
|
|
- if (!row.saleOrderMaterialId) {
|
|
|
- row.saleOrderMaterialId = row.saleOrderId
|
|
|
- }
|
|
|
if (row.newCarrierId == null) {
|
|
|
this.$message.warning('请注册承运商或者选中弹出层之后再提交!')
|
|
|
this.getSteelReport()
|
|
@@ -1236,9 +1264,12 @@ export default {
|
|
|
} else {
|
|
|
// 判断当前元素与上一个元素是否相同
|
|
|
if (
|
|
|
- data[i].orderId === data[i - 1].orderId &&
|
|
|
- data[i].orderId != null &&
|
|
|
- data[i - 1].orderId != null
|
|
|
+ (data[i].orderId === data[i - 1].orderId &&
|
|
|
+ data[i].orderId != null &&
|
|
|
+ data[i - 1].orderId != null) ||
|
|
|
+ (data[i].saleOrderMaterialId === data[i - 1].saleOrderMaterialId &&
|
|
|
+ data[i].saleOrderMaterialId != null &&
|
|
|
+ data[i - 1].saleOrderMaterialId != null)
|
|
|
) {
|
|
|
this.spanArr[this.pos] += 1
|
|
|
data[i].group = data[i - 1].group
|