|
@@ -219,8 +219,10 @@
|
|
|
alt=""
|
|
|
/>
|
|
|
<el-checkbox
|
|
|
- @change="engflagchange"
|
|
|
+ @change="(val) => engflagchange(val,index)"
|
|
|
class="endflag"
|
|
|
+ true-label="1"
|
|
|
+ false-label="0"
|
|
|
v-if="index == deptBudgetList.tranProcessInfoList.length - 1"
|
|
|
v-model="item.endFlag"
|
|
|
:label="1"
|
|
@@ -482,7 +484,8 @@ export default {
|
|
|
weightchange(e) {
|
|
|
this.deptBudgetList.tranProcessInfoList[0].weight = e
|
|
|
},
|
|
|
- engflagchange(e) {
|
|
|
+ engflagchange(e,index) {
|
|
|
+ console.log(e)
|
|
|
this.endflag = e
|
|
|
if (this.endflag) {
|
|
|
this.deptBudgetList.tranProcessInfoList[
|
|
@@ -536,6 +539,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
for (var i = 0; i < response.tranProcessInfoList.length; i++) {
|
|
|
+ console.log(response.tranProcessInfoList[i].endFlag)
|
|
|
if (
|
|
|
response.tranProcessInfoList[i].sendPrivate != '' &&
|
|
|
response.tranProcessInfoList[i].sendCity != '' &&
|
|
@@ -656,6 +660,7 @@ export default {
|
|
|
sendDetailedAddress: '',
|
|
|
receiveDetailedAddress: '',
|
|
|
sender: '',
|
|
|
+ endFlag:'0',
|
|
|
receiver: '',
|
|
|
senderPhone: '',
|
|
|
receiverPhone: '',
|
|
@@ -718,6 +723,7 @@ export default {
|
|
|
this.$router.push({ path: 'tranManagementTransport' })
|
|
|
},
|
|
|
submit() {
|
|
|
+ console.log(this.deptBudgetList)
|
|
|
this.$refs.deptBudgetList.validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (!this.deptBudgetList.taskNo) {
|
|
@@ -819,49 +825,49 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart=='') {
|
|
|
this.$message({
|
|
|
message: '发货日期不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd=='') {
|
|
|
this.$message({
|
|
|
message: '最晚到货日期不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].weight) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].weight=='') {
|
|
|
this.$message({
|
|
|
message: '重量不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].sender) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].sender=='') {
|
|
|
this.$message({
|
|
|
message: '发货人不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].senderPhone) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].senderPhone=='') {
|
|
|
this.$message({
|
|
|
message: '发货人电话不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].receiver) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].receiver=='') {
|
|
|
this.$message({
|
|
|
message: '收货人不能为空!',
|
|
|
type: 'warning',
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- if (!this.deptBudgetList.tranProcessInfoList[i].receiverPhone) {
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList[i].receiverPhone=='') {
|
|
|
this.$message({
|
|
|
message: '收货人电话不能为空!',
|
|
|
type: 'warning',
|
|
@@ -869,7 +875,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- !this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress
|
|
|
+ this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress==''
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '收获详细地址不能为空!',
|
|
@@ -878,7 +884,7 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if (
|
|
|
- !this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress
|
|
|
+ this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress==''
|
|
|
) {
|
|
|
this.$message({
|
|
|
message: '发货详细地址不能为空!',
|
|
@@ -887,27 +893,32 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
+ var text=''
|
|
|
+ if (this.deptBudgetList.tranProcessInfoList.every( function( item, index, array ){
|
|
|
+ return item.endflag==0
|
|
|
+ })==true) {
|
|
|
+ text='你还未选择最终阶段,是否确认提交?'
|
|
|
+ }else{
|
|
|
+ text='运输任务提交成功后将派发到物流部门,是否确定提交?'
|
|
|
+ }
|
|
|
+ this.$confirm(text, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ }).then(()=>{
|
|
|
+ this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
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)
|
|
|
- .toPromise()
|
|
|
+ edittran(this.deptBudgetList).toPromise()
|
|
|
.then((response) => {
|
|
|
this.$message.success('编辑成功')
|
|
|
this.deptBudgetList = {}
|
|
|
this.$router.push({ path: 'tranManagementTransport' })
|
|
|
})
|
|
|
+ })
|
|
|
+
|
|
|
} else {
|
|
|
EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
|
|
|
return false
|