袁野 1 month ago
parent 960ecb1034
commit 47ee086aae
  1. 5
      src/app/app.routes.ts
  2. 81
      src/app/pages/settlement/detail/detail.component.html
  3. 7
      src/app/pages/settlement/detail/detail.component.less
  4. 151
      src/app/pages/settlement/detail/detail.component.ts
  5. 71
      src/app/pages/settlement/list/list.component.html
  6. 7
      src/app/pages/settlement/list/list.component.less
  7. 157
      src/app/pages/settlement/list/list.component.ts
  8. 12
      src/app/pages/settlement/settlement.module.ts
  9. 10
      src/app/pages/settlement/settlement.routes.ts
  10. 69
      src/app/pages/settlement/sum/sum.component.html
  11. 7
      src/app/pages/settlement/sum/sum.component.less
  12. 153
      src/app/pages/settlement/sum/sum.component.ts
  13. 1
      src/app/pages/trade/meituan/meituan-list.component.html
  14. 63
      src/app/services/settlement/settlement.service.ts

@ -56,6 +56,11 @@ export const routes: Routes = [
loadChildren: () => import('./pages/audit/audit.routes').then(m => m.AUDIT_ROUTES), loadChildren: () => import('./pages/audit/audit.routes').then(m => m.AUDIT_ROUTES),
canActivate: [InitGuardService] canActivate: [InitGuardService]
}, },
{
path: 'settlement',
loadChildren: () => import('./pages/settlement/settlement.routes').then(m => m.SETTLEMENT_ROUTES),
canActivate: [InitGuardService]
},
] ]
}, },

@ -0,0 +1,81 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6" *ngIf="objectType == 1">
<nz-form-item>
<nz-form-label>商户</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="merId">
<nz-option *ngFor="let item of merData" nzLabel="{{item['merName']}}" nzValue="{{item['id']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" *ngIf="platform == null">
<nz-form-item>
<nz-form-label>平台</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="platform">
<nz-option *ngFor="let item of platformCode" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="payType">
<nz-option *ngFor="let item of orderPayType" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>结算时间区间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="finishTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="searchForm.reset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="getExport()">导出结算详情</button>
</div>
</div>
</form>
<nz-table #basicTable [nzBordered]="true" [nzLoading] ="tableData.loading" [nzData]="tableData.list" >
<thead>
<tr>
<th>商品名称</th>
<th>商户名称</th>
<th>业务类型</th>
<th>登录平台</th>
<th>订单号</th>
<th>子订单号</th>
<th>业务信息</th>
<th>支付金额</th>
<th>支付方式</th>
<th>收货时间</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.goodsName}}</td>
<td>{{data.merName}}</td>
<td>{{data.businessType}}</td>
<td>{{data.platform}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.childOrderNo}}</td>
<td>{{data.business}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{data.payType}}</td>
<td>{{data.finishTime}}</td>
</tr>
</tbody>
</nz-table>

@ -0,0 +1,7 @@
.search-area {
margin-top: 20px;
margin-bottom: 10px;
}
.search-area button {
margin-right: 14px;
}

@ -0,0 +1,151 @@
import { Component } from '@angular/core';
import {NgForOf, NgIf} from "@angular/common";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {NzMessageService} from "ng-zorro-antd/message";
import {orderPayType, platformCode} from "../../../data/goods/goods.namespace";
import {DATA} from "../../../data/login/localStorage.namespace";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {DateUtils} from "../../../utils/dateUtils.service";
import {SettlementService} from "../../../services/settlement/settlement.service";
import {NzTableComponent, NzTableModule} from "ng-zorro-antd/table";
import {MerService} from "../../../services/merchant/mer.service";
import {CommunicationService} from "../../../services/common/communication.service";
@Component({
selector: 'app-detail',
standalone: true,
imports: [
NgForOf,
NzButtonComponent,
NzColDirective,
NzDatePickerComponent,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
NzOptionComponent,
NzRadioButtonDirective,
NzTableModule,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
NzRowDirective,
NzSelectComponent,
ReactiveFormsModule,
NgIf,
NzTableComponent
],
templateUrl: './detail.component.html',
styleUrl: './detail.component.less'
})
export class DetailComponent {
protected readonly orderPayType = orderPayType;
protected readonly platformCode = platformCode;
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
merData: any;
objectType: any;
platform = this.storage.get(DATA)['account']['platformCode'];
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private merService: MerService,
private communicationService: CommunicationService,
private settlement: SettlementService,
private storage: BrowserStorageService,) {
// 初始化搜索框
this.searchForm = this.fb.group({
platform: [''],
merId: [''],
finishTimeArray: [[]],
finishTimeS: [''],
finishTimeE: [''],
payType: [''],
});
this.objectType = this.storage.get(DATA)['account']['objectType'];
this.getRequest();
this.merList();
}
// 查询商户
public merList() {
let params: any = {
pageNum: 1,
pageSize: 1000,
time: new Date().getTime(),
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data']['list'];
}
});
}
// 查询列表
public getRequest(reset: boolean = false) {
if (this.searchForm.controls['finishTimeArray'].value != null
&& this.searchForm.controls['finishTimeArray'].value.length > 0) {
this.searchForm.controls['finishTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[0]) , 1).getTime());
this.searchForm.controls['finishTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[1]) , 2).getTime());
} else {
this.searchForm.controls['finishTimeS'].setValue(null)
this.searchForm.controls['finishTimeE'].setValue(null)
}
if (this.platform != null) {
this.searchForm.controls['platform'].setValue(this.platform)
}
this.tableData.loading = true;
if (reset) {
this.tablePageNum = 1;
}
this.searchForm.value.time = new Date().getTime();
this.settlement.settlementDetail(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.tableData.list = data['return_data'];
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
// 重制
public reset() {
this.searchForm.reset();
this.getRequest();
}
// 订单导出
public getExport() {
this.searchForm.value.time = new Date().getTime();
this.settlement.exportSettlementDetail(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.communicationService.sendMessage(data['return_data']);
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
}

@ -0,0 +1,71 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6" *ngIf="objectType == 1">
<nz-form-item>
<nz-form-label>商户</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="merId">
<nz-option *ngFor="let item of merData" nzLabel="{{item['merName']}}" nzValue="{{item['id']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" *ngIf="platform == null">
<nz-form-item>
<nz-form-label>平台</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="platform">
<nz-option *ngFor="let item of platformCode" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="payType">
<nz-option *ngFor="let item of orderPayType" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>结算时间区间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="finishTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="searchForm.reset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="getExport()">导出</button>
</div>
</div>
</form>
<nz-table #basicTable [nzBordered]="true" [nzLoading] ="tableData.loading" [nzData]="tableData.list" >
<thead>
<tr>
<th>商户名称</th>
<th>支付方式</th>
<th>业务类型</th>
<th>结算日期</th>
<th>结算日期</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.merName}}</td>
<td>{{data.payType}}</td>
<td>{{data.businessType}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{data.time}}</td>
</tr>
</tbody>
</nz-table>

@ -0,0 +1,7 @@
.search-area {
margin-top: 20px;
margin-bottom: 10px;
}
.search-area button {
margin-right: 14px;
}

@ -0,0 +1,157 @@
import { Component } from '@angular/core';
import {NgForOf, NgIf} from "@angular/common";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {
NzTableCellDirective,
NzTableComponent, NzTableModule,
NzTbodyComponent,
NzTheadComponent,
NzThMeasureDirective, NzTrDirective
} from "ng-zorro-antd/table";
import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {DATA} from "../../../data/login/localStorage.namespace";
import {NzMessageService} from "ng-zorro-antd/message";
import {MerService} from "../../../services/merchant/mer.service";
import {CommunicationService} from "../../../services/common/communication.service";
import {SettlementService} from "../../../services/settlement/settlement.service";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {DateUtils} from "../../../utils/dateUtils.service";
import {orderPayType, platformCode} from "../../../data/goods/goods.namespace";
@Component({
selector: 'app-list',
standalone: true,
imports: [
NgForOf,
NgIf,
NzButtonComponent,
NzColDirective,
NzDatePickerComponent,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzOptionComponent,
NzRangePickerComponent,
NzRowDirective,
NzTableModule,
NzSelectComponent,
NzTableCellDirective,
NzTableComponent,
NzTbodyComponent,
NzThMeasureDirective,
NzTheadComponent,
NzTrDirective,
ReactiveFormsModule
],
templateUrl: './list.component.html',
styleUrl: './list.component.less'
})
export class ListComponent {
protected readonly orderPayType = orderPayType;
protected readonly platformCode = platformCode;
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
merData: any;
objectType: any;
platform = this.storage.get(DATA)['account']['platformCode'];
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private merService: MerService,
private communicationService: CommunicationService,
private settlement: SettlementService,
private storage: BrowserStorageService,) {
// 初始化搜索框
this.searchForm = this.fb.group({
platform: [''],
merId: [''],
finishTimeArray: [[]],
finishTimeS: [''],
finishTimeE: [''],
payType: [''],
});
this.objectType = this.storage.get(DATA)['account']['objectType'];
this.getRequest();
this.merList();
}
// 查询商户
public merList() {
let params: any = {
pageNum: 1,
pageSize: 1000,
time: new Date().getTime(),
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data']['list'];
}
});
}
// 查询列表
public getRequest(reset: boolean = false) {
if (this.searchForm.controls['finishTimeArray'].value != null
&& this.searchForm.controls['finishTimeArray'].value.length > 0) {
this.searchForm.controls['finishTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[0]) , 1).getTime());
this.searchForm.controls['finishTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[1]) , 2).getTime());
} else {
this.searchForm.controls['finishTimeS'].setValue(null)
this.searchForm.controls['finishTimeE'].setValue(null)
}
if (this.platform != null) {
this.searchForm.controls['platform'].setValue(this.platform)
}
this.tableData.loading = true;
if (reset) {
this.tablePageNum = 1;
}
this.searchForm.value.time = new Date().getTime();
this.settlement.getSettlement(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.tableData.list = data['return_data'];
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
// 重制
public reset() {
this.searchForm.reset();
this.getRequest();
}
// 订单导出
public getExport() {
this.searchForm.value.time = new Date().getTime();
this.settlement.exportSettlement(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.communicationService.sendMessage(data['return_data']);
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
}

@ -0,0 +1,12 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
@NgModule({
declarations: [],
imports: [
CommonModule
]
})
export class SettlementModule { }

@ -0,0 +1,10 @@
import { Routes } from '@angular/router';
import {DetailComponent} from "./detail/detail.component";
import {ListComponent} from "./list/list.component";
import {SumComponent} from "./sum/sum.component";
export const SETTLEMENT_ROUTES: Routes = [
{ path: 'detail', component: DetailComponent},
{ path: 'list', component: ListComponent},
{ path: 'sum', component: SumComponent},
];

@ -0,0 +1,69 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6" *ngIf="objectType == 1">
<nz-form-item>
<nz-form-label>商户</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="merId">
<nz-option *ngFor="let item of merData" nzLabel="{{item['merName']}}" nzValue="{{item['id']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" *ngIf="platform == null">
<nz-form-item>
<nz-form-label>平台</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="platform">
<nz-option *ngFor="let item of platformCode" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="payType">
<nz-option *ngFor="let item of orderPayType" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>结算时间区间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="finishTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="searchForm.reset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="getExport()">导出</button>
</div>
</div>
</form>
<nz-table #basicTable [nzBordered]="true" [nzLoading] ="tableData.loading" [nzData]="tableData.list" >
<thead>
<tr>
<th>业务类型</th>
<th>支付方式</th>
<th>支付金额</th>
<th>结算日期</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.businessType}}</td>
<td>{{data.payType}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{data.time}}</td>
</tr>
</tbody>
</nz-table>

@ -0,0 +1,7 @@
.search-area {
margin-top: 20px;
margin-bottom: 10px;
}
.search-area button {
margin-right: 14px;
}

@ -0,0 +1,153 @@
import { Component } from '@angular/core';
import {NgForOf, NgIf} from "@angular/common";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {
NzTableComponent, NzTableModule,
} from "ng-zorro-antd/table";
import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {DATA} from "../../../data/login/localStorage.namespace";
import {NzMessageService} from "ng-zorro-antd/message";
import {MerService} from "../../../services/merchant/mer.service";
import {CommunicationService} from "../../../services/common/communication.service";
import {SettlementService} from "../../../services/settlement/settlement.service";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {DateUtils} from "../../../utils/dateUtils.service";
import {NzInputDirective} from "ng-zorro-antd/input";
import {orderPayType, platformCode} from "../../../data/goods/goods.namespace";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
@Component({
selector: 'app-sum',
standalone: true,
imports: [
NgForOf,
NzButtonComponent,
NzColDirective,
NzDatePickerComponent,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
NzOptionComponent,
NzRadioButtonDirective,
NzTableModule,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
NzRowDirective,
NzSelectComponent,
ReactiveFormsModule,
NgIf,
NzTableComponent
],
templateUrl: './sum.component.html',
styleUrl: './sum.component.less'
})
export class SumComponent {
protected readonly orderPayType = orderPayType;
protected readonly platformCode = platformCode;
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
loading: false,
list: [],
};
// 搜索表单
searchForm: FormGroup;
merData: any;
objectType: any;
platform = this.storage.get(DATA)['account']['platformCode'];
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private merService: MerService,
private communicationService: CommunicationService,
private settlement: SettlementService,
private storage: BrowserStorageService,) {
// 初始化搜索框
this.searchForm = this.fb.group({
platform: [''],
merId: [''],
finishTimeArray: [[]],
finishTimeS: [''],
finishTimeE: [''],
payType: [''],
});
this.objectType = this.storage.get(DATA)['account']['objectType'];
this.getRequest();
this.merList();
}
// 查询商户
public merList() {
let params: any = {
pageNum: 1,
pageSize: 1000,
time: new Date().getTime(),
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data']['list'];
}
});
}
// 查询列表
public getRequest(reset: boolean = false) {
if (this.searchForm.controls['finishTimeArray'].value != null
&& this.searchForm.controls['finishTimeArray'].value.length > 0) {
this.searchForm.controls['finishTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[0]) , 1).getTime());
this.searchForm.controls['finishTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['finishTimeArray'].value[1]) , 2).getTime());
} else {
this.searchForm.controls['finishTimeS'].setValue(null)
this.searchForm.controls['finishTimeE'].setValue(null)
}
if (this.platform != null) {
this.searchForm.controls['platform'].setValue(this.platform)
}
this.tableData.loading = true;
if (reset) {
this.tablePageNum = 1;
}
this.searchForm.value.time = new Date().getTime();
this.settlement.getSum(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.tableData.list = data['return_data'];
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
// 重制
public reset() {
this.searchForm.reset();
this.getRequest();
}
// 订单导出
public getExport() {
this.searchForm.value.time = new Date().getTime();
this.settlement.exportSettlementSum(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.communicationService.sendMessage(data['return_data']);
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
}

@ -134,6 +134,7 @@
</td> </td>
<td nzRight> <td nzRight>
<a (click)="showDetail(data)">详情</a> <a (click)="showDetail(data)">详情</a>
</td>
</tr> </tr>
</tbody> </tbody>
<ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template> <ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template>

@ -0,0 +1,63 @@
import { Injectable } from '@angular/core';
import {environment} from "../../../environments/environment";
import {ObjectData} from "../../utils/objectData.service";
import {HttpClient} from "@angular/common/http";
@Injectable({
providedIn: 'root'
})
export class SettlementService {
constructor(private http: HttpClient) { }
public settlementDetail(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/settlementDetail?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public exportSettlementDetail(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/exportSettlementDetail?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
public getSettlement(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/getSettlement?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public exportSettlement(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/exportSettlement?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
public getSum(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/getSum?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public exportSettlementSum(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'settlement/exportSettlementSum?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
}
Loading…
Cancel
Save