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;
});
}
}
}