product-module.component.html 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <!-- 产品 -->
  2. <nz-card nzTitle="产品">
  3. <!-- 操作按钮 -->
  4. <div nz-row [nzGutter]="24">
  5. <div nz-col [nzSpan]="24">
  6. <button nz-button (click)="productAddRow()" nzType="primary">新增</button>
  7. <br />
  8. <br />
  9. </div>
  10. </div>
  11. <!-- 表格 -->
  12. <div nz-row [nzGutter]="24">
  13. <div nz-col [nzSpan]="24">
  14. <nz-table #productRowTable nzSize="small" class="tableTdPadding" nzBordered [nzData]="productList">
  15. <thead>
  16. <tr>
  17. <th nzWidth="10%">产品编码</th>
  18. <th nzWidth="17%">产品名称</th>
  19. <th nzWidth="9%">折扣率</th>
  20. <th nzWidth="9%">标准报价</th>
  21. <th nzWidth="9%">折扣后单价</th>
  22. <th nzWidth="9%">标准金额</th>
  23. <th nzWidth="9%">折扣后金额</th>
  24. <th nzWidth="9%">成本单价</th>
  25. <th nzWidth="9%">成本金额</th>
  26. <th nzWidth="10%">操作</th>
  27. </tr>
  28. </thead>
  29. <tbody>
  30. <tr *ngFor="let data of productRowTable.data" class="editable-row">
  31. <td><input type="text" nz-input [(ngModel)]="data.code" disabled="true" /></td>
  32. <td>
  33. <nz-input-group nzSearch [nzAddOnAfter]="suffixIconButton">
  34. <input type="text" [(ngModel)]="data.name" nz-input
  35. placeholder="{{ 'select.please.choose' | translate }}" disabled="true" />
  36. </nz-input-group>
  37. <ng-template #suffixIconButton>
  38. <!-- 放大镜 勾选列表 -->
  39. <button nz-button nzType="primary" nzSearch (click)="selectProdutModal(data)">
  40. <i nz-icon type="search"></i>
  41. </button>
  42. </ng-template>
  43. </td>
  44. <td>
  45. <nz-input-number [nzMin]="0" [(ngModel)]="data.discountRate" [nzFormatter]="formatterDollar2" [nzParser]="parserDollar2"></nz-input-number>
  46. </td>
  47. <td>
  48. <nz-input-number [nzMin]="0" [nzDisabled]="true" [(ngModel)]="data.standardQuotation"
  49. [nzFormatter]="formatterDollar" [nzParser]="parserDollar"></nz-input-number>
  50. </td>
  51. <td>
  52. <nz-input-number [nzMin]="0" [(ngModel)]="data.unitPriceAfterDiscount" (nzBlur)="unitPriceAfterDiscountBlur(data)" [nzFormatter]="formatterDollar"
  53. [nzParser]="parserDollar"></nz-input-number>
  54. </td>
  55. <td>
  56. <nz-input-number [nzMin]="0" [(ngModel)]="data.standardAmount" [nzFormatter]="formatterDollar"
  57. [nzParser]="parserDollar"></nz-input-number>
  58. </td>
  59. <td>
  60. <nz-input-number [nzMin]="0" [(ngModel)]="data.amountAfterDiscount" [nzFormatter]="formatterDollar"
  61. [nzParser]="parserDollar"></nz-input-number>
  62. </td>
  63. <td>
  64. <nz-input-number [nzMin]="0" [(ngModel)]="data.costUnitPrice" [nzFormatter]="formatterDollar"
  65. [nzParser]="parserDollar"></nz-input-number>
  66. </td>
  67. <td>
  68. <nz-input-number [nzMin]="0" [(ngModel)]="data.costAmount" [nzFormatter]="formatterDollar"
  69. [nzParser]="parserDollar"></nz-input-number>
  70. </td>
  71. <td>
  72. <a nz-popconfirm nzTitle="{{ 'confirm.to.delete' | translate }}?" nzOkText="{{ 'yes' | translate }}"
  73. nzCancelText="{{ 'no' | translate }}"
  74. (nzOnConfirm)="productDeleteRow(data)">{{ 'table.delete' | translate }}</a>
  75. </td>
  76. </tr>
  77. </tbody>
  78. </nz-table>
  79. </div>
  80. </div>
  81. </nz-card>
  82. <nz-card nzTitle="模块">
  83. <nz-tabset>
  84. <nz-tab *ngFor="let product of productList" [nzTitle]="product.name">
  85. <!-- 操作按钮 -->
  86. <div nz-row [nzGutter]="24">
  87. <div nz-col [nzSpan]="24">
  88. <button nz-button (click)="moduleAddRow(product)" nzType="primary">新增</button>
  89. <br />
  90. <br />
  91. </div>
  92. </div>
  93. <!-- 表格 -->
  94. <div nz-row [nzGutter]="24">
  95. <div nz-col [nzSpan]="24">
  96. <nz-table #moduleRowTable nzSize="small" class="tableTdPadding" nzBordered
  97. [nzData]="product.contractFileModularList">
  98. <thead>
  99. <tr>
  100. <th nzWidth="30%">产品模块编码</th>
  101. <th nzWidth="30%">产品模块名称</th>
  102. <th nzWidth="10%">标准报价</th>
  103. <th nzWidth="10%">采购价格</th>
  104. <th nzWidth="20%">操作</th>
  105. </tr>
  106. </thead>
  107. <tbody>
  108. <tr *ngFor="let data of moduleRowTable.data" class="editable-row">
  109. <td><input disabled="true" type="text" nz-input [(ngModel)]="data.code" /></td>
  110. <td>
  111. <nz-select style="width:100%" nzShowSearch nzAllowClear [(ngModel)]="data.baseMaterialFileModularId"
  112. nzPlaceHolder="请选择" (ngModelChange)="baseMaterialFileModularIdChange(product,data,$event)">
  113. <nz-option *ngFor="let i of product.modularListSelect" [nzValue]="i.id" [nzLabel]="i.name">
  114. </nz-option>
  115. </nz-select>
  116. </td>
  117. <td>
  118. <nz-input-number [nzMin]="0" [nzDisabled]="true" [(ngModel)]="data.standardQuotation" [nzFormatter]="formatterDollar"
  119. [nzParser]="parserDollar" (ngModelChange)="standardQuotationModuleKeyUp(product)"></nz-input-number>
  120. </td>
  121. <td>
  122. <nz-input-number [nzMin]="0" [(ngModel)]="data.purchasePrice" [nzFormatter]="formatterDollar"
  123. [nzParser]="parserDollar"></nz-input-number>
  124. </td>
  125. <td>
  126. <a nz-popconfirm nzTitle="{{ 'confirm.to.delete' | translate }}?" nzOkText="{{ 'yes' | translate }}"
  127. nzCancelText="{{ 'no' | translate }}"
  128. (nzOnConfirm)="moduleDeleteRow(product,data.id)">{{ 'table.delete' | translate }}</a>
  129. </td>
  130. </tr>
  131. </tbody>
  132. </nz-table>
  133. </div>
  134. </div>
  135. </nz-tab>
  136. </nz-tabset>
  137. </nz-card>