edit
This commit is contained in:
@ -17,11 +17,9 @@
|
|||||||
</nz-card>
|
</nz-card>
|
||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div class="card-title"
|
<div class="card-title">装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div>
|
||||||
>装卸货信息<span class="tip-font">预计公里数:{{ totalDistance }}km,预计行程耗时:{{ totalTime }}小时</span></div
|
|
||||||
>
|
|
||||||
|
|
||||||
<form nz-form [formGroup]="validateForm1" role="form">
|
<form #ngForm="ngForm" nz-form role="form">
|
||||||
<div nz-row [nzGutter]="24">
|
<div nz-row [nzGutter]="24">
|
||||||
<div nz-col [nzSpan]="10">
|
<div nz-col [nzSpan]="10">
|
||||||
<div *ngFor="let data1 of startInfo; let idx = index">
|
<div *ngFor="let data1 of startInfo; let idx = index">
|
||||||
@ -30,17 +28,11 @@
|
|||||||
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
<nz-form-control [nzErrorTip]="'请输入装货地'">
|
||||||
<div class="align-center">
|
<div class="align-center">
|
||||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||||
<input
|
<input nz-input [(ngModel)]="data1.detailedAddress" (click)="openMap('start', idx)"
|
||||||
nz-input
|
name="startDetailedAddress{{ idx }}" placeholder="请输入装货地" required />
|
||||||
[(ngModel)]="data1.detailedAddress"
|
|
||||||
(click)="openMap('start', idx)"
|
|
||||||
formControlName="loadAddress{{ idx }}"
|
|
||||||
placeholder="请输入装货地"
|
|
||||||
/>
|
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<span style="padding: 0 10px"
|
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
|
||||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
|
(click)="chooseAddress(idx, 'start')"></i></span>
|
||||||
></span>
|
|
||||||
</div>
|
</div>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
@ -48,23 +40,12 @@
|
|||||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||||
<div class="align-center">
|
<div class="align-center">
|
||||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||||
<input
|
<input nz-input [(ngModel)]="data1.appUserName" name="startAppUserName{{ idx }}" maxlength="30"
|
||||||
nz-input
|
placeholder="请输入联系人姓名" required />
|
||||||
[(ngModel)]="data1.appUserName"
|
|
||||||
formControlName="loadName{{ idx }}"
|
|
||||||
maxlength="30"
|
|
||||||
placeholder="请输入联系人姓名"
|
|
||||||
/>
|
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
||||||
<input
|
<input style="margin-left: 12px" nz-input [(ngModel)]="data1.contractTelephone" maxlength="11"
|
||||||
style="margin-left: 12px"
|
name="startContractTelephone{{ idx }}" placeholder="请输入联系人电话" required/>
|
||||||
nz-input
|
|
||||||
[(ngModel)]="data1.contractTelephone"
|
|
||||||
maxlength="11"
|
|
||||||
formControlName="loadPhone{{ idx }}"
|
|
||||||
placeholder="请输入联系人电话"
|
|
||||||
/>
|
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</div>
|
</div>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
@ -72,7 +53,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="4">
|
<div nz-col [nzSpan]="4">
|
||||||
<div style="display: flex; justify-content: center">
|
<div style="display: flex; justify-content: center">
|
||||||
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap" nzTheme="outline"></i></span>
|
<span style="padding: 24 px; font-size: 30px; color: #7d7d7d"><i nz-icon nzType="swap"
|
||||||
|
nzTheme="outline"></i></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div nz-col [nzSpan]="10">
|
<div nz-col [nzSpan]="10">
|
||||||
@ -82,17 +64,11 @@
|
|||||||
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
<nz-form-control [nzErrorTip]="'请输入卸货地'">
|
||||||
<div class="align-center">
|
<div class="align-center">
|
||||||
<nz-input-group [nzSuffix]="endInconTemp1">
|
<nz-input-group [nzSuffix]="endInconTemp1">
|
||||||
<input
|
<input nz-input [(ngModel)]="data2.detailedAddress" (click)="openMap('end', idx)"
|
||||||
nz-input
|
name="endDetailedAddress{{ idx }}" placeholder="请输入卸货地" required/>
|
||||||
[(ngModel)]="data2.detailedAddress"
|
|
||||||
(click)="openMap('end', idx)"
|
|
||||||
formControlName="unloadAddress{{ idx }}"
|
|
||||||
placeholder="请输入卸货地"
|
|
||||||
/>
|
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<span style="padding: 0 10px"
|
<span style="padding: 0 10px"><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff"
|
||||||
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
|
(click)="chooseAddress(idx, 'end')"></i></span>
|
||||||
></span>
|
|
||||||
</div>
|
</div>
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
@ -100,23 +76,12 @@
|
|||||||
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
|
||||||
<div class="align-center">
|
<div class="align-center">
|
||||||
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
|
||||||
<input
|
<input nz-input [(ngModel)]="data2.appUserName" maxlength="30" name="endAppUserName{{ idx }}"
|
||||||
nz-input
|
placeholder="请输入联系人姓名" required/>
|
||||||
[(ngModel)]="data2.appUserName"
|
|
||||||
maxlength="30"
|
|
||||||
formControlName="unloadName{{ idx }}"
|
|
||||||
placeholder="请输入联系人姓名"
|
|
||||||
/>
|
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
<nz-form-control [nzErrorTip]="'请输入联系人电话'">
|
||||||
<input
|
<input style="margin-left: 12px" nz-input [(ngModel)]="data2.contractTelephone"
|
||||||
style="margin-left: 12px"
|
name="endUnloadPhone{{ idx }}" maxlength="11" placeholder="请输入联系人电话" required/>
|
||||||
nz-input
|
|
||||||
[(ngModel)]="data2.contractTelephone"
|
|
||||||
formControlName="unloadPhone{{ idx }}"
|
|
||||||
maxlength="11"
|
|
||||||
placeholder="请输入联系人电话"
|
|
||||||
/>
|
|
||||||
</nz-form-control>
|
</nz-form-control>
|
||||||
</div>
|
</div>
|
||||||
</nz-form-item>
|
</nz-form-item>
|
||||||
@ -139,7 +104,8 @@
|
|||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
<ng-template #addOnAfterTemplate>
|
<ng-template #addOnAfterTemplate>
|
||||||
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
|
<nz-select [ngModel]="sf4.value.freightType" (ngModelChange)="sf4.setValue('/freightType', $event)">
|
||||||
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions"></nz-option>
|
<nz-option [nzValue]="item.value" [nzLabel]="item.label" *ngFor="let item of freightTypeOptions">
|
||||||
|
</nz-option>
|
||||||
</nz-select>
|
</nz-select>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
@ -150,9 +116,8 @@
|
|||||||
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
|
<nz-option nzLabel="抹除小数" nzValue="2"></nz-option>
|
||||||
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
|
<nz-option nzLabel="抹除个数" nzValue="3"></nz-option>
|
||||||
</nz-select>
|
</nz-select>
|
||||||
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
|
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon
|
||||||
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
|
nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span>
|
||||||
></span>
|
|
||||||
<ng-template #template2>
|
<ng-template #template2>
|
||||||
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
|
<p>例如 付司机运费 = 重量*单价 = 999.99</p>
|
||||||
<p>保留小数,即 999.99</p>
|
<p>保留小数,即 999.99</p>
|
||||||
@ -163,41 +128,20 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="weight" let-i let-ui="ui">
|
<ng-template sf-template="weight" let-i let-ui="ui">
|
||||||
<nz-input-group [nzAddOnAfter]="'吨'">
|
<nz-input-group [nzAddOnAfter]="'吨'">
|
||||||
<input
|
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||||
nz-input
|
placeholder="总重量,必填" />
|
||||||
type="number"
|
|
||||||
[ngModel]="i.value"
|
|
||||||
min="0"
|
|
||||||
step="0.01"
|
|
||||||
(ngModelChange)="i.setValue($event)"
|
|
||||||
placeholder="总重量,必填"
|
|
||||||
/>
|
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="volume" let-i let-ui="ui">
|
<ng-template sf-template="volume" let-i let-ui="ui">
|
||||||
<nz-input-group [nzAddOnAfter]="'方'">
|
<nz-input-group [nzAddOnAfter]="'方'">
|
||||||
<input
|
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||||
nz-input
|
placeholder="总体积" />
|
||||||
type="number"
|
|
||||||
[ngModel]="i.value"
|
|
||||||
min="0"
|
|
||||||
step="0.01"
|
|
||||||
(ngModelChange)="i.setValue($event)"
|
|
||||||
placeholder="总体积"
|
|
||||||
/>
|
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
<ng-template sf-template="number" let-i let-ui="ui">
|
<ng-template sf-template="number" let-i let-ui="ui">
|
||||||
<nz-input-group [nzAddOnAfter]="'车'">
|
<nz-input-group [nzAddOnAfter]="'车'">
|
||||||
<input
|
<input nz-input type="number" [ngModel]="i.value" min="0" step="0.01" (ngModelChange)="i.setValue($event)"
|
||||||
nz-input
|
placeholder="总车次" />
|
||||||
type="number"
|
|
||||||
[ngModel]="i.value"
|
|
||||||
min="0"
|
|
||||||
step="0.01"
|
|
||||||
(ngModelChange)="i.setValue($event)"
|
|
||||||
placeholder="总车次"
|
|
||||||
/>
|
|
||||||
</nz-input-group>
|
</nz-input-group>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</sf>
|
</sf>
|
||||||
@ -214,15 +158,8 @@
|
|||||||
<div nz-row>
|
<div nz-row>
|
||||||
<div class="align-center" style="width: 350px;">
|
<div class="align-center" style="width: 350px;">
|
||||||
<div nz-col nzSpan="12">
|
<div nz-col nzSpan="12">
|
||||||
<nz-input-number
|
<nz-input-number [ngModel]="i.value" style="width: 150px;" [nzMin]="1" [nzMax]="30" [nzStep]="1"
|
||||||
[ngModel]="i.value"
|
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入1-30"></nz-input-number>
|
||||||
style="width: 150px;"
|
|
||||||
[nzMin]="1"
|
|
||||||
[nzMax]="30"
|
|
||||||
[nzStep]="1"
|
|
||||||
(ngModelChange)="i.setValue($event)"
|
|
||||||
nzPlaceHolder="请输入1-30"
|
|
||||||
></nz-input-number>
|
|
||||||
</div>
|
</div>
|
||||||
<div nz-col nzSpan="6">
|
<div nz-col nzSpan="6">
|
||||||
<span>天内支付运费</span>
|
<span>天内支付运费</span>
|
||||||
@ -237,10 +174,10 @@
|
|||||||
|
|
||||||
<nz-card>
|
<nz-card>
|
||||||
<div class="align-center">
|
<div class="align-center">
|
||||||
<button nz-button nzType="primary" (click)="choose()">取消</button>
|
<button nz-button nzType="primary" (click)="choose()">取消</button>
|
||||||
|
|
||||||
<button nz-button nzType="primary" (click)="submit('assign')">生成二维码</button>
|
<button nz-button nzType="primary" (click)="submit('assign')">生成二维码</button>
|
||||||
<button nz-button nzType="primary" (click)="submit('assign')">指派熟车</button>
|
<button nz-button nzType="primary" (click)="submit('assign')">指派熟车</button>
|
||||||
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button>
|
<button nz-button nzType="primary" style="margin-left: 48px" (click)="submit('publish')">司机抢单</button>
|
||||||
</div>
|
</div>
|
||||||
</nz-card>
|
</nz-card>
|
||||||
@ -1,5 +1,5 @@
|
|||||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||||
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
import { FormBuilder, FormControl, FormGroup, NgForm, Validators } from '@angular/forms';
|
||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import {
|
import {
|
||||||
SFArrayWidgetSchema,
|
SFArrayWidgetSchema,
|
||||||
@ -31,7 +31,9 @@ import { PublishSuccessComponent } from '../onecar-publish/publish-success/publi
|
|||||||
styleUrls: ['./bulk-release-publish.component.less']
|
styleUrls: ['./bulk-release-publish.component.less']
|
||||||
})
|
})
|
||||||
export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
||||||
validateForm1: FormGroup;
|
@ViewChild('ngForm')
|
||||||
|
ngForm!: NgForm;
|
||||||
|
|
||||||
sf1data: any; // 货源单设置回显
|
sf1data: any; // 货源单设置回显
|
||||||
sf3data: any; // 货源单设置回显
|
sf3data: any; // 货源单设置回显
|
||||||
sf4data: any; // 货源单设置回显
|
sf4data: any; // 货源单设置回显
|
||||||
@ -59,7 +61,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
ruleOptions: any;
|
ruleOptions: any;
|
||||||
constructor(
|
constructor(
|
||||||
private http: _HttpClient,
|
private http: _HttpClient,
|
||||||
fb: FormBuilder,
|
|
||||||
private modalService: NzModalService,
|
private modalService: NzModalService,
|
||||||
private settingSrv: SettingsService,
|
private settingSrv: SettingsService,
|
||||||
private service: SupplyManagementService,
|
private service: SupplyManagementService,
|
||||||
@ -67,16 +68,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private amapService: AmapService,
|
private amapService: AmapService,
|
||||||
public shipperSrv: ShipperBaseService
|
public shipperSrv: ShipperBaseService
|
||||||
) {
|
) {}
|
||||||
this.validateForm1 = fb.group({
|
|
||||||
loadAddress0: [null, [Validators.required]],
|
|
||||||
loadName0: [null, [Validators.required]],
|
|
||||||
loadPhone0: [null, [Validators.required]],
|
|
||||||
unloadAddress0: [null, [Validators.required]],
|
|
||||||
unloadName0: [null, [Validators.required]],
|
|
||||||
unloadPhone0: [null, [Validators.required]]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
@ViewChild('sf1', { static: false }) sf1!: SFComponent;
|
||||||
schema1: SFSchema = {};
|
schema1: SFSchema = {};
|
||||||
@ -151,9 +143,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
},
|
},
|
||||||
change: (q: any) => {
|
change: (q: any) => {
|
||||||
this.getRegionCode(q);
|
this.getRegionCode(q);
|
||||||
},
|
|
||||||
visibleIf: {
|
|
||||||
_$expand: (value: boolean) => value
|
|
||||||
}
|
}
|
||||||
} as SFSelectWidgetSchema
|
} as SFSelectWidgetSchema
|
||||||
},
|
},
|
||||||
@ -180,9 +169,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
ui: {
|
ui: {
|
||||||
widget: 'select',
|
widget: 'select',
|
||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
visibleIf: {
|
|
||||||
_$expand: (value: boolean) => value
|
|
||||||
},
|
|
||||||
allowClear: true,
|
allowClear: true,
|
||||||
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
|
asyncData: () => this.shipperSrv.getNetworkFreightForwarder()
|
||||||
}
|
}
|
||||||
@ -481,17 +467,17 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
submit(submitType: string): void {
|
submit(submitType: string): void {
|
||||||
// Object.keys(this.validateForm1.controls).forEach(key => {
|
Object.keys(this.ngForm.form.controls).forEach(key => {
|
||||||
// this.validateForm1.controls[key].markAsDirty();
|
this.ngForm.form.controls[key].markAsDirty();
|
||||||
// this.validateForm1.controls[key].updateValueAndValidity();
|
this.ngForm.form.controls[key].updateValueAndValidity();
|
||||||
// });
|
});
|
||||||
// this.sf1.validator({ emitError: true });
|
this.sf1.validator({ emitError: true });
|
||||||
// this.sf3.validator({ emitError: true });
|
this.sf3.validator({ emitError: true });
|
||||||
// this.sf4.validator({ emitError: true });
|
this.sf4.validator({ emitError: true });
|
||||||
// this.sf6.validator({ emitError: true });
|
this.sf6.validator({ emitError: true });
|
||||||
// if (this.validateForm1.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
if (this.ngForm.form.invalid || !this.sf1.valid || !this.sf3.valid || !this.sf4.valid || !this.sf6.valid) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// //装卸货信息
|
// //装卸货信息
|
||||||
const LoadingList = this.startInfo.concat(this.endInfo);
|
const LoadingList = this.startInfo.concat(this.endInfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user