UNPKG

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

Version:

angular webapp : icpc.group.pms

149 lines 8.37 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 def = { data: null, showOperations: false, fields: { id: { label: 'id', hidden: true, sort: { enabled: true, value: 'descend' }, query: {}, filter: { enabled: false } }, fullRoomName: { label: '房产名称', sort: { enabled: false }, query: {}, filter: { enabled: false }, dataTemplateEnabled: true, }, userName: { label: '业主姓名', sort: { enabled: false }, query: {}, filter: { enabled: false }, dataTemplateEnabled: true, }, phone: { label: '业主手机', sort: { enabled: false }, query: {}, filter: { enabled: false }, dataTemplateEnabled: true, }, date: { label: '缴费月份', sort: { enabled: true }, query: {}, filter: { enabled: false }, }, feeType: { label: '缴费项目', sort: { enabled: true }, query: {}, filter: { enabled: false }, }, fee: { label: '缴费金额', sort: { enabled: true }, query: {}, filter: { enabled: false }, dataTemplateEnabled: true, }, status: { label: '账单状态', sort: { enabled: true }, query: {}, filter: { enabled: false }, dataTemplateEnabled: true, } } }; var PropertyProjectBillComponent = /** @class */ (function () { function PropertyProjectBillComponent(dataSourceHelper, userStorageService, injector, dataDictService) { var _this = this; this.dataSourceHelper = dataSourceHelper; this.userStorageService = userStorageService; this.injector = injector; this.dataDictService = dataDictService; this.feeBillStatusOptions = []; this.communityOptions = []; this.dataSource = this.dataSourceHelper.propertyFeeBillItems; this.communityDataSource = this.dataSourceHelper.communities; this.dataDictService.getItems('PMS_PROPERTY_FEE_BILL_ITEM_STATUS').subscribe(function (res) { _this.feeBillStatusOptions = res; }); } PropertyProjectBillComponent.prototype.ngOnInit = function () { var _this = this; this.listView = new ngx_webapp_fx_1.ListView(def, this.injector); this.communityGroupId = this.userStorageService.getCurrentOffice().id; this.communityDataSource.findList({ communityGroupId: this.communityGroupId }, true).subscribe(function (res) { _this.communityOptions = res.body; }); this.loadAll(); }; PropertyProjectBillComponent.prototype.loadAll = function () { var _this = this; this.dataSource.findList({ communityGroupId: this.communityGroupId, communityId: this.listView.params.communityId, page: this.listView.pageIndex - 1, size: this.listView.pageSize, roomId: this.listView.params.roomId ? this.listView.params.roomId[2] : null, keywords: this.listView.params.searchQuery, query: this.listView.params.queryString, sort: this.listView.sortValueToQueryStatement }).subscribe(function (res) { _this.listView.data = res.body; _this.listView.setTotal(res.headers); }); }; PropertyProjectBillComponent.prototype.search = function (e) { this.listView.params.searchQuery = e; this.loadAll(); }; PropertyProjectBillComponent.prototype.filter = function () { var result = []; if (this.listView.params.status) { result[result.length] = 'status=' + this.listView.params.status; } var str = ''; for (var i = 0; i < result.length; i++) { if (str !== '') { str += ','; } str += '"' + result[i] + '"'; } if (str !== '') { str = '{"op":"AND","simpleStatements":[' + str + ']}'; } this.listView.params.queryString = encodeURI(str); this.loadAll(); }; PropertyProjectBillComponent.decorators = [ { type: core_1.Component, args: [{ selector: 'zx-property-project-bill', template: "<zx-header-block [title]=\"'\u7269\u7F34\u8D26\u5355'\" [showBottomLine]=\"false\" [showBreadcrumb]=\"true\"><p>\u7269\u4E1A\u8D39\u8D26\u5355\u7EDF\u8BA1\u5206\u6790</p></zx-header-block><zx-content-block><ng-template #extra><nz-select style=\"width: 150px;\" [(ngModel)]=\"listView.params.communityId\" [nzPlaceHolder]=\"'\u5C0F\u533A'\" [nzSize]=\"'large'\" (ngModelChange)=\"loadAll()\" nzAllowClear><nz-option *ngFor=\"let option of communityOptions\" [nzLabel]=\"option.name\" [nzValue]=\"option.id\"></nz-option></nz-select>&nbsp;<nz-select style=\"width: 150px;\" [(ngModel)]=\"listView.params.status\" [nzPlaceHolder]=\"'\u8D26\u5355\u72B6\u6001'\" [nzSize]=\"'large'\" (ngModelChange)=\"filter()\" nzAllowClear><nz-option *ngFor=\"let option of feeBillStatusOptions\" [nzLabel]=\"option.text\" [nzValue]=\"option.value\"></nz-option></nz-select>&nbsp;<nz-input [nzType]=\"'search'\" [(ngModel)]=\"listView.params.searchQuery\" [nzPlaceHolder]=\"'\u8BF7\u8F93\u5165\u59D3\u540D\u3001\u624B\u673A\u7B49\u5173\u952E\u5B57'\" style=\"width: 300px\" (nzOnSearch)=\"search($event)\" [nzSize]=\"'large'\"></nz-input></ng-template><ng-template #content><zx-list-view [listView]=\"listView\" (loadData)=\"loadAll()\"><ng-template #dataColumn let-dataRow=\"dataRow\" let-field=\"field\" let-value=\"value\"><div *ngIf=\"field.name == 'fullRoomName'\"><span>{{dataRow.bill.fullRoomName}}</span></div><div *ngIf=\"field.name == 'userName'\"><span>{{dataRow.bill.userName}}</span></div><div *ngIf=\"field.name == 'phone'\"><span>{{dataRow.bill.phone}}</span></div><div *ngIf=\"field.name == 'status'\"><span *ngIf=\"dataRow.status === 'MANUAL_FEE'\" style=\"color: #009900\">{{dataRow.status | dictConvert:'PMS_PROPERTY_FEE_BILL_ITEM_STATUS' | async}}</span> <span *ngIf=\"dataRow.status === 'INVALID'\" style=\"color: #666666\">{{dataRow.status | dictConvert:'PMS_PROPERTY_FEE_BILL_ITEM_STATUS' | async}}</span> <span *ngIf=\"dataRow.status === 'AUTO_FEE'\" style=\"color: #009900\">{{dataRow.status | dictConvert:'PMS_PROPERTY_FEE_BILL_ITEM_STATUS' | async}}</span> <span *ngIf=\"dataRow.status === 'NO_FEE'\" style=\"color: #FF0000\">{{dataRow.status | dictConvert:'PMS_PROPERTY_FEE_BILL_ITEM_STATUS' | async}}</span></div><div *ngIf=\"field.name == 'fee'\" style=\"width: 150px;\"><span style=\"min-width: 60px;\">{{dataRow.fee}}</span></div></ng-template></zx-list-view></ng-template></zx-content-block>", styles: [ "\n :host ::ng-deep nz-cascader{\n display:inline-block;\n width:250px;\n text-align: left;\n }\n :host .operation > a{\n padding: 0 5px;\n }\n\n :host .operation > a::after{\n content:\"|\";\n padding-left: 15px;\n color: #999;\n }\n\n :host .operation > a:last-child::after{\n content:\"\";\n }\n " ] },] }, ]; /** @nocollapse */ PropertyProjectBillComponent.ctorParameters = function () { return [ { type: data_source_helper_1.DataSourceHelper, }, { type: ngx_webapp_fx_1.UserStorageService, }, { type: core_1.Injector, }, { type: ngx_webapp_fx_1.DataDictService, }, ]; }; return PropertyProjectBillComponent; }()); exports.PropertyProjectBillComponent = PropertyProjectBillComponent; //# sourceMappingURL=property-project-bill.component.js.map