diff --git a/src/app/routes/insurance-management/components/list/list.component.html b/src/app/routes/insurance-management/components/list/list.component.html index 226346c3..6405c0a4 100644 --- a/src/app/routes/insurance-management/components/list/list.component.html +++ b/src/app/routes/insurance-management/components/list/list.component.html @@ -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. --> - - +
- +
@@ -25,10 +32,8 @@
- - + + +
- \ No newline at end of file + diff --git a/src/app/routes/insurance-management/components/list/list.component.ts b/src/app/routes/insurance-management/components/list/list.component.ts index 842b16a8..295e5b35 100644 --- a/src/app/routes/insurance-management/components/list/list.component.ts +++ b/src/app/routes/insurance-management/components/list/list.component.ts @@ -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; @@ -79,7 +79,15 @@ export class insuranceManagementListComponent implements OnInit { createTime: { start: this.sf?.value?.createTime?.[0] || '', end: this.sf?.value?.createTime?.[1] || '' - } + }, + recordTime: { + start: this.sf?.value?.recordTime?.[0] || '', + end: this.sf?.value?.recordTime?.[1] || '' + }, + insureTime: { + start: this.sf?.value?.insureTime?.[0] || '', + end: this.sf?.value?.insureTime?.[1] || '' + }, }; } get selectedRows() { @@ -91,36 +99,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 +146,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 +158,45 @@ export class insuranceManagementListComponent implements OnInit { type: 'string', title: '货源编号' }, + policyNo: { + type: 'string', + title: '保单号', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + }, + } + }, + insureType: { + title: '类型', + type: 'string', + ui: { + widget: 'dict-select', + params: { dictKey: 'insure:type' }, + containsAllLable: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFSelectWidgetSchema + }, + startAddress: { + type: 'string', + title: '始发地', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, + endAddress: { + type: 'string', + title: '目的地', + ui: { + visibleIf: { + _$expand: (value: boolean) => value + } + } + }, shipperAppUserId: { type: 'string', title: '货主', @@ -159,6 +206,9 @@ export class insuranceManagementListComponent implements OnInit { searchDebounceTime: 300, searchLoadingText: '搜索中...', allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + }, onSearch: (q: any) => { if (!!q) { return this.service @@ -185,24 +235,7 @@ export class insuranceManagementListComponent implements OnInit { }, default: '' }, - loadingPlace: { - type: 'string', - title: '装货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, - dischargePlace: { - type: 'string', - title: '卸货地', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, + driverName: { title: '承运司机', type: 'string', @@ -221,56 +254,18 @@ export class insuranceManagementListComponent implements OnInit { } } }, - carCaptainName: { - title: '车队长', - type: 'string', - ui: { - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, - paymentStatus: { - title: '支付状态', + insureStatus: { + title: '投保状态', type: 'string', ui: { widget: 'dict-select', - params: { dictKey: 'overall:payment:status' }, + params: { dictKey: 'insure:status' }, containsAllLable: true, visibleIf: { _$expand: (value: boolean) => value } } as SFSelectWidgetSchema }, - createTime: { - title: '创建时间', - type: 'string', - ui: { - widget: 'date', - mode: 'range', - format: 'yyyy-MM-dd', - allowClear: true, - visibleIf: { - _$expand: (value: boolean) => value - } - } as SFDateWidgetSchema - }, - riskStatus: { - type: 'string', - title: '是否风险单', - enum: [ - { label: '全部', value: '' }, - { label: '是', value: '3' }, - { label: '否', value: '1' } - ], - ui: { - widget: 'select', - placeholder: '请选择', - visibleIf: { - _$expand: (value: boolean) => value - } - } - }, enterpriseInfoId: { type: 'string', title: '网络货运人', @@ -284,39 +279,52 @@ export class insuranceManagementListComponent implements OnInit { asyncData: () => this.shipperservice.getNetworkFreightForwarder() } }, - serviceType: { - title: '服务类型', + insureTime: { + title: '投保时间', type: 'string', - default: '', ui: { - widget: 'dict-select', - params: { dictKey: 'service:type' }, - containsAllLable: true, + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } as SFDateWidgetSchema }, - settlementBasis: { - title: '结算依据', + createTime: { + title: '创建时间', type: 'string', ui: { - widget: 'dict-select', - containsAllLable: true, - params: { dictKey: 'goodresource:settlement:type' }, - containAllLable: true, + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + allowClear: true, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema - } + } as SFDateWidgetSchema + }, + recordTime: { + title: '录单时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd', + allowClear: true, + visibleIf: { + _$expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + }, type: 'object' }; this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } }; } - /** * 初始化数据列表 */ @@ -334,17 +342,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 +363,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 +384,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 +427,7 @@ export class insuranceManagementListComponent implements OnInit { width: '180px', className: 'text-left', index: 'processMessage' + // processResult=2 }, { title: '操作', @@ -428,19 +437,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,8 +478,39 @@ export class insuranceManagementListComponent implements OnInit { this._$expand = false; } - // 修改订单 - changeOrder() { - this.router.navigate(['/insurance-management/list-set', 1]); + // 退保费 + 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]); + } } diff --git a/src/app/routes/insurance-management/services/insurance-management.service.ts b/src/app/routes/insurance-management/services/insurance-management.service.ts index 51e399db..deaea9a6 100644 --- a/src/app/routes/insurance-management/services/insurance-management.service.ts +++ b/src/app/routes/insurance-management/services/insurance-management.service.ts @@ -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'; // 保险费公司认证