add.component.html 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <nz-spin [nzSpinning]="isLoadingSave">
  2. <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
  3. <div nz-row [nzGutter]="24">
  4. <div nz-col [nzSpan]="8">
  5. <nz-form-item>
  6. <nz-form-label [nzSm]="6" [nzXs]="24">单据编码</nz-form-label>
  7. <nz-form-control [nzSm]="14" [nzXs]="24">
  8. 自动生成
  9. </nz-form-control>
  10. </nz-form-item>
  11. </div>
  12. <div nz-col [nzSpan]="8">
  13. <nz-form-item>
  14. <nz-form-label [nzSm]="6" [nzXs]="24">项目编码</nz-form-label>
  15. <nz-form-control [nzSm]="14" [nzXs]="24">
  16. {{invoiceManagePurchase.proCode}}
  17. </nz-form-control>
  18. </nz-form-item>
  19. </div>
  20. <div nz-col [nzSpan]="8">
  21. <nz-form-item>
  22. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>项目名称</nz-form-label>
  23. <nz-form-control [nzSm]="14" [nzXs]="24">
  24. <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proArchivesId"
  25. id="proArchivesId" [(ngModel)]="invoiceManagePurchase.proArchivesId" nzPlaceHolder="请选择"
  26. (ngModelChange)="proChange($event)">
  27. <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
  28. </nz-select>
  29. <nz-form-explain
  30. *ngIf="validateForm.get('proArchivesId')?.dirty && validateForm.get('proArchivesId')?.errors">
  31. 请选择项目名称
  32. </nz-form-explain>
  33. </nz-form-control>
  34. </nz-form-item>
  35. </div>
  36. </div>
  37. </form>
  38. <nz-card>
  39. <div nz-row [nzGutter]="24">
  40. <div nz-col [nzSpan]="24">
  41. <!-- 新增按钮 -->
  42. <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
  43. </div>
  44. </div>
  45. <div nz-row [nzGutter]="24">
  46. <div nz-col [nzSpan]="24">
  47. <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #basicTable
  48. [nzData]="itemDataList" [nzFrontPagination]="false" [nzShowPagination]="false" >
  49. <thead>
  50. <tr>
  51. <th nzAlign="center">序号</th>
  52. <th>首付款条线</th>
  53. <th>里程碑</th>
  54. <th>金额</th>
  55. <th>未收票金额</th>
  56. <th>本次收票金额</th>
  57. <th>操作</th>
  58. </tr>
  59. </thead>
  60. <tbody>
  61. <tr *ngFor="let data of basicTable.data;let i=index">
  62. <td nzAlign="center">{{i+1}}</td>
  63. <td style="width: 20%;">
  64. <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择" (ngModelChange)="coArchivesChange(data)">
  65. <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.planName" ></nz-option>
  66. </nz-select>
  67. </td>
  68. <td style="width: 20%;" >
  69. <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proBusinessId" nzPlaceHolder="请选择"
  70. (ngModelChange)="proBusinessChange(data)">
  71. <nz-option *ngFor="let i of data.proBusinessList" [nzValue]="i.mileId" [nzLabel]="i.mileName"></nz-option>
  72. </nz-select>
  73. </td>
  74. <td>
  75. <!-- <nz-input-number [(ngModel)]="data.price" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number> -->
  76. {{data.price}}
  77. </td>
  78. <td>
  79. <!-- <nz-input-number [(ngModel)]="data.uncoPrice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number> -->
  80. {{data.uncoPrice}}
  81. </td>
  82. <td>
  83. <nz-input-number [(ngModel)]="data.coPrice" [nzMin]="0" [nzMax]="data.uncoPriceMax" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar" (ngModelChange)="coPriceKeyUp(data)"></nz-input-number>
  84. </td>
  85. <td ><a nz-popconfirm nzTitle="是否删除?"
  86. (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>
  87. </tr>
  88. </tbody>
  89. </nz-table>
  90. </div>
  91. </div>
  92. </nz-card>
  93. </nz-spin>
  94. <!-- 按钮 -->
  95. <div class="base">
  96. <strong>填写人:</strong>{{invoiceManagePurchase.currentUser}} <strong>填写时间:</strong>{{invoiceManagePurchase.createTime}}
  97. <!-- 关闭按钮 -->
  98. <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
  99. style="padding-right: 8px">
  100. <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
  101. </a>
  102. <!-- 保存按钮 -->
  103. <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="submitForm()"
  104. [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
  105. </div>