车辆对接
This commit is contained in:
@ -32,8 +32,8 @@
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
|
||||
></span>
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
|
||||
></span>
|
||||
<span
|
||||
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
|
||||
></span>
|
||||
@ -44,12 +44,12 @@
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人信息'">
|
||||
<div class="align-center">
|
||||
<input nz-input [(ngModel)]="data.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
|
||||
<input nz-input [(ngModel)]="data.appUserName" formControlName="loadName{{ idx }}" maxlength="30" />
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
formControlName="loadPhone{{ idx }}"
|
||||
[(ngModel)]="data.contractTelephone"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
maxlength="11"
|
||||
/>
|
||||
</div>
|
||||
@ -82,8 +82,8 @@
|
||||
/>
|
||||
</nz-input-group>
|
||||
<span style="padding: 0 10px"
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
|
||||
></span>
|
||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
|
||||
></span>
|
||||
<span><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span>
|
||||
</div>
|
||||
</nz-form-control>
|
||||
@ -92,12 +92,12 @@
|
||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||
<nz-form-control [nzErrorTip]="'请输入联系人信息'">
|
||||
<div class="align-center">
|
||||
<input nz-input [(ngModel)]="data.appUserName" [ngModelOptions]="{ standalone: true }" maxlength="30" />
|
||||
<input nz-input [(ngModel)]="data.appUserName" formControlName="unloadName{{ idx }}" maxlength="30" />
|
||||
<input
|
||||
style="margin-left: 12px"
|
||||
nz-input
|
||||
[(ngModel)]="data.contractTelephone"
|
||||
[ngModelOptions]="{ standalone: true }"
|
||||
formControlName="unloadPhone{{ idx }}"
|
||||
maxlength="11"
|
||||
/>
|
||||
</div>
|
||||
@ -282,7 +282,7 @@
|
||||
<div class="align-center">
|
||||
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="choose()">取消</button>
|
||||
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submit()">提交修改</button>
|
||||
<!-- <button nz-button nzType="primary" *ngIf="this.PageStatus == '整车下一单'" (click)="chooseFamifiar()">指派熟车</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)="submit()"
|
||||
>司机抢单</button
|
||||
>
|
||||
|
||||
@ -20,6 +20,8 @@ import { PublishAddressListComponent } from './address-list/address-list.compone
|
||||
import { PublishSuccessComponent } from './publish-success/publish-success.component';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { of } from 'rxjs';
|
||||
import { TranAgreementComponent } from '../tran-agreement/tran-agreement.component';
|
||||
import { SupplyManagementVehicleAssignedCarComponent } from '../assigned-car/assigned-car.component';
|
||||
@Component({
|
||||
selector: 'app-publish-goods-onecar-publish',
|
||||
templateUrl: './onecar-publish.component.html',
|
||||
@ -694,29 +696,63 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
this.validateForm1.removeControl(`unloadPhone${index}`);
|
||||
}
|
||||
|
||||
//指派熟车
|
||||
chooseFamifiar() {
|
||||
this.modalService.create({
|
||||
//指派熟车
|
||||
chooseFamifiar(item: any) {
|
||||
console.log('999')
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '指派熟车',
|
||||
nzContent: PublishGoodsChooseFamifiarComponent,
|
||||
nzWidth: 1300
|
||||
nzContent: SupplyManagementVehicleAssignedCarComponent,
|
||||
nzWidth: 1200,
|
||||
nzComponentParams: {
|
||||
status: 'new',
|
||||
url: this.service.$api_save_assign_whole,
|
||||
params: item
|
||||
},
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.openFinishPage(result);
|
||||
}
|
||||
});
|
||||
}
|
||||
submit(): void {
|
||||
// 打开下单完成页面
|
||||
openFinishPage(resourceObj: any = null) {
|
||||
this.modalService.create({
|
||||
nzTitle: '',
|
||||
nzContent: PublishSuccessComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null,
|
||||
nzComponentParams: { type: 'onecar', resourceObj }
|
||||
});
|
||||
}
|
||||
// 提交前确认,委托运输协议弹窗
|
||||
submitConfirm(submitType?: any) {
|
||||
const modalRef = this.modalService.create({
|
||||
nzTitle: '运输协议',
|
||||
nzContent: TranAgreementComponent,
|
||||
nzWidth: 900,
|
||||
nzFooter: null
|
||||
});
|
||||
modalRef.afterClose.subscribe(result => {
|
||||
if (result) {
|
||||
this.submit(submitType);
|
||||
}
|
||||
});
|
||||
}
|
||||
submit(submitType?: string): void {
|
||||
console.log('进来了');
|
||||
console.log(this.startInfo);
|
||||
// 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 });
|
||||
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||
// return;
|
||||
// }
|
||||
console.log(this.validateForm1.value);
|
||||
Object.keys(this.validateForm1.controls).forEach(key => {
|
||||
this.validateForm1.controls[key].markAsDirty();
|
||||
this.validateForm1.controls[key].updateValueAndValidity();
|
||||
});
|
||||
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.sf3.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
|
||||
return;
|
||||
}
|
||||
if (typeof this.validateForm1.value.unloadingTime !== 'string') {
|
||||
var c = new Date(this.validateForm1.value.unloadingTime);
|
||||
this.validateForm1.value.unloadingTime =
|
||||
@ -747,10 +783,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
':' +
|
||||
this.addPreZero(c.getSeconds());
|
||||
}
|
||||
// if (this.validateForm1.invalid) {
|
||||
// return;
|
||||
// }
|
||||
console.log(this.sf7.value)
|
||||
const params: any = {
|
||||
...this.sf1.value,
|
||||
...this.sf5.value,
|
||||
@ -773,6 +805,12 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
|
||||
totalFees: this.totalFees
|
||||
};
|
||||
console.log(params);
|
||||
if(submitType) {
|
||||
if (submitType == 'assign') {
|
||||
this.chooseFamifiar(params);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this.PageStatus === '整车修改') {
|
||||
this.requests(this.service.$api_set_WholeModify, params);
|
||||
} else if (this.PageStatus === '整车下一单') {
|
||||
|
||||
Reference in New Issue
Block a user