账户管理
This commit is contained in:
		@ -11,17 +11,17 @@
 | 
			
		||||
      <b class="text-md ">{{headerTotalInfo?.ltdName}}</b>
 | 
			
		||||
    </sv>
 | 
			
		||||
    <sv label="可用余额">
 | 
			
		||||
      {{headerTotalInfo?.balance |currency}}
 | 
			
		||||
      {{headerTotalInfo?.allAmount |currency}}
 | 
			
		||||
    </sv>
 | 
			
		||||
    <sv label="收入金额">
 | 
			
		||||
      {{headerTotalInfo?.income |currency}}
 | 
			
		||||
      {{headerTotalInfo?.incomeAmount |currency}}
 | 
			
		||||
    </sv>
 | 
			
		||||
    <sv label="支出金额">
 | 
			
		||||
      {{headerTotalInfo?.spending |currency}}
 | 
			
		||||
      {{headerTotalInfo?.payAmount |currency}}
 | 
			
		||||
    </sv>
 | 
			
		||||
  </sv-container>
 | 
			
		||||
  <ng-template #labelTpl>
 | 
			
		||||
    <b class="text-md" style="color: black;">{{headerTotalInfo?.name}} {{headerTotalInfo?.phone}}</b>
 | 
			
		||||
    <b class="text-md" style="color: black;">{{headerTotalInfo?.name}}   {{headerTotalInfo?.phone}}</b>
 | 
			
		||||
  </ng-template>
 | 
			
		||||
</nz-card>
 | 
			
		||||
<nz-card>
 | 
			
		||||
@ -46,20 +46,20 @@
 | 
			
		||||
      [page]="{ show: true, showSize: true, pageSizes:  [5,10, 20, 50, 100, 200, 500] }"
 | 
			
		||||
      [loading]="service.http.loading" [scroll]="{x:'1200px'}">
 | 
			
		||||
      <ng-template st-row="amount" let-item>
 | 
			
		||||
        <div *ngIf="item.incomeType === '1'"> - {{item.amount | currency }}</div>
 | 
			
		||||
        <div *ngIf="item.incomeType === '2'"> + {{item.amount | currency }}</div>
 | 
			
		||||
        <div *ngIf="item.incomeType === '1'" class="text-right"> - {{item.amount | currency:' ' }}</div>
 | 
			
		||||
        <div *ngIf="item.incomeType === '2'" class="text-right"> + {{item.amount | currency:' ' }}</div>
 | 
			
		||||
      </ng-template>
 | 
			
		||||
      <ng-template st-row="accountBalance" let-item>
 | 
			
		||||
        <div class="text-right">{{item?.accountBalance |currency}}</div>
 | 
			
		||||
        <div class="text-right">{{item?.accountBalance |currency:' '}}</div>
 | 
			
		||||
      </ng-template>
 | 
			
		||||
 | 
			
		||||
    </st>
 | 
			
		||||
    <div class="total-footer text-md" *ngIf="st?.list?.length !== 0 ">
 | 
			
		||||
      合计 <label class="text-red-dark">{{ footerTotalInfo?.total }}</label> 项,收入 <label
 | 
			
		||||
        class="text-red-dark font-weight-bold">{{
 | 
			
		||||
        footerTotalInfo?.income | currency
 | 
			
		||||
        footerTotalInfo?.incomeAmount | currency
 | 
			
		||||
        }}</label>,支出 <label class="text-red-dark font-weight-bold">{{
 | 
			
		||||
        footerTotalInfo?.spending | currency }}</label>
 | 
			
		||||
        footerTotalInfo?.payAmount | currency }}</label>
 | 
			
		||||
    </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</nz-card>
 | 
			
		||||
 | 
			
		||||
@ -136,15 +136,15 @@ export class PartnerAccountManagementAccountDetailComponent implements OnInit {
 | 
			
		||||
  initST() {
 | 
			
		||||
    this.columns = [
 | 
			
		||||
      { title: '交易时间', index: 'createTime', className: 'text-center', width: 200 },
 | 
			
		||||
      { title: '流水号', index: 'transactionNumber', className: 'text-center', width: 150 },
 | 
			
		||||
      { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 200 },
 | 
			
		||||
      { title: '交易单号', index: 'businessNumber', className: 'text-center', width: 120 },
 | 
			
		||||
      { title: '流水号', index: 'transactionNumber', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '交易类型', index: 'tradeTypeLabel', className: 'text-center', width: 150 },
 | 
			
		||||
      { title: '交易单号', index: 'businessNumber', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '备注', index: 'tradeContent', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '收支类型', index: 'incomeTypeLabel', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '交易金额', render: 'amount', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '账户余额', render: 'accountBalance', className: 'text-center', width: 180 },
 | 
			
		||||
      { title: '交易金额', render: 'amount', className: 'text-center', width: 150 },
 | 
			
		||||
      { title: '账户余额', render: 'accountBalance', className: 'text-center', width: 150 },
 | 
			
		||||
      { title: '付款方', index: 'payName', className: 'text-center', width: 200 },
 | 
			
		||||
      { title: '收款方', index: 'payeeName', className: 'text-center', width: 120 },
 | 
			
		||||
      { title: '收款方', index: 'payeeName', className: 'text-center', width: 200 },
 | 
			
		||||
    ];
 | 
			
		||||
  }
 | 
			
		||||
  resetSF() {
 | 
			
		||||
 | 
			
		||||
@ -17,13 +17,13 @@
 | 
			
		||||
    [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">
 | 
			
		||||
    [loading]="service.http.loading" multiSort>
 | 
			
		||||
    <ng-template st-row="allBalance" let-item>
 | 
			
		||||
      <div class="text-right">{{item.allBalance | currency:' '}}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="unEntryAmount" let-item>
 | 
			
		||||
      <a class="text-right text-blue-dark"
 | 
			
		||||
        [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.id">{{item.unEntryAmount | currency:'
 | 
			
		||||
        [routerLink]="'/partner/account-management/am/recorded/detail/'+item?.roleId">{{item.unEntryAmount | currency:'
 | 
			
		||||
        '}}</a>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template st-row="availableBalance" let-item>
 | 
			
		||||
 | 
			
		||||
@ -61,9 +61,15 @@ export class PartnerAccountManagementListComponent implements OnInit {
 | 
			
		||||
    this.columns = [
 | 
			
		||||
      { title: '合伙人名称', index: 'userName', className: 'text-center', width: 250 },
 | 
			
		||||
      { title: '手机号', index: 'phone', className: 'text-center', width: 200 },
 | 
			
		||||
      { title: '账户总额(元)', render: 'allBalance', className: 'text-right', sort: true, width: 150 },
 | 
			
		||||
      { title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', sort: true, width: 150 },
 | 
			
		||||
      { title: '可用余额(元)', render: 'availableBalance', className: 'text-right', sort: true, width: 150 },
 | 
			
		||||
      {
 | 
			
		||||
        title: '账户总额(元)', index: 'allBalance', className: 'text-right', sort: true, width: 150, type: 'currency',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        title: '待入账余额(元)', render: 'unEntryAmount', className: 'text-right', width: 150,
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        title: '可用余额(元)', index: 'availableBalance', className: 'text-right', sort: true, width: 150, type: 'currency'
 | 
			
		||||
      },
 | 
			
		||||
      { title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 220 },
 | 
			
		||||
      {
 | 
			
		||||
        title: '操作',
 | 
			
		||||
@ -90,7 +96,6 @@ export class PartnerAccountManagementListComponent implements OnInit {
 | 
			
		||||
   * @param _record 当前行信息
 | 
			
		||||
   */
 | 
			
		||||
  viewVirtual(_record: any) {
 | 
			
		||||
    console.log()
 | 
			
		||||
    const modalRef = this.modal.create({
 | 
			
		||||
      nzTitle: '虚拟账户明细',
 | 
			
		||||
      nzContent: PartnerAccountManagementVirtualAccountDetailComponent,
 | 
			
		||||
@ -100,8 +105,8 @@ export class PartnerAccountManagementListComponent implements OnInit {
 | 
			
		||||
      nzWidth: '85%',
 | 
			
		||||
      nzFooter: null
 | 
			
		||||
    });
 | 
			
		||||
    modalRef.afterClose.subscribe(result => {
 | 
			
		||||
    });
 | 
			
		||||
    // modalRef.afterClose.subscribe(result => {
 | 
			
		||||
    // });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
 | 
			
		||||
@ -55,10 +55,16 @@
 | 
			
		||||
      <span class="mr-xxl text-md font-weight-bold"><label>网络货运人:</label>{{accountInfo?.name}}</span>
 | 
			
		||||
      <span class="text-md font-weight-bold"><label>返佣总额(元):</label>{{totalInfo?.spending |currency: ' '}}</span>
 | 
			
		||||
    </div>
 | 
			
		||||
    <st #st [data]="service.$api_get_account_management_page " [columns]="billDetailColumns"
 | 
			
		||||
      [res]="{ reName: { list: 'data' } }" [req]="{ method: 'POST', allInBody: true, params:{}}" [page]="{show:false}">
 | 
			
		||||
      <ng-template st-row="amount" let-item>
 | 
			
		||||
        <div *ngIf="item.paAccount">{{item?.amount |currency :' '}}</div>
 | 
			
		||||
    <st #st [data]="billDetailList " [columns]="billDetailColumns" [res]="{ reName: { list: 'data' } }"
 | 
			
		||||
      [req]="{ method: 'POST', allInBody: true, params:billDetailReqParams}" [page]="{show:false}">
 | 
			
		||||
      <ng-template st-row="month" let-item>
 | 
			
		||||
        <div>
 | 
			
		||||
          <span>{{item?.year }}年</span>
 | 
			
		||||
          <span>{{item?.month }}月</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </ng-template>
 | 
			
		||||
      <ng-template st-row="profitAmountSum" let-item>
 | 
			
		||||
        <div>{{item?.profitAmountSum |currency :' '}}</div>
 | 
			
		||||
      </ng-template>
 | 
			
		||||
 | 
			
		||||
    </st>
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
import { Component, OnInit, ViewChild } from '@angular/core';
 | 
			
		||||
import { Router } from '@angular/router';
 | 
			
		||||
import { ActivatedRoute, Router } from '@angular/router';
 | 
			
		||||
import { STColumn, STComponent } from '@delon/abc/st';
 | 
			
		||||
import { SFComponent, SFDateWidgetSchema, SFSchema, SFUISchema, Widget } from '@delon/form';
 | 
			
		||||
import { ModalHelper, _HttpClient } from '@delon/theme';
 | 
			
		||||
@ -32,12 +32,16 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
 | 
			
		||||
  columns: STColumn[] = [];
 | 
			
		||||
  billDetailColumns: STColumn[] = [];
 | 
			
		||||
  showBillDetail = false;
 | 
			
		||||
  billDetailList = [];
 | 
			
		||||
  roleId = '';
 | 
			
		||||
 | 
			
		||||
  constructor(public service: AccountManagemantService, public router: Router) { }
 | 
			
		||||
  constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
 | 
			
		||||
    this.roleId = this.ar.snapshot.params.id;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  get reqParams() {
 | 
			
		||||
    return { ...this.sf?.value };
 | 
			
		||||
    return { ...this.sf?.value, roleId: this.roleId };
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  get billDetailReqParams() {
 | 
			
		||||
@ -46,7 +50,6 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
 | 
			
		||||
  ngOnInit(): void {
 | 
			
		||||
    this.initSF();
 | 
			
		||||
    this.initST();
 | 
			
		||||
    this.initBillDetailST();
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  initSF() {
 | 
			
		||||
@ -96,8 +99,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
 | 
			
		||||
 | 
			
		||||
  initBillDetailST() {
 | 
			
		||||
    this.billDetailColumns = [
 | 
			
		||||
      { title: '账单月份', index: 'carNo', className: 'text-center', width: '40%' },
 | 
			
		||||
      { title: '返佣金额(元)', render: 'amount', className: 'text-center', width: '40%' },
 | 
			
		||||
      { title: '账单月份', render: 'month', className: 'text-center', width: '40%' },
 | 
			
		||||
      { title: '返佣金额(元)', render: 'profitAmountSum', className: 'text-center', width: '40%' },
 | 
			
		||||
      {
 | 
			
		||||
        title: '操作', className: 'text-center', width: '20%', buttons: [
 | 
			
		||||
          {
 | 
			
		||||
@ -122,6 +125,19 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
 | 
			
		||||
  search() {
 | 
			
		||||
    this.st.load(1);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
   * 获取账单明细
 | 
			
		||||
   */
 | 
			
		||||
  getBillDetail(ltdId: string) {
 | 
			
		||||
    this.service.request(this.service.$api_get_bill_detail, { ltdId }).subscribe(res => {
 | 
			
		||||
      if (res) {
 | 
			
		||||
        this.billDetailList = res;
 | 
			
		||||
      }
 | 
			
		||||
    })
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  export() { }
 | 
			
		||||
 | 
			
		||||
  /**
 | 
			
		||||
@ -137,10 +153,16 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
 | 
			
		||||
   * @param record 当前行
 | 
			
		||||
   */
 | 
			
		||||
  viewAccountDetail(record: any) {
 | 
			
		||||
    this.billDetailColumns = [];
 | 
			
		||||
    this.showBillDetail = true;
 | 
			
		||||
    this.initBillDetailST();
 | 
			
		||||
    this.getBillDetail(record?.ltdId);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  handleCancel() {
 | 
			
		||||
    this.showBillDetail = false;
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  goBack() {
 | 
			
		||||
    window.history.go(-1);
 | 
			
		||||
 | 
			
		||||
@ -34,5 +34,5 @@
 | 
			
		||||
  </div>
 | 
			
		||||
</nz-card>
 | 
			
		||||
<div class="modal-footer text-center">
 | 
			
		||||
  <button nz-button type="button" nzType="primary" (click)="close()">确定</button>
 | 
			
		||||
  <button nz-button type="button" nzType="primary" (click)="close()">确 定</button>
 | 
			
		||||
</div>
 | 
			
		||||
 | 
			
		||||
@ -167,20 +167,13 @@ export class PartnerAccountManagementVirtualAccountDetailComponent implements On
 | 
			
		||||
   * @param _record 当前行信息
 | 
			
		||||
   */
 | 
			
		||||
  viewDetail(_record: any) {
 | 
			
		||||
    // record: {
 | 
			
		||||
    //   channelSource: _record?.accountType,
 | 
			
		||||
    //   roleId: _record?.roleId,
 | 
			
		||||
    //   bankType: _record?.bankType,
 | 
			
		||||
    //   ltdId: _record?.ltdId
 | 
			
		||||
    // }
 | 
			
		||||
    this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], {
 | 
			
		||||
      queryParams: {
 | 
			
		||||
        channelSource: _record?.accountType,
 | 
			
		||||
        bankType: _record?.bankType,
 | 
			
		||||
        ltdId: _record?.ltdId
 | 
			
		||||
      }
 | 
			
		||||
    });
 | 
			
		||||
    return;
 | 
			
		||||
    // this.router.navigate([`/partner/account-management/am/detail/${_record?.roleId}`], {
 | 
			
		||||
    //   queryParams: {
 | 
			
		||||
    //     channelSource: _record?.accountType,
 | 
			
		||||
    //     bankType: _record?.bankType,
 | 
			
		||||
    //     ltdId: _record?.ltdId
 | 
			
		||||
    //   }
 | 
			
		||||
    // });
 | 
			
		||||
    window.open(location.origin + `/#/partner/account-management/am/detail/${_record?.roleId}?ltdId=${_record?.ltdId}&channelSource=${_record?.accountType}&bankType=${_record?.bankType}`);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user