From 803835ba0a95c09a9c5ee4115d03c0adad8de01e Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Fri, 14 Jan 2022 14:23:10 +0800 Subject: [PATCH] edit --- .../payable-order-detail.component.html | 85 +++++++++ .../payable-order-detail.component.less | 13 ++ .../payable-order-detail.component.ts | 176 ++++++++++++++++++ .../payable-order.component.html | 2 +- .../payable-order/payable-order.component.ts | 43 ++--- .../financial-managemen-routing.module.ts | 2 + .../financial-management.module.ts | 3 +- .../services/freight-account.service.ts | 7 + src/assets/mocks/menu-data.json | 5 + 9 files changed, 306 insertions(+), 30 deletions(-) create mode 100644 src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.html create mode 100644 src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.less create mode 100644 src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts diff --git a/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.html b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.html new file mode 100644 index 00000000..00933513 --- /dev/null +++ b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.html @@ -0,0 +1,85 @@ + + + + + + + +
+
+ + {{headerInfo?.ltdId}} + + + {{headerInfo?.cno}} + + + {{headerInfo?.shipperaccount}} + + + {{headerInfo?.ahxmoney | currency}} + +
+
+ + {{headerInfo?.phxdate}} + + + {{headerInfo?.arto}} + + + {{headerInfo?.ltdaccount}} + + + {{headerInfo?.prmoney | currency}} + +
+
+ + {{headerInfo?.banktype==='1'?'平安':'浦发'}} + + + {{headerInfo?.arvattype==='1'?'费用款项':''}} + + + {{headerInfo?.bankreceipt}} + + + {{headerInfo?.remarks}} + +
+
+
+ + +
+
+ +
+
+ + + +
+
+
+ + + + + {{index+1}} + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.less b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.less new file mode 100644 index 00000000..aebf12ee --- /dev/null +++ b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.less @@ -0,0 +1,13 @@ +:host::ng-deep { + + .statistics-box { + .ant-form-item { + margin-bottom: 0; + + .ant-form-item-control-input-content { + color: #f5222d; + } + } + } + +} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts new file mode 100644 index 00000000..48b7f2dc --- /dev/null +++ b/src/app/routes/financial-management/components/payable-order/payable-order-detail/payable-order-detail.component.ts @@ -0,0 +1,176 @@ +import { CurrencyPipe } from '@angular/common'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { FreightAccountService } from '../../../services/freight-account.service'; + +@Component({ + selector: 'app-payable-order-detail', + templateUrl: './payable-order-detail.component.html', + styleUrls: ['./payable-order-detail.component.less', '../../../../commom/less/expend-but.less', '../../../../commom/less/box.less'], + providers: [CurrencyPipe] +}) +export class PayableOrderDetailComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + columns: STColumn[] = this.initST(); + searchSchema: SFSchema = this.initSF(); + + _$expand = false; + + id = null; + billHId = null; + headerInfo: any = {}; + constructor(public service: FreightAccountService, private route: ActivatedRoute, private currencyPipe: CurrencyPipe) { + this.id = route.snapshot.params.id; + this.billHId = route.snapshot.queryParams.billHId; + this.loadHeadInfo(); + } + + ngOnInit(): void {} + + loadHeadInfo() { + this.service.request(this.service.$api_get_fico_ph_header, { id: this.id }).subscribe(res => { + console.log(res); + if (res) { + this.headerInfo = res; + } + }); + } + + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { billHId: this.billHId }); + if (this.sf) { + Object.assign(requestOptions.body, { + ...this.sf.value, + billTime: { + start: this.sf.value.billTime?.[0] || null, + end: this.sf.value.billTime?.[1] || null + }, + feedate: { + start: this.sf.value.feedate?.[0] || null, + end: this.sf.value.feedate?.[1] || null + } + }); + if (this.sf.value.billTime) { + Object.assign(requestOptions.body, { + billTime: { + start: this.sf.value.billTime?.[0] || null, + end: this.sf.value.billTime?.[1] || null + } + }); + } + if (this.sf.value.feedate) { + Object.assign(requestOptions.body, { + feedate: { + start: this.sf.value.feedate?.[0] || null, + end: this.sf.value.feedate?.[1] || null + } + }); + } + } + return requestOptions; + }; + + goBack() { + history.go(-1); + } + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + feeHCode: { + type: 'string', + title: '费用单', + ui: { + placeholder: '请输入' + } + }, + billHCode: { + type: 'string', + title: '订单号', + ui: { + placeholder: '请输入' + } + }, + cno: { + type: 'string', + title: '结算客户', + enum: [{ label: '全部', value: '' }], + ui: { + widget: 'select', + placeholder: '请选择' + }, + default: '' + }, + feedate: { + title: '费用日期', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + }, + billTime: { + title: '订单日期', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '序号', render: 'no', width: 80 }, + { title: '费用号', index: 'feeHCode', width: 100 }, + { title: '费用日期', index: 'feedate', type: 'date', width: 150 }, + { title: '订单号', index: 'billHCode', width: 100 }, + { title: '订单日期', index: 'billTime', width: 150 }, + { title: '费用类型', index: 'cnoName', width: 90 }, + { title: '订单费用科目', index: 'feeSubId', width: 100 }, + { title: '费用科目', index: 'feeSubId', width: 140 }, + { title: '结算客户', index: 'cno', width: 100 }, + { + title: '已收金额', + index: 'phxmoney', + width: 100, + className: 'text-right', + format: item => `${this.currencyPipe.transform(item.armoney || 0)}` + } + ]; + } +} diff --git a/src/app/routes/financial-management/components/payable-order/payable-order.component.html b/src/app/routes/financial-management/components/payable-order/payable-order.component.html index 3f0f99fd..79e83713 100644 --- a/src/app/routes/financial-management/components/payable-order/payable-order.component.html +++ b/src/app/routes/financial-management/components/payable-order/payable-order.component.html @@ -23,7 +23,7 @@ - value - } - } - }, cno: { type: 'string', title: '结算客户', @@ -153,7 +142,7 @@ export class PayableOrderComponent implements OnInit { }, arto: { type: 'string', - title: '付款人', + title: '收款人', ui: { widget: 'select', placeholder: '请选择', @@ -237,29 +226,28 @@ export class PayableOrderComponent implements OnInit { private initST(): STColumn[] { return [ { title: '', index: 'key', type: 'checkbox' }, - { title: '核销单号', index: 'ahxcode', type: 'link', width: 140 }, + { title: '核销单号', index: 'phxcode', type: 'link', width: 140 }, { title: '网络货运人', index: 'ltdId', width: 140 }, - { title: '核销日期', index: 'ahxdate', type: 'date', width: 160 }, + { title: '核销日期', index: 'phxdate', type: 'date', width: 160 }, { title: '付款账户', index: 'shipperaccount', width: 120 }, { title: '收款账户', index: 'ltdaccount', width: 120 }, - { title: '核销类型', index: 'ahxType', type: 'enum', enum: { '1': '预收款' }, width: 120 }, { title: '核销金额', - index: 'ahxmoney', + index: 'phxmoney', width: 120, className: 'text-right', - format: item => `${this.currencyPipe.transform(item.ahxmoney)}` + format: item => `${this.currencyPipe.transform(item.phxmoney || 0)}` }, { - title: '应收金额', - index: 'armoney', + title: '应付金额', + index: 'prmoney', width: 120, className: 'text-right', - format: item => `${this.currencyPipe.transform(item.armoney)}` + format: item => `${this.currencyPipe.transform(item.prmoney || 0)}` }, { title: '银行类型', index: 'banktype', type: 'enum', enum: { '1': '平安', '2': '浦发' }, width: 120 }, - { title: '收款类型', index: 'arvattype', type: 'enum', enum: { '1': '费用款项' }, width: 120 }, - { title: '付款人', index: 'artoname', width: 120 }, + { title: '付款类型', index: 'brmtype', type: 'enum', enum: { '1': '费用款项' }, width: 120 }, + { title: '收款人', index: 'artoname', width: 120 }, { title: '结算客户', index: 'cno', width: 120 }, { title: '银行水单', index: 'bankreceipt', width: 120 }, { title: '创建时间', index: 'createTime', width: 160 }, @@ -269,14 +257,13 @@ export class PayableOrderComponent implements OnInit { { title: '操作', fixed: 'right', + className: 'text-center', width: 120, buttons: [ { text: '浏览', - click: item => this.router.navigate(['/financial-management/receivable-order/detail/' + item.id]) - }, - { - text: '核销' + click: item => + this.router.navigate(['/financial-management/payable-order/detail/' + item.id], { queryParams: { billHId: item.billHId } }) } ] } diff --git a/src/app/routes/financial-management/financial-managemen-routing.module.ts b/src/app/routes/financial-management/financial-managemen-routing.module.ts index d3315a4d..5e2923c2 100644 --- a/src/app/routes/financial-management/financial-managemen-routing.module.ts +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -21,6 +21,7 @@ import { VoucherSummaryComponent } from './components/voucher-summary/voucher-su import { ReceivableOrderComponent } from './components/receivable-order/receivable-order.component'; import { PayableOrderComponent } from './components/payable-order/payable-order.component'; import { ReceivableOrderDetailComponent } from './components/receivable-order/receivable-order-detail/receivable-order-detail.component'; +import { PayableOrderDetailComponent } from './components/payable-order/payable-order-detail/payable-order-detail.component'; const routes: Routes = [ { path: 'freight-account', component: FreightAccountComponent }, @@ -44,6 +45,7 @@ const routes: Routes = [ { path: 'receivable-order', component: ReceivableOrderComponent }, { path: 'receivable-order/detail/:id', component: ReceivableOrderDetailComponent }, { path: 'payable-order', component: PayableOrderComponent }, + { path: 'payable-order/detail/:id', component: PayableOrderDetailComponent }, ]; @NgModule({ diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index e78e3063..58cc4e1e 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -25,6 +25,7 @@ import { VoucherSummaryComponent } from './components/voucher-summary/voucher-su import { ReceivableOrderComponent } from './components/receivable-order/receivable-order.component'; import { PayableOrderComponent } from './components/payable-order/payable-order.component'; import { ReceivableOrderDetailComponent } from './components/receivable-order/receivable-order-detail/receivable-order-detail.component'; +import { PayableOrderDetailComponent } from './components/payable-order/payable-order-detail/payable-order-detail.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -51,7 +52,7 @@ const ROUTESCOMPONENTS = [ const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent, ClearingModalComponent]; @NgModule({ - declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS], + declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS, PayableOrderDetailComponent], imports: [CommonModule, FinancialManagementRoutingModule, SharedModule] }) export class FinancialManagementModule {} diff --git a/src/app/routes/financial-management/services/freight-account.service.ts b/src/app/routes/financial-management/services/freight-account.service.ts index 0077a175..fa258465 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -64,6 +64,13 @@ export class FreightAccountService extends ShipperBaseService { // 查询应收核销明细 $api_get_fico_detail_header = '/api/fcc/ficoAhxL/list/page'; + // 查询应付核销抬头 + $api_get_fico_ph_page = '/api/fcc/ficoPhxH/list/page'; + // 获取应付核销抬头 + $api_get_fico_ph_header = '/api/fcc/ficoPhxH/get'; + // 查询应付核销明细 + $api_get_fico_ph_detail_header = '/api/fcc/ficoPhxL/list/page'; + constructor(public injector: Injector,public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv); diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 31e2a874..df3fee1c 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -314,6 +314,11 @@ { "text": "应付核销", "link": "/financial-management/payable-order" + }, + { + "text": "应收核销详情", + "hide": true, + "link": "/financial-management/payable-order/detail/:id" } ] },