Quellcode durchsuchen

采购发票 收款单 费用报销单

chenc vor 4 Jahren
Ursprung
Commit
f1ec3db73a
27 geänderte Dateien mit 1470 neuen und 6 gelöschten Zeilen
  1. 29 0
      src/app/entity/down-payment-management/manager-payment-and-receipt-slip.ts
  2. 27 0
      src/app/entity/expense-reimbursement/re-expense-slip.ts
  3. 13 0
      src/app/routes/down-payment-management/down-payment-management-routing.module.ts
  4. 25 0
      src/app/routes/down-payment-management/down-payment-management.module.ts
  5. 130 0
      src/app/routes/down-payment-management/receipt/add/add.component.html
  6. 24 0
      src/app/routes/down-payment-management/receipt/add/add.component.spec.ts
  7. 190 0
      src/app/routes/down-payment-management/receipt/add/add.component.ts
  8. 60 0
      src/app/routes/down-payment-management/receipt/receipt.component.html
  9. 24 0
      src/app/routes/down-payment-management/receipt/receipt.component.spec.ts
  10. 125 0
      src/app/routes/down-payment-management/receipt/receipt.component.ts
  11. 130 0
      src/app/routes/down-payment-management/receipt/update/update.component.html
  12. 24 0
      src/app/routes/down-payment-management/receipt/update/update.component.spec.ts
  13. 212 0
      src/app/routes/down-payment-management/receipt/update/update.component.ts
  14. 58 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.html
  15. 24 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.spec.ts
  16. 103 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.ts
  17. 58 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.html
  18. 24 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.spec.ts
  19. 89 0
      src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.ts
  20. 13 0
      src/app/routes/expense-reimbursement/expense-reimbursement-routing.module.ts
  21. 23 0
      src/app/routes/expense-reimbursement/expense-reimbursement.module.ts
  22. 2 2
      src/app/routes/invoice-management/invoice-manage-purchase/add/add.component.html
  23. 2 2
      src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.html
  24. 1 1
      src/app/routes/invoice-management/invoice-manage-purchase/update/update.component.ts
  25. 5 1
      src/app/routes/routes-routing.module.ts
  26. 36 0
      src/app/services/down-payment-management/manager-payment-and-receipt-slip.service.ts
  27. 19 0
      src/app/services/expense-reimbursement/re-expense-slip.service.ts

+ 29 - 0
src/app/entity/down-payment-management/manager-payment-and-receipt-slip.ts

@@ -0,0 +1,29 @@
+import { Page } from '../page';
+/**
+ * 首付款主表
+ */
+export class ManagerPaymentAndReceiptSlip extends Page {
+    id?:string;
+    //单据编号
+    billcode?:string;
+    //1.收款单 2.付款单
+    type?:string;
+    //项目id
+    proId?:string;
+    //项目名称
+    proName?:string;
+    //项目编码
+    proCode?:string;
+    //客户档案id
+    cusId?:string;
+    //客户档案编码
+    cusCode?:string;
+    //客户档案名称
+    cusName?:string;
+    //组织
+    pkOrg?:string;
+    //子表数据
+    detailList?:any[];
+    //总收款金额
+    totalPrice?:number;
+}

+ 27 - 0
src/app/entity/expense-reimbursement/re-expense-slip.ts

@@ -0,0 +1,27 @@
+import { Page } from '../page';
+/**
+ * 费用报销单
+ */
+export class ReExpenseSlip  extends Page{
+    id?:string;
+    //人员id
+    personId?:string;
+    //人员
+    person?:string;
+    //日期
+    date?:string;
+    //制单人id
+    producerId?:string;
+    //制单人
+    producer?:string;
+    //审核人id
+    reviewerId?:string;
+    //审核人
+    reviewer?:string;
+    //项目id
+    proId?:string;
+    //项目名
+    proName?:string;
+    //组织
+    pkOrg?:string;
+}

+ 13 - 0
src/app/routes/down-payment-management/down-payment-management-routing.module.ts

@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { DownPaymentManagementReceiptComponent } from './receipt/receipt.component';
+
+const routes: Routes = [
+
+  { path: 'receipt', component: DownPaymentManagementReceiptComponent }];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class DownPaymentManagementRoutingModule { }

+ 25 - 0
src/app/routes/down-payment-management/down-payment-management.module.ts

@@ -0,0 +1,25 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { DownPaymentManagementRoutingModule } from './down-payment-management-routing.module';
+import { DownPaymentManagementReceiptComponent } from './receipt/receipt.component';
+import { DownPaymentManagementReceiptAddComponent } from './receipt/add/add.component';
+import { DownPaymentManagementReceiptUpdateComponent } from './receipt/update/update.component';
+
+const COMPONENTS = [
+  DownPaymentManagementReceiptComponent];
+const COMPONENTS_NOROUNT = [
+  DownPaymentManagementReceiptAddComponent,
+  DownPaymentManagementReceiptUpdateComponent];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    DownPaymentManagementRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class DownPaymentManagementModule { }

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

@@ -0,0 +1,130 @@
+<nz-spin [nzSpinning]="isLoadingSave">
+  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">单据编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            自动生成
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">客户编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.cusCode}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">客户名称</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.cusName}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">项目编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.proCode}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>项目名称</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId"
+              id="proId" [(ngModel)]="managerPaymentAndReceiptSlip.proId" nzPlaceHolder="请选择"
+              (ngModelChange)="proChange($event)">
+              <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+            </nz-select>
+            <nz-form-explain
+              *ngIf="validateForm.get('proId')?.dirty && validateForm.get('proId')?.errors">
+              请选择项目名称
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+<!-- 子表数据 -->
+  <nz-card>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="24">
+        <!-- 新增按钮 -->
+        <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="24">
+        <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #basicTable
+          [nzData]="itemDataList" [nzFrontPagination]="false" [nzShowPagination]="false" >
+          <thead>
+            <tr>
+              <th nzAlign="center">序号</th>
+              <th>里程碑</th>
+              <th>收付款条线</th>
+              <th>收款金额</th>
+              <th>说明</th>
+              <th>对应发票</th>
+              <th>操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <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>
+              </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.proName"></nz-option>
+              </nz-select>
+              </td>
+              <td>
+                <nz-input-number [(ngModel)]="data.coPrvice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar" (ngModelChange)="coPrviceKeyUp()"></nz-input-number>
+              </td>
+              <td>
+                <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
+              </td>
+              <td style="width: 20%;">
+                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                >
+                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+              </nz-select>
+              </td>
+              <td ><a nz-popconfirm nzTitle="是否删除?"
+                  (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>
+            </tr>
+            <tr *ngIf="itemDataList&&itemDataList.length>0">
+              <td colSpan="2"></td>
+              <td><strong>收款总金额</strong></td>
+              <td><strong>$ {{managerPaymentAndReceiptSlip.totalPrice}}</strong></td>
+              <td colSpan="3"></td>
+            </tr>
+          </tbody>
+        </nz-table>
+      </div>
+    </div>
+  </nz-card>
+</nz-spin>
+<!-- 按钮 -->
+<div class="base">
+  <!-- 关闭按钮 -->
+  <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
+    style="padding-right: 8px">
+    <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
+  </a>
+  <!-- 保存按钮 -->
+  <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="submitForm()"
+    [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
+</div>

+ 24 - 0
src/app/routes/down-payment-management/receipt/add/add.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { DownPaymentManagementReceiptAddComponent } from './add.component';
+
+describe('DownPaymentManagementReceiptAddComponent', () => {
+  let component: DownPaymentManagementReceiptAddComponent;
+  let fixture: ComponentFixture<DownPaymentManagementReceiptAddComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DownPaymentManagementReceiptAddComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DownPaymentManagementReceiptAddComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 190 - 0
src/app/routes/down-payment-management/receipt/add/add.component.ts

@@ -0,0 +1,190 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService, NzNotificationService, NzDrawerRef } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { FormBuilder, FormGroup, Validators } from '@angular/forms';
+import { ManagerPaymentAndReceiptSlip } from 'app/entity/down-payment-management/manager-payment-and-receipt-slip';
+import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
+import { ManagerPaymentAndReceiptSlipService } from 'app/services/down-payment-management/manager-payment-and-receipt-slip.service';
+import { I18NService } from '@core';
+
+@Component({
+  selector: 'app-down-payment-management-receipt-add',
+  templateUrl: './add.component.html',
+  styles: [
+    `
+      .base {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        border-top: 1px solid rgb(232, 232, 232);
+        padding: 6px 16px;
+        text-align: right;
+        left: 0px;
+        background: #fff;
+        z-index: 99;
+      }
+    `,
+  ],
+})
+export class DownPaymentManagementReceiptAddComponent implements OnInit {
+  constructor(private fb: FormBuilder, private projectManageArchivesService: ProjectManageArchivesService,
+    private managerPaymentAndReceiptSlipService:ManagerPaymentAndReceiptSlipService,
+    private nzNotificationService:NzNotificationService,
+    private i18NService:I18NService,
+    private drawerRef:NzDrawerRef) {}
+
+  ngOnInit(): void {
+    //初始化表单
+    this.validateForm = this.fb.group({
+      proId: [null, [Validators.required]],
+    });
+    this.isLoadingSave = true;
+    this.getProList().then(() => {
+      this.isLoadingSave = false;
+    });
+  }
+
+  validateForm!: FormGroup;
+  managerPaymentAndReceiptSlip: ManagerPaymentAndReceiptSlip = {}; //对象
+  isLoadingSave = false;
+  proList = []; //项目下拉数据
+  proArchivesList = []; //里程碑下拉数据
+  coArchivesList = []; //条线下拉数据
+  invoiceIdList=[];//发票数据集合
+  //金额格式化
+  formatterDollar = (value: number) => {
+    if (value) {
+      return `$ ${value}`;
+    } else {
+      return `$ `;
+    }
+  };
+  parserDollar = (value: string) => value.replace('$ ', '');
+
+  /**
+   * 获取项目下拉数据
+   */
+  getProList() {
+    return new Promise(resolve => {
+      let projectManageArchives = new ProjectManageArchives();
+      projectManageArchives.pageSize = 20000;
+      projectManageArchives.pkOrg = sessionStorage.getItem('pkOrg');
+      this.projectManageArchivesService.getList(projectManageArchives).then(response => {
+        if (response.result.records) {
+          this.proList = response.result.records;
+        }
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 项目下拉选择事件
+   */
+  proChange(event) {
+    if (event) {
+      //根据id获取项目档案数据
+      this.projectManageArchivesService.getListById(event).then(response => {
+        if (response.success) {
+          let project = JSON.parse(JSON.stringify(response.result)); //项目档案对象
+          this.managerPaymentAndReceiptSlip.proCode = project.proCode; //项目档案编码
+          this.managerPaymentAndReceiptSlip.proName = project.proName; //项目档案名称
+          this.managerPaymentAndReceiptSlip.cusId = project.cusId; //客户id
+          this.managerPaymentAndReceiptSlip.cusCode = project.cusCode; //客户编码
+          this.managerPaymentAndReceiptSlip.cusName = project.cusName; //客户名称
+          //获取里程碑下拉数据
+          // this.getBusinessList();
+        }
+      });
+    }
+  }
+
+  itemDataList = []; //子表明细集合
+  /**
+   * 增行按钮
+   */
+  sort = 0;
+  addRow() {
+    this.itemDataList = [
+      ...this.itemDataList,
+      {
+        price: '',
+        uncoPrice: '',
+        coPrice: '',
+        sort: this.sort,
+      },
+    ];
+    this.sort++;
+  }
+
+  /**
+   * 删除行
+   */
+  deleteRow(sort) {
+    this.itemDataList = this.itemDataList.filter(d => d.sort !== sort);
+    //计算总金额
+    this.getCoPrviceTotal();
+  }
+
+  /**
+   * 金额填写事件
+   */
+  coPrviceKeyUp(){
+    //计算总金额
+    this.getCoPrviceTotal();
+  }
+
+  /**
+   * 获取收款金额合计
+   */
+  getCoPrviceTotal(){
+    //判断是否有值
+    if(!this.itemDataList){
+      return;
+    }
+    //获取所有金额总计
+    let coPrviceTotal=0;
+    this.itemDataList.forEach(element => {
+      if(element.coPrvice&&!isNaN(Number(element.coPrvice))){
+        coPrviceTotal=coPrviceTotal+Number(element.coPrvice);
+      }
+    });
+    this.managerPaymentAndReceiptSlip.totalPrice=coPrviceTotal;
+  }
+
+  /**
+   * 保存提交
+   */
+  submitForm(): any {
+    return new Promise(resolve => {
+      for (const i in this.validateForm.controls) {
+        this.validateForm.controls[i].markAsDirty();
+        this.validateForm.controls[i].updateValueAndValidity();
+      }
+      let valid = this.validateForm.valid;
+      if(valid){
+        this.managerPaymentAndReceiptSlip.type="1";//收款表
+        this.managerPaymentAndReceiptSlip.pkOrg=sessionStorage.getItem("pkOrg");//公司组织
+        this.managerPaymentAndReceiptSlip.detailList=this.itemDataList;
+        this.managerPaymentAndReceiptSlipService.add(this.managerPaymentAndReceiptSlip).then((response)=>{
+          if (response.success) {
+            //保存成功
+            this.isLoadingSave = false;
+            this.nzNotificationService.success(this.i18NService.fanyi('save.ok'), '');
+            this.drawerRef.close(true);
+            resolve();
+          } else {
+            //保存失败
+            this.isLoadingSave = false;
+            this.nzNotificationService.error(this.i18NService.fanyi('save.not'), '');
+          }
+        })
+      }
+    });
+  }
+
+  close() {
+    this.drawerRef.close();
+  }
+}

+ 60 - 0
src/app/routes/down-payment-management/receipt/receipt.component.html

@@ -0,0 +1,60 @@
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl>
+    <button (click)="add()" nz-button nzType="primary" acl [acl-ability]="'receipt:add'">新建</button>
+  </ng-template>
+</page-header>
+<nz-card>
+  <!-- 查询条件 -->
+ <form nz-form>
+  <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+    <div nz-col [nzSpan]="8">
+      <nz-form-item>
+        <nz-form-label [nzSm]="6" [nzXs]="24">单据编码</nz-form-label>
+        <nz-form-control [nzSm]="14" [nzXs]="24">
+          <input nz-input name="code" [(ngModel)]="managerPaymentAndReceiptSlip.billcode" />
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="8">
+      <nz-form-item>
+        <nz-form-label [nzSm]="2" [nzXs]="24" [nzNoColon]=true></nz-form-label>
+        <nz-form-control [nzSm]="14" [nzXs]="24">
+          <button nzType="primary" (click)="query()" nz-button><span>查询</span></button>
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+</form>
+ <!-- 表格 -->
+ <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+  <div nz-col [nzSpan]="24">
+    <nz-table nzSize="small" #basicTable [nzData]="listOfData" [nzFrontPagination]="false" [nzTotal]="page.total"
+      [nzPageIndex]="page.current" (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpinning">
+      <thead>
+        <tr>
+          <th>单据编码</th>
+          <th>客户编码</th>
+          <th>客户名称</th>
+          <th>项目编码</th>
+          <th>项目名称</th>
+          <th>操作</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of basicTable.data">
+          <td>{{ data.billcode }}</td>
+          <td>{{ data.cusCode }}</td>
+          <td>{{ data.cusName }}</td>
+          <td>{{ data.proCode }}</td>
+          <td>{{ data.proName }}</td>
+          <td>
+            <a (click)="update(data)" acl [acl-ability]="'receipt:update'">修改</a>
+            <nz-divider nzType="vertical" acl [acl-ability]="'receipt:update'"></nz-divider>
+            <a (click)="delete(data.id)" acl [acl-ability]="'receipt:delete'">删除</a>
+          </td>
+        </tr>
+      </tbody>
+    </nz-table>
+  </div>
+</div>
+</nz-card>

+ 24 - 0
src/app/routes/down-payment-management/receipt/receipt.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { DownPaymentManagementReceiptComponent } from './receipt.component';
+
+describe('DownPaymentManagementReceiptComponent', () => {
+  let component: DownPaymentManagementReceiptComponent;
+  let fixture: ComponentFixture<DownPaymentManagementReceiptComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DownPaymentManagementReceiptComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DownPaymentManagementReceiptComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 125 - 0
src/app/routes/down-payment-management/receipt/receipt.component.ts

@@ -0,0 +1,125 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+import { ManagerPaymentAndReceiptSlip } from 'app/entity/down-payment-management/manager-payment-and-receipt-slip';
+import { ManagerPaymentAndReceiptSlipService } from 'app/services/down-payment-management/manager-payment-and-receipt-slip.service';
+import { NzDrawerService, NzNotificationService } from 'ng-zorro-antd';
+import { DownPaymentManagementReceiptAddComponent } from './add/add.component';
+import { I18NService } from '@core';
+import { DownPaymentManagementReceiptUpdateComponent } from './update/update.component';
+
+@Component({
+  selector: 'app-down-payment-management-receipt',
+  templateUrl: './receipt.component.html',
+})
+export class DownPaymentManagementReceiptComponent implements OnInit {
+  
+  constructor(
+    private managerPaymentAndReceiptSlipService:ManagerPaymentAndReceiptSlipService,
+    private nzDrawerService:NzDrawerService,
+    private i18NService:I18NService,
+    private nzNotificationService:NzNotificationService
+  ) { }
+
+  ngOnInit() {
+    this.getList();
+   }
+
+  listOfData = [];
+  managerPaymentAndReceiptSlip: ManagerPaymentAndReceiptSlip = {}; //对象
+  page = {
+    total: 0,
+    current: 0,
+  }; //页码
+  isSpinning = false;
+
+  //按页码显示数据
+  pageIndexChange(event) {
+    this.managerPaymentAndReceiptSlip.pageNo = event; //当前页码
+    this.getList();
+  }
+
+  /**
+   * 查询数据表
+   */
+  getList() {
+    this.isSpinning = true;
+    this.managerPaymentAndReceiptSlip.pkOrg = sessionStorage.getItem('pkOrg'); //组织
+    this.managerPaymentAndReceiptSlip.type = '1'; //收款单
+    this.managerPaymentAndReceiptSlipService.getList(this.managerPaymentAndReceiptSlip).then(response => {
+      this.listOfData = response.result.records;
+      this.isSpinning = false;
+    });
+  }
+
+  /**
+   * 查询按钮
+   */
+  query() {
+    this.managerPaymentAndReceiptSlip.pageNo = 1;
+    this.getList();
+  }
+
+  add() {
+    const drawerRef = this.nzDrawerService.create<DownPaymentManagementReceiptAddComponent, { quotationId: string }, string>({
+      nzTitle: this.i18NService.fanyi("button.add"),//新增标题
+      nzContent: DownPaymentManagementReceiptAddComponent,
+      nzWidth: window.innerWidth,
+      nzBodyStyle: { height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' }
+      // nzContentParams: {
+      //   //模板id
+      //   quotationId: item.id
+      // }
+    });
+
+    //关闭抽屉的回调
+    drawerRef.afterClose.subscribe((isRefresh) => {
+      if (isRefresh) {//刷新list列表
+        this.getList();
+      }
+    });
+  }
+
+  /**
+   * 修改按钮
+   */
+  update(data){
+    const drawerRef = this.nzDrawerService.create<DownPaymentManagementReceiptUpdateComponent, { id: string }, string>({
+      nzTitle: this.i18NService.fanyi("table.update"),//修改标题
+      nzContent: DownPaymentManagementReceiptUpdateComponent,
+      nzWidth: window.innerWidth,
+      nzBodyStyle: { height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' },
+      nzContentParams: {
+        //模板id
+        id: data.id
+      }
+    });
+
+    //关闭抽屉的回调
+    drawerRef.afterClose.subscribe((isRefresh) => {
+      if (isRefresh) {//刷新list列表
+        this.getList();
+      }
+    });
+  }
+
+  /**
+   * 删除按钮
+   * @param id 删除id
+   */
+  delete(id){
+    let invoiceManagePurchase={id:id}
+    this.managerPaymentAndReceiptSlipService.delete(invoiceManagePurchase).then((response)=>{
+      if (response.success) {
+        //删除成功
+        this.nzNotificationService.success(this.i18NService.fanyi('successful.deletion'), '');
+        this.getList();
+      } else {
+        //删除失败
+        this.nzNotificationService.error(this.i18NService.fanyi('delete.failed'), '');
+      }
+    })
+  }
+
+}

+ 130 - 0
src/app/routes/down-payment-management/receipt/update/update.component.html

@@ -0,0 +1,130 @@
+<nz-spin [nzSpinning]="isLoadingSave">
+  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">单据编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            自动生成
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">客户编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.cusCode}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">客户名称</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.cusName}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24">项目编码</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            {{managerPaymentAndReceiptSlip.proCode}}
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+      <div nz-col [nzSpan]="6">
+        <nz-form-item>
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>项目名称</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId"
+              id="proId" [(ngModel)]="managerPaymentAndReceiptSlip.proId" nzPlaceHolder="请选择"
+              (ngModelChange)="proChange($event)">
+              <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+            </nz-select>
+            <nz-form-explain
+              *ngIf="validateForm.get('proId')?.dirty && validateForm.get('proId')?.errors">
+              请选择项目名称
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+<!-- 子表数据 -->
+  <nz-card>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="24">
+        <!-- 新增按钮 -->
+        <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
+      </div>
+    </div>
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="24">
+        <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #basicTable
+          [nzData]="itemDataList" [nzFrontPagination]="false" [nzShowPagination]="false" >
+          <thead>
+            <tr>
+              <th nzAlign="center">序号</th>
+              <th>里程碑</th>
+              <th>收付款条线</th>
+              <th>收款金额</th>
+              <th>说明</th>
+              <th>对应发票</th>
+              <th>操作</th>
+            </tr>
+          </thead>
+          <tbody>
+            <tr *ngFor="let data of basicTable.data;let i=index">
+              <td nzAlign="center">{{i+1}}{{data.sort}}</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>
+              </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.proName"></nz-option>
+              </nz-select>
+              </td>
+              <td>
+                <nz-input-number [(ngModel)]="data.coPrvice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar" (ngModelChange)="coPrviceKeyUp()"></nz-input-number>
+              </td>
+              <td>
+                <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
+              </td>
+              <td style="width: 20%;">
+                <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
+                >
+                <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+              </nz-select>
+              </td>
+              <td ><a nz-popconfirm nzTitle="是否删除?"
+                  (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>
+            </tr>
+            <tr *ngIf="itemDataList&&itemDataList.length>0">
+              <td colSpan="2"></td>
+              <td><strong>收款总金额</strong></td>
+              <td><strong>$ {{managerPaymentAndReceiptSlip.totalPrice}}</strong></td>
+              <td colSpan="3"></td>
+            </tr>
+          </tbody>
+        </nz-table>
+      </div>
+    </div>
+  </nz-card>
+</nz-spin>
+<!-- 按钮 -->
+<div class="base">
+  <!-- 关闭按钮 -->
+  <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
+    style="padding-right: 8px">
+    <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
+  </a>
+  <!-- 保存按钮 -->
+  <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="submitForm()"
+    [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
+</div>

+ 24 - 0
src/app/routes/down-payment-management/receipt/update/update.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { DownPaymentManagementReceiptUpdateComponent } from './update.component';
+
+describe('DownPaymentManagementReceiptUpdateComponent', () => {
+  let component: DownPaymentManagementReceiptUpdateComponent;
+  let fixture: ComponentFixture<DownPaymentManagementReceiptUpdateComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ DownPaymentManagementReceiptUpdateComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(DownPaymentManagementReceiptUpdateComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 212 - 0
src/app/routes/down-payment-management/receipt/update/update.component.ts

@@ -0,0 +1,212 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService, NzNotificationService, NzDrawerRef } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
+import { FormBuilder, Validators, FormGroup } from '@angular/forms';
+import { ManagerPaymentAndReceiptSlipService } from 'app/services/down-payment-management/manager-payment-and-receipt-slip.service';
+import { I18NService } from '@core';
+import { ManagerPaymentAndReceiptSlip } from 'app/entity/down-payment-management/manager-payment-and-receipt-slip';
+import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+
+@Component({
+  selector: 'app-down-payment-management-receipt-update',
+  templateUrl: './update.component.html',
+  styles: [
+    `
+      .base {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        border-top: 1px solid rgb(232, 232, 232);
+        padding: 6px 16px;
+        text-align: right;
+        left: 0px;
+        background: #fff;
+        z-index: 99;
+      }
+    `,
+  ],
+})
+export class DownPaymentManagementReceiptUpdateComponent implements OnInit {
+  constructor(private fb: FormBuilder, private projectManageArchivesService: ProjectManageArchivesService,
+    private managerPaymentAndReceiptSlipService:ManagerPaymentAndReceiptSlipService,
+    private nzNotificationService:NzNotificationService,
+    private i18NService:I18NService,
+    private drawerRef:NzDrawerRef) {}
+
+  ngOnInit(): void {
+    //初始化表单
+    this.validateForm = this.fb.group({
+      proId: [null, [Validators.required]],
+    });
+    this.isLoadingSave = true;
+    //项目查询
+    this.getProList().then(()=>{
+      return this.getById();//根据id查询修改数据
+    }).then(() => {
+      this.isLoadingSave = false;
+    });
+  }
+
+  id="";
+  validateForm!: FormGroup;
+  managerPaymentAndReceiptSlip: ManagerPaymentAndReceiptSlip = {}; //对象
+  isLoadingSave = false;
+  proList = []; //项目下拉数据
+  proArchivesList = []; //里程碑下拉数据
+  coArchivesList = []; //条线下拉数据
+  invoiceIdList=[];//发票数据集合
+  //金额格式化
+  formatterDollar = (value: number) => {
+    if (value) {
+      return `$ ${value}`;
+    } else {
+      return `$ `;
+    }
+  };
+  parserDollar = (value: string) => value.replace('$ ', '');
+
+  /**
+   * 根据id查询
+   */
+  getById(){
+    return new Promise(resolve => {
+      this.managerPaymentAndReceiptSlipService.queryById(this.id).then((response)=>{
+        if(response.success){
+          this.managerPaymentAndReceiptSlip=response.result;//主表数据
+          this.itemDataList=response.result.detailList;//子表数据
+          if(this.itemDataList){//获取最大排序
+            this.sort=this.itemDataList.length+1;
+          }
+        }
+        resolve();
+      })
+    })
+  }
+
+  /**
+   * 获取项目下拉数据
+   */
+  getProList() {
+    return new Promise(resolve => {
+      let projectManageArchives = new ProjectManageArchives();
+      projectManageArchives.pageSize = 20000;
+      projectManageArchives.pkOrg = sessionStorage.getItem('pkOrg');
+      this.projectManageArchivesService.getList(projectManageArchives).then(response => {
+        if (response.result.records) {
+          this.proList = response.result.records;
+        }
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 项目下拉选择事件
+   */
+  proChange(event) {
+    if (event) {
+      //根据id获取项目档案数据
+      this.projectManageArchivesService.getListById(event).then(response => {
+        if (response.success) {
+          let project = JSON.parse(JSON.stringify(response.result)); //项目档案对象
+          this.managerPaymentAndReceiptSlip.proCode = project.proCode; //项目档案编码
+          this.managerPaymentAndReceiptSlip.proName = project.proName; //项目档案名称
+          this.managerPaymentAndReceiptSlip.cusId = project.cusId; //客户id
+          this.managerPaymentAndReceiptSlip.cusCode = project.cusCode; //客户编码
+          this.managerPaymentAndReceiptSlip.cusName = project.cusName; //客户名称
+          //获取里程碑下拉数据
+          // this.getBusinessList();
+        }
+      });
+    }
+  }
+
+  itemDataList = []; //子表明细集合
+  /**
+   * 增行按钮
+   */
+  sort = 0;
+  addRow() {
+    this.itemDataList = [
+      ...this.itemDataList,
+      {
+        price: '',
+        uncoPrice: '',
+        coPrice: '',
+        sort: this.sort,
+      },
+    ];
+    this.sort++;
+  }
+
+  /**
+   * 删除行
+   */
+  deleteRow(sort) {
+    this.itemDataList = this.itemDataList.filter(d => d.sort !== sort);
+    //计算总金额
+    this.getCoPrviceTotal();
+  }
+
+  /**
+   * 金额填写事件
+   */
+  coPrviceKeyUp(){
+    //计算总金额
+    this.getCoPrviceTotal();
+  }
+
+  /**
+   * 获取收款金额合计
+   */
+  getCoPrviceTotal(){
+    //判断是否有值
+    if(!this.itemDataList){
+      return;
+    }
+    //获取所有金额总计
+    let coPrviceTotal=0;
+    this.itemDataList.forEach(element => {
+      if(element.coPrvice&&!isNaN(Number(element.coPrvice))){
+        coPrviceTotal=coPrviceTotal+Number(element.coPrvice);
+      }
+    });
+    this.managerPaymentAndReceiptSlip.totalPrice=coPrviceTotal;
+  }
+
+  /**
+   * 保存提交
+   */
+  submitForm(): any {
+    return new Promise(resolve => {
+      for (const i in this.validateForm.controls) {
+        this.validateForm.controls[i].markAsDirty();
+        this.validateForm.controls[i].updateValueAndValidity();
+      }
+      let valid = this.validateForm.valid;
+      if(valid){
+        this.managerPaymentAndReceiptSlip.type="1";//收款表
+        this.managerPaymentAndReceiptSlip.pkOrg=sessionStorage.getItem("pkOrg");//公司组织
+        this.managerPaymentAndReceiptSlip.detailList=this.itemDataList;
+        this.managerPaymentAndReceiptSlipService.add(this.managerPaymentAndReceiptSlip).then((response)=>{
+          if (response.success) {
+            //保存成功
+            this.isLoadingSave = false;
+            this.nzNotificationService.success(this.i18NService.fanyi('save.ok'), '');
+            this.drawerRef.close(true);
+            resolve();
+          } else {
+            //保存失败
+            this.isLoadingSave = false;
+            this.nzNotificationService.error(this.i18NService.fanyi('save.not'), '');
+          }
+        })
+      }
+    });
+  }
+
+  close() {
+    this.drawerRef.close();
+  }
+}

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

@@ -0,0 +1,58 @@
+<nz-spin [nzSpinning]="isLoadingSave">
+  <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
+    <div nz-row [nzGutter]="24">
+      <div nz-col [nzSpan]="8">
+        <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"
+              [nzMaxTagCount]="3" [nzAllowClear]="true">
+            </nz-tree-select>
+            <nz-form-explain *ngIf="validateForm.get('date')?.dirty && validateForm.get('date')?.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">日期</nz-form-label>
+          <nz-form-control [nzSm]="14" [nzXs]="24">
+            <nz-date-picker formControlName="date" id="date" [(ngModel)]="reExpenseSlip.date">
+            </nz-date-picker>
+            <nz-form-explain *ngIf="validateForm.get('date')?.dirty && validateForm.get('date')?.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-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId" id="proId"
+              [(ngModel)]="reExpenseSlip.proId" nzPlaceHolder="请选择">
+              <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
+            </nz-select>
+            <nz-form-explain *ngIf="validateForm.get('proId')?.dirty && validateForm.get('proId')?.errors">
+              请选择项目名称
+            </nz-form-explain>
+          </nz-form-control>
+        </nz-form-item>
+      </div>
+    </div>
+  </form>
+</nz-spin>
+
+<!-- 按钮 -->
+<div class="base">
+  <!-- 关闭按钮 -->
+  <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
+    style="padding-right: 8px">
+    <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
+  </a>
+  <!-- 保存按钮 -->
+  <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="submitForm()"
+    [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
+</div>

+ 24 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ExpenseReimbursementExpenseReimbursementFormAddComponent } from './add.component';
+
+describe('ExpenseReimbursementExpenseReimbursementFormAddComponent', () => {
+  let component: ExpenseReimbursementExpenseReimbursementFormAddComponent;
+  let fixture: ComponentFixture<ExpenseReimbursementExpenseReimbursementFormAddComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ExpenseReimbursementExpenseReimbursementFormAddComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ExpenseReimbursementExpenseReimbursementFormAddComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 103 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-form/add/add.component.ts

@@ -0,0 +1,103 @@
+import { Component, OnInit } from '@angular/core';
+import { NzModalRef, NzMessageService } from 'ng-zorro-antd';
+import { _HttpClient } from '@delon/theme';
+import { FormBuilder, Validators, FormGroup } from '@angular/forms';
+import { ReExpenseSlip } from 'app/entity/expense-reimbursement/re-expense-slip';
+import { PersonnelService } from 'app/services/basedata/personnel.service';
+import { recursiveQuery } from '@shared';
+import { ProjectManageArchives } from 'app/entity/project-manage-archives/project-manage-archives';
+import { ProjectManageArchivesService } from 'app/services/project-manage-archives/project-manage-archives.service';
+
+@Component({
+  selector: 'app-expense-reimbursement-expense-reimbursement-form-add',
+  templateUrl: './add.component.html',
+  styles: [
+    `
+      .base {
+        position: absolute;
+        bottom: 0px;
+        width: 100%;
+        border-top: 1px solid rgb(232, 232, 232);
+        padding: 6px 16px;
+        text-align: right;
+        left: 0px;
+        background: #fff;
+        z-index: 99;
+      }
+    `,
+  ],
+})
+export class ExpenseReimbursementExpenseReimbursementFormAddComponent implements OnInit {
+  constructor(
+    private fb: FormBuilder,
+    private personnelService:PersonnelService,
+    private projectManageArchivesService:ProjectManageArchivesService
+  ) {}
+
+  ngOnInit(): void {
+    //初始化表单
+    this.validateForm = this.fb.group({
+      proId: [null, [Validators.required]],
+      date:[null,[Validators.required]],
+      personId:[null,[Validators.required]]
+    });
+    //人员
+    this.getPersonnelList().then(()=>{
+      return this.getProList();//项目下拉
+    })
+  }
+
+  isLoadingSave=false;
+  validateForm!: FormGroup;
+  reExpenseSlip:ReExpenseSlip={};//对象
+  proList=[];//项目集合
+  personnelList=[];//人员集合
+
+  /**
+   * 获取人员下拉数据到各个页签中
+   */
+  getPersonnelList() {
+    return new Promise(resolve => {
+      this.personnelService.queryApprover(sessionStorage.getItem('pkOrg')).then(response => {
+        //人员
+        this.personnelList = JSON.parse(JSON.stringify(response.result));
+        recursiveQuery(this.personnelList);
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 获取项目下拉数据
+   */
+  getProList() {
+    return new Promise(resolve => {
+      //查询条件
+      let projectManageArchives = new ProjectManageArchives();
+      projectManageArchives.pageSize = 20000;
+      projectManageArchives.pkOrg = sessionStorage.getItem('pkOrg');
+      //查询
+      this.projectManageArchivesService.getList(projectManageArchives).then(response => {
+        if (response.result.records) {
+          this.proList = response.result.records;
+        }
+        resolve();
+      });
+    });
+  }
+
+  /**
+   * 保存提交
+   */
+  submitForm(): any {
+    return new Promise(resolve => {
+      for (const i in this.validateForm.controls) {
+        this.validateForm.controls[i].markAsDirty();
+        this.validateForm.controls[i].updateValueAndValidity();
+      }
+      let valid = this.validateForm.valid;
+    });
+  }
+
+  close() {}
+}

+ 58 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.html

@@ -0,0 +1,58 @@
+<page-header [action]="phActionTpl">
+  <ng-template #phActionTpl>
+    <button (click)="add()" nz-button nzType="primary">新建</button>
+  </ng-template>
+</page-header>
+<nz-card>
+  <!-- 查询条件 -->
+ <form nz-form>
+  <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+    <div nz-col [nzSpan]="8">
+      <nz-form-item>
+        <nz-form-label [nzSm]="6" [nzXs]="24">项目名称</nz-form-label>
+        <nz-form-control [nzSm]="14" [nzXs]="24">
+          <!-- <input nz-input name="code" [(ngModel)]="reExpenseSlip.billcode" /> -->
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+    <div nz-col [nzSpan]="8">
+      <nz-form-item>
+        <nz-form-label [nzSm]="2" [nzXs]="24" [nzNoColon]=true></nz-form-label>
+        <nz-form-control [nzSm]="14" [nzXs]="24">
+          <button nzType="primary" (click)="query()" nz-button><span>查询</span></button>
+        </nz-form-control>
+      </nz-form-item>
+    </div>
+  </div>
+</form>
+ <!-- 表格 -->
+ <div nz-row [nzGutter]="{ xs: 8, sm: 16, md: 24, lg: 32 }">
+  <div nz-col [nzSpan]="24">
+    <nz-table nzSize="small" #basicTable [nzData]="listOfData" [nzFrontPagination]="false" [nzTotal]="page.total"
+      [nzPageIndex]="page.current" (nzPageIndexChange)="pageIndexChange($event)" [nzLoading]="isSpinning">
+      <thead>
+        <tr>
+          <th>人员</th>
+          <th>日期</th>
+          <th>项目</th>
+          <th>制单人</th>
+          <th>操作</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr *ngFor="let data of basicTable.data">
+          <td>{{ data.person }}</td>
+          <td>{{ data.date }}</td>
+          <td>{{ data.proName }}</td>
+          <td>{{ data.producer }}</td>
+          <td>
+            <a (click)="update(data)" acl [acl-ability]="'receipt:update'">修改</a>
+            <nz-divider nzType="vertical" acl [acl-ability]="'receipt:update'"></nz-divider>
+            <a (click)="delete(data.id)" acl [acl-ability]="'receipt:delete'">删除</a>
+          </td>
+        </tr>
+      </tbody>
+    </nz-table>
+  </div>
+</div>
+</nz-card>

+ 24 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.spec.ts

@@ -0,0 +1,24 @@
+import { async, ComponentFixture, TestBed } from '@angular/core/testing';
+import { ExpenseReimbursementExpenseReimbursementFormComponent } from './expense-reimbursement-form.component';
+
+describe('ExpenseReimbursementExpenseReimbursementFormComponent', () => {
+  let component: ExpenseReimbursementExpenseReimbursementFormComponent;
+  let fixture: ComponentFixture<ExpenseReimbursementExpenseReimbursementFormComponent>;
+
+  beforeEach(async(() => {
+    TestBed.configureTestingModule({
+      declarations: [ ExpenseReimbursementExpenseReimbursementFormComponent ]
+    })
+    .compileComponents();
+  }));
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ExpenseReimbursementExpenseReimbursementFormComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 89 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-form/expense-reimbursement-form.component.ts

@@ -0,0 +1,89 @@
+import { Component, OnInit, ViewChild } from '@angular/core';
+import { _HttpClient, ModalHelper } from '@delon/theme';
+import { STColumn, STComponent } from '@delon/abc';
+import { SFSchema } from '@delon/form';
+import { ReExpenseSlip } from 'app/entity/expense-reimbursement/re-expense-slip';
+import { ReExpenseSlipService } from 'app/services/expense-reimbursement/re-expense-slip.service';
+import { NzDrawerService } from 'ng-zorro-antd';
+import { ExpenseReimbursementExpenseReimbursementFormAddComponent } from './add/add.component';
+import { I18NService } from '@core';
+
+@Component({
+  selector: 'app-expense-reimbursement-expense-reimbursement-form',
+  templateUrl: './expense-reimbursement-form.component.html',
+})
+export class ExpenseReimbursementExpenseReimbursementFormComponent implements OnInit {
+ 
+  constructor(
+    private reExpenseSlipService:ReExpenseSlipService,
+    private nzDrawerService:NzDrawerService,
+    private i18NService:I18NService
+  ) { }
+
+  ngOnInit() { 
+    this.getList();
+  }
+
+  listOfData = [];
+  reExpenseSlip: ReExpenseSlip = {}; //对象
+  page = {
+    total: 0,
+    current: 0,
+  }; //页码
+  isSpinning = false;
+
+  //按页码显示数据
+  pageIndexChange(event) {
+    this.reExpenseSlip.pageNo = event; //当前页码
+    this.getList();
+  }
+
+  /**
+   * 查询数据表
+   */
+  getList() {
+    this.isSpinning = true;
+    this.reExpenseSlip.pkOrg = sessionStorage.getItem('pkOrg'); //组织
+    this.reExpenseSlipService.getList(this.reExpenseSlip).then(response => {
+      this.listOfData = response.result.records;
+      this.isSpinning = false;
+    });
+  }
+
+  /**
+   * 查询按钮
+   */
+  query() {
+    this.reExpenseSlip.pageNo = 1;
+    this.getList();
+  }
+
+  add() {
+    const drawerRef = this.nzDrawerService.create<ExpenseReimbursementExpenseReimbursementFormAddComponent, { quotationId: string }, string>({
+      nzTitle: this.i18NService.fanyi("button.add"),//新增标题
+      nzContent: ExpenseReimbursementExpenseReimbursementFormAddComponent,
+      nzWidth: window.innerWidth,
+      nzBodyStyle: { height: 'calc(100% - 55px)', overflow: 'auto', 'padding-bottom': '53px' }
+      // nzContentParams: {
+      //   //模板id
+      //   quotationId: item.id
+      // }
+    });
+
+    //关闭抽屉的回调
+    drawerRef.afterClose.subscribe((isRefresh) => {
+      if (isRefresh) {//刷新list列表
+        this.getList();
+      }
+    });
+  }
+
+  update(){
+
+  }
+
+  delete(){
+
+  }
+
+}

+ 13 - 0
src/app/routes/expense-reimbursement/expense-reimbursement-routing.module.ts

@@ -0,0 +1,13 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+import { ExpenseReimbursementExpenseReimbursementFormComponent } from './expense-reimbursement-form/expense-reimbursement-form.component';
+
+const routes: Routes = [
+
+  { path: 'expense-reimbursement-form', component: ExpenseReimbursementExpenseReimbursementFormComponent }];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class ExpenseReimbursementRoutingModule { }

+ 23 - 0
src/app/routes/expense-reimbursement/expense-reimbursement.module.ts

@@ -0,0 +1,23 @@
+import { NgModule } from '@angular/core';
+import { SharedModule } from '@shared';
+import { ExpenseReimbursementRoutingModule } from './expense-reimbursement-routing.module';
+import { ExpenseReimbursementExpenseReimbursementFormComponent } from './expense-reimbursement-form/expense-reimbursement-form.component';
+import { ExpenseReimbursementExpenseReimbursementFormAddComponent } from './expense-reimbursement-form/add/add.component';
+
+const COMPONENTS = [
+  ExpenseReimbursementExpenseReimbursementFormComponent];
+const COMPONENTS_NOROUNT = [
+  ExpenseReimbursementExpenseReimbursementFormAddComponent];
+
+@NgModule({
+  imports: [
+    SharedModule,
+    ExpenseReimbursementRoutingModule
+  ],
+  declarations: [
+    ...COMPONENTS,
+    ...COMPONENTS_NOROUNT
+  ],
+  entryComponents: COMPONENTS_NOROUNT
+})
+export class ExpenseReimbursementModule { }

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

@@ -35,7 +35,7 @@
       </div>
     </div>
   </form>
-</nz-spin>
+
 
 <nz-card>
   <div nz-row [nzGutter]="24">
@@ -90,7 +90,7 @@
     </div>
   </div>
 </nz-card>
-
+</nz-spin>
 <!-- 按钮 -->
 <div class="base">
   <strong>填写人:</strong>{{invoiceManagePurchase.currentUser}} <strong>填写时间:</strong>{{invoiceManagePurchase.createTime}}

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

@@ -35,7 +35,7 @@
       </div>
     </div>
   </form>
-</nz-spin>
+
 
 <nz-card>
   <div nz-row [nzGutter]="24">
@@ -90,7 +90,7 @@
     </div>
   </div>
 </nz-card>
-
+</nz-spin>
 <!-- 按钮 -->
 <div class="base">
   <strong>填写人:</strong>{{invoiceManagePurchase.currentUser}} <strong>填写时间:</strong>{{invoiceManagePurchase.createTime}}

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

@@ -79,7 +79,7 @@ export class InvoiceManagementInvoiceManagePurchaseUpdateComponent implements On
           this.invoiceManagePurchase=response.result;//主表
           this.itemDataList=response.result.detailList;//子表数据
           if(this.itemDataList){//获取最大排序
-            this.sort=this.itemDataList.length;
+            this.sort=this.itemDataList.length+1;
           }
           resolve();
         }else{

+ 5 - 1
src/app/routes/routes-routing.module.ts

@@ -60,7 +60,11 @@ const routes: Routes = [
       ,{ path: 'project-work', loadChildren: './project-work/project-work.module#ProjectWorkModule' }
       //发票管理
       ,{ path: 'invoice-management', loadChildren: './invoice-management/invoice-management.module#InvoiceManagementModule' }
-    ],
+      //收付款管理
+      ,{ path: 'down-payment-management', loadChildren: './down-payment-management/down-payment-management.module#DownPaymentManagementModule' }
+      //费用报销
+      ,{ path: 'expense-reimbursement', loadChildren: './expense-reimbursement/expense-reimbursement.module#ExpenseReimbursementModule' }
+  ],
   },
   // 全屏布局
   {

+ 36 - 0
src/app/services/down-payment-management/manager-payment-and-receipt-slip.service.ts

@@ -0,0 +1,36 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+import { ManagerPaymentAndReceiptSlip } from 'app/entity/down-payment-management/manager-payment-and-receipt-slip';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class ManagerPaymentAndReceiptSlipService {
+
+  constructor(private http:HttpClient) { }
+  //分页查询
+  async getList(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http
+      .get<BaseResponse<Result<any>>>('/payment/managerPaymentAndReceiptSlip/list', { params: body })
+      .toPromise();
+  }
+
+  //新增
+  async add(body: ManagerPaymentAndReceiptSlip): Promise<BaseResponse<any>> {
+    return await this.http.post<BaseResponse<any>>('payment/managerPaymentAndReceiptSlip/add', body).toPromise();
+  }
+
+  //根据id查询
+  async queryById(id: string): Promise<BaseResponse<any>> {
+    return await this.http
+      .get<BaseResponse<any>>('payment/managerPaymentAndReceiptSlip/queryById', { params: { id: id } })
+      .toPromise();
+  }
+
+  //删除
+  async delete(body:any):Promise<BaseResponse<any>>{
+    return await this.http.delete<BaseResponse<any>>('payment/managerPaymentAndReceiptSlip/delete',{params:body}).toPromise();
+  }
+}

+ 19 - 0
src/app/services/expense-reimbursement/re-expense-slip.service.ts

@@ -0,0 +1,19 @@
+import { Injectable } from '@angular/core';
+import { HttpClient } from '@angular/common/http';
+import { BaseResponse } from 'app/entity/baseResponse';
+import { Result } from 'app/entity/Result';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class ReExpenseSlipService {
+
+  constructor(private http:HttpClient) { }
+
+  //分页查询
+  async getList(body: any): Promise<BaseResponse<Result<any>>> {
+    return await this.http
+      .get<BaseResponse<Result<any>>>('/expense/reExpenseSlip/list', { params: body })
+      .toPromise();
+  }
+}