fix bug
This commit is contained in:
@ -4,19 +4,26 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2022-01-12 10:52:50
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-14 13:29:21
|
||||
* @LastEditTime : 2022-02-17 10:12:21
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\insurance-management\\components\\list\\list.component.html
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
-->
|
||||
<!-- 搜索表单 -->
|
||||
<page-header-wrapper [title]="''">
|
||||
</page-header-wrapper>
|
||||
<page-header-wrapper [title]="''"> </page-header-wrapper>
|
||||
<nz-card>
|
||||
<div nz-row nzGutter="8">
|
||||
<!-- 查询字段小于或等于3个时,不显示伸缩按钮 -->
|
||||
<div nz-col nzSpan="24" *ngIf="queryFieldCount <= 4">
|
||||
<sf #sf [schema]="schema" [ui]="ui" [mode]="'search'" [disabled]="!sf?.valid" [loading]="service.http.loading"
|
||||
(formSubmit)="st?.load(1)" (formReset)="resetSF()"></sf>
|
||||
<sf
|
||||
#sf
|
||||
[schema]="schema"
|
||||
[ui]="ui"
|
||||
[mode]="'search'"
|
||||
[disabled]="!sf?.valid"
|
||||
[loading]="service.http.loading"
|
||||
(formSubmit)="st?.load(1)"
|
||||
(formReset)="resetSF()"
|
||||
></sf>
|
||||
</div>
|
||||
|
||||
<!-- 查询字段大于3个时,根据展开状态调整布局 -->
|
||||
@ -25,10 +32,8 @@
|
||||
<sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"></sf>
|
||||
</div>
|
||||
<div nz-col [nzSpan]="_$expand ? 24 : 6" [class.text-right]="_$expand">
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading"
|
||||
(click)="search()">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading"
|
||||
>导出</button>
|
||||
<button nz-button nzType="primary" [nzLoading]="service.http.loading" (click)="search()">查询</button>
|
||||
<button nz-button nzType="primary" [disabled]="service.http.loading">导出</button>
|
||||
<button nz-button [disabled]="service.http.loading" (click)="resetSF()">重置</button>
|
||||
<button nz-button nzType="link" (click)="expandToggle()">
|
||||
{{ !_$expand ? '展开' : '收起' }}
|
||||
@ -40,15 +45,14 @@
|
||||
</nz-card>
|
||||
|
||||
<nz-card>
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)"
|
||||
[nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tabset (nzSelectedIndexChange)="selectChange($event)" [nzTabBarExtraContent]="extraTemplate">
|
||||
<nz-tab [nzTitle]="'全部(' + tabs?.totalCount + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'待投保(' + tabs?.receivedQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已投保(' + tabs?.stayQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'投保失败(' + tabs?.GoingQuantity + ')'"></nz-tab>
|
||||
<nz-tab [nzTitle]="'已取消(' + tabs?.cancelQuantity + ')'"></nz-tab>
|
||||
</nz-tabset>
|
||||
<div style="margin-top: 15px;">
|
||||
<div style="margin-top: 15px">
|
||||
<st
|
||||
#st
|
||||
[bordered]="true"
|
||||
@ -66,12 +70,26 @@
|
||||
<ng-template st-row="practicalPremium" let-item let-index="index">
|
||||
{{ item.practicalPremium | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="insureAmount" let-item let-index="index">
|
||||
{{ item.insureAmount | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="premium" let-item let-index="index">
|
||||
{{ item.premium | currency }}
|
||||
</ng-template>
|
||||
<ng-template st-row="driverName" let-item let-index="index">
|
||||
<div> {{ item?.driverName }}/{{ item?.driverTelephone }}/{{ item?.carNo }} </div>
|
||||
</ng-template>
|
||||
<ng-template st-row="distance" let-item let-index="index">
|
||||
<div>
|
||||
{{item?.driverName}}/{{item?.driverTelephone}}/{{item?.carNo}}
|
||||
{{ item?.distance ? item?.distance + '公里' : '' }}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsNumber" let-item let-index="index">
|
||||
<div>
|
||||
{{ item?.billCode }}
|
||||
</div>
|
||||
<div>
|
||||
{{ item?.resourceStatusLabel }}
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="insureCode" let-item let-index="index">
|
||||
@ -81,11 +99,11 @@
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="goodsName" let-item let-index="index">
|
||||
<div>{{item?.goodsName}}</div>
|
||||
<div>{{ item?.goodsInfoName }}</div>
|
||||
<div>
|
||||
<span>{{ item?.weight ? item?.weight + '吨/' : '' }}</span>
|
||||
<span>{{item?.volume ? item?.volume + '方/' : '' }}</span>
|
||||
<span>{{item?.goodsNumber ? item?.goodsNumber + '吨' : '' }}</span>
|
||||
<span>{{ item?.volume ? item?.volume + '方' : '' }}</span>
|
||||
<span>{{ item?.number ? item?.number + '件' : '' }}</span>
|
||||
</div>
|
||||
</ng-template>
|
||||
<ng-template st-row="mybidDetailInfo" let-item let-index="index">
|
||||
@ -102,8 +120,6 @@
|
||||
|
||||
<ng-template #extraTemplate>
|
||||
<div>
|
||||
<button nz-button nzType="primary" (click)="changeOrder()">
|
||||
保险配置
|
||||
</button>
|
||||
<button nz-button nzType="primary" (click)="changeOrder()"> 保险配置 </button>
|
||||
</div>
|
||||
</ng-template>
|
||||
@ -50,11 +50,11 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
}
|
||||
];
|
||||
tabs = {
|
||||
cancelQuantity: 0,
|
||||
totalCount: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0,
|
||||
GoingQuantity: 0,
|
||||
totalCount: 0
|
||||
cancelQuantity: 0
|
||||
};
|
||||
constructor(
|
||||
public service: InsuranceManagementService,
|
||||
@ -69,7 +69,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
get reqParams() {
|
||||
const a: any = {};
|
||||
if (this.resourceStatus) {
|
||||
a.billStatus = this.resourceStatus;
|
||||
a.insureStatus = this.resourceStatus;
|
||||
}
|
||||
const params: any = Object.assign({}, this.sf?.value || {});
|
||||
delete params._$expand;
|
||||
@ -91,36 +91,32 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
}
|
||||
getGoodsSourceStatistical() {
|
||||
this.tabs = {
|
||||
cancelQuantity: 0,
|
||||
totalCount: 0,
|
||||
receivedQuantity: 0,
|
||||
stayQuantity: 0,
|
||||
GoingQuantity: 0,
|
||||
totalCount: 0
|
||||
cancelQuantity: 0
|
||||
};
|
||||
const params: any = Object.assign({}, this.reqParams || {});
|
||||
delete params.billStatus
|
||||
// this.service.request(this.service.$api_getBulkStatistical, params).subscribe((res: any) => {
|
||||
// if (res) {
|
||||
// let totalCount = 0;
|
||||
// res.forEach((element: any) => {
|
||||
// if (element.billStatusLabel === '待发车') {
|
||||
// this.tabs.stayQuantity = element.quantity;
|
||||
// } else if (element.billStatusLabel === '待接单') {
|
||||
// this.tabs.receivedQuantity = element.quantity;
|
||||
// } else if (element.billStatusLabel === '待签收') {
|
||||
// this.tabs.signQuantity = element.quantity;
|
||||
// } else if (element.billStatusLabel === '已完成') {
|
||||
// this.tabs.compolatelQuantity = element.quantity;
|
||||
// } else if (element.billStatusLabel === '已取消') {
|
||||
// this.tabs.cancelQuantity = element.quantity;
|
||||
// } else if (element.billStatusLabel === '运输中') {
|
||||
// this.tabs.GoingQuantity = element.quantity;
|
||||
// }
|
||||
// totalCount += element.quantity;
|
||||
// });
|
||||
// this.tabs.totalCount = totalCount;
|
||||
// }
|
||||
// });
|
||||
delete params.insureStatus;
|
||||
this.service.request(this.service.$api_listStatisticalStatus, params).subscribe((res: any) => {
|
||||
if (res) {
|
||||
let totalCount = 0;
|
||||
res.forEach((element: any) => {
|
||||
if (element.insureStatusLabel === '待投保') {
|
||||
this.tabs.receivedQuantity = element.quantity;
|
||||
} else if (element.insureStatusLabel === '已投保') {
|
||||
this.tabs.stayQuantity = element.quantity;
|
||||
} else if (element.insureStatusLabel === '投保失败') {
|
||||
this.tabs.GoingQuantity = element.quantity;
|
||||
} else if (element.insureStatusLabel === '已取消') {
|
||||
this.tabs.cancelQuantity = element.quantity;
|
||||
}
|
||||
totalCount += element.quantity;
|
||||
});
|
||||
this.tabs.totalCount = totalCount;
|
||||
}
|
||||
});
|
||||
}
|
||||
selectChange(e: number) {
|
||||
this.resourceStatus = e;
|
||||
@ -142,6 +138,10 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
this.schema = {
|
||||
properties: {
|
||||
_$expand: { type: 'boolean', ui: { hidden: true } },
|
||||
insureCode: {
|
||||
type: 'string',
|
||||
title: '投保编号'
|
||||
},
|
||||
billCode: {
|
||||
type: 'string',
|
||||
title: '订单号'
|
||||
@ -150,6 +150,15 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
type: 'string',
|
||||
title: '货源编号'
|
||||
},
|
||||
policyNo: {
|
||||
type: 'string',
|
||||
title: '保单号',
|
||||
ui: {
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
}
|
||||
},
|
||||
shipperAppUserId: {
|
||||
type: 'string',
|
||||
title: '货主',
|
||||
@ -159,6 +168,9 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
searchDebounceTime: 300,
|
||||
searchLoadingText: '搜索中...',
|
||||
allowClear: true,
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
onSearch: (q: any) => {
|
||||
if (!!q) {
|
||||
return this.service
|
||||
@ -316,7 +328,6 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
@ -334,17 +345,17 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
title: '保单号',
|
||||
width: '250px',
|
||||
className: 'text-right',
|
||||
render: 'policyNo'
|
||||
index: 'policyNo'
|
||||
},
|
||||
{ title: '类型', index: 'insureTypeLabel', width: '220px', className: 'text-left' },
|
||||
{ title: '始发地', index: 'startAddress', width: '220px', className: 'text-left' },
|
||||
{ title: '目的地', index: 'endAddress', width: '220px', className: 'text-left' },
|
||||
{ title: '距离', index: 'distance', width: '180px', className: 'text-left' },
|
||||
{ title: '保额(元)', index: 'resourceCode', width: '180px', className: 'text-left' },
|
||||
{ title: '保费(元)', render: 'premium', width: '180px', className: 'text-left' },
|
||||
{ title: '距离', render: 'distance', width: '180px', className: 'text-left' },
|
||||
{ title: '保额(元)', render: 'insureAmount', width: '180px', className: 'text-right' },
|
||||
{ title: '保费(元)', render: 'premium', width: '180px', className: 'text-right' },
|
||||
{
|
||||
title: '实际保费(元)',
|
||||
className: 'text-left',
|
||||
className: 'text-right',
|
||||
width: '180px',
|
||||
render: 'practicalPremium'
|
||||
},
|
||||
@ -355,15 +366,15 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
render: 'goodsName'
|
||||
},
|
||||
{
|
||||
title: '车牌号',
|
||||
title: '承运司机',
|
||||
className: 'text-right',
|
||||
width: '180px',
|
||||
width: '250px',
|
||||
render: 'driverName'
|
||||
},
|
||||
{
|
||||
title: '关联订单号',
|
||||
className: 'text-right',
|
||||
index: 'goodsNumber',
|
||||
render: 'goodsNumber',
|
||||
width: '180px'
|
||||
},
|
||||
{
|
||||
@ -376,19 +387,19 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
title: '网络货运人',
|
||||
className: 'text-left',
|
||||
width: '250px',
|
||||
index: 'enterpriseInfoName',
|
||||
index: 'enterpriseInfoName'
|
||||
},
|
||||
{
|
||||
title: '货主',
|
||||
className: 'text-left',
|
||||
width: '180px',
|
||||
index: 'shipperAppUserName',
|
||||
index: 'shipperAppUserName'
|
||||
},
|
||||
{
|
||||
title: '所属项目',
|
||||
width: '200px',
|
||||
className: 'text-left',
|
||||
render: 'enterpriseProjectName'
|
||||
index: 'enterpriseProjectName'
|
||||
},
|
||||
{
|
||||
title: '投保时间',
|
||||
@ -419,6 +430,7 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
width: '180px',
|
||||
className: 'text-left',
|
||||
index: 'processMessage'
|
||||
// processResult=2
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
@ -428,19 +440,19 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
buttons: [
|
||||
{
|
||||
text: '再次投保',
|
||||
click: _record => console.log(''),
|
||||
click: _record => this.retreatNext(_record)
|
||||
// iif: item =>
|
||||
// item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1'
|
||||
},
|
||||
{
|
||||
text: '查看保单',
|
||||
click: _record => console.log(''),
|
||||
click: _record => console.log('')
|
||||
// iif: item =>
|
||||
// item.billStatus == '4' || item.billStatus == '5' || item.billStatus == '2' || item.billStatus == '3' || item.billStatus == '1'
|
||||
},
|
||||
{
|
||||
text: '退保费',
|
||||
click: _record => this.changeOrder(),
|
||||
click: _record => this.retreatPrice(_record)
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -469,7 +481,38 @@ export class insuranceManagementListComponent implements OnInit {
|
||||
this._$expand = false;
|
||||
}
|
||||
|
||||
// 修改订单
|
||||
// 退保费
|
||||
retreatPrice(value: any) {
|
||||
this.modal.warning({
|
||||
nzTitle: '确认退还保费吗?',
|
||||
nzClosable: true,
|
||||
nzContent: '退还后不可撤销,请谨慎操作!',
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.service.request(this.service.$api_del_many, [value.id]).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('删除菜单成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 再次投保
|
||||
retreatNext(value: any) {
|
||||
this.modal.warning({
|
||||
nzTitle: '确认再次投保吗?',
|
||||
nzClosable: true,
|
||||
nzCancelText: '取消',
|
||||
nzOnOk: () => {
|
||||
this.service.request(this.service.$api_del_many, [value.id]).subscribe(res => {
|
||||
if (res) {
|
||||
this.service.msgSrv.success('删除菜单成功');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
// 保险配置
|
||||
changeOrder() {
|
||||
this.router.navigate(['/insurance-management/list-set', 1]);
|
||||
}
|
||||
|
||||
@ -21,6 +21,8 @@ export class InsuranceManagementService extends ShipperBaseService {
|
||||
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
|
||||
// 查询保险费信息表
|
||||
public $api_premiumInfo_list = '/api/sdc/premiumInfo/list/page';
|
||||
// 统计保险单状态数量
|
||||
public $api_listStatisticalStatus = '/api/sdc/premiumInfo/listStatisticalStatus';
|
||||
|
||||
|
||||
// 保险费公司认证
|
||||
|
||||
Reference in New Issue
Block a user