|
@@ -78,7 +78,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="重量(吨)" span="1" prop="weight">
|
|
|
<el-input
|
|
|
- @input='weightchange'
|
|
|
+ @input="weightchange"
|
|
|
v-model="deptBudgetList.weight"
|
|
|
placeholder="请输入重量"
|
|
|
maxlength="20"
|
|
@@ -87,14 +87,13 @@
|
|
|
</el-form-item>
|
|
|
</ws-info-table>
|
|
|
<ws-info-table class="el-table">
|
|
|
- <div class="start-address" style="width : 36%">
|
|
|
- <el-radio-group @change='warehouseTypechange' v-model="deptBudgetList.warehouseType">
|
|
|
- <el-radio label="1"
|
|
|
- >常用仓库发货</el-radio
|
|
|
- >
|
|
|
- <el-radio label="2"
|
|
|
- >临时仓库发货</el-radio
|
|
|
+ <div class="start-address" style="width: 36%">
|
|
|
+ <el-radio-group
|
|
|
+ @change="warehouseTypechange"
|
|
|
+ v-model="deptBudgetList.warehouseType"
|
|
|
>
|
|
|
+ <el-radio label="1">常用仓库发货</el-radio>
|
|
|
+ <el-radio label="2">临时仓库发货</el-radio>
|
|
|
</el-radio-group>
|
|
|
<el-select
|
|
|
v-model="deptBudgetList.sendWarehouse"
|
|
@@ -198,8 +197,11 @@
|
|
|
:key="index"
|
|
|
>
|
|
|
<div class="driver">
|
|
|
- <span style='vertical-align: top;'>运输阶段{{ index + 1 }} {{ item.processNo }}</span>
|
|
|
- <img v-if='!endflag'
|
|
|
+ <span style="vertical-align: top"
|
|
|
+ >运输阶段{{ index + 1 }} {{ item.processNo }}</span
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-if="!endflag"
|
|
|
width="22"
|
|
|
height="22"
|
|
|
class="add"
|
|
@@ -216,13 +218,13 @@
|
|
|
alt=""
|
|
|
/>
|
|
|
<el-checkbox
|
|
|
- @change='engflagchange'
|
|
|
- class='endflag'
|
|
|
+ @change="engflagchange"
|
|
|
+ class="endflag"
|
|
|
v-if="index == deptBudgetList.tranProcessInfoList.length - 1"
|
|
|
v-model="item.endFlag"
|
|
|
:label="1"
|
|
|
>最终阶段</el-checkbox
|
|
|
- >
|
|
|
+ >
|
|
|
</div>
|
|
|
<ws-info-table>
|
|
|
<el-form-item label="运输方式" span="1" prop="waterContent">
|
|
@@ -398,7 +400,7 @@ export default {
|
|
|
checkList: [],
|
|
|
deptBudgetList: {},
|
|
|
radio: '1',
|
|
|
- endflag:false,
|
|
|
+ endflag: false,
|
|
|
carModelList: [],
|
|
|
carLengthList: [],
|
|
|
warehouseType: '1',
|
|
@@ -437,8 +439,8 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- warehouseTypechange(){
|
|
|
- getwarehousename({
|
|
|
+ warehouseTypechange() {
|
|
|
+ getwarehousename({
|
|
|
compId: this.compId,
|
|
|
warehouseType: this.deptBudgetList.warehouseType,
|
|
|
})
|
|
@@ -447,57 +449,82 @@ export default {
|
|
|
this.warehouseList = response
|
|
|
})
|
|
|
},
|
|
|
- weightchange(e){
|
|
|
- this.deptBudgetList.tranProcessInfoList[0].weight=e
|
|
|
+ weightchange(e) {
|
|
|
+ this.deptBudgetList.tranProcessInfoList[0].weight = e
|
|
|
},
|
|
|
- engflagchange(e){
|
|
|
- this.endflag=e
|
|
|
+ engflagchange(e) {
|
|
|
+ this.endflag = e
|
|
|
},
|
|
|
loaddata() {
|
|
|
examinetran({ id: this.$route.query.id })
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
- var tmp = []
|
|
|
- tmp[0] = TextToCode[response.startPrivate].code
|
|
|
- tmp[1] = TextToCode[response.startPrivate][response.startCity].code
|
|
|
- tmp[2] =
|
|
|
- TextToCode[response.startPrivate][response.startCity][
|
|
|
- response.startArea
|
|
|
- ].code
|
|
|
- this.selectedOptions = tmp
|
|
|
- var tmp1 = []
|
|
|
- tmp1[0] = TextToCode[response.endPrivate].code
|
|
|
- tmp1[1] = TextToCode[response.endPrivate][response.endCity].code
|
|
|
- tmp1[2] =
|
|
|
- TextToCode[response.endPrivate][response.endCity][
|
|
|
- response.endArea
|
|
|
- ].code
|
|
|
- this.selectedOptions1 = tmp1
|
|
|
- for (var i = 0; i < response.tranProcessInfoList.length; i++) {
|
|
|
- var tmp2 = []
|
|
|
- tmp2[0] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].sendPrivate].code
|
|
|
- tmp2[1] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].sendPrivate][
|
|
|
- response.tranProcessInfoList[i].sendCity
|
|
|
+ if (
|
|
|
+ response.startPrivate != null &&
|
|
|
+ response.startCity != null &&
|
|
|
+ response.startArea != null
|
|
|
+ ) {
|
|
|
+ var tmp = []
|
|
|
+ tmp[0] = TextToCode[response.startPrivate].code
|
|
|
+ tmp[1] = TextToCode[response.startPrivate][response.startCity].code
|
|
|
+ tmp[2] =
|
|
|
+ TextToCode[response.startPrivate][response.startCity][
|
|
|
+ response.startArea
|
|
|
].code
|
|
|
- tmp2[2] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].sendPrivate][
|
|
|
- response.tranProcessInfoList[i].sendCity
|
|
|
- ][response.tranProcessInfoList[i].sendArea].code
|
|
|
- response.tranProcessInfoList[i].selectedOptions = tmp2
|
|
|
- var tmp3 = []
|
|
|
- tmp3[0] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].receivePrivate].code
|
|
|
- tmp3[1] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].receivePrivate][
|
|
|
- response.tranProcessInfoList[i].receiveCity
|
|
|
+ this.selectedOptions = tmp
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ response.endPrivate != null &&
|
|
|
+ response.endCity != null &&
|
|
|
+ response.endArea != null
|
|
|
+ ) {
|
|
|
+ var tmp1 = []
|
|
|
+ tmp1[0] = TextToCode[response.endPrivate].code
|
|
|
+ tmp1[1] = TextToCode[response.endPrivate][response.endCity].code
|
|
|
+ tmp1[2] =
|
|
|
+ TextToCode[response.endPrivate][response.endCity][
|
|
|
+ response.endArea
|
|
|
].code
|
|
|
- tmp3[2] =
|
|
|
- TextToCode[response.tranProcessInfoList[i].receivePrivate][
|
|
|
- response.tranProcessInfoList[i].receiveCity
|
|
|
- ][response.tranProcessInfoList[i].receiveArea].code
|
|
|
- response.tranProcessInfoList[i].selectedOptions1 = tmp3
|
|
|
+ this.selectedOptions1 = tmp1
|
|
|
+ }
|
|
|
+
|
|
|
+ for (var i = 0; i < response.tranProcessInfoList.length; i++) {
|
|
|
+ if (
|
|
|
+ response.tranProcessInfoList[i].sendPrivate != '' &&
|
|
|
+ response.tranProcessInfoList[i].sendCity != '' &&
|
|
|
+ response.tranProcessInfoList[i].sendArea != ''
|
|
|
+ ) {
|
|
|
+ var tmp2 = []
|
|
|
+ tmp2[0] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].sendPrivate].code
|
|
|
+ tmp2[1] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].sendPrivate][
|
|
|
+ response.tranProcessInfoList[i].sendCity
|
|
|
+ ].code
|
|
|
+ tmp2[2] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].sendPrivate][
|
|
|
+ response.tranProcessInfoList[i].sendCity
|
|
|
+ ][response.tranProcessInfoList[i].sendArea].code
|
|
|
+ response.tranProcessInfoList[i].selectedOptions = tmp2
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ response.tranProcessInfoList[i].receivePrivate != '' &&
|
|
|
+ response.tranProcessInfoList[i].receiveCity != '' &&
|
|
|
+ response.tranProcessInfoList[i].receiveArea != ''
|
|
|
+ ) {
|
|
|
+ var tmp3 = []
|
|
|
+ tmp3[0] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].receivePrivate].code
|
|
|
+ tmp3[1] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].receivePrivate][
|
|
|
+ response.tranProcessInfoList[i].receiveCity
|
|
|
+ ].code
|
|
|
+ tmp3[2] =
|
|
|
+ TextToCode[response.tranProcessInfoList[i].receivePrivate][
|
|
|
+ response.tranProcessInfoList[i].receiveCity
|
|
|
+ ][response.tranProcessInfoList[i].receiveArea].code
|
|
|
+ response.tranProcessInfoList[i].selectedOptions1 = tmp3
|
|
|
+ }
|
|
|
}
|
|
|
this.checkList = response.tranType.split(',')
|
|
|
this.deptBudgetList = response
|
|
@@ -631,6 +658,87 @@ export default {
|
|
|
) {
|
|
|
this.deptBudgetList.tranProcessInfoList[i].processNo =
|
|
|
this.deptBudgetList.taskNo + (i + 1)
|
|
|
+ if (
|
|
|
+ new Date(
|
|
|
+ this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart
|
|
|
+ ).getTime() >
|
|
|
+ new Date(
|
|
|
+ this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd
|
|
|
+ ).getTime()
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '发货日期不能大于最晚到货日期',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateStart) {
|
|
|
+ this.$message({
|
|
|
+ message: '发货日期不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].deliveryDateEnd) {
|
|
|
+ this.$message({
|
|
|
+ message: '最晚到货日期不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].weight) {
|
|
|
+ this.$message({
|
|
|
+ message: '重量不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].sender) {
|
|
|
+ this.$message({
|
|
|
+ message: '发货人不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].senderPhone) {
|
|
|
+ this.$message({
|
|
|
+ message: '发货人电话不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].receiver) {
|
|
|
+ this.$message({
|
|
|
+ message: '收货人不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!this.deptBudgetList.tranProcessInfoList[i].receiverPhone) {
|
|
|
+ this.$message({
|
|
|
+ message: '收货人电话不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.tranProcessInfoList[i].receiveDetailedAddress
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '收获详细地址不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (
|
|
|
+ !this.deptBudgetList.tranProcessInfoList[i].sendDetailedAddress
|
|
|
+ ) {
|
|
|
+ this.$message({
|
|
|
+ message: '发货详细地址不能为空',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
}
|
|
|
this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
|
|
|
this.deptBudgetList.tranType = this.checkList.toString()
|
|
@@ -666,9 +774,9 @@ export default {
|
|
|
.position .ws-info-table .el-form-item {
|
|
|
width: 25%;
|
|
|
}
|
|
|
-.typeselect{
|
|
|
- width:42%;
|
|
|
- margin-left:32px;
|
|
|
+.typeselect {
|
|
|
+ width: 42%;
|
|
|
+ margin-left: 32px;
|
|
|
}
|
|
|
/deep/.position .ws-info-table .el-form-item .el-form-item__label,
|
|
|
/deep/.position .ws-info-table .el-form-item .el-form-item__content {
|
|
@@ -700,8 +808,10 @@ export default {
|
|
|
color: #8890b1;
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
-/deep/.el-table--border:after, /deep/.el-table--group:after, /deep/.el-table:before {
|
|
|
- background:transparent;
|
|
|
+/deep/.el-table--border:after,
|
|
|
+/deep/.el-table--group:after,
|
|
|
+/deep/.el-table:before {
|
|
|
+ background: transparent;
|
|
|
}
|
|
|
.el-form {
|
|
|
padding: 0 10%;
|
|
@@ -801,8 +911,8 @@ export default {
|
|
|
font-size: 16px;
|
|
|
color: #5473e8;
|
|
|
}
|
|
|
-.el-form{
|
|
|
- height: 73vh;
|
|
|
- overflow: scroll;
|
|
|
+.el-form {
|
|
|
+ height: 73vh;
|
|
|
+ overflow: scroll;
|
|
|
}
|
|
|
</style>
|