This commit is contained in:
wangshiming
2022-05-12 14:14:13 +08:00
parent 10a90f521b
commit 6338d9bb6f
4 changed files with 52 additions and 17 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-04-28 20:27:07
* @LastEditors : Shiming
* @LastEditTime : 2022-05-12 13:45:07
* @LastEditTime : 2022-05-12 13:59:31
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\account-management\\components\\recorded-detail\\recorded-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -123,19 +123,23 @@
</st>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="changeAccount" nzTitle="账户明细" [nzFooter]="null" (nzOnCancel)="handleCancelA()" nzWidth="600px">
<nz-modal [(nzVisible)]="changeAccount" nzTitle="账户明细" [nzFooter]="nzModalFooter" (nzOnCancel)="handleCancelA()" nzWidth="600px">
<div *nzModalContent>
<div style="display: flex; justify-content: center; align-items: center;font-weight: 700; font-size: 16px; padding: 10px 0;"><label>网络货运人:</label>{{ changeRecord?.ltdName }}</div>
<div style="display: flex; justify-content: center; align-items: center;font-weight: 700; font-size: 16px; padding: 10px 0;"><label>待入账金额(元):</label>{{ changeRecord?.waitRecordedAmount | currency }}</div>
<sf #sfView [schema]="schemaView" [ui]="uiView" [compact]="true" [button]="'none'">
<ng-template sf-template="smsVerifyCode" let-me let-ui="uiView" let-schema="schemaView">
<div style="display: flex;">
<div [style.background-color]="addd ? '#ff4d4f' : '#ccc'" style="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;" (click)="add(demoValue)">+</div>
<div style="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;" [style.background-color]="!addd ? '#ff4d4f' : '#ccc'" (click)="deletes(demoValue)">-</div>
<nz-input-number style="width: 50%;height: 32px; border-radius: 4px 0 0 4px;" nzPlaceHolder="请输入金额" [(ngModel)]="demoValue" [nzMin]="1" [nzMax]="99999999" [nzStep]="1"></nz-input-number>
<div [style.background-color]="addd ? '#ff4d4f' : '#ccc'" style="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;" (click)="add(changeAmount)">+</div>
<div style="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;" [style.background-color]="!addd ? '#ff4d4f' : '#ccc'" (click)="deletes(changeAmount)">-</div>
<nz-input-number style="width: 50%;height: 32px; border-radius: 4px 0 0 4px;" nzPlaceHolder="请输入金额" [(ngModel)]="changeAmount" [nzMin]="1" [nzMax]="99999999" [nzStep]="1"></nz-input-number>
<span style="margin: 10px ;"></span>
</div>
</ng-template>
</sf>
</div>
<ng-template #nzModalFooter>
<button nz-button nzType="primary" (click)="handleCancel()">取消</button>
<button nz-button nzType="default" (click)="handleOK()">确定</button>
</ng-template>
</nz-modal>

View File

@ -3,6 +3,7 @@ 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';
import { NzModalService } from 'ng-zorro-antd/modal';
import { AccountManagemantService } from '../../services/account-managemant.service';
@Component({
@ -45,8 +46,8 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
addd = false;
billDetailList = [];
roleId = '';
demoValue: number = 0;
constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
changeAmount: number = 0;
constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute, private nzModalService: NzModalService,) {
this.roleId = this.ar.snapshot.params.id;
}
@ -167,7 +168,7 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
}
}
},
required: ['phone', 'remark'],
required: ['smsVerifyCode', 'remark'],
};
this.uiView = {
'*': {
@ -251,15 +252,43 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
window.history.go(-1);
}
deletes(value: number) {
console.log(value);
console.log(this.demoValue);
this.demoValue -= 1
this.addd = false
}
add(value: number) {
this.addd = true
this.demoValue += 1
console.log(value);
console.log(this.demoValue);
}
handleOK() {
console.log(this.sfView.value);
if(!this.sfView.value?.remark || !this.changeAmount) {
this.service.msgSrv.error('请填写必填项!')
return
}
console.log(this.addd);
let params:any = {
remark: this.sfView.value?.remark,
partnerId: this.roleId ,
ltdId: this.changeRecord.ltdId
}
if(!this.addd) {
params.changeAmount = -this.changeAmount
} else {
params.changeAmount = this.changeAmount
}
console.log(params);
this.nzModalService.warning({
nzTitle: `确定调整“${params.changeAmount > 0 ? '+' + params.changeAmount : params.changeAmount}元”的待入账金额吗?`,
nzOnOk: () => {
this.service.request(this.service.$api_get_saveIncomeChange, params).subscribe((res) => {
if(res) {
console.log(res);
this.service.msgSrv.success('修改成功!')
this.changeAccount = false;
}
})
}
});
}
}

View File

@ -25,6 +25,8 @@ export class AccountManagemantService extends ShipperBaseService {
$api_get_bill_detail = `/api/bpc/partnerIncomeDetail/findPartnerWaitIncomeByOperator`; // 查看账单明细
$api_get_invoice_summary = `/api/bpc/partnerInvoiceEntry/oprationEntrySummary`; // 入账明细汇总
$api_get_invoice_detail_page = `/api/bpc/partnerInvoiceEntry/oprationEntryDetail`; // 待入账明细列表
$api_get_getPartnerLitAmountSummary = `/api/bpc/partnerInvoiceEntry/getPartnerLitAmountSummary`; // 查询合伙货运人相关金额
$api_get_saveIncomeChange = `/api/bpc/partnerIncomeChange/saveIncomeChange`; // 调整金额
constructor(public injector: Injector) {
super(injector)

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-25 20:18:52
* @LastEditors : Shiming
* @LastEditTime : 2022-04-27 14:09:04
* @LastEditTime : 2022-05-12 14:10:25
* @FilePath : \\tms-obc-web\\src\\app\\shared\\components\\rebate-table\\rebate-table.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -20,8 +20,8 @@
<tr>
<th rowspan="2" nzWidth="60px" nzAlign="center" nzLeft>序号</th>
<th nzWidth="220px" nzAlign="center" >合伙人等级</th>
<th nzWidth="160px" *ngIf="type == '2'" nzAlign="center" >初始业务量(万/月)</th>
<th nzWidth="160px" *ngIf="type == '2'" nzAlign="center" >到达业务量(万/月)</th>
<th nzWidth="160px" *ngIf="type == '2'" nzAlign="center" >初始业务量</th>
<th nzWidth="160px" *ngIf="type == '2'" nzAlign="center" >到达业务量</th>
<th nzWidth="160px" nzAlign="center" >管理费比例%</th>
<th rowspan="2" nzWidth="60px" nzAlign="center" nzRight *ngIf="type == '2'">操作</th>
</tr>