diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.html b/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.html new file mode 100644 index 00000000..2b649160 --- /dev/null +++ b/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.html @@ -0,0 +1,56 @@ + + + + + + + +
+ 记账凭证 + + + + {{info?.vcltdcode}} + + + {{info?.vctype}} + + + {{info?.vctime}} + +
+ + + + +
+
合计:
+
{{info?.drmoney | currency}}
+
{{info?.crmoney | currency}}
+
+
+
+ + + + {{ auxVO.auxLabel }}: {{ auxVO.auxValue }}
+
+
+
+ +
+ + {{info?.remarks}} + + + {{info?.createUserId}} + + + {{info?.createUserId}} + +
+ +
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.ts b/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.ts new file mode 100644 index 00000000..3f65b793 --- /dev/null +++ b/src/app/routes/financial-management/components/voucher-management/voucher-detail/voucher-detail.component.ts @@ -0,0 +1,57 @@ +import { CurrencyPipe } from '@angular/common'; +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute } from '@angular/router'; +import { STData, STColumn, STRequestOptions } from '@delon/abc/st'; +import { FreightAccountService } from '../../../services/freight-account.service'; + +@Component({ + selector: 'app-voucher-detail', + templateUrl: './voucher-detail.component.html', + providers: [CurrencyPipe] +}) +export class VoucherDetailComponent implements OnInit { + columns: STColumn[] = [ + { title: '摘要', index: 'remarks' }, + { title: '会计科目', index: 'subname' }, + { title: '辅助核算', render: 'auxVOList' }, + { title: '币种', index: 'currency', className: 'text-center' }, + { + title: '借方金额', + index: 'drlocalmoney', + width: 150, + type: 'currency', + format: item => `${this.currencyPipe.transform(item.drlocalmoney)}` + }, + { + title: '贷方金额', + index: 'crlocalmoney', + width: 150, + type: 'currency', + format: item => `${this.currencyPipe.transform(item.crlocalmoney)}` + } + ]; + id!: string; + + info: any = { faShowVOList: [] }; + + constructor(public service: FreightAccountService, private currencyPipe: CurrencyPipe, private route: ActivatedRoute) { + this.id = route.snapshot.params.id; + } + + ngOnInit(): void { + this.loadDetail(this.id); + } + + loadDetail(id: string) { + this.service.request(this.service.$api_get_fico_vch__detail, { id }).subscribe(res => { + if (res) { + this.info = res; + } + console.log(res); + }); + } + + goBack() { + history.go(-1); + } +} diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html index 1171d0fc..484ee40a 100644 --- a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html +++ b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.html @@ -33,7 +33,7 @@ - { if (this.sf) { Object.assign(requestOptions.body, { - ...this.sf.value, - createtime: { - start: this.sf.value.createtime?.[0] || null, - end: this.sf.value.createtime?.[1] || null - }, - invdate: { - start: this.sf.value.invdate?.[0] || null, - end: this.sf.value.invdate?.[1] || null - } + ...this.sf.value }); + if (this.sf.value.createTime) { + Object.assign(requestOptions.body, { + createTime: { + start: this.sf.value.createTime?.[0] || null, + end: this.sf.value.createTime?.[1] || null + } + }); + } + if (this.sf.value.vctime) { + Object.assign(requestOptions.body, { + vctime: { + start: this.sf.value.vctime?.[0] || null, + end: this.sf.value.vctime?.[1] || null + } + }); + } } return requestOptions; }; @@ -54,19 +69,6 @@ export class VoucherManagementComponent implements OnInit { } } - addInvoice() { - if (this.selectedRows?.length <= 0) { - this.service.msgSrv.warning('请选择申请记录'); - return; - } - const modal = this.nzModalService.create({ - nzTitle: '收票信息', - nzContent: AddCollectionInvoiceModalComponent, - nzComponentParams: { i: { userId: 0 } }, - nzFooter: null - }); - } - /** * 重置表单 */ @@ -92,7 +94,7 @@ export class VoucherManagementComponent implements OnInit { hidden: true } }, - inpinvcode: { + vccode: { type: 'string', title: '凭证号', ui: { @@ -100,7 +102,7 @@ export class VoucherManagementComponent implements OnInit { placeholder: '请输入' } }, - ltdid: { + cno: { type: 'string', title: '客户', ui: { @@ -111,7 +113,7 @@ export class VoucherManagementComponent implements OnInit { }, default: '' }, - createtime: { + vctime: { title: '凭证时间', type: 'string', ui: { @@ -119,7 +121,7 @@ export class VoucherManagementComponent implements OnInit { format: 'yyyy-MM-dd' } as SFDateWidgetSchema }, - inpinvc2ode: { + sourceCode: { type: 'string', title: '原始单号', ui: { @@ -130,7 +132,7 @@ export class VoucherManagementComponent implements OnInit { } } }, - invtype: { + sourceType: { type: 'string', title: '原始单类型', ui: { @@ -141,7 +143,7 @@ export class VoucherManagementComponent implements OnInit { } } }, - createtim2e: { + createTime: { title: '创建时间', type: 'string', ui: { @@ -162,19 +164,25 @@ export class VoucherManagementComponent implements OnInit { } } }, - sts: { + vctype: { type: 'string', title: '凭证类型', + enum: [ + { value: null, label: '全部' }, + { value: 'WLW', label: 'WLW' }, + { value: 'CH', label: 'CH' }, + { value: 'YHY', label: 'YHY' }, + { value: 'KP', label: 'KP' } + ], ui: { - widget: 'dict-select', - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - s2ts: { + subid: { type: 'string', title: '科目', ui: { @@ -186,8 +194,8 @@ export class VoucherManagementComponent implements OnInit { } } }, - remarks: { - type: 'string', + drmoney: { + type: 'number', title: '借方金额', ui: { placeholder: '请输入', @@ -196,8 +204,8 @@ export class VoucherManagementComponent implements OnInit { } } }, - billCode: { - type: 'string', + crmoney: { + type: 'number', title: '贷方金额', ui: { placeholder: '请输入', @@ -206,7 +214,7 @@ export class VoucherManagementComponent implements OnInit { } } }, - s2t2s: { + vcltdid: { type: 'string', title: '帐套', ui: { @@ -218,19 +226,24 @@ export class VoucherManagementComponent implements OnInit { } } }, - s22t2s: { + sts: { type: 'string', title: '凭证状态', + enum: [ + { value: null, label: '全部' }, + { value: 0, label: '新建' }, + { value: 1, label: '待审核' }, + { value: 2, label: '已通过' } + ], ui: { - widget: 'dict-select', - params: { dictKey: 'refund:apply:status' }, + widget: 'select', placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } } }, - feecode: { + importncnotes: { type: 'string', title: 'NC凭证', ui: { @@ -240,7 +253,7 @@ export class VoucherManagementComponent implements OnInit { } } }, - feecsode: { + vc2code: { type: 'string', title: '汇总凭证号', ui: { @@ -250,7 +263,7 @@ export class VoucherManagementComponent implements OnInit { } } }, - s22t2ss: { + importnc: { type: 'string', title: '导入NC', ui: { @@ -262,9 +275,14 @@ export class VoucherManagementComponent implements OnInit { } } }, - s22t2s1s: { + isvc2: { type: 'string', title: '是否汇总', + enum: [ + { value: null, label: '全部' }, + { value: 0, label: '否' }, + { value: 1, label: '是' } + ], ui: { widget: 'select', placeholder: '请选择', @@ -279,28 +297,41 @@ export class VoucherManagementComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, - { title: '凭证号', index: 'inpinvcode', type: 'link' }, - { title: '帐套', index: 'ltdid' }, - { title: '凭证时间', index: 'invdate', type: 'date' }, - { title: '凭证类型', index: 'invoiceno' }, - { title: '序号', index: 'invmoney' }, - { title: '摘要', index: 'invtax' }, - { title: '币种', index: 'invtype' }, - { title: '借方金额', index: 'hrto' }, - { title: '贷方金额', index: 'createtime', type: 'date' }, - { title: 'NC凭证', index: 'createbyname' }, - { title: '汇总凭证号', index: 'sts', width: 150 }, - { title: '凭证状态', index: 'sts' }, - { title: '创建时间', index: 'sts' }, - { title: '创建人', index: 'sts' }, + { title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' }, + { title: '凭证号', index: 'id', type: 'link', width: 150 }, + { title: '帐套', index: 'vcltdid', width: 150 }, + { title: '凭证时间', index: 'vctime', type: 'date', width: 150 }, + { title: '凭证类型', index: 'vctype', enum: { WLW: 'WLW', CH: 'CH', YHY: 'YHY', KP: 'KP' }, width: 150 }, + { title: '序号', index: 'invmoney', width: 150, format: _ => '1' }, + { title: '摘要', index: 'remarks', width: 300 }, + { title: '币种', index: 'currency', width: 100 }, + { + title: '借方金额', + index: 'drmoney', + width: 120, + className: 'text-right', + format: item => `${this.currencyPipe.transform(item.armoney || 0)}` + }, + { + title: '贷方金额', + index: 'crmoney', + width: 120, + className: 'text-right', + format: item => `${this.currencyPipe.transform(item.armoney || 0)}` + }, + { title: 'NC凭证', index: 'importncnotes', width: 150 }, + { title: '汇总凭证号', index: 'vc2id', width: 150 }, + { title: '凭证状态', index: 'sts', enum: { 0: '新建', 1: '待审核', 2: '已通过' }, width: 120 }, + { title: '创建时间', index: 'createTime', width: 140 }, + { title: '创建人', index: 'createUserId', width: 150 }, { title: '操作', width: '130px', fixed: 'right', buttons: [ { - text: '浏览' + text: '浏览', + click: (item: any) => this.router.navigate(['/financial-management/voucher-management/detail/' + item.id]) }, { text: '修改' diff --git a/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.html b/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.html new file mode 100644 index 00000000..3434680b --- /dev/null +++ b/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.html @@ -0,0 +1,49 @@ + + + + + + + +
+ 记账凭证 + + + + 天津怡亚通物流科技有限公司 + + + WL + + + 2021-12-12 + +
+ + + + +
+
合计:
+
{{111 | currency}}
+
{{111 | currency}}
+
+
+
+
+ +
+ + 收取服务费XXXX + + + VC202112120001 + +
+ +
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.ts b/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.ts new file mode 100644 index 00000000..4b12b043 --- /dev/null +++ b/src/app/routes/financial-management/components/voucher-summary/summary-detail/summary-detail.component.ts @@ -0,0 +1,39 @@ +import { CurrencyPipe } from '@angular/common'; +import { Component, OnInit } from '@angular/core'; +import { STData, STColumn, STRequestOptions } from '@delon/abc/st'; +import { FreightAccountService } from '../../../services/freight-account.service'; + +@Component({ + selector: 'app-summary-detail', + templateUrl: './summary-detail.component.html', + providers: [CurrencyPipe] +}) +export class SummaryDetailComponent implements OnInit { + data: STData[] = Array(100) + .fill({}) + .map((_, idx) => ({ + id: idx + 1, + price: ~~(Math.random() * 100), + age: ~~(Math.random() * 100) > 50 ? '女' : '男' + })); + columns: STColumn[] = [ + { title: '摘要', type: 'no' }, + { title: '会计科目', index: 'id' }, + { title: '辅助核算', index: 'age' }, + { title: '币种', index: 'price', className: 'text-center' }, + { title: '借方金额', index: 'price', width: 150, type: 'currency', format: item => `${this.currencyPipe.transform(item.price)}` }, + { title: '贷方金额', index: 'price', width: 150, type: 'currency', format: item => `${this.currencyPipe.transform(item.price)}` } + ]; + + constructor(public service: FreightAccountService, private currencyPipe: CurrencyPipe) {} + + ngOnInit(): void {} + + beforeReq = (requestOptions: STRequestOptions) => { + return requestOptions; + }; + + goBack() { + history.go(-1); + } +} diff --git a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html index 165281c4..0d2a30ed 100644 --- a/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html +++ b/src/app/routes/financial-management/components/voucher-summary/voucher-summary.component.html @@ -3,16 +3,17 @@
-
+
-
+
- - + + + +
- - -
- -
- 已选择 - {{ selectedRows.length }} 张发票 - 清空 -
-
- + value - } - } - }, - hrto: { - type: 'string', - title: '销售方', - ui: { placeholder: '请输入', visibleIf: { expand: (value: boolean) => value } } }, - createtime: { + invtype: { + type: 'string', + title: '原始单类型', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + createtim2e: { title: '创建时间', type: 'string', ui: { @@ -151,9 +156,19 @@ export class VoucherSummaryComponent implements OnInit { } } as SFDateWidgetSchema }, + inpinvcosde: { + type: 'string', + title: '凭证摘要', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, sts: { type: 'string', - title: '收票状态', + title: '凭证类型', ui: { widget: 'dict-select', params: { dictKey: 'refund:apply:status' }, @@ -163,12 +178,13 @@ export class VoucherSummaryComponent implements OnInit { } } }, - invdate: { + s2ts: { type: 'string', - title: '发票日期', + title: '科目', ui: { - widget: 'sl-from-to-search', - format: 'yyyy-MM-dd', + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择', visibleIf: { expand: (value: boolean) => value } @@ -176,7 +192,7 @@ export class VoucherSummaryComponent implements OnInit { }, remarks: { type: 'string', - title: '收票备注', + title: '借方金额', ui: { placeholder: '请输入', visibleIf: { @@ -186,7 +202,7 @@ export class VoucherSummaryComponent implements OnInit { }, billCode: { type: 'string', - title: '订单号', + title: '贷方金额', ui: { placeholder: '请输入', visibleIf: { @@ -194,15 +210,72 @@ export class VoucherSummaryComponent implements OnInit { } } }, + s2t2s: { + type: 'string', + title: '帐套', + ui: { + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + s22t2s: { + type: 'string', + title: '凭证状态', + ui: { + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, feecode: { type: 'string', - title: '费用号', + title: 'NC凭证', ui: { placeholder: '请输入', visibleIf: { expand: (value: boolean) => value } } + }, + feecsode: { + type: 'string', + title: '凭证号', + ui: { + placeholder: '请输入', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + s22t2ss: { + type: 'string', + title: '导入NC', + ui: { + widget: 'dict-select', + params: { dictKey: 'refund:apply:status' }, + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } + }, + createt1im2e: { + title: '统计时间', + type: 'string', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd', + visibleIf: { + expand: (value: boolean) => value + } + } as SFDateWidgetSchema } } }; @@ -210,28 +283,47 @@ export class VoucherSummaryComponent implements OnInit { private initST(): STColumn[] { return [ - { title: '', index: 'key', type: 'checkbox' }, - { title: '收票单号', index: 'inpinvcode', type: 'link' }, - { title: '网络货运人', index: 'ltdid' }, - { title: '发票日期', index: 'invdate', type: 'date' }, - { title: '发票号', index: 'invoiceno' }, - { title: '发票金额', index: 'invmoney' }, - { title: '税额', index: 'invtax' }, - { title: '发票类型', index: 'invtype' }, - { title: '销售方', index: 'hrto' }, - { title: '创建时间', index: 'createtime', type: 'date' }, - { title: '创建人', index: 'createbyname' }, - { title: '收票状态', index: 'sts' }, + { title: '', index: 'key', type: 'checkbox', width: 60, className: 'text-center', fixed: 'left' }, + { title: '汇总凭证号', index: 'inpinvcode', type: 'link', width: 140 }, + { title: '帐套', index: 'ltdid', width: 120 }, + { title: '凭证时间', index: 'invdate', type: 'date', width: 150 }, + { title: '统计时间', index: 'invdate', type: 'date', width: 150 }, + { title: '凭证类型', index: 'invoiceno', width: 120 }, + { title: '序号', index: 'invmoney', width: 100 }, + { title: '摘要', index: 'invtax', width: 120 }, + { title: '币种', index: 'invtype', width: 100 }, + { + title: '借方金额', + index: 'hrto', + width: 120, + className: 'text-right', + format: item => `${this.currencyPipe.transform(item.armoney || 0)}` + }, + { + title: '贷方金额', + index: 'createtime', + type: 'date', + width: 120, + className: 'text-right', + format: item => `${this.currencyPipe.transform(item.armoney || 0)}` + }, + { title: 'NC凭证', index: 'createbyname', width: 120 }, + { title: '凭证状态', index: 'sts', width: 120 }, + { title: '创建时间', index: 'sts', width: 150 }, + { title: '创建人', index: 'sts', width: 120 }, { title: '操作', + width: '130px', + fixed: 'right', + className: 'text-center', buttons: [ { text: '浏览', - click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id]) + click: (item: any) => this.router.navigate(['/financial-management/voucher-summary/detail/' + item.id]) }, { - text: '修改', - click: item => this.router.navigate(['/ticket/input-invoice/edit/1']) + text: '列表', + click: (item: any) => this.router.navigate(['/financial-management/voucher-summary/detail/' + item.id]) } ] } 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 5e2923c2..a8e96b1f 100644 --- a/src/app/routes/financial-management/financial-managemen-routing.module.ts +++ b/src/app/routes/financial-management/financial-managemen-routing.module.ts @@ -22,6 +22,8 @@ import { ReceivableOrderComponent } from './components/receivable-order/receivab 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'; +import { VoucherDetailComponent } from './components/voucher-management/voucher-detail/voucher-detail.component'; +import { SummaryDetailComponent } from './components/voucher-summary/summary-detail/summary-detail.component'; const routes: Routes = [ { path: 'freight-account', component: FreightAccountComponent }, @@ -32,7 +34,9 @@ const routes: Routes = [ { path: 'withdrawals-record', component: WithdrawalsRecordComponent }, { path: 'withdrawals-record/detail/:id', component: WithdrawalsDetailComponent }, { path: 'voucher-management', component: VoucherManagementComponent }, + { path: 'voucher-management/detail/:id', component: VoucherDetailComponent }, { path: 'voucher-summary', component: VoucherSummaryComponent }, + { path: 'voucher-summary/detail/:id', component: SummaryDetailComponent }, { path: 'cost-management', component: CostManagementComponent }, { path: 'cost-management/detail/:id', component: CostManagementDetailComponent }, { path: 'cost-management/expenses-receivable/:id', component: ExpensesReceivableComponent }, diff --git a/src/app/routes/financial-management/financial-management.module.ts b/src/app/routes/financial-management/financial-management.module.ts index 58cc4e1e..4b7b076b 100644 --- a/src/app/routes/financial-management/financial-management.module.ts +++ b/src/app/routes/financial-management/financial-management.module.ts @@ -26,6 +26,8 @@ import { ReceivableOrderComponent } from './components/receivable-order/receivab 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'; +import { VoucherDetailComponent } from './components/voucher-management/voucher-detail/voucher-detail.component'; +import { SummaryDetailComponent } from './components/voucher-summary/summary-detail/summary-detail.component'; const ROUTESCOMPONENTS = [ FreightAccountComponent, @@ -43,16 +45,19 @@ const ROUTESCOMPONENTS = [ PaymentOrderComponent, ReceiptOrderComponent, VoucherManagementComponent, + VoucherDetailComponent, VoucherSummaryComponent, + SummaryDetailComponent, ReceivableOrderComponent, PayableOrderComponent, - ReceivableOrderDetailComponent + ReceivableOrderDetailComponent, + PayableOrderDetailComponent ]; const NOTROUTECOMPONENTS = [DriverAccountDetailComponent, FreightAccountDetailComponent, SettingFinancialComponent, ClearingModalComponent]; @NgModule({ - declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS, PayableOrderDetailComponent], + declarations: [...ROUTESCOMPONENTS, ...NOTROUTECOMPONENTS], 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 fa258465..066e6615 100644 --- a/src/app/routes/financial-management/services/freight-account.service.ts +++ b/src/app/routes/financial-management/services/freight-account.service.ts @@ -71,6 +71,11 @@ export class FreightAccountService extends ShipperBaseService { // 查询应付核销明细 $api_get_fico_ph_detail_header = '/api/fcc/ficoPhxL/list/page'; + // 查询总账凭证表 + $api_get_fico_vch_page = '/api/fcc/ficoVcH/list/page'; + // 获取总账凭证表详情信息 + $api_get_fico_vch__detail = '/api/fcc/ficoVcH/getDetail'; + constructor(public injector: Injector,public eaCacheSrv: EACacheService) { super(injector, eaCacheSrv);