123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- import { Component, OnInit } from '@angular/core';
- import { NzModalRef, NzMessageService, NzDrawerRef, NzNotificationService } from 'ng-zorro-antd';
- import { _HttpClient } from '@delon/theme';
- import { FbsAbnormalWorkingHours } from 'app/entity/fbs/fbs-abnormal-working-hours';
- import { FbsAbnormalWorkingHoursDescribe } from 'app/entity/fbs/fbs-abnormal-working-hours-describe';
- import { FbsAbnormalWorkingHoursService } from 'app/services/fbs/fbs-abnormal-working-hours.service';
- import { FbsAbnormalWorkingHoursType } from 'app/entity/fbs/fbs-abnormal-working-hours-type';
- @Component({
- selector: 'app-fbs-abnormal-working-hours-view',
- templateUrl: './view.component.html',
- styles: [
- `
- .base{
- position: absolute;
- bottom: 0px;
- width: 100%;
- border-top: 1px solid rgb(232, 232, 232);
- padding: 10px 16px;
- text-align: right;
- left: 0px;
- background: #fff;
- z-index:99;
- }
- `
- ]
- })
- export class FbsAbnormalWorkingHoursViewComponent implements OnInit {
-
- constructor(
- private drawerRef:NzDrawerRef,
- private fbsAbnormalWorkingHoursService: FbsAbnormalWorkingHoursService,
- private nzNotificationService: NzNotificationService
- ) { }
- ngOnInit(): void {
- this.getById()
- // .then(()=>{
- // this.saveLoading = false;
- // })
- .then(()=>{
- return this.getDescribeListById()
- })
- // .then(()=>{
- // return this.getTypeById();
- // })
- .then(()=>{
- this.saveLoading=false;
- })
- }
- saveLoading=false;//加载效果
- fbsAbnormalWorkingHours:FbsAbnormalWorkingHours={}
- properList=[];//人员下拉选择集合
- describeList=[];//异常描述集合表格数据
- typeList=[];//异常类型集合表格数据
-
- /**
- * 根据id查询主表数据
- */
- id = '';
- getById() {
- return new Promise(resolve => {
- this.saveLoading=true;
- this.fbsAbnormalWorkingHoursService.getById(this.id).then(response => {
- if(response.success){//查询成功
- this.fbsAbnormalWorkingHours=response.result;
- resolve();
- }else{
- this.nzNotificationService.error("查询失败",response.message)
- this.saveLoading=false;
- }
- });
- });
- }
- /**
- * 查询异常工时描述
- */
- getDescribeListById(){
- return new Promise((resolve)=>{
- //查询条件
- let fbsAbnormalWorkingHoursDescribe=new FbsAbnormalWorkingHoursDescribe();
- fbsAbnormalWorkingHoursDescribe.pageSize=1000;
- fbsAbnormalWorkingHoursDescribe.abnormalWorkingHoursId=this.fbsAbnormalWorkingHours.id;//主表id
- //查询
- this.fbsAbnormalWorkingHoursService.getDescribeList(fbsAbnormalWorkingHoursDescribe).then((response)=>{
- this.describeList=response.result.records;
- resolve();
- })
- })
- }
- /**
- * 查询异常工时类别
- */
- getTypeById(){
- return new Promise((resolve)=>{
- //查询条件
- let fbsAbnormalWorkingHoursType=new FbsAbnormalWorkingHoursType();
- fbsAbnormalWorkingHoursType.pageSize=1000;
- fbsAbnormalWorkingHoursType.abnormalWorkingHoursId=this.fbsAbnormalWorkingHours.id;//主表id
- //查询
- this.fbsAbnormalWorkingHoursService.getTypeList(fbsAbnormalWorkingHoursType).then((response)=>{
- this.typeList=response.result.records;
- resolve();
- })
- })
- }
- close() {
- //抽屉关闭
- this.drawerRef.close();
- }
- }
|