This commit is contained in:
wangshiming
2022-04-15 16:49:09 +08:00
parent 792598efd4
commit ff7a5a80fc
5 changed files with 128 additions and 26 deletions

View File

@ -1,6 +1,46 @@
<!--
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-03-30 13:55:41
* @LastEditors : Shiming
* @LastEditTime : 2022-04-15 16:40:11
* @FilePath : \\tms-obc-web\\src\\app\\routes\\datatable\\components\\compliance\\customer\\customer.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
<!-- 页头 -->
<page-header-wrapper [title]="'数据报表'"></page-header-wrapper>
<nz-card>
<sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
<st #st [data]="url" [columns]="columns"></st>
<sf #sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf>
<div class="chooseBox">
<!-- <button nz-button nzType="primary" (click)="exportFun()">导出</button> -->
<!-- <div class="timeBox">
<nz-radio-group [(ngModel)]="mode" nzButtonStyle="solid" (ngModelChange)="changeData()">
<label nz-radio-button nzValue="year">年</label>
<label nz-radio-button nzValue="month">月</label>
<label nz-radio-button nzValue="date">日</label>
<label nz-radio-button nzValue="define">自定义</label>
</nz-radio-group>
<div class="dateBox">
<nz-date-picker [(ngModel)]="date" [nzMode]="mode" [nzFormat]="dateFormat" *ngIf="mode !== 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-date-picker>
<nz-range-picker [(ngModel)]="defineDate" [nzFormat]="dateFormat" *ngIf="mode === 'define'" [nzDisabledDate]="disabledDate" (ngModelChange)="onChange($event)"></nz-range-picker>
</div>
</div> -->
</div>
<st
#st
[bordered]="true"
[scroll]="{ x: '2000px' }"
[data]="service.$api_listCusComplianceReportPage"
[columns]="columns"
[req]="{ process: beforeReq }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } , process: afterRes}"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"
>
<ng-template st-row="freightPrice" let-item let-index="index">
{{ item.freightPrice | currency }}
</ng-template>
</st>
</nz-card>

View File

@ -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 {

View File

@ -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) {

View File

@ -1,7 +1,7 @@
<!--
* @Author: your name
* @Date: 2021-12-24 15:38:08
* @LastEditTime : 2022-04-13 20:05:09
* @LastEditTime : 2022-04-15 16:42:10
* @LastEditors : Shiming
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\components\\abnormal-appear\\abnormal-appear.component.html
@ -42,7 +42,7 @@
</nz-card>
<nz-card class="content-box">
<nz-tabset [(nzSelectedIndex)]="selectedIndex">
<nz-tabset [(nzSelectedIndex)]="selectedIndex" (nzSelectedIndexChange)="selectChange($event)">
<nz-tab [nzTitle]="'待回复(' + tabs?.stayQuantity + ')'">
<st
#st
@ -69,12 +69,12 @@
</ng-template>
</st>
</nz-tab>
<nz-tab nzTitle='已回复'>
<nz-tab [nzTitle]="'已回复(' + tabs?.receivedQuantity + ')'">
<st
#st2
[data]="service.$api_get_listOperatePage"
[columns]="columns2"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }"
[req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams2 }"
[res]="{ reName: { list: 'data.records', total: 'data.total' } }"
[page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }"
[loading]="false"

View File

@ -70,18 +70,19 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
{ title: '回复人', index: 'replyAppUserName', width: '180px', className: 'text-left' },
{ title: '回复时间', index: 'replyTime', width: '180px', className: 'text-left' }
];
resourceStatus: number | undefined;
get reqParams() {
return {
...this.sf?.value,
replyStatus: 0
replyStatus: this.resourceStatus || 0
};
}
get reqParams2() {
return {
...this.sf?.value,
replyStatus: 1
replyStatus:this.resourceStatus || 1
};
}
@ -214,6 +215,14 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
selectChange(e: number) {
console.log(e);
this.resourceStatus = e ;
setTimeout(() => {
this?.st?.load(1);
this?.st2?.load(1);
}, 0);
}
getGoodsSourceStatistical() {
this.tabs = {
stayQuantity: 0,