This commit is contained in:
wangshiming
2022-02-16 13:54:15 +08:00
parent 2b97ad5bb5
commit 5b49aeae04
12 changed files with 326 additions and 128 deletions

View File

@ -20,7 +20,7 @@
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -32,15 +32,12 @@
placeholder="请输入装货地"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> -->
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex ;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -66,13 +63,14 @@
</div>
<div nz-col [nzSpan]="4">
<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 class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
<div *ngFor="let data2 of endInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>卸货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -84,15 +82,12 @@
placeholder="请输入卸货地"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> -->
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -201,19 +196,10 @@
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf7 [schema]="schema7" [formData]="sf7data" [button]="'none'" [ui]="ui7">
<!-- <ng-template sf-template="receiptAddressId" let-i let-ui="ui">
<input
nz-input
[ngModel]="i.value"
(ngModelChange)="i.setValue($event)"
placeholder="请点击选择收回单地址"
(click)="backBillChange()"
/>
</ng-template> -->
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row>
<div class="align-center2" style="width: 350px">
<div nz-col nzSpan="12">
<div class="align-center" >
<div nz-col nzSpan="16">
<nz-input-number
[(ngModel)]="i.value"
(ngModelChange)="i.setValue($event)"
@ -222,8 +208,8 @@
[nzStep]="1"
></nz-input-number>
</div>
<div>
<span>&nbsp;&nbsp; 天内支付运费</span>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
</div>
</div>

View File

@ -1,3 +1,17 @@
:host {
::ng-deep {
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 100%;
}
}
i {
cursor: pointer;
}
}
.tip-font {
margin-left: 16px;
font-weight: 500;
@ -15,16 +29,24 @@
align-items: center;
justify-content: center;
}
.align-center2 {
display: flex;
align-items: center;
.swap-icon {
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
}
#container {
width: 300px;
height: 180px;
}
:host {
::ng-deep {
nz-input-number{width: 100%;}
}
}
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}

View File

@ -361,6 +361,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
maxMultipleCount:3,
errors: { required: '请选择车型' }
}
},
@ -372,6 +373,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
maxMultipleCount:3,
errors: { required: '请选择车长' }
}
}
@ -991,4 +993,25 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
}
});
}
// 装卸货地址互换
swapAddress(){
let item = this.startInfo;
this.startInfo = this.endInfo;
this.endInfo = item;
this.startInfo.forEach((element: any) => {
element.type = '1';
});
this.endInfo.forEach((element: any) => {
element.type = '2';
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
}

View File

@ -26,7 +26,7 @@
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -39,15 +39,12 @@
required
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> -->
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -75,13 +72,14 @@
</div>
<div nz-col [nzSpan]="4">
<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 class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
<div *ngFor="let data2 of endInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>卸货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -94,15 +92,12 @@
required
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> -->
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex: flex;width: 86%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -221,8 +216,8 @@
<sf #sf6 [schema]="schema6" [button]="'none'" [ui]="ui6" [formData]="sf6data">
<ng-template sf-template="paymentDays" let-i let-ui="ui">
<div nz-row>
<div class="align-center2" style="width: 350px">
<div nz-col nzSpan="12">
<div class="align-center" >
<div nz-col nzSpan="16">
<nz-input-number
[ngModel]="i.value"
[nzMin]="1"
@ -232,8 +227,8 @@
nzPlaceHolder="请输入1-30"
></nz-input-number>
</div>
<div>
<span>&nbsp;&nbsp; 天内支付运费</span>
<div nz-col nzSpan="8">
<span>&nbsp;天内支付运费</span>
</div>
</div>
</div>

View File

@ -1,3 +1,17 @@
:host {
::ng-deep {
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 100%;
}
}
i {
cursor: pointer;
}
}
.tip-font {
margin-left: 16px;
font-weight: 500;
@ -15,17 +29,24 @@
align-items: center;
justify-content: center;
}
.align-center2 {
display: flex;
align-items: center;
.swap-icon {
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
}
#container {
width: 300px;
height: 180px;
}
:host {
::ng-deep {
nz-input-number{width: 100%;}
}
}
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}

View File

@ -382,6 +382,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
maxMultipleCount:3,
errors: { required: '请选择车型' }
}
},
@ -394,6 +395,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
maxMultipleCount:3,
errors: { required: '请选择车长' }
}
}
@ -755,4 +757,25 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
}
});
}
// 装卸货地址互换
swapAddress(){
let item = this.startInfo;
this.startInfo = this.endInfo;
this.endInfo = item;
this.startInfo.forEach((element: any) => {
element.type = '1';
});
this.endInfo.forEach((element: any) => {
element.type = '2';
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
}

View File

@ -16,10 +16,10 @@
>
<form nz-form [formGroup]="validateForm1" role="form">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="8">
<div nz-col [nzSpan]="10">
<div *ngFor="let data of startInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -31,18 +31,16 @@
placeholder="请输入装货地"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> -->
<span
<span style="padding: 0 10px"
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx, data.id)"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -74,15 +72,16 @@
</button>
</div>
</div>
<div nz-col [nzSpan]="8">
<div nz-col [nzSpan]="4">
<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 class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="8">
<div nz-col [nzSpan]="10">
<div *ngFor="let data of endInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>卸货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>卸货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -94,16 +93,13 @@
placeholder="请输入卸货地"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><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>
<span style="padding: 0 10px"><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -137,28 +133,31 @@
</div>
</div>
<div nz-row [nzGutter]="24" style="margin-top: 24px">
<div nz-col [nzSpan]="9">
<div nz-col [nzSpan]="10">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货时间'">
<nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
[ngModel]="loadingTime"
(ngModelChange)="changeLO($event)"[ngModelOptions]="{standalone: true}"
(ngModelChange)="changeLO($event)"
[ngModelOptions]="{ standalone: true }"
></nz-date-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<div nz-col [nzSpan]="4"></div>
<div nz-col [nzSpan]="10">
<nz-form-item>
<nz-form-label [nzSpan]="9" nzRequired>卸货时间</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>卸货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
<nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
[ngModel]="unloadingTime"
(ngModelChange)="changeUn($event)"[ngModelOptions]="{standalone: true}"
(ngModelChange)="changeUn($event)"
[ngModelOptions]="{ standalone: true }"
></nz-date-picker>
</nz-form-control>
</nz-form-item>
@ -271,7 +270,7 @@
<nz-card>
<div class="card-title">补充信息</div>
<div nz-row>
<div nz-col nzSpan="12">
<div nz-col nzSpan="9">
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"> </sf>
</div>
</div>
@ -279,7 +278,7 @@
<nz-card>
<div class="card-title">运费信息</div>
<div nz-row>
<div nz-col nzSpan="12">
<div nz-col nzSpan="9">
<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="appendFee" let-i let-ui="ui"

View File

@ -1,3 +1,17 @@
:host {
::ng-deep {
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 94.3%;
}
}
i {
cursor: pointer;
}
}
.tip-font {
margin-left: 16px;
font-weight: 500;
@ -16,14 +30,23 @@
justify-content: center;
}
.swap-icon {
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
}
#container {
width: 300px;
height: 180px;
}
:host {
::ng-deep {
nz-input-number{width: 100%;}
}
}
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}

View File

@ -325,6 +325,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
maxMultipleCount:3,
errors: { required: '请选择车型' }
}
},
@ -336,6 +337,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
maxMultipleCount:3,
errors: { required: '请选择车长' }
}
}
@ -1223,4 +1225,42 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
}
}
// 装卸货地址互换
swapAddress(){
this.startInfo.forEach((element:any, index:any) => {
this.validateForm1.removeControl(`loadAddress${index}`);
this.validateForm1.removeControl(`loadName${index}`);
this.validateForm1.removeControl(`loadPhone${index}`);
});
this.endInfo.forEach((element:any, index:any) => {
this.validateForm1.removeControl(`unloadAddress${index}`);
this.validateForm1.removeControl(`unloadName${index}`);
this.validateForm1.removeControl(`unloadPhone${index}`);
});
let item = this.startInfo;
this.startInfo = this.endInfo;
this.endInfo = item;
this.startInfo.forEach((element:any,index:any) => {
element.type = '1';
this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
this.endInfo.forEach((element:any,index:any) => {
element.type = '2';
this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
}

View File

@ -26,7 +26,7 @@
<div nz-col [nzSpan]="10">
<div *ngFor="let data1 of startInfo; let idx = index">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货地</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货地</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货地'">
<div class="align-center">
<nz-input-group [nzSuffix]="endInconTemp1">
@ -38,18 +38,15 @@
placeholder="请输入装货地"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'start')"></i
></span> -->
<span *ngIf="idx !== 0"
<span style="padding: 0 10px"
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subStartInfo($event, idx)"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex;">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -76,17 +73,18 @@
</div>
<div nz-row>
<div nz-col [nzSpan]="4"></div>
<div style="display: flex; justify-content: center;">
<button nz-button nzType="primary" (click)="addStartInfo()">
<i nz-icon nzType="plus"></i>
添加装货地
</button>
</div>
<div style="display: flex; justify-content: center">
<button nz-button nzType="primary" (click)="addStartInfo()">
<i nz-icon nzType="plus"></i>
添加装货地
</button>
</div>
</div>
</div>
<div nz-col [nzSpan]="4">
<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 class="swap-icon" (click)="swapAddress()"><i nz-icon nzType="swap"
nzTheme="outline"></i></span>
</div>
</div>
<div nz-col [nzSpan]="10">
@ -105,18 +103,15 @@
name="unloadAddress{{ idx }}"
/>
</nz-input-group>
<!-- <span style="padding: 0 10px"
><i nz-icon nzType="menu" nzTheme="outline" style="color: #1890ff" (click)="chooseAddress(idx, 'end')"></i
></span> -->
<span *ngIf="idx !== 0"
<span style="padding: 0 10px"
><i nz-icon nzType="minus-circle-o" nzTheme="fill" style="color: #d9001b" (click)="subEndInfo($event, idx)"></i
></span>
</div>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>联系人</nz-form-label>
<div style="display: flex;">
<nz-form-label [nzSpan]="3" nzRequired>联系人</nz-form-label>
<div style="display: flex; width: 80.7%">
<nz-form-control [nzErrorTip]="'请输入联系人姓名'">
<input
nz-input
@ -143,19 +138,19 @@
</div>
<div nz-row>
<div nz-col [nzSpan]="4"></div>
<div style="display: flex; justify-content: center;">
<button nz-button nzType="primary" (click)="addEndInfo()">
<i nz-icon nzType="plus"></i>
添加卸货地
</button>
</div>
<div style="display: flex; justify-content: center">
<button nz-button nzType="primary" (click)="addEndInfo()">
<i nz-icon nzType="plus"></i>
添加卸货地
</button>
</div>
</div>
</div>
</div>
<div nz-row [nzGutter]="24" style="margin-top: 24px">
<div nz-col [nzSpan]="10">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>装货时间</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>装货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入装货时间'">
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="loadingTime" name="loadingTime"></nz-date-picker>
</nz-form-control>
@ -164,7 +159,7 @@
<div nz-col [nzSpan]="4"></div>
<div nz-col [nzSpan]="10">
<nz-form-item>
<nz-form-label [nzSpan]="4" nzRequired>卸货时间</nz-form-label>
<nz-form-label [nzSpan]="3" nzRequired>卸货时间</nz-form-label>
<nz-form-control [nzErrorTip]="'请输入卸货时间'">
<nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="unloadingTime" name="unloadingTime"></nz-date-picker>
</nz-form-control>
@ -246,15 +241,22 @@
<sf #sf5 [schema]="schema5" [button]="'none'" [ui]="ui5" [formData]="sf5data">
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="3000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event)" nzPlaceHolder="请输入50000-3000000之间数值"></nz-input-number>
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="3000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event)"
nzPlaceHolder="请输入50000-3000000之间数值"
></nz-input-number>
</div>
</ng-template>
<ng-template sf-template="insureInfo" let-i let-ui="ui">
<div class="align-center">
<input nz-input placeholder="保价费金额" [ngModel]="i.value" [disabled]="true" />
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"><i nz-icon
nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i></span>
<span style="padding: 0 12px" nz-tooltip [nzTooltipTitle]="template2" nzTooltipPlacement="bottom"
><i nz-icon nzType="exclamation-circle" nzTheme="outline" style="color: #1890ff"></i
></span>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知》</p>
@ -292,7 +294,9 @@
<div nz-col nzSpan="12">
<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="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="paymentDays" let-i let-ui="ui">
<div nz-row>
@ -307,7 +311,7 @@
nzPlaceHolder="请输入1-30"
></nz-input-number>
</div>
<div >
<div>
<span>&nbsp;&nbsp; 天内支付运费</span>
</div>
</div>
@ -319,7 +323,7 @@
</nz-card>
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" (click)="submitConfirm('assign')" >指派熟车</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>

View File

@ -1,6 +1,14 @@
:host {
::ng-deep {
nz-input-number{width: 100%;}
nz-input-number {
width: 100%;
}
nz-date-picker {
width: 94.3%;
}
}
i {
cursor: pointer;
}
}
@ -22,9 +30,23 @@
justify-content: center;
}
.swap-icon {
padding: 24px;
color: #7d7d7d;
font-size: 30px;
:hover{color: #52acff;}
}
#container {
width: 300px;
height: 180px;
}
input[type='number'] {
-moz-appearance: textfield;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
margin: 0;
-webkit-appearance: none;
}

View File

@ -341,6 +341,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
params: { dictKey: 'car:model' },
mode: 'multiple',
placeholder: '请选择车型',
maxMultipleCount:3,
errors: { required: '请选择车型' }
}
},
@ -352,6 +353,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
params: { dictKey: 'car:length' },
mode: 'multiple',
placeholder: '请选择车长',
maxMultipleCount:3,
errors: { required: '请选择车长' }
}
}
@ -972,4 +974,42 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
goBack() {
window.history.go(-1);
}
// 装卸货地址互换
swapAddress(){
this.startInfo.forEach((element:any, index:any) => {
this.validateForm1.removeControl(`loadAddress${index}`);
this.validateForm1.removeControl(`loadName${index}`);
this.validateForm1.removeControl(`loadPhone${index}`);
});
this.endInfo.forEach((element:any, index:any) => {
this.validateForm1.removeControl(`unloadAddress${index}`);
this.validateForm1.removeControl(`unloadName${index}`);
this.validateForm1.removeControl(`unloadPhone${index}`);
});
let item = this.startInfo;
this.startInfo = this.endInfo;
this.endInfo = item;
this.startInfo.forEach((element:any,index:any) => {
element.type = '1';
this.validateForm1.addControl(`loadAddress${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadName${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`loadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
this.endInfo.forEach((element:any,index:any) => {
element.type = '2';
this.validateForm1.addControl(`unloadAddress${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadName${index}`, new FormControl(null, Validators.required));
this.validateForm1.addControl(`unloadPhone${index}`, new FormControl(null, [Validators.required, Validators.pattern('^[0-9]*$')]));
});
// 计算里程,时间
if (this.startInfo[0]?.area && this.endInfo[0]?.area) {
this.amapService.drivingCompute([...this.startInfo], [...this.endInfo]).subscribe(res => {
this.totalDistance = res.distance;
this.totalTime = res.time;
});
}
}
}