车辆接口更新
This commit is contained in:
@ -49,7 +49,7 @@
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<div class="align-center">
|
||||
<div style="display: flex;">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
@ -114,7 +114,7 @@
|
||||
</nz-form-item>
|
||||
<nz-form-item>
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<div class="align-center">
|
||||
<div style="display: flex;">
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||
<input
|
||||
nz-input
|
||||
@ -310,17 +310,7 @@
|
||||
</nz-card>
|
||||
<nz-card>
|
||||
<div class="align-center">
|
||||
<button nz-button nzType="primary" (click)="submitConfirm('assign')" *ngIf="type === 'add'">指派熟车</button>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')" *ngIf="type === 'add'">司机抢单</button>
|
||||
<button
|
||||
nz-button
|
||||
nzType="primary"
|
||||
style="margin-left: 48px"
|
||||
(click)="submit('publish')"
|
||||
*ngIf="type === 'edit'"
|
||||
[nzLoading]="service.http.loading"
|
||||
>保存</button
|
||||
>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="goBack()" *ngIf="type === 'edit'">取消</button>
|
||||
<button nz-button nzType="primary" (click)="submitConfirm('assign')" >指派熟车</button>
|
||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm('publish')" *ngIf="type === 'add'">司机抢单</button>
|
||||
</div>
|
||||
</nz-card>
|
||||
|
||||
@ -60,8 +60,14 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
public shipperSrv: ShipperBaseService
|
||||
) {
|
||||
this.validateForm1 = fb.group({
|
||||
loadingTime: [null, [Validators.required]],
|
||||
unloadingTime: [null, [Validators.required]]
|
||||
loadAddress0: [null, [Validators.required]],
|
||||
loadName0: [null, [Validators.required]],
|
||||
loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
|
||||
unloadAddress0: [null, [Validators.required]],
|
||||
unloadName0: [null, [Validators.required]],
|
||||
unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
|
||||
loadingTime: [null, []],
|
||||
unloadingTime: [null, []]
|
||||
});
|
||||
}
|
||||
|
||||
@ -684,6 +690,19 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
// 提交前确认,委托运输协议弹窗
|
||||
submitConfirm(submitType?: any) {
|
||||
Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
this.validateForm1.controls[key].markAsDirty();
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
this.sf1.validator({ emitError: true });
|
||||
this.sf3.validator({ emitError: true });
|
||||
this.sf4.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
@ -698,19 +717,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
|
||||
}
|
||||
// 提交
|
||||
submit(submitType: string): void {
|
||||
Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
this.validateForm1.controls[key].markAsDirty();
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
this.sf1.validator({ emitError: true });
|
||||
this.sf3.validator({ emitError: true });
|
||||
this.sf4.validator({ emitError: true });
|
||||
this.sf6.validator({ emitError: true });
|
||||
this.sf7.validator({ emitError: true });
|
||||
if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
return;
|
||||
}
|
||||
|
||||
//装卸货信息
|
||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||
// 货物信息
|
||||
|
||||
Reference in New Issue
Block a user