@wjya/ngx-webapp-icpc.group.pms
Version:
angular webapp : icpc.group.pms
77 lines • 6.22 kB
JavaScript
"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 ParkingTransactionRecordDetailComponent = /** @class */ (function () {
function ParkingTransactionRecordDetailComponent(dataSourceHelper, activateRoute) {
var _this = this;
this.dataSourceHelper = dataSourceHelper;
this.activateRoute = activateRoute;
this.data = {};
this.totalAmount = 0;
this.items = [];
this.openPayKinds = [];
this.dataSource = this.dataSourceHelper.parkFeeOrder;
this.orderItemDataSource = this.dataSourceHelper.parkFeeOrderItems;
this.openPayKindDataSource = this.dataSourceHelper.openPayKindProviderSettings;
this.openPayKindDataSource.findList({
size: 9999
}).subscribe(function (res) {
_this.openPayKinds = res.body;
});
}
ParkingTransactionRecordDetailComponent.prototype.ngOnInit = function () {
this.id = this.activateRoute.snapshot.params['id'];
this.loadAll();
};
ParkingTransactionRecordDetailComponent.prototype.loadAll = function () {
var _this = this;
this.dataSource.findOne(this.id).subscribe(function (res) {
_this.data = res.body;
});
this.orderItemDataSource.findOne(this.id).subscribe(function (res) {
_this.items = res.body;
if (res.body) {
res.body.map(function (val) {
_this.totalAmount += val.fee;
});
_this.totalAmount = Number(_this.totalAmount.toFixed(2));
}
});
};
ParkingTransactionRecordDetailComponent.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;
};
ParkingTransactionRecordDetailComponent.prototype.goBack = function () {
window.history.back();
};
ParkingTransactionRecordDetailComponent.decorators = [
{ type: core_1.Component, args: [{
selector: 'zx-parking-transaction-record-detail',
template: "<zx-header-block [title]=\"'\u8BA2\u5355\u8BE6\u60C5'\" [showBottomLine]=\"false\" [showBreadcrumb]=\"true\" [breadcrumbAppendings]=\"['\u8BE6\u60C5']\"><p>\u67E5\u770B\u8BE6\u7EC6\u8BA2\u5355\u8BB0\u5F55\u8D26\u5355</p></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>\u8F66\u4F4D\u7F16\u53F7\uFF1A</span> <span>{{data.carPort}}</span></div></div><div nz-row class=\"div-item\"><div nz-col [nzSpan]=\"8\"><span>\u8F66\u724C\u53F7\u7801\uFF1A</span> <span>{{data.carNumber}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u7F34\u8D39\u8D26\u6237\uFF1A</span> <span>{{data.feeUserName}}</span></div><div nz-col [nzSpan]=\"8\"><span>\u8BA2\u5355\u7F16\u53F7\uFF1A</span> <span>{{data.payOrderId}}</span></div></div><div nz-row class=\"div-item\"><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 nz-col [nzSpan]=\"8\"><span>\u652F\u4ED8\u91D1\u989D\uFF1A</span> <span>{{data.payAmount}}</span></div></div><div nz-row class=\"div-item\"><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\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.fee}}</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 */
ParkingTransactionRecordDetailComponent.ctorParameters = function () { return [
{ type: data_source_helper_1.DataSourceHelper, },
{ type: router_1.ActivatedRoute, },
]; };
ParkingTransactionRecordDetailComponent.propDecorators = {
"listControl": [{ type: core_1.ViewChild, args: ['list',] },],
};
return ParkingTransactionRecordDetailComponent;
}());
exports.ParkingTransactionRecordDetailComponent = ParkingTransactionRecordDetailComponent;
//# sourceMappingURL=parking-transaction-record-detail.component.js.map