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

This commit is contained in:
Taric Xin
2022-03-07 17:30:29 +08:00
9 changed files with 227 additions and 296 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-24 16:58:02 * @Date : 2021-12-24 16:58:02
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 14:15:21 * @LastEditTime : 2022-03-07 17:26:41
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -495,7 +495,6 @@ loadTime: any; // 货源单设置回显
this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => { this.service.request(this.service.$api_set_modifyBulkOrder, params).subscribe((res: any) => {
if(res) { if(res) {
this.service.msgSrv.success('修改成功!'); this.service.msgSrv.success('修改成功!');
this.router.navigate(['/order-management/bulk']);
} else { } else {
this.service.msgSrv.error(res?.msg); this.service.msgSrv.error(res?.msg);
} }

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2021-12-23 13:39:58 * @Date : 2021-12-23 13:39:58
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-03-04 10:48:50 * @LastEditTime : 2022-03-07 17:27:38
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\vehicle-detail-change\\vehicle-detail-change.component.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -545,7 +545,6 @@ export class OrderManagementVehicleDetailChangeComponent implements OnInit {
console.log(res); console.log(res);
if (res) { if (res) {
this.service.msgSrv.success('修改成功!'); this.service.msgSrv.success('修改成功!');
this.router.navigate(['/order-management/vehicle']);
} else { } else {
this.service.msgSrv.error(res?.msg); this.service.msgSrv.error(res?.msg);
} }

View File

@ -262,6 +262,7 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -698,7 +699,9 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
...this.sf1.value, ...this.sf1.value,
...this.sf7.value, ...this.sf7.value,
unLoadingPlaceDTOList: LoadingList, unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoDTOList goodsInfoDTOList: goodsInfoDTOList,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
}; };
params.freightPrice = this.totalFees; params.freightPrice = this.totalFees;
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
@ -885,6 +888,8 @@ export class SupplyManagementBulkPublishComponent implements OnInit {
if (res?.enterpriseProjectId) { if (res?.enterpriseProjectId) {
this.enterpriseProjectIds = res.enterpriseProjectId; this.enterpriseProjectIds = res.enterpriseProjectId;
} }
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = { this.sf1data = {
dispatchPhone: res?.dispatchPhone, dispatchPhone: res?.dispatchPhone,
dispatchName: res?.dispatchName, dispatchName: res?.dispatchName,

View File

@ -288,6 +288,7 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -619,7 +620,9 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit {
...this.sf1.value, ...this.sf1.value,
unLoadingPlaceDTOList: LoadingList, unLoadingPlaceDTOList: LoadingList,
goodsInfoDTOList: goodsInfoList, goodsInfoDTOList: goodsInfoList,
...this.sf6.value ...this.sf6.value,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
}; };
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',

View File

@ -177,6 +177,7 @@
<ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template> <ng-template #endInconTemp1><i nz-icon nzType="environment" nzTheme="outline"></i></ng-template>
</form> </form>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">货物信息</div> <div class="card-title">货物信息</div>
<div nz-row> <div nz-row>
@ -187,47 +188,32 @@
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<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="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="总重量,必填"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</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="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
step="0.01"
(ngModelChange)="i.setValue($event)"
placeholder="体积"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</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" (ngModelChange)="i.setValue($event)" placeholder="件数"
nz-input oninput="if(value>99999)value=99999;if(value<0)value=0" />
type="number"
[ngModel]="i.value"
min="0"
(ngModelChange)="i.setValue($event)"
placeholder="车次"
oninput="if(value>99999)value=99999;if(value<0)value=0"
/>
</nz-input-group> </nz-input-group>
</ng-template> </ng-template>
<ng-template sf-template="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值">
</nz-input-number>
</div>
</ng-template>
</sf> </sf>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">服务信息</div> <div class="card-title">服务信息</div>
<div nz-row> <div nz-row>
@ -239,34 +225,8 @@
<ng-template sf-template="freeInsurance2" let-i let-ui="ui"> <ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template> </ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保单次运输保额仅限200万元以内详见<a target="_blank" [queryParams]="{ type: 10 }"
<ng-template sf-template="goodsValue" let-i let-ui="ui"> [routerLink]="['/agreement']">《投保告知》</a></ng-template>
<div class="align-center">
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
<ng-template sf-template="insurancePremium" 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>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
<p>③最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -310,6 +310,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -336,7 +337,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入', placeholder: '请输入',
errors: { required: '必填项' } errors: { required: '必填项' },
validator: val => this.customValidator(val)
} }
}, },
volume: { volume: {
@ -344,7 +346,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
number: { number: {
@ -352,7 +354,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
carModel: { carModel: {
@ -384,37 +386,60 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }), asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
change: (tag: any, org: any) => { change: (tag: any, org: any) => {
if (tag.includes('999')) { if (tag.includes('999')) {
this.sf4.setValue('/carModel', ['999']); this.sf4.setValue('/carLength', ['999']);
} }
} }
} }
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
} }
}, },
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
} as SFSelectWidgetSchema
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
}
},
},
required: ['weight', 'carModel', 'carLength'] required: ['weight', 'carModel', 'carLength']
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
spanLabelFixed: 90, spanLabelFixed: 115,
grid: { span: 24 }
},
$weight: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$volume: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$number: {
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
},
$carModel: {
spanLabelFixed: 100,
grid: { span: 8 }
},
$carLength: {
grid: { span: 8 } grid: { span: 8 }
} }
}; };
} }
initSF5() { initSF5() {
this.schema5 = { this.schema5 = {
properties: { properties: {
@ -444,73 +469,30 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
type1: { type1: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +10', '车源匹配率 +10'], enum: ['源曝光率 +10', '车源匹配率 +10'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' } visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +10', '车源匹配率 +10'] default: ['源曝光率 +10', '车源匹配率 +10']
}, },
type2: { type2: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +20', '车源匹配率 +20'], enum: ['源曝光率 +20', '车源匹配率 +20'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' } visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +20', '车源匹配率 +20'] default: ['源曝光率 +20', '车源匹配率 +20']
},
freeInsurance1: {
type: 'string',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
visibleIf: { insuranceType: (value: string) => value !== '3' }
} as SFSelectWidgetSchema
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
}, },
insurancePremium: { insurancePremium: {
type: 'string', type: 'string',
title: '', title: '服务包费用',
readOnly:true,
ui: { ui: {
widget: 'custom',
validator: val => this.customValidator(val),
visibleIf: { insuranceType: (value: string) => value !== '3' } visibleIf: { insuranceType: (value: string) => value !== '3' }
} }
}, },
@ -520,9 +502,27 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
ui: { ui: {
hidden: true hidden: true
} }
},
freeInsurance1: {
type: 'string',
title: '预投基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} }
}, },
required: ['insurancePackagedGoods', 'insurancePremium'] freeInsurance2: {
type: 'string',
title: '预投综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
},
required: [ 'insurancePremium']
}; };
this.ui5 = { this.ui5 = {
'*': { '*': {
@ -543,6 +543,7 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
}; };
} }
/** /**
* 自定义校验数据 * 自定义校验数据
* @param val * @param val
@ -657,19 +658,16 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
prePay: { prePay: {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
toPay: { toPay: {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
@ -1001,7 +999,11 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
...this.sf5.value, ...this.sf5.value,
...this.sf6.value, ...this.sf6.value,
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods:this.sf4.value.insurancePackagedGoods,
goodsValue:this.sf4.value.goodsValue,
}; };
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
nzTitle: '运输协议', nzTitle: '运输协议',
@ -1126,6 +1128,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
if (res?.enterpriseProjectId) { if (res?.enterpriseProjectId) {
this.enterpriseProjectIds = res.enterpriseProjectId; this.enterpriseProjectIds = res.enterpriseProjectId;
} }
this.totalDistance = res?.estimatedKilometers;
this.totalTime = res?.estimatedTravelTime;
this.sf1data = { this.sf1data = {
enterpriseInfoName: res?.enterpriseInfoName, enterpriseInfoName: res?.enterpriseInfoName,
enterpriseInfoId: res?.enterpriseInfoId, enterpriseInfoId: res?.enterpriseInfoId,
@ -1241,7 +1245,9 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
volume: res?.goodsInfoVOList[0]?.volume || '', volume: res?.goodsInfoVOList[0]?.volume || '',
number: res?.goodsInfoVOList[0]?.number || '', number: res?.goodsInfoVOList[0]?.number || '',
carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [], carModel: res?.goodsInfoVOList[0]?.carModel?.split(',') || [],
carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [] carLength: res?.goodsInfoVOList[0]?.carLength?.split(',') || [],
goodsValue: res?.goodsValue || '',
insurancePackagedGoods: res?.insurancePackagedGoods || '',
}; };
if (this.PageStatus === '整车修改') { if (this.PageStatus === '整车修改') {
this.sf4data.id = res?.goodsInfoVOList[0]?.id; this.sf4data.id = res?.goodsInfoVOList[0]?.id;
@ -1249,10 +1255,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
this.totalFees = res?.shippingInformationVO?.totalFee || '0'; this.totalFees = res?.shippingInformationVO?.totalFee || '0';
this.sf5data = { this.sf5data = {
insuranceType: res?.insuranceType || '', insuranceType: res?.insuranceType || '',
goodsValue: res?.goodsValue || '',
insurancePremium: res?.insurancePremium || '', insurancePremium: res?.insurancePremium || '',
insuranceRate: res?.insuranceRate || '', insuranceRate: res?.insuranceRate || '',
insurancePackagedGoods: res?.insurancePackagedGoods || ''
}; };
this.sf6data = { this.sf6data = {
stateReceipt: res?.stateReceipt, stateReceipt: res?.stateReceipt,
@ -1379,17 +1383,17 @@ export class SupplyManagementOnecarPublishComponent implements OnInit {
} }
// 计算保价费金额 // 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
const params = { const params = {
insuranceType, insuranceType,
goodsValue: this.sf5.value.goodsValue, goodsValue: this.sf4.value.goodsValue,
km: this.totalDistance km: this.totalDistance
}; };
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
if (res) { if (res) {
this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insurancePremium', res.insurancePremium);
this.sf5.setValue('/insuranceRate', res.insuranceRate); this.sf5.setValue('/insuranceRate', res.insuranceRate);
} else { }else{
this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null); this.sf5.setValue('/insuranceRate', null);
} }

View File

@ -180,55 +180,43 @@
</form> </form>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">货物信息</div> <div class="card-title">货物信息</div>
<div nz-row> <div nz-row>
<div nz-col nzSpan="24"> <div nz-col nzSpan="16">
<sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf> <sf #sf3 [schema]="schema3" [button]="'none'" [ui]="ui3" [formData]="sf3data"></sf>
</div>
</div>
<sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data"> <sf #sf4 [schema]="schema4" [button]="'none'" [ui]="ui4" [formData]="sf4data">
<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="总重量,必填" oninput="if(value>99999)value=99999;if(value<0)value=0" />
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="体积" oninput="if(value>99999)value=99999;if(value<0)value=0" />
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" (ngModelChange)="i.setValue($event)" placeholder="件数"
nz-input oninput="if(value>99999)value=99999;if(value<0)value=0" />
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="goodsValue" let-i let-ui="ui">
<div class="align-center">
<nz-input-number [ngModel]="i.value" [nzMin]="50000" [nzMax]="2000000" [nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()" nzPlaceHolder="请输入50000-2000000之间数值">
</nz-input-number>
</div>
</ng-template>
</sf> </sf>
</div>
</div>
</nz-card> </nz-card>
<nz-card> <nz-card>
<div class="card-title">服务信息</div> <div class="card-title">服务信息</div>
<div nz-row> <div nz-row>
@ -240,34 +228,8 @@
<ng-template sf-template="freeInsurance2" let-i let-ui="ui"> <ng-template sf-template="freeInsurance2" let-i let-ui="ui">
<nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert> <nz-alert nzType="warning" [nzMessage]="template1" nzShowIcon></nz-alert>
</ng-template> </ng-template>
<ng-template #template1>推荐投保,填写货值自动估保费,司机接单后不可退保。详见<a target="_blank" [queryParams]="{ type: 10 }" [routerLink]="['/agreement']">《投保告知》</a></ng-template> <ng-template #template1>香港、澳门、台湾、西藏、新疆不予承保单次运输保额仅限200万元以内详见<a target="_blank" [queryParams]="{ type: 10 }"
<ng-template sf-template="goodsValue" let-i let-ui="ui"> [routerLink]="['/agreement']">《投保告知》</a></ng-template>
<div class="align-center">
<nz-input-number
[ngModel]="i.value"
[nzMin]="50000"
[nzMax]="2000000"
[nzStep]="0.01"
(ngModelChange)="i.setValue($event);getInsurersPrice()"
nzPlaceHolder="请输入50000-2000000之间数值"
></nz-input-number>
</div>
</ng-template>
<ng-template sf-template="insurancePremium" 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>
<ng-template #template2>
<p>注意事项:</p>
<p>①请仔细阅读《投保告知函》;</p>
<p>②香港、澳门、台湾、西藏、新疆不在投保范围内,不予承保;</p>
<p>③最低保费12元/每单单次运输保额仅限200万元以内</p>
<p>④本保险只限于货物起运前投保,起运后投保无效,保险人不负赔偿责任;</p>
</ng-template>
</div>
</ng-template>
</sf> </sf>
</div> </div>
</div> </div>

View File

@ -293,6 +293,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
goodsName1: { goodsName1: {
type: 'string', type: 'string',
title: '', title: '',
maxLength: 20,
ui: { ui: {
errors: { required: '请填写货物名称' }, errors: { required: '请填写货物名称' },
visibleIf: { visibleIf: {
@ -328,7 +329,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
number: { number: {
@ -336,7 +337,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
title: '', title: '',
ui: { ui: {
widget: 'custom', widget: 'custom',
placeholder: '请输入' placeholder: '请输入',
} }
}, },
carModel: { carModel: {
@ -372,18 +373,52 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
} }
} }
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
} }
}, },
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
} as SFSelectWidgetSchema
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
validator: val => {
if (this.sf5.value.insuranceType !=='3' && this.isEmpty(val)) {
return [{ keyword: 'required', message: '必填项' }];
} else {
return [];
}
}
}
},
},
required: ['weight', 'carModel', 'carLength'] required: ['weight', 'carModel', 'carLength']
}; };
this.ui4 = { this.ui4 = {
'*': { '*': {
spanLabelFixed: 115, spanLabelFixed: 115,
grid: { span: 8 } grid: { span: 8 }
},
$carModel: {
spanLabelFixed: 100,
grid: { span: 8 }
} }
}; };
} }
@ -417,73 +452,30 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
type1: { type1: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +10', '车源匹配率 +10'], enum: ['源曝光率 +10', '车源匹配率 +10'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '0' } visibleIf: { insuranceType: (value: string) => value === '0' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +10', '车源匹配率 +10'] default: ['源曝光率 +10', '车源匹配率 +10']
}, },
type2: { type2: {
type: 'string', type: 'string',
title: '', title: '',
enum: ['源曝光率 +20', '车源匹配率 +20'], enum: ['源曝光率 +20', '车源匹配率 +20'],
readOnly: true, readOnly: true,
ui: { ui: {
widget: 'checkbox', widget: 'checkbox',
visibleIf: { insuranceType: (value: string) => value === '1' } visibleIf: { insuranceType: (value: string) => value === '1' }
} as SFCheckboxWidgetSchema, } as SFCheckboxWidgetSchema,
default: ['源曝光率 +20', '车源匹配率 +20'] default: ['源曝光率 +20', '车源匹配率 +20']
},
freeInsurance1: {
type: 'string',
title: '赠送基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
}
},
freeInsurance2: {
type: 'string',
title: '赠送综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
insurancePackagedGoods: {
type: 'string',
title: '货物包装',
ui: {
widget: 'dict-select',
params: { dictKey: 'insure:packaged:goods' },
containsAllLabel: false,
visibleIf: { insuranceType: (value: string) => value !== '3' }
} as SFSelectWidgetSchema
},
hidenField: {
type: 'string',
title: '',
default: ' ',
ui: {
widget: 'text'
}
},
goodsValue: {
type: 'string',
title: '货物价值',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value !== '3' }
}
}, },
insurancePremium: { insurancePremium: {
type: 'string', type: 'string',
title: '', title: '服务包费用',
readOnly:true,
ui: { ui: {
widget: 'custom',
validator: val => this.customValidator(val),
visibleIf: { insuranceType: (value: string) => value !== '3' } visibleIf: { insuranceType: (value: string) => value !== '3' }
} }
}, },
@ -493,9 +485,27 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
ui: { ui: {
hidden: true hidden: true
} }
},
freeInsurance1: {
type: 'string',
title: '预投基本险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '0' }
} }
}, },
required: ['insurancePackagedGoods', 'insurancePremium'] freeInsurance2: {
type: 'string',
title: '预投综合险',
ui: {
widget: 'custom',
visibleIf: { insuranceType: (value: string) => value === '1' }
}
},
},
required: [ 'insurancePremium']
}; };
this.ui5 = { this.ui5 = {
'*': { '*': {
@ -517,6 +527,7 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
}; };
} }
initSF6() { initSF6() {
this.schema6 = { this.schema6 = {
properties: { properties: {
@ -614,19 +625,16 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
prePay: { prePay: {
type: 'number', type: 'number',
title: '预付', title: '预付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
toPay: { toPay: {
type: 'number', type: 'number',
title: '到付', title: '到付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
receiptPay: { receiptPay: {
type: 'number', type: 'number',
title: '回单付', title: '回单付',
default: 0,
ui: { widget: 'custom' } ui: { widget: 'custom' }
}, },
subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema }, subtotal: { type: 'number', title: '小计', default: 0, ui: { widget: 'custom' } as SFNumberWidgetSchema },
@ -924,20 +932,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
{ expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' }, { expenseCode: 'RECE', expenseName: '到付', price: this.sf7.value.toPay || 0, id: this.sf7data?.toPayId || '' },
{ expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' } { expenseCode: 'BACK', expenseName: '回单付', price: this.sf7.value.receiptPay || 0, id: this.sf7data?.receiptPayId || '' }
]; ];
console.log(this.sf55?.value);
// const params = {
// id: '',
// ...this.sf1.value,
// unLoadingPlaceDTOList: LoadingList,
// unloadingTime: format(this.validateForm1.value?.unloadingTime, 'yyyy-MM-dd HH:mm:ss'),
// loadingTime: format(this.validateForm1.value?.loadingTime, 'yyyy-MM-dd HH:mm:ss'),
// goodsInfoDTOList: goodsInfoList,
// ...this.sf5.value,
// ...this.sf6.value,
// expenseDTOList: expenseList,
// paymentDays: this.sf7.value?.paymentDays,
// insuranceType:this.sf55?.value?.insuranceType,
// };
const params = { const params = {
id: '', id: '',
...this.sf1.value, ...this.sf1.value,
@ -948,7 +942,11 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
...this.sf5.value, ...this.sf5.value,
...this.sf6.value, ...this.sf6.value,
expenseDTOList: expenseList, expenseDTOList: expenseList,
paymentDays: this.sf7.value.paymentDays paymentDays: this.sf7.value.paymentDays,
estimatedKilometers: this.totalDistance,
estimatedTravelTime: this.totalTime,
insurancePackagedGoods:this.sf4.value.insurancePackagedGoods,
goodsValue:this.sf4.value.goodsValue,
}; };
console.log(params); console.log(params);
const modalRef = this.modalService.create({ const modalRef = this.modalService.create({
@ -1164,17 +1162,17 @@ export class SupplyManagementReleasePublishComponent implements OnInit {
} }
// 计算保价费金额 // 计算保价费金额
getInsurersPrice(insuranceType = this.sf5.value.insuranceType) { getInsurersPrice(insuranceType = this.sf5.value.insuranceType) {
if (this.sf5.value.goodsValue >= 50000 && this.totalDistance > 0) { if ( this.sf5.value.insuranceType !=='3' && this.sf4.value.goodsValue >= 50000 && this.totalDistance > 0 ) {
const params = { const params = {
insuranceType, insuranceType,
goodsValue: this.sf5.value.goodsValue, goodsValue: this.sf4.value.goodsValue,
km: this.totalDistance km: this.totalDistance
}; };
this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => { this.service.request(this.service.$api_getWholeInsuranceInfo, params).subscribe(res => {
if (res) { if (res) {
this.sf5.setValue('/insurancePremium', res.insurancePremium); this.sf5.setValue('/insurancePremium', res.insurancePremium);
this.sf5.setValue('/insuranceRate', res.insuranceRate); this.sf5.setValue('/insuranceRate', res.insuranceRate);
} else { }else{
this.sf5.setValue('/insurancePremium', null); this.sf5.setValue('/insurancePremium', null);
this.sf5.setValue('/insuranceRate', null); this.sf5.setValue('/insuranceRate', null);
} }

View File

@ -377,11 +377,12 @@ export class FreightComponentsListComponent implements OnInit {
{ {
title: '操作', title: '操作',
width: '110px', width: '110px',
className: 'text-center',
fixed: 'right', fixed: 'right',
buttons: [ buttons: [
{ type: 'divider' }, { type: 'divider' },
{ {
text: '查看<br>', text: '查看  <br>',
acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] }, acl: { ability: ['USERCENTER-FREIGHT-LIST-view'] },
click: item => { click: item => {
this.router.navigate(['./detail', item.id], { relativeTo: this.ar }); this.router.navigate(['./detail', item.id], { relativeTo: this.ar });