add.component.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <nz-spin [nzSpinning]="isLoadingSave">
  2. <form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()">
  3. <div nz-row [nzGutter]="24">
  4. <div nz-col [nzSpan]="6">
  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>
  13. <div nz-row [nzGutter]="24">
  14. <div nz-col [nzSpan]="6">
  15. <nz-form-item>
  16. <nz-form-label [nzSm]="6" [nzXs]="24">客户编码</nz-form-label>
  17. <nz-form-control [nzSm]="14" [nzXs]="24">
  18. {{managerPaymentAndReceiptSlip.cusCode}}
  19. </nz-form-control>
  20. </nz-form-item>
  21. </div>
  22. <div nz-col [nzSpan]="6">
  23. <nz-form-item>
  24. <nz-form-label [nzSm]="6" [nzXs]="24">客户名称</nz-form-label>
  25. <nz-form-control [nzSm]="14" [nzXs]="24">
  26. {{managerPaymentAndReceiptSlip.cusName}}
  27. </nz-form-control>
  28. </nz-form-item>
  29. </div>
  30. <div nz-col [nzSpan]="6">
  31. <nz-form-item>
  32. <nz-form-label [nzSm]="6" [nzXs]="24">项目编码</nz-form-label>
  33. <nz-form-control [nzSm]="14" [nzXs]="24">
  34. {{managerPaymentAndReceiptSlip.proCode}}
  35. </nz-form-control>
  36. </nz-form-item>
  37. </div>
  38. <div nz-col [nzSpan]="6">
  39. <nz-form-item>
  40. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired>项目名称</nz-form-label>
  41. <nz-form-control [nzSm]="14" [nzXs]="24">
  42. <nz-select style="widows: 100%;" nzShowSearch nzAllowClear formControlName="proId"
  43. id="proId" [(ngModel)]="managerPaymentAndReceiptSlip.proId" nzPlaceHolder="请选择"
  44. (ngModelChange)="proChange($event)">
  45. <nz-option *ngFor="let i of proList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
  46. </nz-select>
  47. <nz-form-explain
  48. *ngIf="validateForm.get('proId')?.dirty && validateForm.get('proId')?.errors">
  49. 请选择项目名称
  50. </nz-form-explain>
  51. </nz-form-control>
  52. </nz-form-item>
  53. </div>
  54. </div>
  55. </form>
  56. <!-- 子表数据 -->
  57. <nz-card>
  58. <div nz-row [nzGutter]="24">
  59. <div nz-col [nzSpan]="24">
  60. <!-- 新增按钮 -->
  61. <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
  62. </div>
  63. </div>
  64. <div nz-row [nzGutter]="24">
  65. <div nz-col [nzSpan]="24">
  66. <nz-table style="padding-top: 5px;" nzSize="small" class="tableTdPadding" #basicTable
  67. [nzData]="itemDataList" [nzFrontPagination]="false" [nzShowPagination]="false" >
  68. <thead>
  69. <tr>
  70. <th nzAlign="center">序号</th>
  71. <th>收付款条线</th>
  72. <th>里程碑</th>
  73. <th>收款金额</th>
  74. <th>说明</th>
  75. <th>对应发票</th>
  76. <th>操作</th>
  77. </tr>
  78. </thead>
  79. <tbody>
  80. <tr *ngFor="let data of basicTable.data;let i=index">
  81. <td nzAlign="center">{{i+1}}</td>
  82. <td style="width: 20%;">
  83. <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.coArchivesId" nzPlaceHolder="请选择" (ngModelChange)="coArchivesIdChange(data)">
  84. <nz-option *ngFor="let i of coArchivesList" [nzValue]="i.id" [nzLabel]="i.planName"></nz-option>
  85. </nz-select>
  86. </td>
  87. <td style="width: 20%;">
  88. <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.proArchivesId" nzPlaceHolder="请选择"
  89. >
  90. <nz-option *ngFor="let i of proArchivesList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
  91. </nz-select>
  92. </td>
  93. <td>
  94. <nz-input-number [(ngModel)]="data.coPrvice" [nzMin]="0" [nzStep]="1" [nzFormatter]="formatterDollar" [nzParser]="parserDollar" (ngModelChange)="coPrviceKeyUp()"></nz-input-number>
  95. </td>
  96. <td>
  97. <textarea rows="1" nz-input [(ngModel)]="data.explain"></textarea>
  98. </td>
  99. <td style="width: 20%;">
  100. <nz-select style="width: 100%;" nzShowSearch [(ngModel)]="data.invoiceId" nzPlaceHolder="请选择"
  101. >
  102. <nz-option *ngFor="let i of invoiceIdList" [nzValue]="i.id" [nzLabel]="i.proName"></nz-option>
  103. </nz-select>
  104. </td>
  105. <td ><a nz-popconfirm nzTitle="是否删除?"
  106. (nzOnConfirm)="deleteRow(data.sort)">{{'table.delete'|translate}}</a></td>
  107. </tr>
  108. <tr *ngIf="itemDataList&&itemDataList.length>0">
  109. <td colSpan="2"></td>
  110. <td><strong>收款总金额</strong></td>
  111. <td><strong>$ {{managerPaymentAndReceiptSlip.totalPrice}}</strong></td>
  112. <td colSpan="3"></td>
  113. </tr>
  114. </tbody>
  115. </nz-table>
  116. </div>
  117. </div>
  118. </nz-card>
  119. </nz-spin>
  120. <!-- 按钮 -->
  121. <div class="base">
  122. <!-- 关闭按钮 -->
  123. <a nz-popconfirm nzTitle="{{'pm.contract.contract.add.button.cancel'|translate}}" (nzOnConfirm)="close()"
  124. style="padding-right: 8px">
  125. <button nz-button>{{'pm.quotation.cancel'|translate}}</button>
  126. </a>
  127. <!-- 保存按钮 -->
  128. <button nz-button nzType="primary" class="ant-btn ant-btn-primary" (click)="submitForm()"
  129. [nzLoading]="isLoadingSave"><span>{{'pm.finish' | translate}}</span></button>
  130. </div>