chenc преди 4 години
родител
ревизия
5006063167
променени са 32 файла, в които са добавени 782 реда и са изтрити 176 реда
  1. 2 0
      src/app/entity/project-manage-archives/project-manage-archives.ts
  2. 5 5
      src/app/routes/down-payment-management/receipt/add/add.component.html
  3. 39 2
      src/app/routes/down-payment-management/receipt/add/add.component.ts
  4. 3 3
      src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.html
  5. 51 35
      src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.ts
  6. 3 3
      src/app/routes/expense-reimbursement/expense-reimbursement-form/update/update.component.html
  7. 19 5
      src/app/routes/expense-reimbursement/expense-reimbursement-form/update/update.component.ts
  8. 10 8
      src/app/routes/invoice-management/invoice-manage-purchase/add/add.component.html
  9. 106 27
      src/app/routes/invoice-management/invoice-manage-purchase/add/add.component.ts
  10. 1 0
      src/app/routes/invoice-management/invoice-manage-purchase/invoice-manage-purchase.component.html
  11. 5 5
      src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.html
  12. 113 31
      src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.ts
  13. 21 7
      src/app/routes/project-manage-archives/add/add.component.ts
  14. 4 4
      src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.html
  15. 3 3
      src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.ts
  16. 3 3
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.html
  17. 2 2
      src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.ts
  18. 15 7
      src/app/routes/project-manage-archives/update/update.component.ts
  19. 22 0
      src/app/routes/project-work/development-log/add/add.component.html
  20. 37 4
      src/app/routes/project-work/development-log/add/add.component.ts
  21. 22 0
      src/app/routes/project-work/development-log/update/update.component.html
  22. 37 4
      src/app/routes/project-work/development-log/update/update.component.ts
  23. 25 2
      src/app/routes/project-work/implementation-log/add/add.component.html
  24. 37 4
      src/app/routes/project-work/implementation-log/add/add.component.ts
  25. 22 0
      src/app/routes/project-work/implementation-log/update/update.component.html
  26. 36 4
      src/app/routes/project-work/implementation-log/update/update.component.ts
  27. 22 0
      src/app/routes/project-work/service-log/add/add.component.html
  28. 37 4
      src/app/routes/project-work/service-log/add/add.component.ts
  29. 22 0
      src/app/routes/project-work/service-log/update/update.component.html
  30. 37 4
      src/app/routes/project-work/service-log/update/update.component.ts
  31. 7 0
      src/app/services/invoice-management/invoice-manage-purchase.service.ts
  32. 14 0
      src/app/services/project-manage-archives/project-manage-archives.service.ts

+ 2 - 0
src/app/entity/project-manage-archives/project-manage-archives.ts

@@ -66,4 +66,6 @@ export class ProjectManageArchives extends Page{
     deInfo?:{}
     //服务
     seInfo?:{}
+    //类型
+    planType?:string;
 }

+ 5 - 5
src/app/routes/down-payment-management/receipt/add/add.component.html

@@ -68,8 +68,8 @@
           <thead>
             <tr>
               <th nzAlign="center">序号</th>
-              <th>里程碑</th>
               <th>收付款条线</th>
+              <th>里程碑</th>
               <th>收款金额</th>
               <th>说明</th>
               <th>对应发票</th>
@@ -80,14 +80,14 @@
             <tr *ngFor="let data of basicTable.data;let i=index">
               <td nzAlign="center">{{i+1}}</td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proArchivesId" nzPlaceHolder="请选择">
-                <nz-option *ngFor="let i of proArchivesList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
+                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择" (ngModelChange)="coArchivesIdChange(data)">
+                <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.planName"></nz-option>
               </nz-select>
               </td>
               <td style="width: 20%;">
-                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择"
+                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proArchivesId" nzPlaceHolder="请选择"
                 >
-                <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+                <nz-option *ngFor="let i of proArchivesList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
               </nz-select>
               </td>
               <td>

+ 39 - 2
src/app/routes/down-payment-management/receipt/add/add.component.ts

@@ -93,13 +93,50 @@ export class DownPaymentManagementReceiptAddComponent implements OnInit {
           this.managerPaymentAndReceiptSlip.cusId = project.cusId; //客户id
           this.managerPaymentAndReceiptSlip.cusCode = project.cusCode; //客户编码
           this.managerPaymentAndReceiptSlip.cusName = project.cusName; //客户名称
-          //获取里程碑下拉数据
-          // this.getBusinessList();
+          //获取条线下拉数据
+          this.getLineList()
         }
       });
     }
   }
 
+  //获取条线下拉数据
+  getLineList(){
+    //查询条件
+    let projectManageArchives={proArchivesId:this.managerPaymentAndReceiptSlip.proId,planType:"1"};
+    this.projectManageArchivesService.getLineList(projectManageArchives).then((response)=>{
+      if(response.success){
+        this.coArchivesList=response.result
+      }
+    })
+  }
+
+  /**
+   * 条件选择事件
+   * 获取条线名称、获取里程碑数据
+   */
+  coArchivesIdChange(data){
+    if(data.coArchivesId){
+      //获取条线名称
+      this.coArchivesList.forEach(element => {
+        if(data.coArchivesId===element.id){
+          data.coArchivesName=element.planName;
+        }
+      });
+      // //获取里程碑下拉数据
+      // let where={businessId:data.coArchivesId};
+      // this.projectManageArchivesService.getMileNameById(where).then((response)=>{
+      //   if(response.success){
+      //     data.proBusinessList=response.result;
+      //     //一般用于选择完里程碑又反过来选条线 则重新获取金额
+      //     if(data.proBusinessId){
+      //       this.proBusinessChange(data);
+      //     }
+      //   }
+      // })
+    }
+  }
+
   itemDataList = []; //子表明细集合
   /**
    * 增行按钮

+ 3 - 3
src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.html

@@ -5,11 +5,11 @@
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24">人员</nz-form-label>
           <nz-form-control [nzSm]="14" [nzXs]="24">
-            <nz-tree-select style="width: 100%" [nzNodes]="personnelList" nzShowSearch [nzMultiple]="false"
-              formControlName="personId" id="personId" nzPlaceHolder="请选择" [(ngModel)]="reExpenseSlip.personId"
+            <nz-tree-select style="width: 100%" [nzNodes]="personnelList" nzShowSearch [nzMultiple]="true"
+              formControlName="personIds" id="personIds" nzPlaceHolder="请选择" [(ngModel)]="personIds"
               [nzMaxTagCount]="3" [nzAllowClear]="true">
             </nz-tree-select>
-            <nz-form-explain *ngIf="validateForm.get('personId')?.dirty && validateForm.get('personId')?.errors">
+            <nz-form-explain *ngIf="validateForm.get('personIds')?.dirty && validateForm.get('personIds')?.errors">
               请选择人员
             </nz-form-explain>
           </nz-form-control>

+ 51 - 35
src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.ts

@@ -39,11 +39,11 @@ export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements
     private projectManageArchivesService: ProjectManageArchivesService,
     private settingsService: SettingsService,
     private baseArchivesCostService: BaseArchivesCostService,
-    private nzNotificationService:NzNotificationService,
-    private reExpenseSlipService:ReExpenseSlipService,
-    private i18NService:I18NService,
-    private drawerRef:NzDrawerRef,
-    private datePipe:DatePipe
+    private nzNotificationService: NzNotificationService,
+    private reExpenseSlipService: ReExpenseSlipService,
+    private i18NService: I18NService,
+    private drawerRef: NzDrawerRef,
+    private datePipe: DatePipe,
   ) {}
 
   ngOnInit(): void {
@@ -51,17 +51,20 @@ export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements
     this.validateForm = this.fb.group({
       proId: [null, [Validators.required]],
       date: [null, [Validators.required]],
-      personId: [null, [Validators.required]],
+      personIds: [null, [Validators.required]],
     });
-    this.isLoadingSave=true;
+    this.isLoadingSave = true;
     //人员
-    this.getPersonnelList().then(() => {
-      return this.getProList(); //项目下拉
-    }).then(()=>{
-      return this.getCostIdList();//费用项目数据
-    }).then(()=>{
-      this.isLoadingSave=false;
-    });
+    this.getPersonnelList()
+      .then(() => {
+        return this.getProList(); //项目下拉
+      })
+      .then(() => {
+        return this.getCostIdList(); //费用项目数据
+      })
+      .then(() => {
+        this.isLoadingSave = false;
+      });
   }
 
   isLoadingSave = false;
@@ -71,6 +74,7 @@ export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements
   }; //对象
   proList = []; //项目集合
   personnelList = []; //人员集合
+  personIds = []; //多选人员数据绑定
 
   /**
    * 获取人员下拉数据到各个页签中
@@ -166,54 +170,66 @@ export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements
         this.validateForm.controls[i].updateValueAndValidity();
       }
       let valid = this.validateForm.valid;
-      if(valid){
-        this.isLoadingSave=true;
-        this.reExpenseSlip.pkOrg=sessionStorage.getItem("pkOrg");//组织
+      if (valid) {
+        this.isLoadingSave = true;
+        this.reExpenseSlip.pkOrg = sessionStorage.getItem('pkOrg'); //组织
         //日期
         this.reExpenseSlip.date = this.datePipe.transform(this.reExpenseSlip.date, 'yyyy-MM-dd HH:mm:ss');
         //人员名称
-        if (this.reExpenseSlip.personId) {
+        if (this.personIds) {
           //循环集合数据获取名称
+          let pids="";
+          let pNames="";
           this.personnelList.forEach(pkOrg => {
             pkOrg.children.forEach(depart => {
               depart.children.forEach(personnel => {
-                if (personnel.key === this.reExpenseSlip.personId) {
-                  this.reExpenseSlip.person = personnel.name;
-                }
+                this.personIds.forEach(pid => {
+                  if (personnel.key === pid) {
+                    if(pids===""){
+                      pids=personnel.key;
+                      pNames=personnel.name;
+                    }else{
+                      pids=pids+"、"+personnel.key;
+                      pNames=pNames+"、"+personnel.name;
+                    }
+                  }
+                });
               });
             });
           });
+          this.reExpenseSlip.personId=pids;
+          this.reExpenseSlip.person=pNames;
         }
         //项目名称
-        if(this.reExpenseSlip.proId){
+        if (this.reExpenseSlip.proId) {
           this.proList.forEach(element => {
-            if(element.id===this.reExpenseSlip.proId){
-              this.reExpenseSlip.proName=element.proName;
+            if (element.id === this.reExpenseSlip.proId) {
+              this.reExpenseSlip.proName = element.proName;
             }
           });
         }
         //明细
-        if(this.itemDataList){
+        if (this.itemDataList) {
           this.itemDataList.forEach(element => {
             //获取明细中下拉选择的费用项目名称
-            if(element.costId){
+            if (element.costId) {
               this.costIdList.forEach(cost => {
-                if(cost.id===element.costId){
-                  element.costName=cost.name;
+                if (cost.id === element.costId) {
+                  element.costName = cost.name;
                 }
               });
-            }else{
-              element.costName="";
+            } else {
+              element.costName = '';
             }
           });
           //获取明细数据
-          this.reExpenseSlip.detailList=this.itemDataList;
-        }else{
+          this.reExpenseSlip.detailList = this.itemDataList;
+        } else {
           this.nzNotificationService.warning('费用项目必填', '');
-          this.isLoadingSave=false;
+          this.isLoadingSave = false;
           return;
         }
-        this.reExpenseSlipService.add(this.reExpenseSlip).then((response)=>{
+        this.reExpenseSlipService.add(this.reExpenseSlip).then(response => {
           if (response.success) {
             //保存成功
             this.isLoadingSave = false;
@@ -225,7 +241,7 @@ export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements
             this.isLoadingSave = false;
             this.nzNotificationService.error(this.i18NService.fanyi('save.not'), '');
           }
-        })
+        });
       }
     });
   }

+ 3 - 3
src/app/routes/expense-reimbursement/expense-reimbursement-form/update/update.component.html

@@ -5,11 +5,11 @@
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24">人员</nz-form-label>
           <nz-form-control [nzSm]="14" [nzXs]="24">
-            <nz-tree-select style="width: 100%" [nzNodes]="personnelList" nzShowSearch [nzMultiple]="false"
-              formControlName="personId" id="personId" nzPlaceHolder="请选择" [(ngModel)]="reExpenseSlip.personId"
+            <nz-tree-select style="width: 100%" [nzNodes]="personnelList" nzShowSearch [nzMultiple]="true"
+              formControlName="personIds" id="personIds" nzPlaceHolder="请选择" [(ngModel)]="personIds"
               [nzMaxTagCount]="3" [nzAllowClear]="true">
             </nz-tree-select>
-            <nz-form-explain *ngIf="validateForm.get('personId')?.dirty && validateForm.get('personId')?.errors">
+            <nz-form-explain *ngIf="validateForm.get('personIds')?.dirty && validateForm.get('personIds')?.errors">
               请选择人员
             </nz-form-explain>
           </nz-form-control>

+ 19 - 5
src/app/routes/expense-reimbursement/expense-reimbursement-form/update/update.component.ts

@@ -51,7 +51,7 @@ export class ExpenseReimbursementExpenseReimbursementFormUpdateComponent impleme
     this.validateForm = this.fb.group({
       proId: [null, [Validators.required]],
       date: [null, [Validators.required]],
-      personId: [null, [Validators.required]],
+      personIds: [null, [Validators.required]],
     });
     this.isLoadingSave=true;
     //人员
@@ -74,6 +74,7 @@ export class ExpenseReimbursementExpenseReimbursementFormUpdateComponent impleme
   proList = []; //项目集合
   personnelList = []; //人员集合
   id="";
+  personIds=[];//人员绑定id
 
   /**
    * 根据id查询主子表数据
@@ -82,6 +83,7 @@ export class ExpenseReimbursementExpenseReimbursementFormUpdateComponent impleme
     return new Promise((resolve)=>{
       this.reExpenseSlipService.getListById(this.id).then((response)=>{
         this.reExpenseSlip=response.result;//主表
+        this.personIds=this.reExpenseSlip.personId.split("、");//获取人员多选款数组绑定数据
         this.itemDataList=response.result.detailList;//子表明细
         if(this.itemDataList){
           this.sort=this.itemDataList.length+1;
@@ -191,17 +193,29 @@ export class ExpenseReimbursementExpenseReimbursementFormUpdateComponent impleme
         //日期
         this.reExpenseSlip.date = this.datePipe.transform(this.reExpenseSlip.date, 'yyyy-MM-dd HH:mm:ss');
         //人员名称
-        if (this.reExpenseSlip.personId) {
+        if (this.personIds) {
           //循环集合数据获取名称
+          let pids="";
+          let pNames="";
           this.personnelList.forEach(pkOrg => {
             pkOrg.children.forEach(depart => {
               depart.children.forEach(personnel => {
-                if (personnel.key === this.reExpenseSlip.personId) {
-                  this.reExpenseSlip.person = personnel.name;
-                }
+                this.personIds.forEach(pid => {
+                  if (personnel.key === pid) {
+                    if(pids===""){
+                      pids=personnel.key;
+                      pNames=personnel.name;
+                    }else{
+                      pids=pids+"、"+personnel.key;
+                      pNames=pNames+"、"+personnel.name;
+                    }
+                  }
+                });
               });
             });
           });
+          this.reExpenseSlip.personId=pids;
+          this.reExpenseSlip.person=pNames;
         }
         //项目名称
         if(this.reExpenseSlip.proId){

+ 10 - 8
src/app/routes/invoice-management/invoice-manage-purchase/add/add.component.html

@@ -63,24 +63,26 @@
           <tr *ngFor="let data of basicTable.data;let i=index">
             <td nzAlign="center">{{i+1}}</td>
             <td style="width: 20%;">
-              <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择">
-              <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
+              <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择" (ngModelChange)="coArchivesChange(data)">
+              <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.planName" ></nz-option>
             </nz-select>
             </td>
-            <td style="width: 20%;">
+            <td style="width: 20%;" >
               <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proBusinessId" nzPlaceHolder="请选择"
-              >
-              <nz-option *ngFor="let i of proBusinessList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+              (ngModelChange)="proBusinessChange(data)">
+              <nz-option *ngFor="let i of data.proBusinessList" [nzValue]="i.mileId" [nzLabel]="i.mileName"></nz-option>
             </nz-select>
             </td>
             <td>
-              <nz-input-number [(ngModel)]="data.price" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
+              <!-- <nz-input-number [(ngModel)]="data.price" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number> -->
+              {{data.price}}
             </td>
             <td>
-              <nz-input-number [(ngModel)]="data.uncoPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
+              <!-- <nz-input-number [(ngModel)]="data.uncoPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number> -->
+              {{data.uncoPrice}}
             </td>
             <td>
-              <nz-input-number [(ngModel)]="data.coPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
+              <nz-input-number [(ngModel)]="data.coPrice" [nzMin]="0" [nzMax]="data.uncoPriceMax" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar" (ngModelChange)="coPriceKeyUp(data)"></nz-input-number>
             </td>
             <td ><a nz-popconfirm nzTitle="是否删除?"
                 (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>

+ 106 - 27
src/app/routes/invoice-management/invoice-manage-purchase/add/add.component.ts

@@ -51,9 +51,7 @@ export class InvoiceManagementInvoiceManagePurchaseAddComponent implements OnIni
 
     //项目下拉数据
     this.isLoadingSave = true;
-    this.getProList().then(() => {
-      return this.getCoArchivesList();
-    }).then(()=>{
+    this.getProList().then(()=>{
       this.isLoadingSave = false;
     });
   }
@@ -87,24 +85,25 @@ export class InvoiceManagementInvoiceManagePurchaseAddComponent implements OnIni
   /**
    * 获取条线下拉数据
    */
-  getCoArchivesList(){
-    return new Promise(resolve => {
-      let baseArchivesCollectionLine = new BaseArchivesCollectionLine();
-      baseArchivesCollectionLine.pageSize = 20000;
-      baseArchivesCollectionLine.pkOrg = sessionStorage.getItem('pkOrg');
-      this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then(response => {
-        if (response.result.records) {
-          this.coArchivesList = response.result.records;
-        }
-        resolve();
-      });
-    });
-  }
+  // getCoArchivesList(){
+  //   return new Promise(resolve => {
+  //     let baseArchivesCollectionLine = new BaseArchivesCollectionLine();
+  //     baseArchivesCollectionLine.pageSize = 20000;
+  //     baseArchivesCollectionLine.pkOrg = sessionStorage.getItem('pkOrg');
+  //     this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then(response => {
+  //       if (response.result.records) {
+  //         this.coArchivesList = response.result.records;
+  //       }
+  //       resolve();
+  //     });
+  //   });
+  // }
 
 
 
   /**
    * 项目下拉选择事件
+   * 获取条线下拉数据
    */
   proChange(event) {
     if (event) {
@@ -114,27 +113,107 @@ export class InvoiceManagementInvoiceManagePurchaseAddComponent implements OnIni
           let project = JSON.parse(JSON.stringify(response.result)); //项目档案对象
           this.invoiceManagePurchase.proCode = project.proCode; //项目档案编码
           this.invoiceManagePurchase.proName = project.proName; //项目档案名称
-          //获取里程碑下拉数据
-          // this.getBusinessList();
+          //获取首付款条线
+          this.getLineList();
         }
       });
     }
   }
 
-  /**
-   * 获取里程碑下拉数据
-   */
-  proBusinessList=[];//里程碑下拉数据
-  getBusinessList(){
-    //查询条件:项目档案id、计划类型
-    let business={id:this.invoiceManagePurchase.proArchivesId,planType:"1"}
-    this.projectManageArchivesService.getBusinessList(business).then((response)=>{
+  //获取条线下拉数据
+  getLineList(){
+    //查询条件
+    let projectManageArchives={proArchivesId:this.invoiceManagePurchase.proArchivesId,planType:"1"};
+    this.projectManageArchivesService.getLineList(projectManageArchives).then((response)=>{
       if(response.success){
-        this.proBusinessList=response.result;
+        this.coArchivesList=response.result
       }
     })
   }
 
+  /**
+   * 条线下拉选择事件
+   * 获取名称和里程碑下拉数据
+   */
+  coArchivesChange(data){
+    if(data.coArchivesId){
+      //获取条线名称
+      this.coArchivesList.forEach(element => {
+        if(data.coArchivesId===element.id){
+          data.coArchivesName=element.planName;
+        }
+      });
+      //获取里程碑下拉数据
+      let where={businessId:data.coArchivesId};
+      this.projectManageArchivesService.getMileNameById(where).then((response)=>{
+        if(response.success){
+          data.proBusinessList=response.result;
+          //一般用于选择完里程碑又反过来选条线 则重新获取金额
+          if(data.proBusinessId){
+            this.proBusinessChange(data);
+          }
+        }
+      })
+    }
+    
+  }
+
+  /**
+   * 里程碑选择事件
+   * 获取名称和金额
+   */
+  uncoPrice=0;//未收票金额
+  proBusinessChange(data){
+    if(data.proBusinessId){
+      data.proBusinessList.forEach(element => {
+        if(element.mileId===data.proBusinessId){
+          data.proArchivesMilestone=element.mileName;//名称
+          data.price=element.price;//金额
+          
+        }
+      });
+      //查询条件
+      let where={coArchivesId:data.coArchivesId,proBusinessId:data.proBusinessId}
+      //获取未开票金额
+      this.invoiceManagePurchaseService.getChildrenList(where).then((response)=>{
+        if(response.success){
+          if(response.result.uncoPrice){
+            data.uncoPrice=response.result.uncoPrice;//未收票金额
+            data.uncoPriceMax=Number(response.result.uncoPrice);//未收票金额
+          }else{
+            data.uncoPrice=JSON.parse(JSON.stringify(data.price));//未收票金额
+            data.uncoPriceMax=Number(JSON.parse(JSON.stringify(data.price)));//未收票金额
+          }
+        }
+        
+      })
+    }
+  }
+
+  /**
+   * 收票输入事件
+   */
+  coPriceKeyUp(data){
+    if(data.coPrice){
+      //未开票金额减已开票金额
+      data.uncoPrice=data.uncoPriceMax-Number(data.coPrice);
+    }
+  }
+
+  /**
+   * 获取里程碑下拉数据
+   */
+  proBusinessList=[];//里程碑下拉数据
+  // getBusinessList(){
+  //   //查询条件:项目档案id、计划类型
+  //   let business={businessId:this.invoiceManagePurchase.proArchivesId,planType:"1"}
+  //   this.projectManageArchivesService.getMileNameById(business).then((response)=>{
+  //     if(response.success){
+  //       this.proBusinessList=response.result;
+  //     }
+  //   })
+  // }
+
   /**
    * 增行按钮
    */

+ 1 - 0
src/app/routes/invoice-management/invoice-manage-purchase/invoice-manage-purchase.component.html

@@ -1,3 +1,4 @@
+<!-- 采购发票 -->
 <page-header [action]="phActionTpl">
   <ng-template #phActionTpl>
     <button (click)="add()" nz-button nzType="primary"  acl [acl-ability]="'invoice-manage-purchase:add'">新建</button>

+ 5 - 5
src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.html

@@ -63,14 +63,14 @@
           <tr *ngFor="let data of basicTable.data;let i=index">
             <td nzAlign="center">{{i+1}}</td>
             <td style="width: 20%;">
-              <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择">
-              <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
+              <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择" (ngModelChange)="coArchivesChange(data)">
+              <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.planName" ></nz-option>
             </nz-select>
             </td>
             <td style="width: 20%;">
               <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proBusinessId" nzPlaceHolder="请选择"
-              (ngModelChange)="proChange($event)">
-              <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+              (ngModelChange)="proBusinessIdChange(data)">
+              <nz-option *ngFor="let i of data.proBusinessList" [nzValue]="i.mileId" [nzLabel]="i.mileName"></nz-option>
             </nz-select>
             </td>
             <td>
@@ -80,7 +80,7 @@
               <nz-input-number [(ngModel)]="data.uncoPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td>
-              <nz-input-number [(ngModel)]="data.coPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
+              <nz-input-number [(ngModel)]="data.coPrice" [nzMax]="data.uncoPriceMax" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
             </td>
             <td ><a nz-popconfirm nzTitle="是否删除?"
                 (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>

+ 113 - 31
src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.ts

@@ -51,21 +51,18 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
 
     //项目下拉数据
     this.isLoadingSave = true;
-    this.getProList()
+
+    this.queryById()
       .then(() => {
-        //获取条线下拉数据
-        return this.getCoArchivesList();
-      }).then(()=>{
         //根据id查询
-        return this.queryById();
+        return this.getProList();
       })
       .then(() => {
         this.isLoadingSave = false;
       });
   }
   validateForm!: FormGroup;
-  invoiceManagePurchase: InvoiceManagePurchase = {
-  }; //对象
+  invoiceManagePurchase: InvoiceManagePurchase = {}; //对象
   isLoadingSave = false;
   proList = []; //项目下拉数据
   itemDataList = []; //明细表格数据集合
@@ -75,14 +72,21 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
   queryById() {
     return new Promise(resolve => {
       this.invoiceManagePurchaseService.queryById(this.id).then(response => {
-        if(response.success){
-          this.invoiceManagePurchase=response.result;//主表
-          this.itemDataList=response.result.detailList;//子表数据
-          if(this.itemDataList){//获取最大排序
-            this.sort=this.itemDataList.length+1;
+        if (response.success) {
+          this.invoiceManagePurchase = response.result; //主表
+          this.itemDataList = response.result.detailList; //子表数据
+          //获取里程碑下拉数据
+          this.itemDataList.forEach(element => {
+            this.coArchivesChange(element);
+            //获取用来计算的未收票金额
+            element.uncoPriceMax=JSON.parse(JSON.stringify(element.uncoPrice))
+          });
+          if (this.itemDataList) {
+            //获取最大排序
+            this.sort = this.itemDataList.length + 1;
           }
           resolve();
-        }else{
+        } else {
           resolve();
         }
       });
@@ -109,19 +113,19 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
   /**
    * 获取条线下拉数据
    */
-  getCoArchivesList() {
-    return new Promise(resolve => {
-      let baseArchivesCollectionLine = new BaseArchivesCollectionLine();
-      baseArchivesCollectionLine.pageSize = 20000;
-      baseArchivesCollectionLine.pkOrg = sessionStorage.getItem('pkOrg');
-      this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then(response => {
-        if (response.result.records) {
-          this.coArchivesList = response.result.records;
-        }
-        resolve();
-      });
-    });
-  }
+  // getCoArchivesList() {
+  //   return new Promise(resolve => {
+  //     let baseArchivesCollectionLine = new BaseArchivesCollectionLine();
+  //     baseArchivesCollectionLine.pageSize = 20000;
+  //     baseArchivesCollectionLine.pkOrg = sessionStorage.getItem('pkOrg');
+  //     this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then(response => {
+  //       if (response.result.records) {
+  //         this.coArchivesList = response.result.records;
+  //       }
+  //       resolve();
+  //     });
+  //   });
+  // }
 
   /**
    * 项目下拉选择事件
@@ -134,6 +138,84 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
           let project = JSON.parse(JSON.stringify(response.result)); //项目档案对象
           this.invoiceManagePurchase.proCode = project.proCode; //项目档案编码
           this.invoiceManagePurchase.proName = project.proName; //项目档案名称
+          //获取首付款条线
+          this.getLineList();
+        }
+      });
+    }
+  }
+
+  //获取条线下拉数据
+  getLineList() {
+    //查询条件
+    let projectManageArchives = { proArchivesId: this.invoiceManagePurchase.proArchivesId, planType: '1' };
+    this.projectManageArchivesService.getLineList(projectManageArchives).then(response => {
+      if (response.success) {
+        this.coArchivesList = response.result;
+      }
+    });
+  }
+
+  /**
+   * 条线下拉选择事件
+   * 获取名称和里程碑下拉数据
+   */
+  coArchivesChange(data) {
+    if (data.coArchivesId) {
+      //获取条线名称
+      this.coArchivesList.forEach(element => {
+        if (data.coArchivesId === element.id) {
+          data.coArchivesName = element.planName;
+        }
+      });
+      //获取里程碑下拉数据
+      let where = { businessId: data.coArchivesId };
+      this.projectManageArchivesService.getMileNameById(where).then(response => {
+        if (response.success) {
+          data.proBusinessList = response.result;
+          //一般用于选择完里程碑又反过来选条线 则重新获取金额
+          if (data.proBusinessId) {
+            this.proBusinessChange(data);
+          }
+        }
+      });
+    }
+  }
+
+  /**
+   *
+   * 获取名称和金额
+   */
+  uncoPrice = 0; //未收票金额
+  proBusinessChange(data) {
+    if (data.proBusinessId) {
+      data.proBusinessList.forEach(element => {
+        if (element.mileId === data.proBusinessId) {
+          data.proArchivesMilestone = element.mileName; //名称
+          data.price = element.price; //金额
+        }
+      });
+    }
+  }
+
+  /**
+   * 里程碑选择事件
+   */
+  proBusinessIdChange(data) {
+    if (data.proBusinessId) {
+      this.proBusinessChange(data);
+      //查询条件
+      let where = { coArchivesId: data.coArchivesId, proBusinessId: data.proBusinessId };
+      //获取未开票金额
+      this.invoiceManagePurchaseService.getChildrenList(where).then(response => {
+        if (response.success) {
+          if (response.result.uncoPrice) {
+            data.uncoPrice = response.result.uncoPrice; //未收票金额
+            data.uncoPriceMax = Number(response.result.uncoPrice); //未收票金额
+          } else {
+            data.uncoPrice = JSON.parse(JSON.stringify(data.price)); //未收票金额
+            data.uncoPriceMax = Number(JSON.parse(JSON.stringify(data.price))); //未收票金额
+          }
         }
       });
     }
@@ -164,11 +246,11 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
   }
 
   //金额格式化
-  formatterDollar = (value: number) =>{
-    if(value){
-      return  `$ ${value}`;
-    }else{
-      return  `$ `;
+  formatterDollar = (value: number) => {
+    if (value) {
+      return `$ ${value}`;
+    } else {
+      return `$ `;
     }
   };
   parserDollar = (value: string) => value.replace('$ ', '');

+ 21 - 7
src/app/routes/project-manage-archives/add/add.component.ts

@@ -15,6 +15,8 @@ import { ProjectManageArchives } from 'app/entity/project-manage-archives/projec
 import { I18NService } from '@core';
 import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
 import { DatePipe } from '@angular/common';
+import { BaseArchivesCollectionLineService } from 'app/services/basedata/base-archives-collection-line.service';
+import { BaseArchivesCollectionLine } from 'app/entity/basedata/base-archives-collection-line';
 
 @Component({
   selector: 'app-project-manage-archives-add',
@@ -45,6 +47,7 @@ export class ProjectManageArchivesAddComponent implements OnInit {
     private i18NService: I18NService,
     private projectManageArchivesService: ProjectManageArchivesService,
     private datePipe: DatePipe,
+    private baseArchivesCollectionLineService:BaseArchivesCollectionLineService
   ) {}
 
   ngOnInit(): void {
@@ -72,11 +75,22 @@ export class ProjectManageArchivesAddComponent implements OnInit {
    */
   getPlanType() {
     return new Promise(resolve => {
-      this.dictService.getByDictCode('plan_type').then(response => {
-        //商务计划类型
-        this.businessAffairs.planList = response.result;
+      // this.dictService.getByDictCode('plan_type').then(response => {
+      //   //商务计划类型
+      //   this.businessAffairs.planList = response.result;
+      //   resolve();
+      // });
+      let baseArchivesCollectionLine=new BaseArchivesCollectionLine();
+      baseArchivesCollectionLine.pageSize=20000;
+      baseArchivesCollectionLine.pkOrg=sessionStorage.getItem("pkOrg");
+      this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then((response)=>{
+        if(response.success){
+           //商务计划类型
+          this.businessAffairs.planList = response.result.records;
+        }
         resolve();
-      });
+      })
+      
     });
   }
 
@@ -86,12 +100,12 @@ export class ProjectManageArchivesAddComponent implements OnInit {
    */
   remittanceInformationChange(data) {
     //实施页签
-    if (data.planId === '2') {
+    if (data.planName.indexOf("实施")!==-1) {
       this.implementation.remittanceInformation = data;
-    } else if (data.planId === '3') {
+    } else if (data.planName.indexOf("开发")!==-1) {
       //开发
       this.development.remittanceInformation = data;
-    } else if (data.planId === '4') {
+    } else if (data.planName.indexOf("服务")!==-1) {
       //服务
       this.serviceta.remittanceInformation = data;
     }

+ 4 - 4
src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.html

@@ -68,7 +68,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'1')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
@@ -179,7 +179,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
@@ -290,7 +290,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
@@ -401,7 +401,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'4')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>

+ 3 - 3
src/app/routes/project-manage-archives/add/business-affairs/business-affairs.component.ts

@@ -22,7 +22,7 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
   paymentCollectionList = []; //回款情况数据
   paymentPlanList = []; //付款计划
   paymentStatusList = []; //付款情况
-  planList = []; //计划下来集合数据
+  planList :any= []; //计划下来集合数据
   formatterDollar = (value: number) => {
     if(value){
       return  `$ ${value}`;
@@ -168,8 +168,8 @@ export class ProjectManageArchivesAddBusinessAffairsComponent implements OnInit
    */
   getPlanName(data) {
     this.planList.forEach(element => {
-      if (element.value === data.planId) {
-        data.planName = element.text;
+      if (element.id === data.planId) {
+        data.planName = element.name;
       }
     });
   }

+ 3 - 3
src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.html

@@ -68,7 +68,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'1')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
@@ -179,7 +179,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'2')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>
@@ -290,7 +290,7 @@
             <td style="width: 7%;">
               <nz-select style="width: 100%;" nzShowSearch nzAllowClear [(ngModel)]="data.planId" nzPlaceHolder="请选择"
                 [nzDropdownMatchSelectWidth]="false" (ngModelChange)="planIdChange(data,'3')">
-                <nz-option *ngFor="let i of planList" [nzValue]="i.value" [nzLabel]="i.text"></nz-option>
+                <nz-option *ngFor="let i of planList" [nzValue]="i.id" [nzLabel]="i.name"></nz-option>
               </nz-select>
             </td>
             <td style="width: 4%;">第一笔</td>

+ 2 - 2
src/app/routes/project-manage-archives/update/business-affairs/business-affairs.component.ts

@@ -168,8 +168,8 @@ export class ProjectManageArchivesUpdateBusinessAffairsComponent implements OnIn
    */
   getPlanName(data) {
     this.planList.forEach(element => {
-      if (element.value === data.planId) {
-        data.planName = element.text;
+      if (element.id === data.planId) {
+        data.planName = element.name;
       }
     });
   }

+ 15 - 7
src/app/routes/project-manage-archives/update/update.component.ts

@@ -17,6 +17,8 @@ import { ProjectManageArchivesUpdateServicetaComponent } from './serviceta/servi
 import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
 import { BaseArchivesMilestone } from 'app/entity/basedata/base-archives-milestone';
 import { recursiveQuery } from '@shared/utils/yuan copy';
+import { BaseArchivesCollectionLine } from 'app/entity/basedata/base-archives-collection-line';
+import { BaseArchivesCollectionLineService } from 'app/services/basedata/base-archives-collection-line.service';
 
 @Component({
   selector: 'app-project-manage-archives-update',
@@ -47,6 +49,7 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
     private i18NService: I18NService,
     private projectManageArchivesService: ProjectManageArchivesService,
     private datePipe: DatePipe,
+    private baseArchivesCollectionLineService:BaseArchivesCollectionLineService
   ) {}
 
   ngOnInit(): void {
@@ -86,11 +89,16 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
    */
   getPlanType() {
     return new Promise(resolve => {
-      this.dictService.getByDictCode('plan_type').then(response => {
-        //商务计划类型
-        this.businessAffairs.planList = response.result;
+      let baseArchivesCollectionLine=new BaseArchivesCollectionLine();
+      baseArchivesCollectionLine.pageSize=20000;
+      baseArchivesCollectionLine.pkOrg=sessionStorage.getItem("pkOrg");
+      this.baseArchivesCollectionLineService.getList(baseArchivesCollectionLine).then((response)=>{
+        if(response.success){
+           //商务计划类型
+          this.businessAffairs.planList = response.result.records;
+        }
         resolve();
-      });
+      })
     });
   }
 
@@ -100,12 +108,12 @@ export class ProjectManageArchivesUpdateComponent implements OnInit {
    */
   remittanceInformationChange(data) {
     //实施页签
-    if (data.planId === '2') {
+    if (data.planName.indexOf("实施")!==-1) {
       this.implementation.remittanceInformation = data;
-    } else if (data.planId === '3') {
+    } else if (data.planName.indexOf("开发")!==-1) {
       //开发
       this.development.remittanceInformation = data;
-    } else if (data.planId === '4') {
+    } else if (data.planName.indexOf("服务")!==-1) {
       //服务
       this.serviceta.remittanceInformation = data;
     }

+ 22 - 0
src/app/routes/project-work/development-log/add/add.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>

+ 37 - 4
src/app/routes/project-work/development-log/add/add.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkDevelopmentLogAddComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -75,6 +77,35 @@ export class ProjectWorkDevelopmentLogAddComponent implements OnInit {
   mieList = []; //里程碑数据下拉
   date = null;
 
+  /**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
+
   /**
    * 获取项目下拉数据
    */
@@ -221,8 +252,10 @@ export class ProjectWorkDevelopmentLogAddComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if(!this.getHourBoole()){
           this.nzNotificationService.warning("工作用时不得大于开始时间与结束时间之差","");
@@ -262,7 +295,7 @@ export class ProjectWorkDevelopmentLogAddComponent implements OnInit {
     //明细总工时
     let itemHour=0;
     //两个时间差
-    let dateHour=this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour=this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if(element.duration){

+ 22 - 0
src/app/routes/project-work/development-log/update/update.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>

+ 37 - 4
src/app/routes/project-work/development-log/update/update.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkDevelopmentLogUpdateComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -77,6 +79,35 @@ export class ProjectWorkDevelopmentLogUpdateComponent implements OnInit {
   date = null;
   id="";
 
+/**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
+
   /**
    * 根据id查询
    */
@@ -245,8 +276,10 @@ export class ProjectWorkDevelopmentLogUpdateComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if (!this.getHourBoole()) {
           this.nzNotificationService.warning('工作用时不得大于开始时间与结束时间之差', '');
@@ -286,7 +319,7 @@ export class ProjectWorkDevelopmentLogUpdateComponent implements OnInit {
     //明细总工时
     let itemHour = 0;
     //两个时间差
-    let dateHour = this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour = this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if (element.duration) {

+ 25 - 2
src/app/routes/project-work/implementation-log/add/add.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>
@@ -76,8 +98,9 @@
               <td nzAlign="center">{{i+1}}</td>
               <td>
                 <nz-tree-select style="width: 100%" [nzNodes]="mieList" nzShowSearch [nzMultiple]="false"
-                  nzPlaceHolder="请选择" [(ngModel)]="data.proArchivesId" [nzMaxTagCount]="3" [nzAllowClear]="true" (ngModelChange)="proArchivesIdChange(data)">
-                </nz-tree-select >
+                  nzPlaceHolder="请选择" [(ngModel)]="data.proArchivesId" [nzMaxTagCount]="3" [nzAllowClear]="true"
+                  (ngModelChange)="proArchivesIdChange(data)">
+                </nz-tree-select>
               </td>
               <td>
                 <textarea rows="1" nz-input [(ngModel)]="data.content"></textarea>

+ 37 - 4
src/app/routes/project-work/implementation-log/add/add.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkImplementationLogAddComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -75,6 +77,35 @@ export class ProjectWorkImplementationLogAddComponent implements OnInit {
   mieList = []; //里程碑数据下拉
   date = null;
 
+  /**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
+
   /**
    * 获取项目下拉数据
    */
@@ -221,8 +252,10 @@ export class ProjectWorkImplementationLogAddComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if(!this.getHourBoole()){
           this.nzNotificationService.warning("工作用时不得大于开始时间与结束时间之差","");
@@ -262,7 +295,7 @@ export class ProjectWorkImplementationLogAddComponent implements OnInit {
     //明细总工时
     let itemHour=0;
     //两个时间差
-    let dateHour=this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour=this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if(element.duration){

+ 22 - 0
src/app/routes/project-work/implementation-log/update/update.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>

+ 36 - 4
src/app/routes/project-work/implementation-log/update/update.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkImplementationLogUpdateComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -77,6 +79,34 @@ export class ProjectWorkImplementationLogUpdateComponent implements OnInit {
   date = null;
   id="";
 
+  /**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
   /**
    * 根据id查询
    */
@@ -244,8 +274,10 @@ export class ProjectWorkImplementationLogUpdateComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if (!this.getHourBoole()) {
           this.nzNotificationService.warning('工作用时不得大于开始时间与结束时间之差', '');
@@ -285,7 +317,7 @@ export class ProjectWorkImplementationLogUpdateComponent implements OnInit {
     //明细总工时
     let itemHour = 0;
     //两个时间差
-    let dateHour = this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour = this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if (element.duration) {

+ 22 - 0
src/app/routes/project-work/service-log/add/add.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>

+ 37 - 4
src/app/routes/project-work/service-log/add/add.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkServiceLogAddComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -75,6 +77,35 @@ export class ProjectWorkServiceLogAddComponent implements OnInit {
   mieList = []; //里程碑数据下拉
   date = null;
 
+  /**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
+
   /**
    * 获取项目下拉数据
    */
@@ -221,8 +252,10 @@ export class ProjectWorkServiceLogAddComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if(!this.getHourBoole()){
           this.nzNotificationService.warning("工作用时不得大于开始时间与结束时间之差","");
@@ -262,7 +295,7 @@ export class ProjectWorkServiceLogAddComponent implements OnInit {
     //明细总工时
     let itemHour=0;
     //两个时间差
-    let dateHour=this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour=this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if(element.duration){

+ 22 - 0
src/app/routes/project-work/service-log/update/update.component.html

@@ -43,8 +43,30 @@
       <div nz-col [nzSpan]="8">
         <nz-form-item>
           <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>开始时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
           <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="startDate" id="startDate"
+              [(ngModel)]="proWorkLogic.startDate" [nzDisabledDate]="disabledDate"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('startDate')?.dirty && validateForm.get('startDate')?.errors">
+              请选择开始时间
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="8">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>结束时间</nz-form-label>
+          <!-- <nz-form-control [nzSm]="14" [nzXs]="24">
             <nz-range-picker [nzShowTime]="true" formControlName="date" id="date" [(ngModel)]="date"></nz-range-picker>
+          </nz-form-control> -->
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker nzShowTime nzFormat="yyyy-MM-dd HH:mm:ss" formControlName="endDate" id="endDate"
+              [(ngModel)]="proWorkLogic.endDate" [nzDisabledDate]="disabledDate2"></nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('endDate')?.dirty && validateForm.get('endDate')?.errors">
+              请选择结束时间
+            </nz-form-explain>
           </nz-form-control>
         </nz-form-item>
       </div>

+ 37 - 4
src/app/routes/project-work/service-log/update/update.component.ts

@@ -48,8 +48,10 @@ export class ProjectWorkServiceLogUpdateComponent implements OnInit {
     this.validateForm = this.fb.group({
       billcode: [{ value: '', disabled: true }],
       proId: [null, [Validators.required]],
-      date: [null, [Validators.required]],
+      // date: [null, [Validators.required]],
       reporterId: [null, [Validators.required]],
+      startDate:[null,[Validators.required]],
+      endDate:[null,[Validators.required]]
     });
     //项目下拉
     this.isLoadingSave = true;
@@ -77,6 +79,35 @@ export class ProjectWorkServiceLogUpdateComponent implements OnInit {
   date = null;
   id="";
 
+  /**
+   * 开始时间禁用事件
+   */
+  disabledDate = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.endDate){
+      let end=new Date(this.proWorkLogic.endDate);//结束时间
+      //开始时间大于结束时间的禁用
+      return current.getTime()>end.getTime();
+    }else{
+      return false;
+    }
+  };
+
+  /**
+   * 结束
+   * 时间禁用事件
+   */
+  disabledDate2 = (current: Date): boolean => {
+    // Can not select days before today and today
+    if(this.proWorkLogic.startDate){
+      let start=new Date(this.proWorkLogic.startDate);//开始时间
+      //结束时间小于开始时间禁用
+      return current.getTime()<start.getTime();
+    }else{
+      return false;
+    }
+  };
+
   /**
    * 根据id查询
    */
@@ -244,8 +275,10 @@ export class ProjectWorkServiceLogUpdateComponent implements OnInit {
           this.proWorkLogic.reporter = '';
         }
         //时间格式化
-        this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
-        this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.startDate = this.datePipe.transform(this.date[0], 'yyyy-MM-dd HH:mm:ss');
+        // this.proWorkLogic.endDate = this.datePipe.transform(this.date[1], 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.startDate = this.datePipe.transform(this.proWorkLogic.startDate, 'yyyy-MM-dd HH:mm:ss');
+        this.proWorkLogic.endDate = this.datePipe.transform(this.proWorkLogic.endDate, 'yyyy-MM-dd HH:mm:ss');
         //判断两个时间差的工时是否大于明细总工时
         if (!this.getHourBoole()) {
           this.nzNotificationService.warning('工作用时不得大于开始时间与结束时间之差', '');
@@ -285,7 +318,7 @@ export class ProjectWorkServiceLogUpdateComponent implements OnInit {
     //明细总工时
     let itemHour = 0;
     //两个时间差
-    let dateHour = this.getInervalHour(this.date[0], this.date[1]);
+    let dateHour = this.getInervalHour(new Date(this.proWorkLogic.startDate), new Date(this.proWorkLogic.endDate));
     //循环获取明细的总工时
     this.itemList.forEach(element => {
       if (element.duration) {

+ 7 - 0
src/app/services/invoice-management/invoice-manage-purchase.service.ts

@@ -42,4 +42,11 @@ export class InvoiceManagePurchaseService {
   async update(body: InvoiceManagePurchase): Promise<BaseResponse<any>> {
     return await this.http.put<BaseResponse<any>>('invoice/invoiceManagePurchase/edit', body).toPromise();
   }
+
+  //根据主表id与类型查询商务里程碑信息收付款条线列表
+  async getChildrenList(body: any): Promise<BaseResponse<any>> {
+    return await this.http
+      .get<BaseResponse<any>>('invoice/invoiceManagePurchase/getChildrenList', { params: body })
+      .toPromise();
+  }
 }

+ 14 - 0
src/app/services/project-manage-archives/project-manage-archives.service.ts

@@ -62,4 +62,18 @@ export class ProjectManageArchivesService {
       .get<BaseResponse<any>>('archives/projectManageArchives/getBusinessList', { params: body })
       .toPromise();
   }
+
+  //根据主表id与类型查询商务里程碑信息收付款条线列表
+  async getLineList(body: any): Promise<BaseResponse<any>> {
+    return await this.http
+      .get<BaseResponse<any>>('archives/projectManageArchives/getLineList', { params: body })
+      .toPromise();
+  }
+
+  //根据主表id与类型查询商务里程碑信息收付款条线列表
+  async getMileNameById(body: any): Promise<BaseResponse<any>> {
+    return await this.http
+      .get<BaseResponse<any>>('archives/projectManageArchives/getMileNameById', { params: body })
+      .toPromise();
+  }
 }