From a3293f7a541bd4e08eefa35cb25a8e0cea4e4f46 Mon Sep 17 00:00:00 2001 From: Taric Xin Date: Fri, 1 Apr 2022 10:29:52 +0800 Subject: [PATCH] edit --- .../dist/recharge-record.component.js | 252 ++++++++++++++++++ .../recharge-record.component.html | 13 +- .../recharge-record.component.ts | 34 ++- 3 files changed, 295 insertions(+), 4 deletions(-) create mode 100644 src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js diff --git a/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js b/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js new file mode 100644 index 00000000..d6f8ba31 --- /dev/null +++ b/src/app/routes/financial-management/components/recharge-record/dist/recharge-record.component.js @@ -0,0 +1,252 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +}; +exports.__esModule = true; +exports.RechargeRecordComponent = void 0; +var core_1 = require("@angular/core"); +var RechargeRecordComponent = /** @class */ (function () { + function RechargeRecordComponent(service, modal) { + var _this = this; + this.service = service; + this.modal = modal; + this.columns = this.initST(); + this.searchSchema = this.initSF(); + this.rechargeRemark = ''; + this._$expand = false; + this.beforeReq = function (requestOptions) { + if (_this.sf) { + Object.assign(requestOptions.body, __assign({}, _this.sf.value)); + } + return requestOptions; + }; + } + RechargeRecordComponent.prototype.ngOnInit = function () { }; + RechargeRecordComponent.prototype.addRemark = function (item) { + var _this = this; + this.rechargeRemark = item.rechargeRemark; + var modal = this.modal.create({ + nzTitle: this.rechargeRemark ? '修改备注' : '添加备注', + nzContent: this.remarkodal, + nzFooter: [ + { + type: 'primary', + label: '确认', + loading: function () { return _this.service.http.loading; }, + onClick: function () { + modal.destroy(); + } + } + ] + }); + }; + RechargeRecordComponent.prototype.goBack = function () { + history.go(-1); + }; + /** + * 重置表单 + */ + RechargeRecordComponent.prototype.resetSF = function () { + this.sf.reset(); + this._$expand = false; + }; + /** + * 伸缩查询条件 + */ + RechargeRecordComponent.prototype.expandToggle = function () { + var _a; + this._$expand = !this._$expand; + (_a = this.sf) === null || _a === void 0 ? void 0 : _a.setValue('/expand', this._$expand); + }; + RechargeRecordComponent.prototype.exportList = function () { + this.service.downloadFile(this.service.$mock_url, __assign(__assign({}, this.sf.value), { pageSize: -1 })); + }; + RechargeRecordComponent.prototype.initSF = function () { + var _this = this; + return { + properties: { + expand: { + type: 'boolean', + ui: { + hidden: true + } + }, + rechargeNo: { + type: 'string', + title: '充值单号', + ui: { + placeholder: '请输入' + } + }, + rechargeStatus: { + type: 'string', + title: '充值状态', + "enum": [ + { label: '全部', value: '' }, + { label: '充值中', value: '1' }, + { label: '充值失败', value: '2' }, + { label: '充值成功', value: '3' } + ], + ui: { + widget: 'select', + placeholder: '请选择' + }, + "default": '' + }, + createTime: { + title: '充值时间', + type: 'string', + ui: { + widget: 'date', + mode: 'range', + format: 'yyyy-MM-dd' + } + }, + roleName: { + type: 'string', + title: '账户名称', + ui: { + placeholder: '请输入', + autocomplete: 'off', + visibleIf: { + expand: function (value) { return value; } + } + } + }, + accountType: { + type: 'string', + title: '账户类型', + "enum": [ + { label: '全部', value: '' }, + { label: '货主账户', value: '1' }, + { label: '司机账户', value: '2' }, + { label: '营商商账户', value: '3' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: function (value) { return value; } + } + }, + "default": '' + }, + ltdId: { + type: 'string', + title: '网络货运人', + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: function (value) { return value; } + }, + allowClear: true, + asyncData: function () { return _this.service.getNetworkFreightForwarder(); } + } + }, + bankType: { + type: 'string', + title: '银行类型', + "enum": [ + { label: '全部', value: '' }, + { label: '平安银行', value: '1' }, + { label: '浦发银行', value: '2' } + ], + ui: { + widget: 'select', + placeholder: '请选择', + visibleIf: { + expand: function (value) { return value; } + } + }, + "default": '' + } + } + }; + }; + RechargeRecordComponent.prototype.initST = function () { + var _this = this; + return [ + { title: '充值时间', index: 'createTime', type: 'date', width: 180 }, + { title: '充值单号', index: 'rechargeNo', width: 140 }, + { title: '网络货运人', index: 'ltdName', width: 160 }, + { title: '银行类型', index: 'bankTypeLabel', width: 100 }, + { title: '账户类型', index: 'accountTypeLabel', width: 100 }, + { title: '账户名称', index: 'roleName', width: 160 }, + { title: '虚拟账户', index: 'virtualAccount', width: 100 }, + { + title: '充值金额', + index: 'rechargeAmount', + width: 160, + type: 'widget', + className: 'text-right', + widget: { type: 'currency-chy', params: function (_a) { + var record = _a.record; + return ({ value: record.rechargeAmount }); + } } + }, + { title: '充值银行账户', render: 'transferBankAccount', width: 200 }, + { title: '充值方式', index: 'payChannelLabel', width: 100 }, + { title: '充值状态', index: 'rechargeStatusLabel', width: 100 }, + { title: '银行流水号', index: 'paySerialNumber', width: 120 }, + { + title: '操作', + width: 120, + fixed: 'right', + className: 'text-center', + buttons: [ + { type: 'divider' }, + { + text: '查看回单
', + click: function (item) { + return _this.service.getReceiptUrl(item.receiptUrl, { + bankType: item.bankType, + rmYll: item.roleId, + snglFlgCd: item.paySerialNumber2, + bussType: '06', + ltdId: item.ltdId, + accountType: item.accountType + }); + } + }, + { + text: '添加备注', + click: function (item) { return _this.addRemark(item); } + } + ] + } + ]; + }; + __decorate([ + core_1.ViewChild('st', { static: true }) + ], RechargeRecordComponent.prototype, "st"); + __decorate([ + core_1.ViewChild('sf', { static: false }) + ], RechargeRecordComponent.prototype, "sf"); + __decorate([ + core_1.ViewChild('remarkodal', { static: true }) + ], RechargeRecordComponent.prototype, "remarkodal"); + RechargeRecordComponent = __decorate([ + core_1.Component({ + selector: 'app-recharge-record', + templateUrl: './recharge-record.component.html', + styleUrls: ['../../../commom/less/box.less', '../../../commom/less/expend-but.less'] + }) + ], RechargeRecordComponent); + return RechargeRecordComponent; +}()); +exports.RechargeRecordComponent = RechargeRecordComponent; diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html index 308cf2a7..bc3a4e92 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.html @@ -42,4 +42,15 @@ {{ item.transferBankOpenName }}
{{ item.transferBankCardNumber }} - \ No newline at end of file + + + +
+
+ + + +
+
+
\ No newline at end of file diff --git a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts index 0c7054fb..bb067549 100644 --- a/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts +++ b/src/app/routes/financial-management/components/recharge-record/recharge-record.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, ViewChild } from '@angular/core'; import { STComponent, STColumn, STChange, STRequestOptions } from '@delon/abc/st'; import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; +import { NzModalService } from 'ng-zorro-antd/modal'; import { FreightAccountService } from '../../services/freight-account.service'; @Component({ @@ -16,8 +17,12 @@ export class RechargeRecordComponent implements OnInit { columns: STColumn[] = this.initST(); searchSchema: SFSchema = this.initSF(); + @ViewChild('remarkodal', { static: true }) + remarkodal!: any; + rechargeRemark = ''; + _$expand = false; - constructor(public service: FreightAccountService) {} + constructor(public service: FreightAccountService, private modal: NzModalService) {} ngOnInit(): void {} @@ -28,6 +33,24 @@ export class RechargeRecordComponent implements OnInit { return requestOptions; }; + addRemark(item: any) { + this.rechargeRemark = item.rechargeRemark; + const modal = this.modal.create({ + nzTitle: this.rechargeRemark ? '修改备注' : '添加备注', + nzContent: this.remarkodal, + nzFooter: [ + { + type: 'primary', + label: '确认', + loading: () => this.service.http.loading, + onClick: () => { + modal.destroy(); + } + } + ] + }); + } + goBack() { history.go(-1); } @@ -178,12 +201,13 @@ export class RechargeRecordComponent implements OnInit { { title: '银行流水号', index: 'paySerialNumber', width: 120 }, { title: '操作', - width: 100, + width: 120, fixed: 'right', className: 'text-center', buttons: [ + { type: 'divider' }, { - text: '查看回单', + text: '查看回单
', click: item => this.service.getReceiptUrl(item.receiptUrl, { bankType: item.bankType, @@ -193,6 +217,10 @@ export class RechargeRecordComponent implements OnInit { ltdId: item.ltdId, accountType: item.accountType }) + }, + { + text: '添加备注', + click: item => this.addRemark(item) } ] }