|
@@ -99,6 +99,7 @@
|
|
v-model="deptBudgetList.sendWarehouse"
|
|
v-model="deptBudgetList.sendWarehouse"
|
|
placeholder="选择仓库"
|
|
placeholder="选择仓库"
|
|
class="typeselect"
|
|
class="typeselect"
|
|
|
|
+ @change="sendWarehousechange"
|
|
>
|
|
>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in warehouseList"
|
|
v-for="item in warehouseList"
|
|
@@ -183,7 +184,7 @@
|
|
<div class="check-box">
|
|
<div class="check-box">
|
|
<span class="check-box">运输方式</span>
|
|
<span class="check-box">运输方式</span>
|
|
<el-checkbox-group v-model="checkList" prop="tranType">
|
|
<el-checkbox-group v-model="checkList" prop="tranType">
|
|
- <el-checkbox label="汽运"></el-checkbox>
|
|
|
|
|
|
+ <el-checkbox label="汽运" checked></el-checkbox>
|
|
<el-checkbox label="火运"></el-checkbox>
|
|
<el-checkbox label="火运"></el-checkbox>
|
|
<el-checkbox label="船运"></el-checkbox>
|
|
<el-checkbox label="船运"></el-checkbox>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
@@ -419,10 +420,13 @@ export default {
|
|
taskwayList: [],
|
|
taskwayList: [],
|
|
name: '',
|
|
name: '',
|
|
age: '',
|
|
age: '',
|
|
|
|
+ weight: 0,
|
|
|
|
+ number:2,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
activated() {
|
|
activated() {
|
|
this.loaddata()
|
|
this.loaddata()
|
|
|
|
+
|
|
this.showType = this.isShow
|
|
this.showType = this.isShow
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -439,6 +443,29 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ sendWarehousechange(e) {
|
|
|
|
+ for (let i = 0; i < this.warehouseList.length; i++) {
|
|
|
|
+ if (this.warehouseList[i].warehouseName == e) {
|
|
|
|
+ var tmp = []
|
|
|
|
+ tmp[0] = TextToCode[this.warehouseList[i].warehousePrivate].code
|
|
|
|
+ tmp[1] =
|
|
|
|
+ TextToCode[this.warehouseList[i].warehousePrivate][
|
|
|
|
+ this.warehouseList[i].warehouseCity
|
|
|
|
+ ].code
|
|
|
|
+ tmp[2] =
|
|
|
|
+ TextToCode[this.warehouseList[i].warehousePrivate][
|
|
|
|
+ this.warehouseList[i].warehouseCity
|
|
|
|
+ ][this.warehouseList[i].warehouseArea].code
|
|
|
|
+ this.selectedOptions = tmp
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].selectedOptions = tmp
|
|
|
|
+ this.deptBudgetList.startDetailedAddress =
|
|
|
|
+ this.warehouseList[i].detailedAddress
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].sendDetailedAddress =
|
|
|
|
+ this.warehouseList[i].detailedAddress
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
warehouseTypechange() {
|
|
warehouseTypechange() {
|
|
getwarehousename({
|
|
getwarehousename({
|
|
compId: this.compId,
|
|
compId: this.compId,
|
|
@@ -454,11 +481,28 @@ export default {
|
|
},
|
|
},
|
|
engflagchange(e) {
|
|
engflagchange(e) {
|
|
this.endflag = e
|
|
this.endflag = e
|
|
|
|
+ if (this.endflag) {
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].selectedOptions1 = this.selectedOptions1
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].receiveDetailedAddress = this.deptBudgetList.endDetailedAddress
|
|
|
|
+ } else {
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].selectedOptions1 = []
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList[
|
|
|
|
+ this.deptBudgetList.tranProcessInfoList.length - 1
|
|
|
|
+ ].receiveDetailedAddress = ''
|
|
|
|
+ }
|
|
},
|
|
},
|
|
loaddata() {
|
|
loaddata() {
|
|
examinetran({ id: this.$route.query.id })
|
|
examinetran({ id: this.$route.query.id })
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
|
+ this.deptBudgetList = response
|
|
|
|
+ this.number = response.tranProcessInfoList.length+1
|
|
if (
|
|
if (
|
|
response.startPrivate != null &&
|
|
response.startPrivate != null &&
|
|
response.startCity != null &&
|
|
response.startCity != null &&
|
|
@@ -525,9 +569,9 @@ export default {
|
|
][response.tranProcessInfoList[i].receiveArea].code
|
|
][response.tranProcessInfoList[i].receiveArea].code
|
|
response.tranProcessInfoList[i].selectedOptions1 = tmp3
|
|
response.tranProcessInfoList[i].selectedOptions1 = tmp3
|
|
}
|
|
}
|
|
|
|
+ this.weight = response.weight
|
|
}
|
|
}
|
|
this.checkList = response.tranType.split(',')
|
|
this.checkList = response.tranType.split(',')
|
|
- this.deptBudgetList = response
|
|
|
|
})
|
|
})
|
|
// 货名
|
|
// 货名
|
|
packList({ constId: 'CON2' })
|
|
packList({ constId: 'CON2' })
|
|
@@ -591,11 +635,13 @@ export default {
|
|
},
|
|
},
|
|
add() {
|
|
add() {
|
|
this.deptBudgetList.tranProcessInfoList.push({
|
|
this.deptBudgetList.tranProcessInfoList.push({
|
|
|
|
+ processNo: this.deptBudgetList.taskNo+(this.number),
|
|
|
|
+ sort:0,
|
|
tranType: '汽运',
|
|
tranType: '汽运',
|
|
tranTypeKey: '1',
|
|
tranTypeKey: '1',
|
|
deliveryDateStart: '',
|
|
deliveryDateStart: '',
|
|
deliveryDateEnd: '',
|
|
deliveryDateEnd: '',
|
|
- weight: '13',
|
|
|
|
|
|
+ weight: this.weight,
|
|
selectedOptions: [],
|
|
selectedOptions: [],
|
|
selectedOptions1: [],
|
|
selectedOptions1: [],
|
|
sendPrivate: '',
|
|
sendPrivate: '',
|
|
@@ -611,6 +657,7 @@ export default {
|
|
senderPhone: '',
|
|
senderPhone: '',
|
|
receiverPhone: '',
|
|
receiverPhone: '',
|
|
})
|
|
})
|
|
|
|
+ this.number++
|
|
},
|
|
},
|
|
del(index) {
|
|
del(index) {
|
|
if (this.deptBudgetList.tranProcessInfoList.length > 1) {
|
|
if (this.deptBudgetList.tranProcessInfoList.length > 1) {
|
|
@@ -651,6 +698,84 @@ export default {
|
|
submit() {
|
|
submit() {
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
|
|
+ if (!this.deptBudgetList.taskNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '任务编号不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.taskType) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '任务类型不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.contractNo) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '合同编号/移库任务编号不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.goodsName) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '货名不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.weight) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '重量(吨)不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.sendWarehouse) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '发货仓库不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.selectedOptions.length <= 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '始发地不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (!this.deptBudgetList.startDetailedAddress) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '始发地详细地址不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.selectedOptions1.length <= 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '终到地不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (!this.deptBudgetList.endDetailedAddress) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '终到地详细地址不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ if (this.checkList.length <= 0) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '运输方式多选框不能为空!',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
for (
|
|
for (
|
|
var i = 0;
|
|
var i = 0;
|
|
i < this.deptBudgetList.tranProcessInfoList.length;
|
|
i < this.deptBudgetList.tranProcessInfoList.length;
|
|
@@ -667,56 +792,56 @@ export default {
|
|
).getTime()
|
|
).getTime()
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发货日期不能大于最晚到货日期',
|
|
|
|
|
|
+ message: '发货日期不能大于最晚到货日期!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发货日期不能为空',
|
|
|
|
|
|
+ message: '发货日期不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '最晚到货日期不能为空',
|
|
|
|
|
|
+ message: '最晚到货日期不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].weight) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].weight) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '重量不能为空',
|
|
|
|
|
|
+ message: '重量不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].sender) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].sender) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发货人不能为空',
|
|
|
|
|
|
+ message: '发货人不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].senderPhone) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].senderPhone) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发货人电话不能为空',
|
|
|
|
|
|
+ message: '发货人电话不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].receiver) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].receiver) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '收货人不能为空',
|
|
|
|
|
|
+ message: '收货人不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
}
|
|
}
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].receiverPhone) {
|
|
if (!this.deptBudgetList.tranProcessInfoList[i].receiverPhone) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '收货人电话不能为空',
|
|
|
|
|
|
+ message: '收货人电话不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
@@ -725,7 +850,7 @@ export default {
|
|
!this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress
|
|
!this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '收获详细地址不能为空',
|
|
|
|
|
|
+ message: '收获详细地址不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
@@ -734,7 +859,7 @@ export default {
|
|
!this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress
|
|
!this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress
|
|
) {
|
|
) {
|
|
this.$message({
|
|
this.$message({
|
|
- message: '发货详细地址不能为空',
|
|
|
|
|
|
+ message: '发货详细地址不能为空!',
|
|
type: 'warning',
|
|
type: 'warning',
|
|
})
|
|
})
|
|
return
|
|
return
|
|
@@ -742,6 +867,18 @@ export default {
|
|
}
|
|
}
|
|
this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
this.deptBudgetList.tranType = this.checkList.toString()
|
|
this.deptBudgetList.tranType = this.checkList.toString()
|
|
|
|
+ this.deptBudgetList.startPrivate = CodeToText[this.selectedOptions[0]]
|
|
|
|
+ this.deptBudgetList.startCity = CodeToText[this.selectedOptions[1]]
|
|
|
|
+ this.deptBudgetList.startArea = CodeToText[this.selectedOptions[2]]
|
|
|
|
+ // for(var i = 0; i< this.deptBudgetList.tranProcessInfoList.length ; i++){
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].sort = i
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].sendPrivate = CodeToText[this.selectedOptions[0]]
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].sendCity = CodeToText[this.selectedOptions[1]]
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].sendArea = CodeToText[this.selectedOptions[2]]
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].receivePrivate = CodeToText[this.selectedOptions1[0]]
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].receiveCity = CodeToText[this.selectedOptions1[1]]
|
|
|
|
+ // this.deptBudgetList.tranProcessInfoList[i].receiveArea = CodeToText[this.selectedOptions1[2]]
|
|
|
|
+ // }
|
|
edittran(this.deptBudgetList)
|
|
edittran(this.deptBudgetList)
|
|
.toPromise()
|
|
.toPromise()
|
|
.then((response) => {
|
|
.then((response) => {
|
|
@@ -915,7 +1052,7 @@ export default {
|
|
height: 73vh;
|
|
height: 73vh;
|
|
overflow: scroll;
|
|
overflow: scroll;
|
|
}
|
|
}
|
|
-.el-cascader{
|
|
|
|
|
|
+.el-cascader {
|
|
width: 100%;
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|