From 0019e4730d84bc1be71c38be08388dfa9767a02f Mon Sep 17 00:00:00 2001 From: wangshiming Date: Thu, 10 Feb 2022 17:18:26 +0800 Subject: [PATCH] fix bug --- .../components/risk/risk.component.html | 2 +- .../bulk-detail/bulk-detail.component.html | 2 +- .../bulk-publish/bulk-publish.component.ts | 18 ++--- .../bulk-release-publish.component.ts | 14 ++-- .../onecar-publish.component.html | 14 ++-- .../onecar-publish.component.ts | 68 ++++++++++++++++--- .../release-publish.component.html | 4 ++ .../release-publish.component.ts | 14 ++-- .../bulk-detail/bulk-detail.component.html | 2 +- .../vehicle-detail.component.html | 2 +- 10 files changed, 100 insertions(+), 40 deletions(-) diff --git a/src/app/routes/order-management/components/risk/risk.component.html b/src/app/routes/order-management/components/risk/risk.component.html index 09b0ff66..c63313b8 100644 --- a/src/app/routes/order-management/components/risk/risk.component.html +++ b/src/app/routes/order-management/components/risk/risk.component.html @@ -89,7 +89,7 @@

货物名称:{{i?.goodsName}}

重量/体积:{{i?.weight}}吨/{{i?.volume}}方

-

车型/车长:{{i?.maxWeight}}/ {{i?.maxCube}}

+

车型/车长:{{i?.carModel}}/ {{i?.carLength}}

diff --git a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html index 57989053..4d7567db 100644 --- a/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/supply-management/components/bulk-detail/bulk-detail.component.html @@ -66,7 +66,7 @@ {{ item?.weight }}吨 | {{ item?.volume }}方 {{ 10 }}吨 | {{ 10 }}方 - {{ item?.maxWeight }} | {{ item?.maxCube }}米 + {{ item?.carModel }} | {{ item?.carLength }}米 {{ i?.carrierInformationVO?.driverName }} / {{ i?.carrierInformationVO?.driverTelephone }} / {{ i?.carrierInformationVO?.driverLicensePlate }} diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 5347d024..8261f185 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -353,7 +353,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { placeholder: '请输入' } }, - maxWeight: { + carModel: { type: 'string', title: '车型/车长', ui: { @@ -364,7 +364,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { errors: { required: '请选择车型' } } }, - maxCube: { + carLength: { type: 'string', title: '', ui: { @@ -376,7 +376,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit { } } }, - required: ['weight', 'maxWeight', 'maxCube', 'freightPrice', 'rule', 'settlementBasis'] + required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis'] }; this.ui4 = { '*': { @@ -401,10 +401,10 @@ export class SupplyManagementBulkPublishComponent implements OnInit { $number: { grid: { span: 8 } }, - $maxWeight: { + $carModel: { grid: { span: 12 } }, - $maxCube: { + $carLength: { grid: { span: 12 } } }; @@ -680,8 +680,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { { ...this.sf4.value, ...this.sf3.value, - maxWeight: this.sf4.value.maxWeight.join(','), - maxCube: this.sf4.value.maxCube.join(',') + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') } ] }; @@ -926,8 +926,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit { weight: res?.goodsInfoVOList[0]?.weight || '', volume: res?.goodsInfoVOList[0]?.volume || '', number: res?.goodsInfoVOList[0]?.number || '', - maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '', - maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(',') || '' + carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || '', + carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || '' }; if (this.PageStatus === '大宗修改') { this.sf4data.id = res?.goodsInfoVOList[0]?.id; diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index 015699cf..7aa86c4a 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -373,7 +373,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { placeholder: '请输入' } }, - maxWeight: { + carModel: { type: 'string', title: '车型/车长', default: [], @@ -385,7 +385,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { errors: { required: '请选择车型' } } }, - maxCube: { + carLength: { type: 'string', title: '', default: [], @@ -398,7 +398,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { } } }, - required: ['weight', 'maxWeight', 'maxCube', 'freightPrice', 'rule', 'settlementBasis'] + required: ['weight', 'carModel', 'carLength', 'freightPrice', 'rule', 'settlementBasis'] }; this.ui4 = { '*': { @@ -423,10 +423,10 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { $number: { grid: { span: 8 } }, - $maxWeight: { + $carModel: { grid: { span: 12 } }, - $maxCube: { + $carLength: { grid: { span: 12 } } }; @@ -598,8 +598,8 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { { ...sf3Values, ...this.sf4.value, - maxWeight: this.sf4.value.maxWeight.join(','), - maxCube: this.sf4.value.maxCube.join(',') + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') } ]; const params = { diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html index 72e00ce5..c82ca4f8 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.html @@ -67,10 +67,12 @@ - +
+ +
@@ -126,11 +128,13 @@
+
+
@@ -142,6 +146,7 @@ nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadingTime" [(ngModel)]="loadingTime" + (ngModelChange)="changeLO(loadingTime)" > @@ -155,6 +160,7 @@ nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" [(ngModel)]="unloadingTime" + (ngModelChange)="changeUn(unloadingTime)" > diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index ded52605..9a3cd82a 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -316,7 +316,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { placeholder: '请输入' } }, - maxWeight: { + carModel: { type: 'string', title: '车型/车长', ui: { @@ -327,7 +327,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { errors: { required: '请选择车型' } } }, - maxCube: { + carLength: { type: 'string', title: '', ui: { @@ -339,7 +339,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } } }, - required: ['weight', 'maxWeight', 'maxCube'] + required: ['weight', 'carModel', 'carLength'] }; this.ui4 = { '*': { @@ -355,10 +355,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { $number: { grid: { span: 8 } }, - $maxWeight: { + $carModel: { grid: { span: 12 } }, - $maxCube: { + $carLength: { grid: { span: 12 } } }; @@ -871,8 +871,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { { ...this.sf4.value, ...this.sf3.value, - maxWeight: this.sf4.value.maxWeight.join(','), - maxCube: this.sf4.value.maxCube.join(',') + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') } ] }; @@ -1076,8 +1076,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { weight: res?.goodsInfoVOList[0]?.weight, volume: res?.goodsInfoVOList[0]?.volume, vehicleDemand: res?.goodsInfoVOList[0]?.vehicleDemand, - maxCube: res?.goodsInfoVOList[0]?.maxCube?.split(','), - maxWeight: res?.goodsInfoVOList[0]?.maxWeight?.split(',') || '', + carLength: res?.goodsInfoVOList[0]?.carLength?.split(','), + carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || '', number: res?.goodsInfoVOList[0]?.number, goodsTypeName: res?.goodsInfoVOList[0]?.goodsTypeName, modifyUserId: res?.goodsInfoVOList[0]?.modifyUserId, @@ -1171,4 +1171,54 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { } }); } + changeUn(value: any) { + console.log(value) + if (typeof value !== 'string') { + var c = new Date(value); + value = + c.getFullYear() + + '-' + + this.addPreZero(c.getMonth() + 1) + + '-' + + this.addPreZero(c.getDate()) + + ' ' + + this.addPreZero(c.getHours()) + + ':' + + this.addPreZero(c.getMinutes()) + + ':' + + this.addPreZero(c.getSeconds()); + } + console.log(value) + console.log(this.loadingTime) + console.log(this.loadingTime > value) + if(this.loadingTime > value) { + console.log('错误') + this.unloadingTime = '' + } + } + changeLO(value: any) { + console.log(value) + if (typeof value !== 'string') { + var c = new Date(value); + value = + c.getFullYear() + + '-' + + this.addPreZero(c.getMonth() + 1) + + '-' + + this.addPreZero(c.getDate()) + + ' ' + + this.addPreZero(c.getHours()) + + ':' + + this.addPreZero(c.getMinutes()) + + ':' + + this.addPreZero(c.getSeconds()); + } + console.log(value) + console.log(this.unloadingTime) + console.log(this.unloadingTime > value) + if(this.unloadingTime > value) { + console.log('错误') + this.loadingTime = '' + } + } } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.html b/src/app/routes/supply-management/components/release-publish/release-publish.component.html index 02c0f86c..188c5756 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.html +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.html @@ -76,11 +76,13 @@
+
+
@@ -141,11 +143,13 @@
+
+
diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index 0a546e3b..c43bf611 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -333,7 +333,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { placeholder: '请输入' } }, - maxWeight: { + carModel: { type: 'string', title: '车型/车长', ui: { @@ -344,7 +344,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { errors: { required: '请选择车型' } } }, - maxCube: { + carLength: { type: 'string', title: '', ui: { @@ -356,7 +356,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit { } } }, - required: ['weight', 'maxWeight', 'maxCube'] + required: ['weight', 'carModel', 'carLength'] }; this.ui4 = { '*': { @@ -372,10 +372,10 @@ export class SupplyManagementReleasePublishComponent implements OnInit { $number: { grid: { span: 8 } }, - $maxWeight: { + $carModel: { grid: { span: 12 } }, - $maxCube: { + $carLength: { grid: { span: 12 } } }; @@ -781,8 +781,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { { ...this.sf4.value, ...this.sf3.value, - maxWeight: this.sf4.value.maxWeight.join(','), - maxCube: this.sf4.value.maxCube.join(',') + carModel: this.sf4.value.carModel.join(','), + carLength: this.sf4.value.carLength.join(',') } ]; // 运费信息 diff --git a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html index 8fcd875c..8ab2af3a 100644 --- a/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html +++ b/src/app/routes/waybill-management/components/bulk-detail/bulk-detail.component.html @@ -74,7 +74,7 @@ {{i?.goodsInfos?.[0]?.weight}}吨,{{i?.goodsInfos?.[0]?.volume}}方,{{i?.goodsInfos?.[0]?.number}}件 - {{i?.goodsInfos?.[0]?.maxWeightLabel}}/{{i?.goodsInfos?.[0]?.maxCube}} + {{i?.goodsInfos?.[0]?.carModelLabel}}/{{i?.goodsInfos?.[0]?.carLength}} {{i?.driver?.name}}/{{i?.driver?.phone}} diff --git a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html index f63d7dd5..dacf4d01 100644 --- a/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html +++ b/src/app/routes/waybill-management/components/vehicle-detail/vehicle-detail.component.html @@ -74,7 +74,7 @@ {{i?.goodsInfos?.[0]?.weight}}吨,{{i?.goodsInfos?.[0]?.volume}}方,{{i?.goodsInfos?.[0]?.number}}件 - {{i?.goodsInfos?.[0]?.maxWeightLabel}}/{{i?.goodsInfos?.[0]?.maxCube}} + {{i?.goodsInfos?.[0]?.carModelLabel}}/{{i?.goodsInfos?.[0]?.carLength}} {{i?.driverVo?.name}}/{{i?.driverVo?.phone}}