业务统计
This commit is contained in:
		| @ -18,7 +18,7 @@ | |||||||
|           </div> |           </div> | ||||||
|           <div> |           <div> | ||||||
|             <span class="letf-box">添加时间:{{detailInfo?.createTime}}</span> |             <span class="letf-box">添加时间:{{detailInfo?.createTime}}</span> | ||||||
|             <span c>所属城市:{{detailInfo?.belongCity}}</span> |             <span>所属城市:{{detailInfo?.belongCity}}</span> | ||||||
|           </div> |           </div> | ||||||
|         </div> |         </div> | ||||||
|       </div> |       </div> | ||||||
| @ -29,8 +29,7 @@ | |||||||
|       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf> |       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf> | ||||||
|     </div> |     </div> | ||||||
|     <div nz-col [nzSpan]="8"> |     <div nz-col [nzSpan]="8"> | ||||||
|       <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" |       <button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button> | ||||||
|         (click)="search()">查询</button> |  | ||||||
|       <button nz-button (click)="resetSF()">重置</button> |       <button nz-button (click)="resetSF()">重置</button> | ||||||
|       <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> |       <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||||
|     </div> |     </div> | ||||||
|  | |||||||
| @ -1,4 +1,5 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
|  | import { Router } from '@angular/router'; | ||||||
| import { STColumn, STComponent } from '@delon/abc/st'; | import { STColumn, STComponent } from '@delon/abc/st'; | ||||||
| import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
| @ -37,7 +38,7 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { | |||||||
|   ]; |   ]; | ||||||
|   _$expand = false; |   _$expand = false; | ||||||
|  |  | ||||||
|   constructor(public service: BussinessStatisticsService) { |   constructor(public service: BussinessStatisticsService, public router: Router) { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
| @ -52,7 +53,10 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { | |||||||
|  |  | ||||||
|   resetSF() { |   resetSF() { | ||||||
|     this._$expand = false; |     this._$expand = false; | ||||||
|     this.sf.reset() |     this.sf.reset(); | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.st.reset(); | ||||||
|  |     }) | ||||||
|   } |   } | ||||||
|   /** |   /** | ||||||
| * 伸缩查询条件 | * 伸缩查询条件 | ||||||
| @ -145,8 +149,12 @@ export class PartnerPartnerCustomDetailComponent implements OnInit { | |||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |    * 查看订单明细 | ||||||
|  |    * @param record 当前对象 | ||||||
|  |    */ | ||||||
|   viewOrderDetail(record: any) { |   viewOrderDetail(record: any) { | ||||||
|  |     this.router.navigate([`/partner/business-statistics/partner/custom-order-detail/${record?.id}`]) | ||||||
|   } |   } | ||||||
|   goBack() { |   goBack() { | ||||||
|     window.history.go(-1); |     window.history.go(-1); | ||||||
|  | |||||||
| @ -1,9 +1,44 @@ | |||||||
| <page-header [action]="phActionTpl"> | <page-header-wrapper [title]="'客户明细'" [logo]="logo"> | ||||||
|   <ng-template #phActionTpl> |   <ng-template #logo> | ||||||
|     <button (click)="add()" nz-button nzType="primary">新建</button> |     <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> | ||||||
|  |       <i nz-icon nzType="left" nzTheme="outline"></i> | ||||||
|  |     </button> | ||||||
|   </ng-template> |   </ng-template> | ||||||
| </page-header> | </page-header-wrapper> | ||||||
| <nz-card> | <nz-card> | ||||||
|   <sf mode="search" [schema]="searchSchema" (formSubmit)="st.reset($event)" (formReset)="st.reset($event)"></sf> |   <div class="user-info border-1" nz-row> | ||||||
|   <st #st [data]="url" [columns]="columns"></st> |     <div nz-col nzSpan="24" class="d-flex p-md"> | ||||||
|  |       <img class="user-logo" [src]="detailInfo?.logo" /> | ||||||
|  |       <div style="flex: 1;"> | ||||||
|  |         <div> | ||||||
|  |           <h3>{{detailInfo?.company}}</h3> | ||||||
|  |           <div class="mb-sm"> | ||||||
|  |             <span class="letf-box text-grey-dark">{{detailInfo?.code}}</span> | ||||||
|  |             <span class="mr-xs">{{detailInfo?.proxy}}</span> | ||||||
|  |           </div> | ||||||
|  |           <div> | ||||||
|  |             <span class="letf-box">添加时间:{{detailInfo?.createTime}}</span> | ||||||
|  |             <span c>所属城市:{{detailInfo?.belongCity}}</span> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  |   <div class="mt-md" nz-row> | ||||||
|  |     <div nz-col [nzSpan]="18"> | ||||||
|  |       <sf #sf [schema]="schema" [ui]="ui" [compact]="true" [button]="'none'"> </sf> | ||||||
|  |     </div> | ||||||
|  |     <div nz-col [nzSpan]="6"> | ||||||
|  |       <button nz-button nzType="primary" [disabled]="!sf.valid" (click)="search()">查询</button> | ||||||
|  |       <button nz-button (click)="resetSF()">重置</button> | ||||||
|  |       <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | </nz-card> | ||||||
|  | <nz-card> | ||||||
|  |  | ||||||
|  |   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}" | ||||||
|  |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|  |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|  |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500] }"></st> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -0,0 +1,11 @@ | |||||||
|  | :host { | ||||||
|  |   .user-logo { | ||||||
|  |     width: 90px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .letf-box { | ||||||
|  |     display: inline-block; | ||||||
|  |     width: 250px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,45 +1,162 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { STColumn, STComponent } from '@delon/abc/st'; | import { STColumn, STComponent } from '@delon/abc/st'; | ||||||
| import { SFSchema } from '@delon/form'; | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
|  | import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-partner-partner-custom-order-detail', |   selector: 'app-partner-partner-custom-order-detail', | ||||||
|   templateUrl: './partner-custom-order-detail.component.html', |   templateUrl: './partner-custom-order-detail.component.html', | ||||||
|  |   styleUrls: ['./partner-custom-order-detail.component.less'] | ||||||
| }) | }) | ||||||
| export class PartnerPartnerCustomOrderDetailComponent implements OnInit { | export class PartnerPartnerCustomOrderDetailComponent implements OnInit { | ||||||
|   url = `/user`; |   schema: SFSchema = {}; | ||||||
|   searchSchema: SFSchema = { |   ui!: SFUISchema; | ||||||
|     properties: { |   detailInfo: any = { | ||||||
|       no: { |     logo: './assets/images/user/logo.svg', | ||||||
|         type: 'string', |     company: '张三', | ||||||
|         title: '编号' |     code: '91440300357887492H', | ||||||
|  |     proxy: '企业合伙人', | ||||||
|  |     belongCity: '深圳、上海、北京', | ||||||
|  |     createTime: '2021-09-23 14:43:31' | ||||||
|   } |   } | ||||||
|     } |  | ||||||
|   }; |  | ||||||
|   @ViewChild('st') private readonly st!: STComponent; |   @ViewChild('st') private readonly st!: STComponent; | ||||||
|   columns: STColumn[] = [ |   @ViewChild('sf') private readonly sf!: SFComponent; | ||||||
|     { title: '编号', index: 'no' }, |   columns: STColumn[] = []; | ||||||
|     { title: '调用次数', type: 'number', index: 'callNo' }, |   _$expand = false; | ||||||
|     { title: '头像', type: 'img', width: '50px', index: 'avatar' }, |  | ||||||
|     { title: '时间', type: 'date', index: 'updatedAt' }, |   constructor(public service: BussinessStatisticsService) { | ||||||
|     { |  | ||||||
|       title: '', |  | ||||||
|       buttons: [ |  | ||||||
|         // { text: '查看', click: (item: any) => `/form/${item.id}` }, |  | ||||||
|         // { text: '编辑', type: 'static', component: FormEditComponent, click: 'reload' }, |  | ||||||
|       ] |  | ||||||
|   } |   } | ||||||
|   ]; |  | ||||||
|  |  | ||||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } |   get reqParams() { | ||||||
|  |     return { ...this.sf?.value }; | ||||||
|  |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { } |   ngOnInit(): void { | ||||||
|  |     this.initST(); | ||||||
|  |     this.initSF(); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   resetSF() { | ||||||
|  |     this._$expand = false; | ||||||
|  |     this.sf.reset(); | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.st.reset(); | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  |   /** | ||||||
|  | * 伸缩查询条件 | ||||||
|  | */ | ||||||
|  |   expandToggle() { | ||||||
|  |     this._$expand = !this._$expand; | ||||||
|  |     this.sf?.setValue('/_$expand', this._$expand); | ||||||
|  |   } | ||||||
|  |  | ||||||
|   add(): void { |   add(): void { | ||||||
|     // this.modal |     // this.modal | ||||||
|     //   .createStatic(FormEditComponent, { i: { id: 0 } }) |     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||||
|     //   .subscribe(() => this.st.reload()); |     //   .subscribe(() => this.st.reload()); | ||||||
|   } |   } | ||||||
|  |   search() { | ||||||
|  |     this.st.load(1); | ||||||
|  |   } | ||||||
|  |   export() { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   initSF() { | ||||||
|  |     this.schema = { | ||||||
|  |       properties: { | ||||||
|  |         abnormalCause: { | ||||||
|  |           title: '订单号', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |         abnormalCause1: { | ||||||
|  |           title: '订单状态', | ||||||
|  |           type: 'string', | ||||||
|  |           default: '', | ||||||
|  |           enum: [ | ||||||
|  |             { | ||||||
|  |               label: '全部', | ||||||
|  |               value: '' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '个人', | ||||||
|  |               value: '1' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '企业', | ||||||
|  |               value: '2' | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           ui: { | ||||||
|  |             widget: 'select' | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |         abnormalCause2: { | ||||||
|  |           title: '开票状态', | ||||||
|  |           type: 'string', | ||||||
|  |           default: '', | ||||||
|  |           enum: [ | ||||||
|  |             { | ||||||
|  |               label: '全部', | ||||||
|  |               value: '' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '个人', | ||||||
|  |               value: '1' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '企业', | ||||||
|  |               value: '2' | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           ui: { | ||||||
|  |             widget: 'select' | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     this.ui = { | ||||||
|  |       '*': { spanLabelFixed: 100, grid: { span: 7, gutter: 4 } }, | ||||||
|  |     }; | ||||||
|  |   } | ||||||
|  |   /** | ||||||
|  |  * 初始化数据列表 | ||||||
|  |  */ | ||||||
|  |   initST() { | ||||||
|  |     this.columns = [ | ||||||
|  |       { title: '订单号', index: 'carNo', className: 'text-center', width: 150 }, | ||||||
|  |       { title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 }, | ||||||
|  |       { title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 }, | ||||||
|  |       { title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, | ||||||
|  |       { title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, | ||||||
|  |       { title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 }, | ||||||
|  |       { title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 }, | ||||||
|  |       { title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 }, | ||||||
|  |       { title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 }, | ||||||
|  |       { | ||||||
|  |         title: '操作', | ||||||
|  |         width: 150, | ||||||
|  |         buttons: [ | ||||||
|  |           { | ||||||
|  |             text: '查看订单详情', | ||||||
|  |             click: (_record) => this.viewOrderDetail(_record) | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |     ]; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   viewOrderDetail(record: any) { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |   goBack() { | ||||||
|  |     window.history.go(-1); | ||||||
|  |   } | ||||||
|  |  | ||||||
| } | } | ||||||
|  | |||||||
| @ -0,0 +1,49 @@ | |||||||
|  | <page-header-wrapper [title]="'客户明细'" [logo]="logo"> | ||||||
|  |   <ng-template #logo> | ||||||
|  |     <button nz-button nz-tooltip nzTooltipTitle="返回上一页" (click)="goBack()"> | ||||||
|  |       <i nz-icon nzType="left" nzTheme="outline"></i> | ||||||
|  |     </button> | ||||||
|  |   </ng-template> | ||||||
|  | </page-header-wrapper> | ||||||
|  | <nz-card> | ||||||
|  |   <div class="user-info border-1" nz-row> | ||||||
|  |     <div nz-col nzSpan="24" class="d-flex p-md"> | ||||||
|  |       <img class="user-logo" [src]="detailInfo?.logo" /> | ||||||
|  |       <div style="flex: 1;"> | ||||||
|  |         <div> | ||||||
|  |           <h3>{{detailInfo?.company}}</h3> | ||||||
|  |           <div class="mb-sm"> | ||||||
|  |             <span class="letf-box text-grey-dark">{{detailInfo?.code}}</span> | ||||||
|  |             <span class="mr-xs">{{detailInfo?.proxy}}</span> | ||||||
|  |           </div> | ||||||
|  |           <div> | ||||||
|  |             <span class="letf-box">添加时间:{{detailInfo?.createTime}}</span> | ||||||
|  |             <span c>所属城市:{{detailInfo?.belongCity}}</span> | ||||||
|  |           </div> | ||||||
|  |         </div> | ||||||
|  |       </div> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  |   <div class="mt-md" nzGutter="8" nz-row> | ||||||
|  |     <div nz-col [nzSpan]="_$expand ? 24 : 18"> | ||||||
|  |       <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" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||||
|  |         (click)="st?.load(1)">查询</button> | ||||||
|  |       <button nz-button (click)="resetSF()">重置</button> | ||||||
|  |       <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||||
|  |       <button nz-button nzType="link" (click)="expandToggle()"> | ||||||
|  |         {{ !_$expand ? '展开' : '收起' }} | ||||||
|  |         <i nz-icon [nzType]="!_$expand ? 'down' : 'up'"></i> | ||||||
|  |       </button> | ||||||
|  |     </div> | ||||||
|  |   </div> | ||||||
|  | </nz-card> | ||||||
|  | <nz-card> | ||||||
|  |  | ||||||
|  |   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{x:'1500px'}" | ||||||
|  |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|  |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|  |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500] }"></st> | ||||||
|  | </nz-card> | ||||||
| @ -0,0 +1,11 @@ | |||||||
|  | :host { | ||||||
|  |   .user-logo { | ||||||
|  |     width: 90px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   .letf-box { | ||||||
|  |     display: inline-block; | ||||||
|  |     width: 250px; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -0,0 +1,24 @@ | |||||||
|  | import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing'; | ||||||
|  | import { PartnerPartnerOrderDetailComponent } from './partner-order-detail.component'; | ||||||
|  |  | ||||||
|  | describe('PartnerPartnerOrderDetailComponent', () => { | ||||||
|  |   let component: PartnerPartnerOrderDetailComponent; | ||||||
|  |   let fixture: ComponentFixture<PartnerPartnerOrderDetailComponent>; | ||||||
|  |  | ||||||
|  |   beforeEach(waitForAsync(() => { | ||||||
|  |     TestBed.configureTestingModule({ | ||||||
|  |       declarations: [ PartnerPartnerOrderDetailComponent ] | ||||||
|  |     }) | ||||||
|  |     .compileComponents(); | ||||||
|  |   })); | ||||||
|  |  | ||||||
|  |   beforeEach(() => { | ||||||
|  |     fixture = TestBed.createComponent(PartnerPartnerOrderDetailComponent); | ||||||
|  |     component = fixture.componentInstance; | ||||||
|  |     fixture.detectChanges(); | ||||||
|  |   }); | ||||||
|  |  | ||||||
|  |   it('should create', () => { | ||||||
|  |     expect(component).toBeTruthy(); | ||||||
|  |   }); | ||||||
|  | }); | ||||||
| @ -0,0 +1,174 @@ | |||||||
|  | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
|  | import { STColumn, STComponent } from '@delon/abc/st'; | ||||||
|  | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
|  | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
|  | import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; | ||||||
|  |  | ||||||
|  | @Component({ | ||||||
|  |   selector: 'app-partner-partner-order-detail', | ||||||
|  |   templateUrl: './partner-order-detail.component.html', | ||||||
|  |   styleUrls: ['./partner-order-detail.component.less'] | ||||||
|  | }) | ||||||
|  | export class PartnerPartnerOrderDetailComponent implements OnInit { | ||||||
|  |   schema: SFSchema = {}; | ||||||
|  |   ui!: SFUISchema; | ||||||
|  |   detailInfo: any = { | ||||||
|  |     logo: './assets/images/user/logo.svg', | ||||||
|  |     company: '张三', | ||||||
|  |     code: '91440300357887492H', | ||||||
|  |     proxy: '企业合伙人', | ||||||
|  |     belongCity: '深圳、上海、北京', | ||||||
|  |     createTime: '2021-09-23 14:43:31' | ||||||
|  |   } | ||||||
|  |   @ViewChild('st') private readonly st!: STComponent; | ||||||
|  |   @ViewChild('sf') private readonly sf!: SFComponent; | ||||||
|  |   columns: STColumn[] = []; | ||||||
|  |   _$expand = false; | ||||||
|  |  | ||||||
|  |   constructor(public service: BussinessStatisticsService) { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   get reqParams() { | ||||||
|  |     return { ...this.sf?.value }; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   ngOnInit(): void { | ||||||
|  |     this.initST(); | ||||||
|  |     this.initSF(); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   resetSF() { | ||||||
|  |     this._$expand = false; | ||||||
|  |     this.sf.reset(); | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.st.reset(); | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  |   /** | ||||||
|  | * 伸缩查询条件 | ||||||
|  | */ | ||||||
|  |   expandToggle() { | ||||||
|  |     this._$expand = !this._$expand; | ||||||
|  |     this.sf?.setValue('/_$expand', this._$expand); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   add(): void { | ||||||
|  |     // this.modal | ||||||
|  |     //   .createStatic(FormEditComponent, { i: { id: 0 } }) | ||||||
|  |     //   .subscribe(() => this.st.reload()); | ||||||
|  |   } | ||||||
|  |   search() { | ||||||
|  |     this.st.load(1); | ||||||
|  |   } | ||||||
|  |   export() { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   initSF() { | ||||||
|  |     this.schema = { | ||||||
|  |       properties: { | ||||||
|  |         _$expand: { type: 'boolean', ui: { hidden: true } }, | ||||||
|  |         abnormalCause: { | ||||||
|  |           title: '订单号', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |         abnormalCause1: { | ||||||
|  |           title: '订单状态', | ||||||
|  |           type: 'string', | ||||||
|  |           default: '', | ||||||
|  |           enum: [ | ||||||
|  |             { | ||||||
|  |               label: '全部', | ||||||
|  |               value: '' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '个人', | ||||||
|  |               value: '1' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '企业', | ||||||
|  |               value: '2' | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           ui: { | ||||||
|  |             widget: 'select' | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |         abnormalCause2: { | ||||||
|  |           title: '开票状态', | ||||||
|  |           type: 'string', | ||||||
|  |           default: '', | ||||||
|  |           enum: [ | ||||||
|  |             { | ||||||
|  |               label: '全部', | ||||||
|  |               value: '' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '个人', | ||||||
|  |               value: '1' | ||||||
|  |             }, | ||||||
|  |             { | ||||||
|  |               label: '企业', | ||||||
|  |               value: '2' | ||||||
|  |             } | ||||||
|  |           ], | ||||||
|  |           ui: { | ||||||
|  |             widget: 'select' | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |         abnormalCause3: { | ||||||
|  |           title: '客户名称', | ||||||
|  |           type: 'string', | ||||||
|  |           ui: { | ||||||
|  |             placeholder: '请输入', | ||||||
|  |             visibleIf: { | ||||||
|  |               _$expand: (value: boolean) => value, | ||||||
|  |             }, | ||||||
|  |           }, | ||||||
|  |         }, | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |     this.ui = { | ||||||
|  |       '*': { spanLabelFixed: 100, grid: { span: 8, gutter: 4 } }, | ||||||
|  |     }; | ||||||
|  |   } | ||||||
|  |   /** | ||||||
|  |  * 初始化数据列表 | ||||||
|  |  */ | ||||||
|  |   initST() { | ||||||
|  |     this.columns = [ | ||||||
|  |       { title: '订单号', index: 'carNo', className: 'text-center', width: 150 }, | ||||||
|  |       { title: '订单状态', render: 'carModelLabel', className: 'text-center', width: 120 }, | ||||||
|  |       { title: '订单金额(元)', index: 'carNo', className: 'text-center', width: 200 }, | ||||||
|  |       { title: '实际付款金额(元)', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, | ||||||
|  |       { title: '客户附加费率', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, | ||||||
|  |       { title: '预估收益(元)', render: 'approvalStatus1', className: 'text-center', sort: true, width: 120 }, | ||||||
|  |       { title: '开票状态', render: 'approvalStatus2', className: 'text-center', sort: true, width: 180 }, | ||||||
|  |       { title: '开票金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true, width: 180 }, | ||||||
|  |       { title: '下单时间', index: 'approvalStatus5', className: 'text-right', sort: true, type: 'currency', width: 180 }, | ||||||
|  |       { | ||||||
|  |         title: '操作', | ||||||
|  |         width: 150, | ||||||
|  |         buttons: [ | ||||||
|  |           { | ||||||
|  |             text: '查看订单详情', | ||||||
|  |             click: (_record) => this.viewOrderDetail(_record) | ||||||
|  |           } | ||||||
|  |         ] | ||||||
|  |       }, | ||||||
|  |     ]; | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   viewOrderDetail(record: any) { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |   goBack() { | ||||||
|  |     window.history.go(-1); | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | } | ||||||
| @ -1,17 +1,28 @@ | |||||||
| <nz-card> | <nz-card> | ||||||
|   <sf mode="search" [schema]="schema" [ui]="ui" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf></sf> |   <sf mode="search" [schema]="schema" [ui]="ui" [button]="'none'" (formSubmit)="st.load(1)" (formReset)="resetSF()" #sf> | ||||||
|  |     <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||||
|  |       (click)="st?.load(1)">查询</button> | ||||||
|  |     <button nz-button (click)="resetSF()">重置</button> | ||||||
|  |     <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||||
|  |   </sf> | ||||||
|  |  | ||||||
| </nz-card> | </nz-card> | ||||||
| <nz-card> | <nz-card> | ||||||
|   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns"> |   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }" | ||||||
|  |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|  |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|  |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||||
|  |     [loading]="service.http.loading"> | ||||||
|     <ng-template st-row="approvalStatus" let-item> |     <ng-template st-row="approvalStatus" let-item> | ||||||
|       <a [routerLink]="'/partner/business-statistics/partner-custom/detail/'+item?.id">{{item.yskmoney}}</a> |       <a [routerLink]="'/partner/business-statistics/partner/custom-detail/'+item?.id">{{item.yskmoney}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="approvalStatus1" let-item> |     <ng-template st-row="approvalStatus1" let-item> | ||||||
|       <div class="text-right">{{item.approvalStatus1 | currency:' '}}</div> |       <div class="text-right">{{item.approvalStatus1 | currency:' '}}</div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="approvalStatus2" let-item> |     <ng-template st-row="approvalStatus2" let-item> | ||||||
|       <a class="text-right text-blue-dark">{{item.yskmoney | currency:' '}}</a> |       <a class="text-right text-blue-dark" | ||||||
|  |         [routerLink]="'/partner/business-statistics/partner/order-detail/'+item?.id">{{item.yskmoney | currency:' | ||||||
|  |         '}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|  |  | ||||||
|     <ng-template st-row="approvalStatus3" let-item> |     <ng-template st-row="approvalStatus3" let-item> | ||||||
|  | |||||||
| @ -17,6 +17,13 @@ export class PartnerPartnerStatisticsComponent implements OnInit { | |||||||
|   columns: STColumn[] = []; |   columns: STColumn[] = []; | ||||||
|  |  | ||||||
|   constructor(public service: BussinessStatisticsService) { } |   constructor(public service: BussinessStatisticsService) { } | ||||||
|  |   /** | ||||||
|  |    * 查询参数 | ||||||
|  |    */ | ||||||
|  |   get reqParams() { | ||||||
|  |     const params = { ...this.sf?.value }; | ||||||
|  |     return params | ||||||
|  |   } | ||||||
|  |  | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
| @ -64,21 +71,27 @@ export class PartnerPartnerStatisticsComponent implements OnInit { | |||||||
|  */ |  */ | ||||||
|   initST() { |   initST() { | ||||||
|     this.columns = [ |     this.columns = [ | ||||||
|       { title: '合伙人名称', index: 'carNo', className: 'text-center' }, |       { title: '合伙人名称', index: 'carNo', className: 'text-center', width: 150 }, | ||||||
|       { title: '类型', render: 'carModelLabel', className: 'text-center' }, |       { title: '类型', render: 'carModelLabel', className: 'text-center', width: 150 }, | ||||||
|       { title: '注册时间', index: 'carNo', className: 'text-center' }, |       { title: '注册时间', index: 'carNo', className: 'text-center', width: 150 }, | ||||||
|       { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true }, |       { title: '本月新增客户', render: 'approvalStatus0', className: 'text-center', sort: true, width: 150 }, | ||||||
|       { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, |       { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true, width: 150 }, | ||||||
|       { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-center', sort: true }, |       { title: '本月已结算金额(元)', render: 'approvalStatus1', className: 'text-right', sort: true, width: 180 }, | ||||||
|       { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, |       { title: '累计已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true, width: 180 }, | ||||||
|       { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, |       { title: '本月预估收益(元)', render: 'approvalStatus3', className: 'text-right', sort: true, width: 180 }, | ||||||
|       { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-center', sort: true }, |       { title: '累计收益(元)', render: 'approvalStatus4', className: 'text-right', sort: true, width: 180 }, | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   resetSF() { |   resetSF() { | ||||||
|     this.sf.reset(); |     this.sf.reset(); | ||||||
|  |     setTimeout(() => { | ||||||
|       this.st.reset(); |       this.st.reset(); | ||||||
|  |     }) | ||||||
|  |   } | ||||||
|  |  | ||||||
|  |   export() { | ||||||
|  |  | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|  | |||||||
| @ -1,11 +1,20 @@ | |||||||
| <nz-card> | <nz-card> | ||||||
|   <sf mode="search" [schema]="schema" (formSubmit)="st.load(1)" (formReset)="st.reset($event)"></sf> |   <sf mode="search" [schema]="schema" [button]="'none'" #sf> | ||||||
|  |     <button nz-button nzType="primary" [disabled]="!sf.valid" [nzLoading]="service.http.loading" | ||||||
|  |       (click)="st?.load(1)">查询</button> | ||||||
|  |     <button nz-button (click)="resetSF()">重置</button> | ||||||
|  |     <button nz-button (click)="export()" nzType="primary" nzGhost>导出</button> | ||||||
|  |   </sf> | ||||||
|  |  | ||||||
| </nz-card> | </nz-card> | ||||||
| <nz-card> | <nz-card> | ||||||
|   <st #st [data]="url" [columns]="columns"> |   <st #st [data]="service.$api_get_partner_statistics_page" [columns]="columns" [scroll]="{ x: '1200px' }" | ||||||
|  |     [req]="{ method: 'POST', allInBody: true, reName: { pi: 'pageIndex', ps: 'pageSize' }, params: reqParams }" | ||||||
|  |     [res]="{ reName: { list: 'data.records', total: 'data.total' } }" | ||||||
|  |     [page]="{ show: true, showSize: true, pageSizes: [10, 20, 30, 50, 100, 200, 300, 500, 1000] }" | ||||||
|  |     [loading]="service.http.loading"> | ||||||
|     <ng-template st-row="approvalStatus" let-item> |     <ng-template st-row="approvalStatus" let-item> | ||||||
|       <a [routerLink]="'/'">{{item.approvalStatus}}</a> |       <a [routerLink]="'/'">{{item.yskmoney | currency:' ':false:'1.0-2'}}</a> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|     <ng-template st-row="approvalStatus1" let-item> |     <ng-template st-row="approvalStatus1" let-item> | ||||||
|       <div>{{item.approvalStatus1 | currency:' '}}</div> |       <div>{{item.approvalStatus1 | currency:' '}}</div> | ||||||
| @ -15,7 +24,7 @@ | |||||||
|     </ng-template> |     </ng-template> | ||||||
|  |  | ||||||
|     <ng-template st-row="approvalStatus3" let-item> |     <ng-template st-row="approvalStatus3" let-item> | ||||||
|       <div class="text-right">{{item.approvalStatus1 | currency:' '}}</div> |       <div class="text-right">{{item.yskmoney | currency:' '}}</div> | ||||||
|     </ng-template> |     </ng-template> | ||||||
|   </st> |   </st> | ||||||
| </nz-card> | </nz-card> | ||||||
|  | |||||||
| @ -1,7 +1,8 @@ | |||||||
| import { Component, OnInit, ViewChild } from '@angular/core'; | import { Component, OnInit, ViewChild } from '@angular/core'; | ||||||
| import { STColumn, STComponent } from '@delon/abc/st'; | import { STColumn, STComponent } from '@delon/abc/st'; | ||||||
| import { SFSchema, SFUISchema } from '@delon/form'; | import { SFComponent, SFSchema, SFUISchema } from '@delon/form'; | ||||||
| import { ModalHelper, _HttpClient } from '@delon/theme'; | import { ModalHelper, _HttpClient } from '@delon/theme'; | ||||||
|  | import { BussinessStatisticsService } from '../../services/bussiness-statistics.service'; | ||||||
|  |  | ||||||
| @Component({ | @Component({ | ||||||
|   selector: 'app-partner-sale-statistics', |   selector: 'app-partner-sale-statistics', | ||||||
| @ -11,11 +12,19 @@ export class PartnerSaleStatisticsComponent implements OnInit { | |||||||
|   url = `/user`; |   url = `/user`; | ||||||
|   schema!: SFSchema; |   schema!: SFSchema; | ||||||
|   @ViewChild('st') private readonly st!: STComponent; |   @ViewChild('st') private readonly st!: STComponent; | ||||||
|  |   @ViewChild('sf') private readonly sf!: SFComponent; | ||||||
|   columns: STColumn[] = []; |   columns: STColumn[] = []; | ||||||
|   ui!: SFUISchema; |   ui!: SFUISchema; | ||||||
|  |  | ||||||
|   constructor(private http: _HttpClient, private modal: ModalHelper) { } |   constructor(public service: BussinessStatisticsService) { } | ||||||
|  |  | ||||||
|  |   /** | ||||||
|  |   * 查询参数 | ||||||
|  |   */ | ||||||
|  |   get reqParams() { | ||||||
|  |     const params = { ...this.sf?.value }; | ||||||
|  |     return params | ||||||
|  |   } | ||||||
|   ngOnInit(): void { |   ngOnInit(): void { | ||||||
|     this.initSF(); |     this.initSF(); | ||||||
|     this.initST(); |     this.initST(); | ||||||
| @ -47,16 +56,24 @@ export class PartnerSaleStatisticsComponent implements OnInit { | |||||||
|  */ |  */ | ||||||
|   initST() { |   initST() { | ||||||
|     this.columns = [ |     this.columns = [ | ||||||
|       { title: '姓名', index: 'carNo', className: 'text-center' }, |       { title: '联系人', index: 'carNo', className: 'text-center' }, | ||||||
|       { title: '手机号', render: 'carModelLabel', className: 'text-center' }, |       { title: '手机号', render: 'carModelLabel', className: 'text-center' }, | ||||||
|       { title: '添加时间', index: 'carNo', className: 'text-center' }, |       { title: '添加时间', index: 'carNo', className: 'text-center' }, | ||||||
|       { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, |       { title: '本月新增客户', render: 'approvalStatus', className: 'text-center', sort: true }, | ||||||
|       { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, |       { title: '客户总数', render: 'approvalStatus', className: 'text-center', sort: true }, | ||||||
|       { title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true }, |       { title: '本月新增合伙人', render: 'approvalStatus1', className: 'text-center', sort: true }, | ||||||
|       { title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true }, |       { title: '合伙人总数', render: 'approvalStatus1', className: 'text-center', sort: true }, | ||||||
|       { title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-center', sort: true }, |       { title: '本月已结算金额(元)', render: 'approvalStatus2', className: 'text-right', sort: true }, | ||||||
|       { title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-center', sort: true }, |       { title: '累计已结算金额(元)', render: 'approvalStatus3', className: 'text-right', sort: true }, | ||||||
|     ]; |     ]; | ||||||
|   } |   } | ||||||
|  |   export() { | ||||||
|  |  | ||||||
|  |   } | ||||||
|  |   resetSF() { | ||||||
|  |     this.sf.reset(); | ||||||
|  |     setTimeout(() => { | ||||||
|  |       this.st.reset(); | ||||||
|  |     }) | ||||||
|  |   } | ||||||
| } | } | ||||||
|  | |||||||
| @ -20,6 +20,7 @@ import { ParterLevelConfigListComponent } from './level-config/components/list/l | |||||||
| import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; | import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; | ||||||
| import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; | import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; | ||||||
| import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | ||||||
|  | import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; | ||||||
|  |  | ||||||
| const routes: Routes = [ | const routes: Routes = [ | ||||||
|   { |   { | ||||||
| @ -27,7 +28,7 @@ const routes: Routes = [ | |||||||
|     children: [ |     children: [ | ||||||
|       { path: '', redirectTo: 'index' }, |       { path: '', redirectTo: 'index' }, | ||||||
|       { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, |       { path: 'index', component: PartnerBusinessStatisticsIndexComponent }, | ||||||
|       { path: 'partner/order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, |       { path: 'partner/order-detail/:id', component: PartnerPartnerOrderDetailComponent }, | ||||||
|       { path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent }, |       { path: 'partner/custom-detail/:id', component: PartnerPartnerCustomDetailComponent }, | ||||||
|       { path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, |       { path: 'partner/custom-order-detail/:id', component: PartnerPartnerCustomOrderDetailComponent }, | ||||||
|       { path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent }, |       { path: 'sale/custom-detail/:id', component: PartnerSaleCustomDetailComponent }, | ||||||
| @ -55,7 +56,8 @@ const routes: Routes = [ | |||||||
|     children: [ |     children: [ | ||||||
|       { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, |       { path: 'particulars', component: ParterRebateManageMentParticularsComponent }, | ||||||
|     ] |     ] | ||||||
|   }]; |   }, | ||||||
|  | ]; | ||||||
| @NgModule({ | @NgModule({ | ||||||
|   imports: [RouterModule.forChild(routes)], |   imports: [RouterModule.forChild(routes)], | ||||||
|   exports: [RouterModule] |   exports: [RouterModule] | ||||||
|  | |||||||
| @ -14,6 +14,7 @@ import { PartnerPartnerCustomDetailComponent } from './business-statistics/compo | |||||||
| import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; | import { ParterRebateManageMentParticularsComponent } from './rebate-management/components/list/particulars.component'; | ||||||
| import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; | import { PartnerSalePartnerDetailComponent } from './business-statistics/components/sale-partner-detail/sale-partner-detail.component'; | ||||||
| import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | import { PartnerPartnerCustomOrderDetailComponent } from './business-statistics/components/partner-custom-order-detail/partner-custom-order-detail.component'; | ||||||
|  | import { PartnerPartnerOrderDetailComponent } from './business-statistics/components/partner-order-detail/partner-order-detail.component'; | ||||||
|  |  | ||||||
| const COMPONENTS: any[] = [ | const COMPONENTS: any[] = [ | ||||||
|   PartnerBusinessStatisticsIndexComponent, |   PartnerBusinessStatisticsIndexComponent, | ||||||
| @ -29,7 +30,8 @@ const COMPONENTS: any[] = [ | |||||||
|   ParterRebateManageMentParticularsComponent, |   ParterRebateManageMentParticularsComponent, | ||||||
|   PartnerSalePartnerDetailComponent, |   PartnerSalePartnerDetailComponent, | ||||||
|   PartnerPartnerCustomOrderDetailComponent |   PartnerPartnerCustomOrderDetailComponent | ||||||
| ]; | , | ||||||
|  |   PartnerPartnerOrderDetailComponent]; | ||||||
|  |  | ||||||
| @NgModule({ | @NgModule({ | ||||||
|   declarations: [...COMPONENTS], |   declarations: [...COMPONENTS], | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user