fix bug
This commit is contained in:
		@ -67,7 +67,7 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </nz-form-item>
 | 
					          </nz-form-item>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div style="display: flex; justify-content: center;">
 | 
					        <div style="display: flex; justify-content: center">
 | 
				
			||||||
          <button nz-button nzType="primary" (click)="addStartInfo($event)">
 | 
					          <button nz-button nzType="primary" (click)="addStartInfo($event)">
 | 
				
			||||||
            <i nz-icon nzType="plus"></i>
 | 
					            <i nz-icon nzType="plus"></i>
 | 
				
			||||||
            添加装货地
 | 
					            添加装货地
 | 
				
			||||||
@ -128,7 +128,7 @@
 | 
				
			|||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </nz-form-item>
 | 
					          </nz-form-item>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
        <div style="display: flex; justify-content: center;">
 | 
					        <div style="display: flex; justify-content: center">
 | 
				
			||||||
          <button nz-button nzType="primary" (click)="addEndInfo($event)">
 | 
					          <button nz-button nzType="primary" (click)="addEndInfo($event)">
 | 
				
			||||||
            <i nz-icon nzType="plus"></i>
 | 
					            <i nz-icon nzType="plus"></i>
 | 
				
			||||||
            添加卸货地
 | 
					            添加卸货地
 | 
				
			||||||
@ -144,9 +144,8 @@
 | 
				
			|||||||
            <nz-date-picker
 | 
					            <nz-date-picker
 | 
				
			||||||
              nzShowTime
 | 
					              nzShowTime
 | 
				
			||||||
              nzFormat="yyyy-MM-dd HH:mm:ss"
 | 
					              nzFormat="yyyy-MM-dd HH:mm:ss"
 | 
				
			||||||
              formControlName="loadingTime"
 | 
					              [ngModel]="loadingTime"
 | 
				
			||||||
              [(ngModel)]="loadingTime"
 | 
					              (ngModelChange)="changeLO($event)"[ngModelOptions]="{standalone: true}"
 | 
				
			||||||
              (ngModelChange)="changeLO(loadingTime)"
 | 
					 | 
				
			||||||
            ></nz-date-picker>
 | 
					            ></nz-date-picker>
 | 
				
			||||||
          </nz-form-control>
 | 
					          </nz-form-control>
 | 
				
			||||||
        </nz-form-item>
 | 
					        </nz-form-item>
 | 
				
			||||||
@ -158,9 +157,8 @@
 | 
				
			|||||||
            <nz-date-picker
 | 
					            <nz-date-picker
 | 
				
			||||||
              nzShowTime
 | 
					              nzShowTime
 | 
				
			||||||
              nzFormat="yyyy-MM-dd HH:mm:ss"
 | 
					              nzFormat="yyyy-MM-dd HH:mm:ss"
 | 
				
			||||||
              formControlName="unloadingTime"
 | 
					              [ngModel]="unloadingTime"
 | 
				
			||||||
              [(ngModel)]="unloadingTime"
 | 
					              (ngModelChange)="changeUn($event)"[ngModelOptions]="{standalone: true}"
 | 
				
			||||||
              (ngModelChange)="changeUn(unloadingTime)"
 | 
					 | 
				
			||||||
            ></nz-date-picker>
 | 
					            ></nz-date-picker>
 | 
				
			||||||
          </nz-form-control>
 | 
					          </nz-form-control>
 | 
				
			||||||
        </nz-form-item>
 | 
					        </nz-form-item>
 | 
				
			||||||
@ -241,15 +239,22 @@
 | 
				
			|||||||
      <sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
 | 
					      <sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
 | 
				
			||||||
        <ng-template sf-template="goodsValue" let-i let-ui="ui">
 | 
					        <ng-template sf-template="goodsValue" let-i let-ui="ui">
 | 
				
			||||||
          <div class="align-center">
 | 
					          <div class="align-center">
 | 
				
			||||||
            <nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="3000000" [nzStep]="0.01"
 | 
					            <nz-input-number
 | 
				
			||||||
              (ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入50000-3000000之间数值"></nz-input-number>
 | 
					              [ngModel]="i.value"
 | 
				
			||||||
 | 
					              [nzMin]="50000"
 | 
				
			||||||
 | 
					              [nzMax]="3000000"
 | 
				
			||||||
 | 
					              [nzStep]="0.01"
 | 
				
			||||||
 | 
					              (ngModelChange)="i.setValue($event)"
 | 
				
			||||||
 | 
					              nzPlaceHolder="请输入50000-3000000之间数值"
 | 
				
			||||||
 | 
					            ></nz-input-number>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </ng-template>
 | 
					        </ng-template>
 | 
				
			||||||
        <ng-template sf-template="insureInfo" let-i let-ui="ui">
 | 
					        <ng-template sf-template="insureInfo" let-i let-ui="ui">
 | 
				
			||||||
          <div class="align-center">
 | 
					          <div class="align-center">
 | 
				
			||||||
            <input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" />
 | 
					            <input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" />
 | 
				
			||||||
            <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon
 | 
					            <span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
 | 
				
			||||||
                nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span>
 | 
					              ><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
 | 
				
			||||||
 | 
					            ></span>
 | 
				
			||||||
            <ng-template #template2>
 | 
					            <ng-template #template2>
 | 
				
			||||||
              <p>注意事项:</p>
 | 
					              <p>注意事项:</p>
 | 
				
			||||||
              <p>①请仔细阅读《投保告知》</p>
 | 
					              <p>①请仔细阅读《投保告知》</p>
 | 
				
			||||||
@ -263,13 +268,11 @@
 | 
				
			|||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</nz-card>
 | 
					</nz-card>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
<nz-card>
 | 
					<nz-card>
 | 
				
			||||||
  <div class="card-title">补充信息</div>
 | 
					  <div class="card-title">补充信息</div>
 | 
				
			||||||
  <div nz-row>
 | 
					  <div nz-row>
 | 
				
			||||||
    <div nz-col nzSpan="12">
 | 
					    <div nz-col nzSpan="12">
 | 
				
			||||||
      <sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
 | 
					      <sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"> </sf>
 | 
				
			||||||
      </sf>
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</nz-card>
 | 
					</nz-card>
 | 
				
			||||||
@ -279,7 +282,9 @@
 | 
				
			|||||||
    <div nz-col nzSpan="12">
 | 
					    <div nz-col nzSpan="12">
 | 
				
			||||||
      <sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
 | 
					      <sf #sf7 [schema]="schema7" [button]="'none'" [ui]="ui7" [formData]="sf7data">
 | 
				
			||||||
        <ng-template sf-template="subtotal" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
 | 
					        <ng-template sf-template="subtotal" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
 | 
				
			||||||
        <ng-template sf-template="appendFee" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template>
 | 
					        <ng-template sf-template="appendFee" let-i let-ui="ui"
 | 
				
			||||||
 | 
					          >¥{{ i.value | number: '0.2-2' }}(费率:{{ currentRate | number: '0.2-4' }}%)</ng-template
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
        <ng-template sf-template="total" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
 | 
					        <ng-template sf-template="total" let-i let-ui="ui">¥{{ i.value | number: '0.2-2' }}</ng-template>
 | 
				
			||||||
        <ng-template sf-template="paymentDays" let-i let-ui="ui">
 | 
					        <ng-template sf-template="paymentDays" let-i let-ui="ui">
 | 
				
			||||||
          <div nz-row>
 | 
					          <div nz-row>
 | 
				
			||||||
@ -307,7 +312,9 @@
 | 
				
			|||||||
<nz-card>
 | 
					<nz-card>
 | 
				
			||||||
  <div class="align-center">
 | 
					  <div class="align-center">
 | 
				
			||||||
    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button>
 | 
					    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button>
 | 
				
			||||||
    <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()">提交修改</button>
 | 
					    <button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
 | 
				
			||||||
 | 
					      >提交修改</button
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')">指派熟车</button>
 | 
					    <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="submitConfirm('assign')">指派熟车</button>
 | 
				
			||||||
    <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
 | 
					    <button *ngIf="this.PageStatus == '整车下一单'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
 | 
				
			||||||
      >司机抢单</button
 | 
					      >司机抢单</button
 | 
				
			||||||
 | 
				
			|||||||
@ -14,6 +14,7 @@ import {
 | 
				
			|||||||
import { _HttpClient } from '@delon/theme';
 | 
					import { _HttpClient } from '@delon/theme';
 | 
				
			||||||
import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
 | 
					import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
 | 
				
			||||||
import { NzModalService } from 'ng-zorro-antd/modal';
 | 
					import { NzModalService } from 'ng-zorro-antd/modal';
 | 
				
			||||||
 | 
					import { type } from 'os';
 | 
				
			||||||
import { of } from 'rxjs';
 | 
					import { of } from 'rxjs';
 | 
				
			||||||
import { map } from 'rxjs/operators';
 | 
					import { map } from 'rxjs/operators';
 | 
				
			||||||
import { SupplyManagementService } from '../../services/supply-management.service';
 | 
					import { SupplyManagementService } from '../../services/supply-management.service';
 | 
				
			||||||
@ -386,9 +387,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
          readOnly: true,
 | 
					          readOnly: true,
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'checkbox',
 | 
					            widget: 'checkbox',
 | 
				
			||||||
            visibleIf: {insuranceType: (value: string) => value ==='1'},
 | 
					            visibleIf: { insuranceType: (value: string) => value === '1' }
 | 
				
			||||||
          } as SFCheckboxWidgetSchema,
 | 
					          } as SFCheckboxWidgetSchema,
 | 
				
			||||||
          default: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'],
 | 
					          default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        type2: {
 | 
					        type2: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
@ -397,9 +398,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
          readOnly: true,
 | 
					          readOnly: true,
 | 
				
			||||||
          ui: {
 | 
					          ui: {
 | 
				
			||||||
            widget: 'checkbox',
 | 
					            widget: 'checkbox',
 | 
				
			||||||
            visibleIf: {insuranceType: (value: string) => value ==='2'},
 | 
					            visibleIf: { insuranceType: (value: string) => value === '2' }
 | 
				
			||||||
          } as SFCheckboxWidgetSchema,
 | 
					          } as SFCheckboxWidgetSchema,
 | 
				
			||||||
          default: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'],
 | 
					          default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
@ -478,7 +479,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
            visibleIf: {
 | 
					            visibleIf: {
 | 
				
			||||||
              receiptType: value => value === '2'
 | 
					              receiptType: value => value === '2'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        receiptUserPhone: {
 | 
					        receiptUserPhone: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
@ -488,7 +489,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
            visibleIf: {
 | 
					            visibleIf: {
 | 
				
			||||||
              receiptType: value => value === '2'
 | 
					              receiptType: value => value === '2'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        receiptAddressArea: {
 | 
					        receiptAddressArea: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
@ -498,7 +499,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
            visibleIf: {
 | 
					            visibleIf: {
 | 
				
			||||||
              receiptType: value => value === '2'
 | 
					              receiptType: value => value === '2'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        receiptAddress: {
 | 
					        receiptAddress: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
@ -508,7 +509,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
            visibleIf: {
 | 
					            visibleIf: {
 | 
				
			||||||
              receiptType: value => value === '2'
 | 
					              receiptType: value => value === '2'
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          },
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        remarks: {
 | 
					        remarks: {
 | 
				
			||||||
          type: 'string',
 | 
					          type: 'string',
 | 
				
			||||||
@ -827,7 +828,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
    if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
 | 
					    if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    console.log(this.validateForm1.value?.unloadingTime)
 | 
					    console.log(this.validateForm1.value?.unloadingTime);
 | 
				
			||||||
    if (typeof this.validateForm1.value.unloadingTime !== 'string') {
 | 
					    if (typeof this.validateForm1.value.unloadingTime !== 'string') {
 | 
				
			||||||
      var c = new Date(this.validateForm1.value.unloadingTime);
 | 
					      var c = new Date(this.validateForm1.value.unloadingTime);
 | 
				
			||||||
      this.validateForm1.value.unloadingTime =
 | 
					      this.validateForm1.value.unloadingTime =
 | 
				
			||||||
@ -1087,10 +1088,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
    if (res?.loadingTime) {
 | 
					    if (res?.loadingTime) {
 | 
				
			||||||
      this.loadingTime = res?.loadingTime;
 | 
					      this.loadingTime = res?.loadingTime;
 | 
				
			||||||
 | 
					      // this.validateForm1.patchValue(
 | 
				
			||||||
 | 
					      //   {
 | 
				
			||||||
 | 
					      //     loadingTime: res?.loadingTime,
 | 
				
			||||||
 | 
					      //   },
 | 
				
			||||||
 | 
					      //   { onlySelf: true },
 | 
				
			||||||
 | 
					      // );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (res?.unloadingTime) {
 | 
					    if (res?.unloadingTime) {
 | 
				
			||||||
      this.unloadingTime = res?.unloadingTime;
 | 
					      this.unloadingTime = res?.unloadingTime;
 | 
				
			||||||
 | 
					      // this.validateForm1.patchValue(
 | 
				
			||||||
 | 
					      //   {
 | 
				
			||||||
 | 
					      //     unloadingTime: res?.unloadingTime,
 | 
				
			||||||
 | 
					      //   },
 | 
				
			||||||
 | 
					      //   { onlySelf: true },
 | 
				
			||||||
 | 
					      // );
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (this.PageStatus === '整车修改') {
 | 
					    if (this.PageStatus === '整车修改') {
 | 
				
			||||||
      this.sf4data.id = res?.goodsInfoVOList[0]?.id;
 | 
					      this.sf4data.id = res?.goodsInfoVOList[0]?.id;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@ -1171,54 +1185,42 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  changeUn(value: any) {
 | 
					  changeUn(event: Date) {
 | 
				
			||||||
    console.log(value)
 | 
					    this.unloadingTime = event;
 | 
				
			||||||
        if (typeof value !== 'string') {
 | 
					    console.log(this.unloadingTime );
 | 
				
			||||||
      var c = new Date(value);
 | 
					    console.log(this.unloadingTime.getTime() );
 | 
				
			||||||
      value =
 | 
					    if(typeof this.loadingTime === 'string') {
 | 
				
			||||||
        c.getFullYear() +
 | 
					      var a = new Date(this.loadingTime)
 | 
				
			||||||
        '-' +
 | 
					    if ( a > this.unloadingTime.getTime() ) {
 | 
				
			||||||
        this.addPreZero(c.getMonth() + 1) +
 | 
					      this.service.msgSrv.error('卸货时间不能小于装货时间!');
 | 
				
			||||||
        '-' +
 | 
					      this.unloadingTime = '';
 | 
				
			||||||
        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)
 | 
				
			||||||
    console.log(this.unloadingTime <  value)
 | 
					    }
 | 
				
			||||||
    if(this.unloadingTime < value) {
 | 
					  } else {
 | 
				
			||||||
      console.log('错误')
 | 
					    if ( this.loadingTime.getTime() > this.unloadingTime.getTime() ) {
 | 
				
			||||||
      this.loadingTime = ''
 | 
					      this.service.msgSrv.error('卸货时间不能小于装货时间!');
 | 
				
			||||||
 | 
					      this.unloadingTime = '';
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  changeLO(event: Date) {
 | 
				
			||||||
 | 
					    this.loadingTime = event;
 | 
				
			||||||
 | 
					    console.log(this.loadingTime.getTime() );
 | 
				
			||||||
 | 
					    console.log(this.unloadingTime)
 | 
				
			||||||
 | 
					    console.log( typeof this.unloadingTime)
 | 
				
			||||||
 | 
					    if(typeof this.unloadingTime === 'string') {
 | 
				
			||||||
 | 
					      var a = new Date(this.unloadingTime)
 | 
				
			||||||
 | 
					      if ( a.getTime()< this.loadingTime.getTime()) {
 | 
				
			||||||
 | 
					        console.log('错误');
 | 
				
			||||||
 | 
					        this.service.msgSrv.error('装货时间不能大于卸货时间!');
 | 
				
			||||||
 | 
					        this.loadingTime = '';
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    } else {
 | 
				
			||||||
 | 
					      if ( this.unloadingTime.getTime()< this.loadingTime.getTime()) {
 | 
				
			||||||
 | 
					        console.log('错误');
 | 
				
			||||||
 | 
					        this.service.msgSrv.error('装货时间不能大于卸货时间!');
 | 
				
			||||||
 | 
					        this.loadingTime = '';
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user