This commit is contained in:
wangshiming
2022-05-11 21:09:34 +08:00
parent 081d185d4c
commit 2d48fff9ef
6 changed files with 188 additions and 65 deletions

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-04-28 20:27:07
* @LastEditors : Shiming
* @LastEditTime : 2022-05-11 19:42:40
* @LastEditTime : 2022-05-11 20:46:30
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\account-management\\components\\recorded-detail\\recorded-detail.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -68,19 +68,32 @@
[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: [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>
<!-- [loading]="service.http.loading" -->
<ng-template st-row="recordedAmount" let-item>
<div>{{ item.recordedAmount | currency }}</div>
</ng-template>
<ng-template st-row="recordedTaxPersonal" let-item>
<div>{{ item.recordedTaxPersonal | currency }}</div>
</ng-template>
<ng-template st-row="ongoingRecordedAmount" let-item>
<div>{{ item.ongoingRecordedAmount | currency }}</div>
</ng-template>
<ng-template st-row="waitRecordedTaxPersonal" let-item>
<div>{{ item.waitRecordedTaxPersonal | currency }}</div>
</ng-template>
<ng-template st-row="changeAmount" let-item>
<div>{{ item.changeAmount | currency }}</div>
</ng-template>
<ng-template st-row="waitRecordedAmount" let-item>
<div>{{ item.waitRecordedAmount | currency }}</div>
</ng-template>
<ng-template st-row="totalRebate" let-item>
<div>{{ item.totalRebate | currency }}</div>
</ng-template>
</st>
<div class="total-footer text-md" *ngIf="st?.list?.length !== 0">
合计 <label class="text-red-dark">{{ footerSummary?.total }}</label> 项,收入
<label class="text-red-dark font-weight-bold">{{ footerSummary?.income | currency }}</label
>,支出 <label class="text-red-dark font-weight-bold">{{ footerSummary?.spending | currency }}</label>
</div>
</div>
</nz-card>
@ -110,3 +123,19 @@
</st>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="changeAccount" nzTitle="账户明细" [nzFooter]="null" (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="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;">+</div>
<div style="display: flex; justify-content: center; align-items: center;width: 30px; height: 30px; background-color: #ccc;margin: 0 10px;font-size: 14px;">-</div>
<nz-input-number style="width: 50%; border-radius: 4px 0 0 4px;" nzPlaceHolder="请输入金额" [(ngModel)]="demoValue" [nzMin]="1" [nzMax]="99999999" [nzStep]="1"></nz-input-number>
<span style="margin: 10px ;"></span>
</div>
</ng-template>
</sf>
</div>
</nz-modal>

View File

@ -7,7 +7,7 @@ import { AccountManagemantService } from '../../services/account-managemant.serv
@Component({
selector: 'app-partner-account-management-recorded-detail',
templateUrl: './recorded-detail.component.html',
templateUrl: './recorded-detail.component.html'
})
export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
summaryObj: any = {
@ -18,14 +18,18 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
ltdName: '',
taxno: ''
};
@ViewChild('sfView', { static: false }) sfView!: SFComponent;
schemaView!: SFSchema;
uiView: SFUISchema = {};
footerSummary = {
total: 0,
income: 0,
spending: 0
}
};
detailRecord: any = {};
changeRecord: any = {};
url = `/user`;
schema: SFSchema = {};
@ -33,19 +37,17 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
@ViewChild('st') private readonly st!: STComponent;
@ViewChild('sf') private readonly sf!: SFComponent;
columns: STColumn[] = [];
billDetailColumns: STColumn[] = [];
showBillDetail = false;
changeAccount = false;
billDetailList = [];
roleId = '';
demoValue!: number;
constructor(public service: AccountManagemantService, public router: Router, public ar: ActivatedRoute) {
this.roleId = this.ar.snapshot.params.id;
}
get reqParams() {
return { ...this.sf?.value, partnerId: this.roleId };
}
@ -63,53 +65,60 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
this.schema = {
properties: {
ltdName: {
title: '网络货运人',
type: 'string',
title: '网络货运人',
ui: {
placeholder: '请输入',
},
},
// allowClear: true,
// asyncData: () => this.service.getNetworkFreightForwarder(),
// visibleIf: {
// expand: (value: boolean) => value
// }
}
}
}
}
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } }, };
};
this.ui = { '*': { spanLabelFixed: 120, grid: { span: 8, gutter: 4 } } };
}
/**
* 初始化数据列表
*/
* 初始化数据列表
*/
initST() {
this.columns = [
{ title: '网络货运人', index: 'ltdName', className: 'text-center', width: 200 },
{ title: '银行类型', index: 'bankTypeName', className: 'text-center', width: 150 },
{ title: '虚拟账户', index: 'virtualAccount', className: 'text-center', width: 200 },
{ title: '返佣总额(元)', index: 'totalRebate', className: 'text-center', width: 180, type: 'currency' },
{ title: '已入账金额(元)', index: 'recordedAmount', className: 'text-center', width: 180, type: 'currency' },
{ title: '已代缴个税(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '入账中金额(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '代缴中个税(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '调整金额(元)', index: 'taxPersonalSum', className: 'text-center', width: 180, type: 'currency' },
{ title: '待入账金额(元)', index: 'waitRecordedAmount', className: 'text-right', width: 180, type: 'currency' },
{ title: '返佣总额(元)', render: 'totalRebate', className: 'text-center', width: 180 },
{ title: '已入账金额(元)', render: 'recordedAmount', className: 'text-center', width: 180 },
{ title: '已代缴个税(元)', render: 'recordedTaxPersonal', className: 'text-center', width: 180 },
{ title: '入账中金额(元)', render: 'ongoingRecordedAmount', className: 'text-center', width: 180 },
{ title: '代缴中个税(元)', render: 'waitRecordedTaxPersonal', className: 'text-center', width: 180 },
{ title: '调整金额(元)', render: 'changeAmount', className: 'text-center', width: 180 },
{ title: '待入账金额(元)', render: 'waitRecordedAmount', className: 'text-right', width: 180 },
{
title: '操作', className: 'text-center', width: 300,
title: '操作',
className: 'text-center',
width: 150,
fixed: 'right',
buttons: [
{
text: '查看入账记录',
acl: { ability: ['AN-RECORDED-DETAIL-viewRecord'] },
click: (_record) => this.viewBookedRecord(_record)
click: _record => this.viewBookedRecord(_record)
},
{
text: '查看账单明细',
acl: { ability: ['AN-RECORDED-DETAIL-viewBill'] },
click: (_record) => this.viewAccountDetail(_record)
click: _record => this.viewAccountDetail(_record)
},
{
text: '调整待入账金额',
acl: { ability: [''] },
click: (_record) => this.viewAccountDetail(_record)
},
click: _record => this.changeStalyAccount(_record)
}
]
},
}
];
}
@ -118,26 +127,60 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
{ title: '账单月份', render: 'month', className: 'text-center', width: '40%' },
{ title: '返佣金额(元)', render: 'profitAmountSum', className: 'text-center', width: '40%' },
{
title: '操作', className: 'text-center', width: '20%', buttons: [
title: '操作',
className: 'text-center',
width: '20%',
buttons: [
{
text: '订单明细',
click: (_record) => window.open(location.origin + `#/partner/rebate/record?ltdId=${_record?.ltdId}`)
click: _record => window.open(location.origin + `#/partner/rebate/record?ltdId=${_record?.ltdId}`)
}
]
},
]
}
];
}
initSFNew() {
this.schemaView = {
properties: {
smsVerifyCode: {
title: '调整金额',
type: 'string',
ui: {
widget: 'custom',
placeholder: '请输入金额',
errors: {
},
},
},
remark: {
title: '备注',
type: 'string',
maxLength: 50,
ui: {
placeholder: '请输入备注',
widget: 'textarea',
autosize: { minRows: 3, maxRows: 6 }
}
}
},
required: ['phone', 'remark'],
};
this.uiView = {
'*': {
spanLabelFixed: 100,
grid: { span: 24 },
},
};
}
resetSF() {
this.sf.reset();
setTimeout(() => {
this.st.reset();
})
});
}
search() {
this.st.load(1);
}
@ -150,16 +193,15 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
if (res) {
this.billDetailList = res;
}
})
});
}
export() { }
export() {}
/**
* 查看入账记录
* @param record 当前行
*/
* 查看入账记录
* @param record 当前行
*/
viewBookedRecord(record: any) {
window.open(location.origin + `#/partner/recorded/record?ltdId=${record?.ltdId}`);
}
@ -175,22 +217,34 @@ export class PartnerAccountManagementRecordedDetailComponent implements OnInit {
this.detailRecord = record;
this.getBillDetail(record?.ltdId);
}
/**
* 调整待入账金额
* @param record 当前行
*/
changeStalyAccount(record: any) {
this.changeAccount = true;
this.initSFNew();
this.changeRecord = record;
// this.getBillDetail(record?.ltdId);
}
getInvoiceSummary() {
this.service.request(this.service.$api_get_invoice_summary, { partnerId: this.roleId }).subscribe(res => {
if (res) {
this.summaryObj = res;
}
})
});
}
handleCancel() {
this.showBillDetail = false;
this.detailRecord = {};
}
handleCancelA() {
this.changeAccount = false;
this.changeRecord = {};
}
goBack() {
window.history.go(-1);
}
}

View File

@ -1,10 +1,20 @@
/*
* @Description :
* @Version : 1.0
* @Author : Shiming
* @Date : 2022-04-21 13:49:22
* @LastEditors : Shiming
* @LastEditTime : 2022-05-11 19:56:49
* @FilePath : \\tms-obc-web\\src\\app\\routes\\partner\\account-management\\services\\account-managemant.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved.
*/
import { Injectable, Injector } from '@angular/core';
import { BaseService } from '@shared';
import { BaseService, ShipperBaseService } from '@shared';
@Injectable({
providedIn: 'root'
})
export class AccountManagemantService extends BaseService {
export class AccountManagemantService extends ShipperBaseService {
$api_get_account_management_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceByOperator`; // 账户管理
$api_get_virtual_detail_page = `/api/bpc/accountBalancePartner/getPartnerAccountBalanceInfoByOperator`;//虚拟账户明细

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-05-06 15:31:19
* @LastEditors : Shiming
* @LastEditTime : 2022-05-11 14:54:00
* @LastEditTime : 2022-05-11 21:04:42
* @FilePath : \\tms-obc-web\\src\\app\\routes\\tax-management\\components\\individual-income\\individual-income.component.html
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
@ -73,11 +73,17 @@
</div>
</ng-template>
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate" (nzOnOk)="handleOK()"
<nz-modal [(nzVisible)]="isVisible" [nzWidth]="600" [nzFooter]="nzModalFooterEvaluate"
(nzOnCancel)="handleCancel()">
<ng-container *nzModalContent>
<div> 司机姓名:张三/13812345678 </div>
<div *ngIf="oneStatus">
<div> 司机姓名:{{driverRecord?.xm}}/{{driverRecord.lxdh}} </div>
<div> 是否确认要将该司机的起征点同步调整为超过15万 </div>
</div>
<div *ngIf="!oneStatus">
<div> 已选择{{selectedRows.length}}个司机 </div>
<div> 是否确认要将该司机的起征点同步调整为超过15万 </div>
</div>
</ng-container>
<ng-template #nzModalFooterEvaluate>
<button nz-button nzType="default" (click)="handleCancel()">取消</button>

View File

@ -23,8 +23,10 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
];
selectedIndex = '0'; //选择的项目
isVisible: boolean = false;
oneStatus: boolean = false;
selectedRows: any[] = [];
driverRecord!: any;
constructor(public service: TaxManagementService, public searchDrawerService: SearchDrawerService) {
super(searchDrawerService);
@ -287,11 +289,20 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
* @param record 记录实例
*/
resetData() {
// if (this.selectedRows.length === 0) {
// this.openWainingModal('请选择需要更新的数据!');
// return;
// }
// this.isVisible = true;
if (this.selectedRows.length === 0) {
this.service.msgSrv.error('请选择明细!');
return;
}
if(this.selectedRows.length === 1) {
console.log(this.selectedRows);
this.oneStatus = true
this.driverRecord = this.selectedRows[0]
} else {
this.oneStatus = false
}
this.isVisible = true;
}
selectChange(item: any) {
@ -352,7 +363,18 @@ export class TaxManagementIndividualIncomeComponent extends BasicTableComponent
this.service.exportStart({ ...this.sfValue,declareStatus: this.selectedIndex, pageSize: -1 }, this.service.$api_taxIncome_export);
}
handleOK() {}
handleOK() {
let params: any = [];
if (this.selectedRows.length !== 0) {
this.selectedRows.forEach(item => {
params.push(item.id);
});
}
this.service.request(this.service.$api_fixThreshold, params).subscribe((res) => {
console.log(res);
})
}
handleCancel() {
this.isVisible = false;
}

View File

@ -68,6 +68,8 @@ export class TaxManagementService extends ShipperBaseService {
$api_taxDeclaration_export = '/api/sdc/taxDeclaration/asyncExport';
// 发票上传撤回
$api_invoiceUpload_withdraw = '/api/sdc/invoiceUploadInfo/withdraw';
// 修改起征点
$api_fixThreshold = '/api/sdc/taxIncome/fixThreshold';
constructor(public injector: Injector) {
super(injector);
}