UNPKG

@wjya/ngx-webapp-icpc.group.pms

Version:

angular webapp : icpc.group.pms

83 lines 6.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var data_source_helper_1 = require("../../service/data-source.helper"); var core_1 = require("@angular/core"); var ngx_webapp_fx_1 = require("@wjya/ngx-webapp-fx"); var router_1 = require("@angular/router"); var PropertyTransactionRecordDetailComponent = /** @class */ (function () { function PropertyTransactionRecordDetailComponent(dataSourceHelper, activateRoute, userStorageService) { var _this = this; this.dataSourceHelper = dataSourceHelper; this.activateRoute = activateRoute; this.userStorageService = userStorageService; this.data = {}; this.totalAmount = 0; this.items = []; this.openPayKinds = []; this.dataSource = dataSourceHelper.propertyFeeOrder; this.orderItemDataSource = dataSourceHelper.propertyFeeOrderItems; this.openPayKindDataSource = this.dataSourceHelper.openPayKindProviderSettings; this.openPayKindDataSource.findList({ size: 9999 }).subscribe(function (res) { _this.openPayKinds = res.body; }); } PropertyTransactionRecordDetailComponent.prototype.ngOnInit = function () { this.communityGroupId = this.userStorageService.getCurrentOffice().id; this.id = this.activateRoute.snapshot.params['id']; this.loadAll(); }; PropertyTransactionRecordDetailComponent.prototype.loadAll = function () { var _this = this; this.dataSource.findOne(this.id).subscribe(function (res) { _this.data = res.body; }); this.orderItemDataSource.findList({ orderId: this.id, communityGroupId: this.communityGroupId }).subscribe(function (res) { _this.items = res.body; if (res.body) { res.body.map(function (val) { _this.totalAmount += val.amount; }); _this.totalAmount = Number(_this.totalAmount.toFixed(2)); } }); }; PropertyTransactionRecordDetailComponent.prototype.formateValue = function (val) { if (this.openPayKinds) { for (var i = 0; i < this.openPayKinds.length; i++) { if (val === this.openPayKinds[i].kind) { return this.openPayKinds[i].name; } } } return val; }; PropertyTransactionRecordDetailComponent.prototype.goBack = function () { window.history.back(); }; PropertyTransactionRecordDetailComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'zx-property-transaction-record-detail', template: "<zx-header-block [title]=\"'\u7269\u7F34\u4EA4\u6613\u8BB0\u5F55\u7EDF\u8BA1'\" [showBottomLine]=\"false\" [showBreadcrumb]=\"true\" [breadcrumbAppendings]=\"['\u8BE6\u60C5']\"></zx-header-block><zx-content-block><nz-card nzNoHovering nzBordered=\"false\"><ng-template #title>\u8BA2\u5355\u8BE6\u60C5</ng-template><ng-template #body><div nz-row class=\"div-item\"><div nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u623F\u4EA7\uFF1A</span> <span>{{data.fullRoomName}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u4E1A\u4E3B\u59D3\u540D\uFF1A</span> <span>{{data.userName}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u7F34\u8D39\u8D26\u6237\uFF1A</span> <span>{{data.feeUserName}}</span></div></div><div nz-row class=\"div-item\"><div nz-col [nzSpan]=\"8\"><span>\u8BA2\u5355\u7F16\u53F7\uFF1A</span> <span>{{data.payOrderId}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u7C7B\u578B\uFF1A</span> <span>{{formateValue(data.outPayKind)}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u72B6\u6001\uFF1A</span> <span>{{data.paySuccess ? '\u652F\u4ED8\u6210\u529F' : '\u652F\u4ED8\u5931\u8D25'}}</span></div></div><div nz-row class=\"div-item\"><div nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u91D1\u989D\uFF1A</span> <span>{{data.payAmount}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u65F6\u95F4\uFF1A</span> <span>{{data.payTime | date:'yyyy-MM-dd HH:mm:ss'}}</span></div></div></ng-template></nz-card></zx-content-block><zx-content-block><nz-card nzNoHovering nzBordered=\"false\"><ng-template #title>\u8BA2\u5355\u660E\u7EC6</ng-template><ng-template #body><nz-table #nzTable [nzDataSource]=\"items\" [nzIsPagination]=\"false\" nzShowSizeChanger [nzLoading]=\"_loading\" nzBordered [nzShowQuickJumper]=\"true\" [nzSize]=\"'middle'\"><thead nz-thead><tr nz-thead-tr><th nz-th><span>\u7F34\u8D39\u7C7B\u76EE</span></th><th nz-th><span>\u7F34\u8D39\u91D1\u989D</span></th><th nz-th><span>\u7F34\u8D39\u7C7B\u76EE\u6708\u4EFD</span></th></tr></thead><tbody nz-tbody><tr nz-tbody-tr *ngFor=\"let item of items\"><td nz-td>{{item.name}}</td><td nz-td>{{item.amount}}</td><td nz-td>{{item.date}}</td></tr></tbody></nz-table></ng-template></nz-card></zx-content-block><div style=\"margin-top: 15px;margin-left:18px\"><button nz-button [nzType]=\"'default'\" (click)=\"goBack()\"><span>\u8FD4\u56DE</span></button></div>", styles: [ "\n :host ::ng-deep .list div{\n border-bottom: 1px solid #e9e9e9;\n padding:10px;\n }\n :host .total{\n font-size:30px;\n color:#000;\n margin-top:15px;\n text-align:right;\n font-weight:bold;\n }\n :host .div-item{\n margin-bottom:16px;\n }\n " ] },] }, ]; /** @nocollapse */ PropertyTransactionRecordDetailComponent.ctorParameters = function () { return [ { type: data_source_helper_1.DataSourceHelper, }, { type: router_1.ActivatedRoute, }, { type: ngx_webapp_fx_1.UserStorageService, }, ]; }; PropertyTransactionRecordDetailComponent.propDecorators = { "listControl": [{ type: core_1.ViewChild, args: ['list',] },], }; return PropertyTransactionRecordDetailComponent; }()); exports.PropertyTransactionRecordDetailComponent = PropertyTransactionRecordDetailComponent; //# sourceMappingURL=property-transaction-record-detail.component.js.map