From 2d48fff9effc34ec512ca7c0c64be29a6c9159d2 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Wed, 11 May 2022 21:09:34 +0800 Subject: [PATCH] fix bug --- .../recorded-detail.component.html | 49 ++++-- .../recorded-detail.component.ts | 142 ++++++++++++------ .../services/account-managemant.service.ts | 14 +- .../individual-income.component.html | 12 +- .../individual-income.component.ts | 34 ++++- .../services/tax-management.service.ts | 2 + 6 files changed, 188 insertions(+), 65 deletions(-) diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html index a8adc5dd..bc545f49 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.html @@ -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' }" > - -
- {{ item.amount | currency }}
-
+ {{ item.amount | currency }}
+ + + +
{{ item.recordedAmount | currency }}
+
+ +
{{ item.recordedTaxPersonal | currency }}
+
+ +
{{ item.ongoingRecordedAmount | currency }}
+
+ +
{{ item.waitRecordedTaxPersonal | currency }}
+
+ +
{{ item.changeAmount | currency }}
+
+ +
{{ item.waitRecordedAmount | currency }}
+
+ +
{{ item.totalRebate | currency }}
- @@ -110,3 +123,19 @@ + +
+
{{ changeRecord?.ltdName }}
+
{{ changeRecord?.waitRecordedAmount | currency }}
+ + +
+
+
+
-
+ + +
+
+
+
+
diff --git a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts index 396cc970..f159d556 100644 --- a/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts +++ b/src/app/routes/partner/account-management/components/recorded-detail/recorded-detail.component.ts @@ -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); } - } diff --git a/src/app/routes/partner/account-management/services/account-managemant.service.ts b/src/app/routes/partner/account-management/services/account-managemant.service.ts index f7fa89b0..d78db1bd 100644 --- a/src/app/routes/partner/account-management/services/account-managemant.service.ts +++ b/src/app/routes/partner/account-management/services/account-managemant.service.ts @@ -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`;//虚拟账户明细 diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.html b/src/app/routes/tax-management/components/individual-income/individual-income.component.html index 0f3e49be..f06ff9a1 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.html +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.html @@ -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 @@
- -
司机姓名:张三/13812345678
+
+
司机姓名:{{driverRecord?.xm}}/{{driverRecord.lxdh}}
是否确认要将该司机的起征点同步调整为超过15万?
+
+
+
已选择{{selectedRows.length}}个司机
+
是否确认要将该司机的起征点同步调整为超过15万?
+
diff --git a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts index c3307605..e2a1ad34 100644 --- a/src/app/routes/tax-management/components/individual-income/individual-income.component.ts +++ b/src/app/routes/tax-management/components/individual-income/individual-income.component.ts @@ -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; } diff --git a/src/app/routes/tax-management/services/tax-management.service.ts b/src/app/routes/tax-management/services/tax-management.service.ts index 3df8dc4a..f70df070 100644 --- a/src/app/routes/tax-management/services/tax-management.service.ts +++ b/src/app/routes/tax-management/services/tax-management.service.ts @@ -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); }