diff --git a/src/app/routes/commom/less/basic-board.less b/src/app/routes/commom/less/basic-board.less new file mode 100644 index 00000000..84354724 --- /dev/null +++ b/src/app/routes/commom/less/basic-board.less @@ -0,0 +1,5 @@ +:host::ng-deep { + .ant-form-item { + margin-bottom: 0; + } +} \ No newline at end of file diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html new file mode 100644 index 00000000..c3f47905 --- /dev/null +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.html @@ -0,0 +1,83 @@ + + + + + + + +
+
+ + 基本信息 + + {{ costInfo?.ltdId }} + + + {{ costInfo?.brmdate }} + + + {{ costInfo?.brmModeLabel }} + + + {{ costInfo?.banktypeLabel }} + + + {{ costInfo?.artoname }} + + + {{ costInfo?.recnopay |currency }} + + + {{ costInfo?.ltdaccountId }} + + +
+
+
+ + + + +
+
+ +
+
+ + +
+
+ + + {{index+1}} + + +
+ +
+
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.ts new file mode 100644 index 00000000..3d627fe1 --- /dev/null +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection-detail/advance-collection-detail.component.ts @@ -0,0 +1,150 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFDateWidgetSchema, SFSchema } from '@delon/form'; +import { FreightAccountService } from '../../../services/freight-account.service'; + +@Component({ + selector: 'app-advance-collection-detail', + templateUrl: './advance-collection-detail.component.html', + styleUrls: ['../../../../commom/less/box.less', '../../../../commom/less/basic-board.less'] +}) +export class AdvanceCollectionDetailComponent implements OnInit { + @ViewChild('inputST', { static: true }) + inputST!: STComponent; + columns: { [key: string]: STColumn[] } = this.initST(); + @ViewChild('infoST', { static: true }) + infoST!: STComponent; + costInfo: any = {}; + id: any = null; + + @ViewChild('sf', { static: false }) + inputSF!: SFComponent; + @ViewChild('sf', { static: false }) + infoSF!: SFComponent; + inputSearchSchema: SFSchema = this.initInputSF(); + infoSearchSchema: SFSchema = this.initInfoSF(); + constructor(public service: FreightAccountService, private route: ActivatedRoute) { + this.id = route.snapshot.params.id; + this.loadDetail(this.id); + } + + ngOnInit(): void {} + + beforeReq = (requestOptions: STRequestOptions) => { + Object.assign(requestOptions.body, { + id: this.id + }); + return requestOptions; + }; + + loadDetail(id: any) { + this.service.request(this.service.$api_get_receipt_header, { id }).subscribe(res => { + if (res) { + this.costInfo = res; + } + }); + } + + /** + * 重置表单 + */ + resetInputSF() { + this.inputSF.reset(); + } + /** + * 重置表单 + */ + resetInfoSF() { + this.infoSF.reset(); + } + + goBack() { + history.go(-1); + } + + private initInputSF(): SFSchema { + return { + properties: { + feedate: { + title: '到账日期', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + }, + billHCode: { + type: 'string', + title: '收款单号', + ui: { + placeholder: '请输入' + } + } + } + }; + } + + private initInfoSF(): SFSchema { + return { + properties: { + feedate: { + title: '核销日期', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + }, + billHCode: { + type: 'string', + title: '核销单号', + ui: { + placeholder: '请输入' + } + } + } + }; + } + + private initST(): { [key: string]: STColumn[] } { + return { + input: [ + { title: '序号', render: 'no', width: 70, className: 'text-left' }, + { title: '收款单号', index: 'feeHId', className: 'text-left', width: 200 }, + { title: '到账日期', index: 'billHId', className: 'text-center', width: 150 }, + { + title: '到账金额', + index: 'hrvatrate', + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) }, + width: 140 + }, + { + title: '转预收金额', + index: 'hrvatrate', + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) }, + width: 140 + }, + { title: '预收备注', index: 'callNo', width: 200 } + ], + info: [ + { title: '序号', render: 'no', width: 70, className: 'text-left' }, + { title: '核销单号', index: 'cnoName', className: 'text-left', width: 200 }, + { title: '核销日期', index: 'billHId', className: 'text-center', width: 150 }, + { + title: '核销金额', + index: 'yskmoney', + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) }, + width: 200 + }, + { title: '核销备注', index: 'vatapptype', className: 'text-left', width: 200 } + ] + }; + } +} diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html new file mode 100644 index 00000000..500f15f4 --- /dev/null +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.html @@ -0,0 +1,28 @@ + + + + +
+
+ +
+
+ + + + +
+
+
+ + + + + \ No newline at end of file diff --git a/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts new file mode 100644 index 00000000..cb7e3c37 --- /dev/null +++ b/src/app/routes/financial-management/components/advance-collection/advance-collection.component.ts @@ -0,0 +1,154 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { Router } from '@angular/router'; +import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; +import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { AccountDetailComponent } from 'src/app/shared/components/account-detail/account-detail.component'; +import { FreightAccountService } from '../../services/freight-account.service'; + +@Component({ + selector: 'app-advance-collection', + templateUrl: './advance-collection.component.html', + styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] +}) +export class AdvanceCollectionComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + + searchSchema: SFSchema = this.initSF(); + columns: STColumn[] = this.initST(); + _$expand = false; + + constructor(public service: FreightAccountService, private router: Router, private modal: NzModalService) {} + + ngOnInit(): void {} + + beforeReq = (requestOptions: STRequestOptions) => { + if (this.sf) { + Object.assign(requestOptions.body, { ...this.sf.value }); + } + return requestOptions; + }; + + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + this._$expand = false; + } + + /** + * 伸缩查询条件 + */ + expandToggle() { + this._$expand = !this._$expand; + this.sf?.setValue('/expand', this._$expand); + } + + exportList() { + this.service.downloadFile(this.service.$mock_url, { ...this.sf.value, pageIndex: this.st.pi, pageSize: this.st.ps }); + } + + private initSF(): SFSchema { + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + ltdId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + allowClear: true, + asyncData: () => this.service.getNetworkFreightForwarder() + } + }, + cno: { + type: 'string', + title: '结算客户', + ui: { placeholder: '请输入' } + }, + arto: { + type: 'string', + title: '付款人', + ui: { placeholder: '请输入' } + }, + brmtype: { + type: 'string', + title: '收款类型', + enum: [{ label: '全部', value: null }], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: null + }, + bankType: { + type: 'string', + title: '银行类型', + enum: [ + { label: '全部', value: null }, + { label: '平安银行', value: '1' }, + { label: '浦发银行', value: '2' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + }, + default: null + } + } + }; + } + + private initST(): STColumn[] { + return [ + { title: '网络货运人', width: 160, index: 'ltdName' }, + { title: '银行类型', width: 120, index: 'bankTypeLabel' }, + { title: '收款账户', width: 120, index: 'ltdaccountId' }, + { title: '收款类型', width: 120, index: 'brmtype' }, + { + title: '预收余额', + index: 'yskmoney', + width: 140, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: ({ record }) => ({ value: record.yskmoney }) } + }, + { title: '付款人', index: 'arto', width: 180 }, + { title: '结算客户', index: 'cno', width: 150 }, + { + title: '操作', + width: 120, + className: 'text-center', + fixed: 'right', + buttons: [ + { + text: '浏览', + click: item => this.router.navigate(['/financial-management/advance-collection/detail/' + item.id]) + }, + { + text: '核销', + }, + { + text: '退款', + } + ] + } + ]; + } +} 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 583c91d7..bcef4941 100644 --- a/src/app/routes/financial-management/financial-managemen-routing.module.ts +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -29,6 +29,8 @@ import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt- import { PaymentOrderDetailComponent } from './components/payment-order/payment-order-detail/payment-order-detail.component'; import { PlatformAccountComponent } from './components/platform-account/platform-account.component'; import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component'; +import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component'; +import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component'; const routes: Routes = [ { path: 'freight-account', component: FreightAccountComponent, data: { guard: { ability: ['FINANCIAL-FREIGHT-ACOUNT-list'] } } }, @@ -57,6 +59,8 @@ const routes: Routes = [ { path: 'payment-order/detail/:id', component: PaymentOrderDetailComponent }, { path: 'receipt-order', component: ReceiptOrderComponent }, { path: 'receipt-order/detail/:id', component: ReceiptOrderDetailComponent }, + { path: 'advance-collection', component: AdvanceCollectionComponent }, + { path: 'advance-collection/detail/:id', component: AdvanceCollectionDetailComponent }, { path: 'receivable-order', component: ReceivableOrderComponent }, { path: 'receivable-order/detail/:id', component: ReceivableOrderDetailComponent }, { path: 'payable-order', component: PayableOrderComponent }, diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index a61972f6..1da0af17 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -32,6 +32,8 @@ import { VoucherListComponent } from './components/voucher-summary/voucher-list/ import { ReceiptOrderDetailComponent } from './components/receipt-order/receipt-order-detail/receipt-order-detail.component'; import { PlatformAccountComponent } from './components/platform-account/platform-account.component'; import { PlatformAccountDetailComponent } from './components/platform-account/platform-account-detail/platform-account-detail.component'; +import { AdvanceCollectionComponent } from './components/advance-collection/advance-collection.component'; +import { AdvanceCollectionDetailComponent } from './components/advance-collection/advance-collection-detail/advance-collection-detail.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -60,7 +62,9 @@ const ROUTESCOMPONENTS = [ PlatformAccountDetailComponent, PaymentOrderDetailComponent, VoucherListComponent, - ReceiptOrderDetailComponent + ReceiptOrderDetailComponent, + AdvanceCollectionComponent, + AdvanceCollectionDetailComponent ]; const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, ClearingModalComponent]; 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 a62327d7..7dbddb78 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -101,6 +101,9 @@ export class FreightAccountService extends ShipperBaseService { // 下载银行回单请求 $api_download_receipt_apply = '/api/fcc/spd/callback/receiptApply'; + // 查询预收款余额 + $api_get_advance_collection_page = '/api/fcc/ficoYskBla/list/page'; + constructor(public injector: Injector, public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv); }