From ff7a5a80fc9b5b611e9c1ba71b582e740eede660 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Fri, 15 Apr 2022 16:49:09 +0800 Subject: [PATCH] fix bug --- .../customer/customer.component.html | 44 +++++++++- .../compliance/customer/customer.component.ts | 84 +++++++++++++++---- .../routes/datatable/services/data.service.ts | 5 +- .../abnormal-appear.component.html | 8 +- .../abnormal-appear.component.ts | 13 ++- 5 files changed, 128 insertions(+), 26 deletions(-) diff --git a/src/app/routes/datatable/components/compliance/customer/customer.component.html b/src/app/routes/datatable/components/compliance/customer/customer.component.html index 56092666..45f01672 100644 --- a/src/app/routes/datatable/components/compliance/customer/customer.component.html +++ b/src/app/routes/datatable/components/compliance/customer/customer.component.html @@ -1,6 +1,46 @@ + - - + +
+ + +
+ + + {{ item.freightPrice | currency }} + +
diff --git a/src/app/routes/datatable/components/compliance/customer/customer.component.ts b/src/app/routes/datatable/components/compliance/customer/customer.component.ts index 1546a048..2971ed5b 100644 --- a/src/app/routes/datatable/components/compliance/customer/customer.component.ts +++ b/src/app/routes/datatable/components/compliance/customer/customer.component.ts @@ -1,39 +1,89 @@ +import { SFComponent } from '@delon/form'; +/* + * @Description : + * @Version : 1.0 + * @Author : Shiming + * @Date : 2022-03-30 13:55:41 + * @LastEditors : Shiming + * @LastEditTime : 2022-04-15 16:35:10 + * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\compliance\\customer\\customer.component.ts + * Copyright (C) 2022 huzhenhong. All rights reserved. + */ import { Component, OnInit, ViewChild } from '@angular/core'; -import { STColumn, STComponent } from '@delon/abc/st'; +import { STColumn, STComponent, STRequestOptions } from '@delon/abc/st'; import { SFSchema } from '@delon/form'; import { ModalHelper, _HttpClient } from '@delon/theme'; +import { DataService } from '../../../services/data.service'; @Component({ selector: 'app-datatable-compliance-customer', templateUrl: './customer.component.html', }) export class DatatableComplianceCustomerComponent implements OnInit { - url = `/user`; + @ViewChild('sf', {static: false}) sf!: SFComponent + mode = 'year'; + date: any = null; + defineDate = []; + time: any = ['2022-01-01 00:00:00'] + dateFormat = 'yyyy'; + dateNext: any = null; + modeNext = 'year'; + timeNext: any = ['2022-01-01 00:00:00'] + today = new Date(); searchSchema: SFSchema = { properties: { no: { type: 'string', - title: '编号' - } + title: '客户名称' + }, + no2: { + type: 'string', + title: '业务员' + }, + no3: { + type: 'string', + title: '合伙人名称' + }, } }; @ViewChild('st') private readonly st!: STComponent; columns: STColumn[] = [ - { title: '编号', index: 'no' }, - { title: '调用次数', type: 'number', index: 'callNo' }, - { title: '头像', type: 'img', width: '50px', index: 'avatar' }, - { title: '时间', type: 'date', index: 'updatedAt' }, - { - title: '', - buttons: [ - // { text: '查看', click: (item: any) => `/form/${item.id}` }, - // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, - ] - } + { title: '公司名称', index: 'enterpriseName' ,}, + { title: '注册时间', index: 'registerTime' }, + { title: '客户类型', width: '100px', index: 'customerType' }, + { title: '业务员', index: 'salesmanName' }, + { title: '合伙人', index: 'partnerName' }, + { title: '订单数', index: 'billCounts' }, + { title: '订单不合格数', index: 'billQuaCounts' }, + { title: '订单不合格率', index: 'billQuaCountsPer' }, + { title: '货源单订单数', index: 'gsourceCounts' }, + { title: '合同单数', index: 'billConCounts' }, + { title: '货源单个', index: 'gsourceCounts' }, + { title: '运费直付单数', index: 'freightDirPayCounts' }, + { title: '运费代收单数', index: 'freightRepPayCounts' }, + { title: '手机直付', index: 'updatedAt' }, + { title: '汇款单数', index: 'updatedAt' }, + { title: '及时付款', index: 'timelyPayPer' }, + ]; - constructor(private http: _HttpClient, private modal: ModalHelper) { } - + constructor(private http: _HttpClient, private modal: ModalHelper,public service: DataService,) { } + beforeReq = (requestOptions: STRequestOptions) => { + const params: any = Object.assign({}, this.sf?.value || {}); + delete params._$expand; + console.log(params); + if (this.sf) { + Object.assign(requestOptions.body, { + ...params, + }); + } + return requestOptions; + }; + afterRes = (data: any[], rawData?: any) => { + return data.map(item => ({ + ...item, + })); + }; ngOnInit(): void { } add(): void { diff --git a/src/app/routes/datatable/services/data.service.ts b/src/app/routes/datatable/services/data.service.ts index e7443148..117ac0d8 100644 --- a/src/app/routes/datatable/services/data.service.ts +++ b/src/app/routes/datatable/services/data.service.ts @@ -4,7 +4,7 @@ * @Author : Shiming * @Date : 2021-12-27 10:30:56 * @LastEditors : Shiming - * @LastEditTime : 2022-04-07 15:07:27 + * @LastEditTime : 2022-04-15 16:03:46 * @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\services\\data.service.ts * Copyright (C) 2022 huzhenhong. All rights reserved. */ @@ -85,6 +85,9 @@ export class DataService extends BaseService { // 数据大屏-交易分布 $api_getTransactionDistribution = `/api/sdc/reportDataLargeScreen/getTransactionDistribution`; + // 客户-合规报表 + $api_listCusComplianceReportPage = `/api/sdc/report/listCusComplianceReportPage`; + constructor(public injector: Injector) { diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html index 393c74d6..a85f4bdc 100644 --- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html +++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.html @@ -1,7 +1,7 @@