barcode-prefabrication.component.html 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzXl='18' class="list-template__searchBox"></div>
  5. <div nz-col nzXl='6' class="list-template__btns">
  6. <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
  7. </div>
  8. </div>
  9. <div class="list-template__bottom">
  10. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  11. [nzLoading]="loading1">
  12. <thead>
  13. <tr class="thead">
  14. <th nzWidth="25%">预制名称</th>
  15. <th nzWidth="25%">序号名称</th>
  16. <th nzWidth="25%">条码样式</th>
  17. <th nzWidth="25%">操作</th>
  18. </tr>
  19. </thead>
  20. <tbody>
  21. <tr *ngFor="let data of listOfData;let index=index;">
  22. <td>{{ data.title }}</td>
  23. <td>{{ data.snConfigDTO ? data.snConfigDTO.title : '' }}</td>
  24. <td>{{ data.codeType ? data.codeType.name : '' }}</td>
  25. <td>
  26. <div class="coop">
  27. <span *ngIf="coopBtns.generateQRcode" (click)="generateQRcode(data)">生成</span>
  28. <span *ngIf="coopBtns.edit" (click)="edit(data)">修改</span>
  29. <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </nz-table>
  35. <div class="list-template__pagination">
  36. <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
  37. (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
  38. </nz-pagination>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <!-- 新增/编辑模态框 -->
  44. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
  45. <div class="modalBody">
  46. <div class="title">{{add?"新增":"编辑"}}条码预制<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
  47. </div>
  48. <overlay-scrollbars #osComponentRef1 class="content">
  49. <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
  50. <nz-form-item>
  51. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">预制名称</nz-form-label>
  52. <nz-form-control nzErrorTip="请填写预制名称!">
  53. <nz-input-group>
  54. <input nz-input formControlName="title" placeholder="请填写预制名称" />
  55. </nz-input-group>
  56. </nz-form-control>
  57. </nz-form-item>
  58. <nz-form-item>
  59. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="snConfig">序号名称</nz-form-label>
  60. <nz-form-control nzErrorTip="请选择序号名称!">
  61. <nz-select (nzOnSearch)="changeInp($event)" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzAllowClear formControlName="snConfig" nzPlaceHolder="请选择序号名称">
  62. <ng-container *ngFor="let option of snConfigs">
  63. <nz-option *ngIf="!isLoading" [nzLabel]="option.title" [nzValue]="option.id"></nz-option>
  64. </ng-container>
  65. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  66. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  67. </nz-option>
  68. </nz-select>
  69. </nz-form-control>
  70. </nz-form-item>
  71. <nz-form-item>
  72. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="codeType">条码样式</nz-form-label>
  73. <nz-form-control nzErrorTip="请选择条码样式!">
  74. <nz-select [nzDropdownMatchSelectWidth]="false" nzShowSearch nzAllowClear
  75. formControlName="codeType" nzPlaceHolder="请选择条码样式">
  76. <nz-option [nzLabel]="data.name" [nzValue]="data.id" *ngFor="let data of codeTypes">
  77. </nz-option>
  78. </nz-select>
  79. </nz-form-control>
  80. </nz-form-item>
  81. </form>
  82. </overlay-scrollbars>
  83. <div class="display_flex justify-content_flex-center">
  84. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
  85. <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
  86. </div>
  87. </div>
  88. </div>
  89. <!-- 生成模态框 -->
  90. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="generateModal">
  91. <div class="modalBody">
  92. <div class="title">条码生成<i class="icon_transport transport-guanbi" (click)="hideGenerateModal()"></i>
  93. </div>
  94. <overlay-scrollbars #osComponentRef1 class="content">
  95. <form nz-form [formGroup]="validateGenerateForm" class="addForm" (ngSubmit)="submitGenerateForm()">
  96. <nz-form-item *ngIf="coopData.snConfigDTO.dateType">
  97. <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="date">选择日期({{dateText}})</nz-form-label>
  98. <nz-form-control nzErrorTip="请选择日期({{dateText}})!">
  99. <div>
  100. <nz-year-picker class="w100" *ngIf="isYear && !isMonth && !isDay" formControlName="date" nzPlaceHolder="请选择日期({{dateText}})"></nz-year-picker>
  101. <nz-month-picker class="w100" *ngIf="isYear && isMonth && !isDay" formControlName="date" nzPlaceHolder="请选择日期({{dateText}})"></nz-month-picker>
  102. <nz-date-picker class="w100" *ngIf="isYear && isMonth && isDay" formControlName="date" nzPlaceHolder="请选择日期({{dateText}})"></nz-date-picker>
  103. </div>
  104. </nz-form-control>
  105. </nz-form-item>
  106. <nz-form-item>
  107. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="count">生成数量</nz-form-label>
  108. <nz-form-control nzErrorTip="请选择生成数量!">
  109. <div style="margin-top: 15px;">
  110. <nz-input-number nz-input formControlName="count" nzPlaceHolder="请填写生成数量" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
  111. </div>
  112. </nz-form-control>
  113. </nz-form-item>
  114. </form>
  115. </overlay-scrollbars>
  116. <div class="display_flex justify-content_flex-center">
  117. <button nzType="primary" nz-button (click)="submitGenerateForm()" [nzLoading]="btnLoading">生成打印</button>
  118. <button class="btn cancel" nz-button nzType="default" (click)="hideGenerateModal()">取消</button>
  119. </div>
  120. </div>
  121. </div>
  122. <!-- 删除模态框 -->
  123. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  124. (confirmDelEvent)="confirmDel()" content="您确认要删除吗?">
  125. </app-dialog-delete>
  126. <!-- 操作成功/失败提示框 -->
  127. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  128. [info]="promptInfo"></app-prompt-modal>
  129. <!-- 遮罩 -->
  130. <app-mask *ngIf="maskFlag"></app-mask>
  131. <!-- 打印二维码的内容 -->
  132. <div id="print-section" hidden>
  133. <table>
  134. <tr style="overflow: hidden;box-sizing: border-box;page-break-inside:avoid;" *ngFor="let item of codeList">
  135. <td style="padding:0;width: 70mm;height: 50mm;">
  136. <div style="display: flex;justify-content: center;align-items: center;height: 8mm;background-color: #F4EE17;-webkit-print-color-adjust: exact;font-size: 4mm;letter-spacing: 1mm;font-weight: bold;">
  137. 医疗废物标签
  138. </div>
  139. <div style="display:flex;overflow: hidden;height: 42mm;">
  140. <div style="width:34mm;height: 34mm;">
  141. <img [src]="item.qrCode" style="height: 34mm;">
  142. <div style="font-size: 3mm;margin: 0 1mm 0 2mm;height: 1.5em;word-break: break-all;overflow: hidden;text-align: center;">{{item.clinicalWasteSn}}</div>
  143. </div>
  144. <div style="flex: 1;height: 34mm;">
  145. <div style="font-size: 3mm;margin: 1mm 0 1mm;">科室:____________________</div>
  146. <div style="font-size: 3mm;margin: 0; overflow: hidden;">
  147. <p style="float: left;margin: 0;">类型:</p>
  148. <ul style="margin:0;padding: 0;list-style-type: none;float: right;width: 29mm;">
  149. <li *ngFor="let clinicalWasteType of clinicalWasteTypes;let first = first;" style="height: 1.5em;word-break: break-all;overflow: hidden;"><span style="display: inline-block;width: 3mm;height: 3mm;border:1px solid #000;position: relative;top: 0.7mm;margin-right: 1mm;"></span>{{clinicalWasteType.typeName}}</li>
  150. </ul>
  151. </div>
  152. </div>
  153. </div>
  154. </td>
  155. </tr>
  156. </table>
  157. </div>
  158. <button ngxPrint printSectionId="print-section" #printBtn hidden [printStyle]="{ '@page': { margin: '0 !important' }, 'body': { margin: '0 !important' } }">打印</button>