From 08617ecfa16e39878c931c840bf910bb142cf9eb Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Thu, 13 Jan 2022 15:49:58 +0800 Subject: [PATCH] edit --- .../driver-account.component.ts | 54 +++++- .../freight-account.component.ts | 1 + .../voucher-management.component.html | 9 +- .../voucher-management.component.ts | 167 +++++++++++++----- .../express-info/express-info.component.html | 29 +++ .../express-info/express-info.component.less | 0 .../express-info/express-info.component.ts | 102 +++++++++++ .../ticket-management-routing.module.ts | 4 +- .../ticket-management.module.ts | 9 +- .../account-detail.component.html | 2 +- .../account-detail.component.ts | 36 +++- src/assets/mocks/menu-data.json | 4 + 12 files changed, 348 insertions(+), 69 deletions(-) create mode 100644 src/app/routes/ticket-management/components/express-info/express-info.component.html create mode 100644 src/app/routes/ticket-management/components/express-info/express-info.component.less create mode 100644 src/app/routes/ticket-management/components/express-info/express-info.component.ts diff --git a/src/app/routes/financial-management/components/driver-account/driver-account.component.ts b/src/app/routes/financial-management/components/driver-account/driver-account.component.ts index b91fc0e3..649e61cc 100644 --- a/src/app/routes/financial-management/components/driver-account/driver-account.component.ts +++ b/src/app/routes/financial-management/components/driver-account/driver-account.component.ts @@ -1,14 +1,18 @@ +import { CurrencyPipe } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Router } from '@angular/router'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { ShipperBaseService } from '@shared'; +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-driver-account', templateUrl: './driver-account.component.html', - styleUrls: ['./driver-account.component.less'] + styleUrls: ['./driver-account.component.less'], + providers: [CurrencyPipe] }) export class DriverAccountComponent implements OnInit { @ViewChild('st', { static: true }) @@ -20,7 +24,12 @@ export class DriverAccountComponent implements OnInit { columns: STColumn[] = this.initST(); _$expand = false; - constructor(public service: FreightAccountService, private router: Router) {} + constructor( + public service: FreightAccountService, + private router: Router, + private modal: NzModalService, + private currencyPipe: CurrencyPipe + ) {} ngOnInit(): void {} @@ -32,6 +41,16 @@ export class DriverAccountComponent implements OnInit { return requestOptions; }; + showAccountDetail(item: any) { + this.modal.create({ + nzTitle: '账户明细', + nzContent: AccountDetailComponent, + nzWidth: 600, + nzComponentParams: {}, + nzFooter: null + }); + } + /** * 重置表单 */ @@ -146,10 +165,33 @@ export class DriverAccountComponent implements OnInit { { title: '网络货运人', index: 'ltdName' }, { title: '银行类型', index: 'bankTypeLabel' }, { title: '虚拟账户', index: 'virtualAccount' }, - { title: '可用余额', index: 'availableBalance' }, - { title: '冻结余额', index: 'freezeBalance' }, - { title: '本月累计提现金额', index: 'withdrawBalance', width: 150 }, - { title: '账户总余额', index: 'availableBalance' }, + { + title: '可用余额', + index: 'availableBalance', + type: 'currency', + format: item => `${this.currencyPipe.transform(item.availableBalance)}` + }, + { + title: '冻结余额', + index: 'freezeBalance', + type: 'currency', + format: item => `${this.currencyPipe.transform(item.availableBalance)}` + }, + { + title: '本月累计提现金额', + index: 'withdrawBalance', + width: 150, + type: 'currency', + format: item => `${this.currencyPipe.transform(item.availableBalance)}` + }, + { + title: '账户总余额', + index: 'availableBalance', + className: 'text-right', + type: 'link', + format: item => `${this.currencyPipe.transform(item.availableBalance)}`, + click: item => this.showAccountDetail(item) + }, { title: '创建时间', index: 'createTime', type: 'date', width: 150 }, { title: '操作', diff --git a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts index dadfced6..49017bda 100644 --- a/src/app/routes/financial-management/components/freight-account/freight-account.component.ts +++ b/src/app/routes/financial-management/components/freight-account/freight-account.component.ts @@ -50,6 +50,7 @@ export class FreightAccountComponent implements OnInit { this.modal.create({ nzTitle: '账户明细', nzContent: AccountDetailComponent, + nzWidth: 600, nzComponentParams: {}, nzFooter: null }); 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 73f510c3..1171d0fc 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 @@ -10,9 +10,9 @@
- - - + + + + +
已选择 {{ selectedRows.length }} 张发票 diff --git a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts index e115af1f..a34465c0 100644 --- a/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts +++ b/src/app/routes/financial-management/components/voucher-management/voucher-management.component.ts @@ -102,7 +102,7 @@ export class VoucherManagementComponent implements OnInit { }, ltdid: { type: 'string', - title: '网络货运人', + title: '客户', ui: { widget: 'select', placeholder: '请选择', @@ -111,37 +111,37 @@ export class VoucherManagementComponent implements OnInit { }, default: '' }, - invoiceno: { + createtime: { + title: '凭证时间', type: 'string', - title: '发票号码', + ui: { + widget: 'sl-from-to-search', + format: 'yyyy-MM-dd' + } as SFDateWidgetSchema + }, + inpinvc2ode: { + type: 'string', + title: '原始单号', ui: { autocomplete: 'off', - placeholder: '请输入' - } - }, - invtype: { - type: 'string', - title: '发票类型', - ui: { - widget: 'dict-select', - params: { dictKey: 'refund:apply:status' }, - placeholder: '请选择', - visibleIf: { - expand: (value: boolean) => 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: { @@ -152,9 +152,19 @@ export class VoucherManagementComponent 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' }, @@ -164,12 +174,13 @@ export class VoucherManagementComponent 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 } @@ -177,7 +188,7 @@ export class VoucherManagementComponent implements OnInit { }, remarks: { type: 'string', - title: '收票备注', + title: '借方金额', ui: { placeholder: '请输入', visibleIf: { @@ -187,7 +198,7 @@ export class VoucherManagementComponent implements OnInit { }, billCode: { type: 'string', - title: '订单号', + title: '贷方金额', ui: { placeholder: '请输入', visibleIf: { @@ -195,15 +206,72 @@ export class VoucherManagementComponent 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 + } + } + }, + s22t2s1s: { + type: 'string', + title: '是否汇总', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: (value: boolean) => value + } + } } } }; @@ -212,27 +280,34 @@ 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: '创建人', index: 'createbyname' }, - { title: '收票状态', index: 'sts' }, + { 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' }, + { title: '凭证状态', index: 'sts' }, + { title: '创建时间', index: 'sts' }, + { title: '创建人', index: 'sts' }, { title: '操作', buttons: [ { - text: '浏览', - click: item => this.router.navigate(['/ticket/input-invoice/detail/' + item.id]) + text: '浏览' }, { - text: '修改', - click: item => this.router.navigate(['/ticket/input-invoice/edit/1']) + text: '修改' + }, + { + text: '删除 ' + }, + { + text: '提交' } ] } diff --git a/src/app/routes/ticket-management/components/express-info/express-info.component.html b/src/app/routes/ticket-management/components/express-info/express-info.component.html new file mode 100644 index 00000000..7ff92d54 --- /dev/null +++ b/src/app/routes/ticket-management/components/express-info/express-info.component.html @@ -0,0 +1,29 @@ + + + + +
+
+ +
+
+ + +
+
+
+ + + +
+
+ +
+
+ +
\ No newline at end of file diff --git a/src/app/routes/ticket-management/components/express-info/express-info.component.less b/src/app/routes/ticket-management/components/express-info/express-info.component.less new file mode 100644 index 00000000..e69de29b diff --git a/src/app/routes/ticket-management/components/express-info/express-info.component.ts b/src/app/routes/ticket-management/components/express-info/express-info.component.ts new file mode 100644 index 00000000..d52afa84 --- /dev/null +++ b/src/app/routes/ticket-management/components/express-info/express-info.component.ts @@ -0,0 +1,102 @@ +import { Component, OnInit, ViewChild } from '@angular/core'; +import { STComponent, STColumn, STChange } from '@delon/abc/st'; +import { SFComponent, SFSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; +import { TicketService } from '../../services/ticket.service'; + +@Component({ + selector: 'app-express-info', + templateUrl: './express-info.component.html', + styleUrls: ['./express-info.component.less'] +}) +export class ExpressInfoComponent implements OnInit { + @ViewChild('st', { static: true }) + st!: STComponent; + @ViewChild('sf', { static: false }) + sf!: SFComponent; + + url = `/rule?_allow_anonymous=true`; + + searchSchema: SFSchema = { + properties: { + receiveName: { + title: '配置类型', + type: 'string', + ui: { + widget: 'select', + placeholder: '请选择', + // asyncData: () => { + // return this.service.request(this.service.$api_getAppRoleList).pipe( + // map((res: any) => { + // this.roleList = res; + // return res.map((item: any) => { + // return { label: item.roleName, value: item.id }; + // }); + // }), + // ); + // }, + change: (i: any) => { + this.sf.value.receiveName = i; + this.sf?.setValue('/receiveName', i); + } + } + } + } + }; + + columns: STColumn[] = [ + { title: '配置类型', index: 'no' }, + { title: '配置项', index: 'description' }, + { + title: '启用状态', + className: 'text-center', + index: 'status', + type: 'badge', + badge: { + 0: { text: '启用', color: 'success' }, + 2: { text: '停用', color: 'error' }, + 3: { text: '停用', color: 'error' }, + 1: { text: '停用', color: 'error' } + } + }, + { + title: '创建时间', + index: 'updatedAt', + type: 'date' + } + ]; + + selectedRows: any[] = []; + + reqParams = { pageIndex: 1, pageSize: 10 }; + + constructor(public service: TicketService, private nzModalService: NzModalService) {} + + ngOnInit(): void {} + + stChange(e: STChange): void { + switch (e.type) { + case 'checkbox': + this.selectedRows = e.checkbox!; + break; + case 'filter': + this.st.load(); + break; + } + } + + printOrder() { + this.nzModalService.warning({ + nzTitle: '确认打印面单所选快递单?', + nzClosable: false, + nzCancelText: '取消', + nzOnOk: () => {} + }); + } + /** + * 重置表单 + */ + resetSF() { + this.sf.reset(); + } +} diff --git a/src/app/routes/ticket-management/ticket-management-routing.module.ts b/src/app/routes/ticket-management/ticket-management-routing.module.ts index 55b52986..ea2145f5 100644 --- a/src/app/routes/ticket-management/ticket-management-routing.module.ts +++ b/src/app/routes/ticket-management/ticket-management-routing.module.ts @@ -5,6 +5,7 @@ import { ETCBlacklistComponent } from './components/etc-blacklist/etc-blacklist. import { ETCInvoicedListComponent } from './components/etc-invoiced-list/etc-invoiced-list.component'; import { ETCInvoicedLogsComponent } from './components/etc-invoiced-logs/etc-invoiced-logs.component'; import { ETCInvoicedRequestedComponent } from './components/etc-invoiced-requested/etc-invoiced-requested.component'; +import { ExpressInfoComponent } from './components/express-info/express-info.component'; import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-collection-invoice/edit-collection-invoice.component'; import { InputInvoiceDetailComponent } from './components/input-invoice/input-invoice-detail/input-invoice-detail.component'; import { InputInvoiceComponent } from './components/input-invoice/input-invoice.component'; @@ -26,7 +27,8 @@ const routes: Routes = [ { path: 'etc-blacklist', component: ETCBlacklistComponent }, { path: 'input-invoice', component: InputInvoiceComponent }, { path: 'input-invoice/detail/:id', component: InputInvoiceDetailComponent }, - { path: 'input-invoice/edit/:id', component: EditCollectionInvoiceComponent } + { path: 'input-invoice/edit/:id', component: EditCollectionInvoiceComponent }, + { path: 'express-info', component: ExpressInfoComponent }, ]; @NgModule({ diff --git a/src/app/routes/ticket-management/ticket-management.module.ts b/src/app/routes/ticket-management/ticket-management.module.ts index 92e24cec..9217baaf 100644 --- a/src/app/routes/ticket-management/ticket-management.module.ts +++ b/src/app/routes/ticket-management/ticket-management.module.ts @@ -23,6 +23,7 @@ import { AddCollectionInvoiceModalComponent } from './components/input-invoice/a import { EditCollectionInvoiceComponent } from './components/input-invoice/edit-collection-invoice/edit-collection-invoice.component'; import { AddCostDetailComponent } from './components/input-invoice/add-cost-detail/add-cost-detail.component'; import { PrintOrderModalComponent } from './components/invoice-requested/print-order-modal/print-order-modal.component'; +import { ExpressInfoComponent } from './components/express-info/express-info.component'; const COMPONENTS: any = [ ETCInvoicedListComponent, @@ -37,7 +38,8 @@ const COMPONENTS: any = [ PushInvoiceComponent, InputInvoiceComponent, InputInvoiceDetailComponent, - EditCollectionInvoiceComponent + EditCollectionInvoiceComponent, + ExpressInfoComponent ]; const NOTROUTECOMPONENTS: any = [ TransactionDetailsComponent, @@ -46,10 +48,11 @@ const NOTROUTECOMPONENTS: any = [ AddOwnerComponent, AddCartComponent, AddCollectionInvoiceModalComponent, - AddCostDetailComponent + AddCostDetailComponent, + PrintOrderModalComponent ]; @NgModule({ - declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS, PrintOrderModalComponent], + declarations: [...COMPONENTS, ...NOTROUTECOMPONENTS], imports: [CommonModule, TicketManagementRoutingModule, SharedModule] }) export class TicketManagementModule {} diff --git a/src/app/shared/components/account-detail/account-detail.component.html b/src/app/shared/components/account-detail/account-detail.component.html index c17b5a4c..35a0ba7f 100644 --- a/src/app/shared/components/account-detail/account-detail.component.html +++ b/src/app/shared/components/account-detail/account-detail.component.html @@ -1,4 +1,4 @@ - { + this.initST(); + }, 200); + } beforeReq = (requestOptions: STRequestOptions) => { return requestOptions; }; + + initST() { + this.columns = [ + { title: '网络货运人', index: 'phone', className: 'text-center' }, + { + title: '平安账户余额', + index: 'ltdName', + type: 'currency', + format: item => `${this.currencyPipe.transform(item.availableBalance)}` + }, + { + title: '浦发账户余额', + index: 'bankTypeLabel', + type: 'currency', + format: item => `${this.currencyPipe.transform(item.availableBalance)}` + } + ]; + } } diff --git a/src/assets/mocks/menu-data.json b/src/assets/mocks/menu-data.json index 4c7e0fcf..e1e1118d 100644 --- a/src/assets/mocks/menu-data.json +++ b/src/assets/mocks/menu-data.json @@ -338,6 +338,10 @@ "text": "已开订单明细", "link": "/ticket/invoice-list/detail/:id", "hide": true + }, + { + "text": "快递信息", + "link": "/ticket/express-info" } ] },