Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-02-11 10:52:49 +08:00
6 changed files with 122 additions and 112 deletions

View File

@ -67,7 +67,7 @@
</div>
</nz-form-item>
</div>
<div style="display: flex; justify-content: center;">
<div style="display: flex; justify-content: center">
<button nz-button nzType="primary" (click)="addStartInfo($event)">
<i nz-icon nzType="plus"></i>
添加装货地
@ -128,7 +128,7 @@
</div>
</nz-form-item>
</div>
<div style="display: flex; justify-content: center;">
<div style="display: flex; justify-content: center">
<button nz-button nzType="primary" (click)="addEndInfo($event)">
<i nz-icon nzType="plus"></i>
添加卸货地
@ -144,9 +144,8 @@
<nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
formControlName="loadingTime"
[(ngModel)]="loadingTime"
(ngModelChange)="changeLO(loadingTime)"
[ngModel]="loadingTime"
(ngModelChange)="changeLO($event)"[ngModelOptions]="{standalone: true}"
></nz-date-picker>
</nz-form-control>
</nz-form-item>
@ -158,9 +157,8 @@
<nz-date-picker
nzShowTime
nzFormat="yyyy-MM-dd HH:mm:ss"
formControlName="unloadingTime"
[(ngModel)]="unloadingTime"
(ngModelChange)="changeUn(unloadingTime)"
[ngModel]="unloadingTime"
(ngModelChange)="changeUn($event)"[ngModelOptions]="{standalone: true}"
></nz-date-picker>
</nz-form-control>
</nz-form-item>
@ -241,15 +239,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>
@ -263,13 +268,11 @@
</div>
</nz-card>
<nz-card>
<div class="card-title">补充信息</div>
<div nz-row>
<div nz-col nzSpan="12">
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6">
</sf>
<sf #sf6 [schema]="schema6" [formData]="sf6data" [button]="'none'" [ui]="ui6"> </sf>
</div>
</div>
</nz-card>
@ -278,8 +281,10 @@
<div nz-row>
<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="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="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>
@ -294,7 +299,7 @@
nzPlaceHolder="请输入1-30"
></nz-input-number>
</div>
<div >
<div>
<span>&nbsp;&nbsp; 天内支付运费</span>
</div>
</div>
@ -307,7 +312,9 @@
<nz-card>
<div class="align-center">
<button nz-button nzType="primary" *ngIf="this.PageStatus == '整车修改'" (click)="goBack()">取消</button>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()">提交修改</button>
<button *ngIf="this.PageStatus == '整车修改'" nz-button nzType="primary" style="margin-left: 48px" (click)="submitConfirm()"
>提交修改</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)="submitConfirm()"
>司机抢单</button

View File

@ -14,6 +14,7 @@ import {
import { _HttpClient } from '@delon/theme';
import { AmapPoiPickerComponent, AmapService, ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { type } from 'os';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/supply-management.service';
@ -61,10 +62,10 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.validateForm1 = fb.group({
loadAddress0: [null, [Validators.required]],
loadName0: [null, [Validators.required]],
loadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
loadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
unloadAddress0: [null, [Validators.required]],
unloadName0: [null, [Validators.required]],
unloadPhone0: [null, [Validators.required,Validators.pattern('^[0-9]*$')]],
unloadPhone0: [null, [Validators.required, Validators.pattern('^[0-9]*$')]],
loadingTime: [null, []],
unloadingTime: [null, []]
});
@ -377,29 +378,29 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: {
widget: 'select'
},
default:'0'
default: '0'
},
type1: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'],
enum: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: {insuranceType: (value: string) => value ==='1'},
visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护','赠送基本险'],
default: ['车辆实时定位', '轨迹查询', '数据保护', '赠送基本险']
},
type2: {
type: 'string',
title: '',
enum: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'],
enum: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险'],
readOnly: true,
ui: {
widget: 'checkbox',
visibleIf: {insuranceType: (value: string) => value ==='2'},
visibleIf: { insuranceType: (value: string) => value === '2' }
} as SFCheckboxWidgetSchema,
default: ['车辆实时定位', '轨迹查询', '数据保护','专属技术服务','赠送综合险'],
default: ['车辆实时定位', '轨迹查询', '数据保护', '专属技术服务', '赠送综合险']
}
}
};
@ -478,7 +479,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
visibleIf: {
receiptType: value => value === '2'
}
},
}
},
receiptUserPhone: {
type: 'string',
@ -488,7 +489,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
visibleIf: {
receiptType: value => value === '2'
}
},
}
},
receiptAddressArea: {
type: 'string',
@ -498,7 +499,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
visibleIf: {
receiptType: value => value === '2'
}
},
}
},
receiptAddress: {
type: 'string',
@ -508,7 +509,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
visibleIf: {
receiptType: value => value === '2'
}
},
}
},
remarks: {
type: 'string',
@ -521,7 +522,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} as SFTextareaWidgetSchema
}
},
required: ['stateReceipt', 'receiptType', 'receiptUserName','receiptUserPhone','receiptAddressArea','receiptAddress']
required: ['stateReceipt', 'receiptType', 'receiptUserName', 'receiptUserPhone', 'receiptAddressArea', 'receiptAddress']
};
this.ui6 = {
'*': {
@ -639,7 +640,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
subtotal = value.prePay + value.toPay + value.receiptPay || 0;
// oilCardPay = value.oilCardPay || 0;
} else {
subtotal = this.sf7.value.prePay + this.sf7.value.toPay+ this.sf7.value.receiptPay || 0;
subtotal = this.sf7.value.prePay + this.sf7.value.toPay + this.sf7.value.receiptPay || 0;
// oilCardPay = this.sf7.value.oilCardPay || 0;
}
console.log(this.sf7.value);
@ -827,7 +828,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
if (this.validateForm1.invalid || !this.sf3.valid || !this.sf1.valid || !this.sf4.valid || !this.sf6.valid || !this.sf7.valid) {
return;
}
console.log(this.validateForm1.value?.unloadingTime)
console.log(this.validateForm1.value?.unloadingTime);
if (typeof this.validateForm1.value.unloadingTime !== 'string') {
var c = new Date(this.validateForm1.value.unloadingTime);
this.validateForm1.value.unloadingTime =
@ -866,7 +867,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
loadingTime: this.validateForm1?.value?.loadingTime,
unloadingTime: this.validateForm1?.value?.unloadingTime,
unLoadingPlaceDTOList: [...this.startInfo, ...this.endInfo],
insuranceType:this.sf55.value.insuranceType,
insuranceType: this.sf55.value.insuranceType,
goodsInfoDTOList: [
{
...this.sf4.value,
@ -1087,10 +1088,23 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
};
if (res?.loadingTime) {
this.loadingTime = res?.loadingTime;
// this.validateForm1.patchValue(
// {
// loadingTime: res?.loadingTime,
// },
// { onlySelf: true },
// );
}
if (res?.unloadingTime) {
this.unloadingTime = res?.unloadingTime;
// this.validateForm1.patchValue(
// {
// unloadingTime: res?.unloadingTime,
// },
// { onlySelf: true },
// );
}
if (this.PageStatus === '整车修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id;
}
@ -1171,54 +1185,42 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
}
});
}
changeUn(value: any) {
console.log(value)
if (typeof value !== 'string') {
var c = new Date(value);
value =
c.getFullYear() +
'-' +
this.addPreZero(c.getMonth() + 1) +
'-' +
this.addPreZero(c.getDate()) +
' ' +
this.addPreZero(c.getHours()) +
':' +
this.addPreZero(c.getMinutes()) +
':' +
this.addPreZero(c.getSeconds());
}
console.log(value)
console.log(this.loadingTime)
console.log(this.loadingTime > value)
if(this.loadingTime > value) {
console.log('错误')
this.unloadingTime = ''
}
}
changeLO(value: any) {
console.log(value)
if (typeof value !== 'string') {
var c = new Date(value);
value =
c.getFullYear() +
'-' +
this.addPreZero(c.getMonth() + 1) +
'-' +
this.addPreZero(c.getDate()) +
' ' +
this.addPreZero(c.getHours()) +
':' +
this.addPreZero(c.getMinutes()) +
':' +
this.addPreZero(c.getSeconds());
}
console.log(value)
changeUn(event: Date) {
this.unloadingTime = event;
console.log(this.unloadingTime );
console.log(this.unloadingTime.getTime() );
if(typeof this.loadingTime === 'string') {
var a = new Date(this.loadingTime)
if ( a > this.unloadingTime.getTime() ) {
this.service.msgSrv.error('卸货时间不能小于装货时间!');
this.unloadingTime = '';
console.log(this.unloadingTime)
console.log(this.unloadingTime < value)
if(this.unloadingTime < value) {
console.log('错误')
this.loadingTime = ''
}
} else {
if ( this.loadingTime.getTime() > this.unloadingTime.getTime() ) {
this.service.msgSrv.error('卸货时间不能小于装货时间!');
this.unloadingTime = '';
}
}
}
changeLO(event: Date) {
this.loadingTime = event;
console.log(this.loadingTime.getTime() );
console.log(this.unloadingTime)
console.log( typeof this.unloadingTime)
if(typeof this.unloadingTime === 'string') {
var a = new Date(this.unloadingTime)
if ( a.getTime()< this.loadingTime.getTime()) {
console.log('错误');
this.service.msgSrv.error('装货时间不能大于卸货时间!');
this.loadingTime = '';
}
} else {
if ( this.unloadingTime.getTime()< this.loadingTime.getTime()) {
console.log('错误');
this.service.msgSrv.error('装货时间不能大于卸货时间!');
this.loadingTime = '';
}
}
}
}

View File

@ -121,10 +121,10 @@
{{i?.insuranceTypeLabel}}
</sv>
<sv label="货物价值">
{{i?.goodsValue}}
{{i?.goodsValue |currency}}
</sv>
<sv label="保价费金额">
{{i?.insuranceAmount |currency: '¥'}} 元
{{i?.insuranceAmount |currency}} 元
</sv>
</sv-container>
</nz-card>
@ -132,29 +132,28 @@
<st [data]="i?.expenseVOList" [columns]="expenseColumns" [page]="{show:false}">
<ng-template st-row="total" let-item>
<div>
{{item?.totalAmount | currency: '¥'}}
{{item?.totalAmount | currency}}
<span>(含附加费)</span>
</div>
</ng-template>
<ng-template st-row="price" let-item>
<div>
{{item?.price | currency}}
</div>
</ng-template>
</st>
<div class="freight-info-box mt-md" nz-row>
<div nz-col nzSpan="24">
<h3>
<label>总计 :</label>
<span class="text-error-dark text-xl">
{{(i?.totalAmount) | currency: '¥'}}
{{(i?.totalAmount) | currency}}
</span>
<span>(运费{{i?.totalFreight | currency: '¥'}}含附加运费 {{i?.totalSurcharge| currency: '¥' }}</span>
<span>(运费{{i?.totalFreight | currency}}含附加运费 {{i?.totalSurcharge| currency}}</span>
</h3>
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}/{{ i?.payeeCardNo }}</div>
</div>
</div>
<!-- <div>
总计:<span style="color: #da001b; font-size: 18px">{{ totalObj?.price | currency: '¥' }}</span> (运费¥{{
totalObj?.price - attObj?.price
}},附加运费¥{{ attObj?.price }},附加费率{{ (attObj?.price / totalObj?.price) * 100 | number: '0.2-2' }}%
</div>
<div>收款人:{{ i?.payeeName }}/{{ i?.payeePhone }}</div> -->
</nz-card>
<nz-card nzTitle="补充信息">
<sv-container>

View File

@ -47,7 +47,7 @@ export class SupplyManagementVehicleDetailComponent implements OnInit {
title: '协议金额(元)',
width: '150px',
className: 'text-center',
index: 'price'
render: 'price'
},
];

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-12 10:52:50
* @LastEditors : Shiming
* @LastEditTime : 2022-02-10 14:39:40
* @LastEditTime : 2022-02-11 10:30:16
* @FilePath : \\tms-obc-web\\src\\app\\routes\\supply-management\\components\\vehicle\\vehicle.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -67,6 +67,9 @@
<p>{{ item?.resourceTypeLabel }}{{ item?.serviceTypeLabel }}</p>
<p>{{ item?.resourceStatusLabel }}</p>
</ng-template>
<ng-template st-row="total" let-item let-index="index">
<div class="mr-xs">{{ item?.totalAmount + item?.surcharge | currency }} </div>
</ng-template>
<ng-template st-row="totalAmount" let-item let-index="index">
<div class="mr-xs">{{ item?.totalAmount | currency }} </div>
</ng-template>

View File

@ -488,8 +488,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '总费用',
className: 'text-right',
width: '120px',
index: 'totalAmount',
render: 'totalAmount'
render: 'total'
},
{
title: '总运费',