edit.component.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <nz-drawer [nzMaskClosable]="true" [nzWidth]="drawerWidth" [nzVisible]="visible" nzTitle="修改医院档案" [nzClosable]="true"
  2. (nzOnClose)="close()">
  3. <form [formGroup]="validateForm">
  4. <div nz-row [nzGutter]="24">
  5. <div nz-col nzMd="24" nzLg="12">
  6. <nz-form-item>
  7. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code" nzRequired>{{'hospital.code'|translate}}</nz-form-label>
  8. <nz-form-control [nzSm]="18" [nzXs]="24">
  9. <input nz-input formControlName="code" disabled [(ngModel)]="hospital.code" id="code" name="code" />
  10. <nz-form-explain *ngIf="validateForm.get('code')?.dirty && validateForm.get('code')?.errors">
  11. {{'hospital.please.input.code'|translate}}
  12. </nz-form-explain>
  13. </nz-form-control>
  14. </nz-form-item>
  15. </div>
  16. <div nz-col nzMd="24" nzLg="12">
  17. <nz-form-item>
  18. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="name" nzRequired>{{'hospital.name'|translate}}</nz-form-label>
  19. <nz-form-control [nzSm]="18" [nzXs]="24">
  20. <input nz-input formControlName="name" [(ngModel)]="hospital.name" id="name" name="name" />
  21. <nz-form-explain *ngIf="validateForm.get('name')?.dirty && validateForm.get('name')?.errors">
  22. {{'hospital.please.input.name'|translate}}
  23. </nz-form-explain>
  24. </nz-form-control>
  25. </nz-form-item>
  26. </div>
  27. </div>
  28. <div nz-row [nzGutter]="24">
  29. <div nz-col nzMd="24" nzLg="12">
  30. <nz-form-item>
  31. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="enable">{{'hospital.whether.discontinuation'|translate}}
  32. </nz-form-label>
  33. <nz-form-control [nzSm]="18" [nzXs]="24">
  34. <nz-switch [ngModelOptions]="{standalone: true}" [(ngModel)]="enable" name="enable"
  35. nzCheckedChildren="{{'yes' | translate}}" nzUnCheckedChildren="{{'no' | translate}}"></nz-switch>
  36. </nz-form-control>
  37. </nz-form-item>
  38. </div>
  39. <div nz-col nzMd="24" nzLg="12">
  40. <nz-form-item>
  41. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="memo">{{'hospital.remark'|translate}}</nz-form-label>
  42. <nz-form-control [nzSm]="18" [nzXs]="24">
  43. <input nz-input [ngModelOptions]="{standalone: true}" [(ngModel)]="hospital.memo" id="memo" name="memo" />
  44. <!-- <nz-form-explain *ngIf="validateForm.get('email')?.dirty && validateForm.get('email')?.errors">
  45. The input is not valid E-mail!
  46. </nz-form-explain> -->
  47. </nz-form-control>
  48. </nz-form-item>
  49. </div>
  50. </div>
  51. <!-- 数据表 -->
  52. <!-- <div nz-row nzGutter="24">
  53. <div nz-col nzMd="24" nzLg="24">
  54. <button (click)="editNewContact()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
  55. <app-basedata-hospital-hospital-new #basedataHospitalHospitalNew (afterEditNewSave)="getContacts($event)">
  56. </app-basedata-hospital-hospital-new>
  57. </div>
  58. </div> -->
  59. <!-- <nz-form-item>
  60. <div nz-row nzGutter="24">
  61. <div nz-col nzMd="24" nzLg="24">
  62. <nz-table #basicTable [nzData]="hospitalContacts" [nzFrontPagination]="false" [nzShowPagination]="false">
  63. <thead>
  64. <tr>
  65. <th>联系人</th>
  66. <th>联系人电话</th>
  67. <th>联系人邮箱</th>
  68. <th>联系地址</th>
  69. <th>是否默认</th>
  70. <th>操作</th>
  71. </tr>
  72. </thead>
  73. <tbody>
  74. <tr *ngFor="let item of basicTable.data">
  75. <td>{{item.contactPsn}}</td>
  76. <td>{{item.contactTel}}</td>
  77. <td>{{item.email}}</td>
  78. <td>{{item.address}}</td>
  79. <td>{{item.isDefault==0?'否':'是'}}</td>
  80. <td>
  81. <a href="javascript:;" (click)="edit(item.id)">{{'hospital.operation.edit' | translate}}</a>
  82. <span class="ant-divider ant-divider-vertical"></span>
  83. <a nz-popconfirm
  84. nzTitle="确定删除吗?"
  85. nzOkText="是"
  86. nzCancelText="否"
  87. (nzOnConfirm)="confirmDel(item.id)"
  88. (nzOnCancel)="cancelDel()"
  89. >删除</a>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </nz-table>
  94. </div>
  95. </div>
  96. </nz-form-item> -->
  97. <div class="base">
  98. <button type="button" (click)="close()" class="ant-btn"
  99. style="margin-right: 8px;">{{ 'button.close' | translate }}</button>
  100. <button nzbutton nzType="primary" (click)="save()"
  101. class="ant-btn ant-btn-primary">{{ 'button.save' | translate }}</button>
  102. </div>
  103. </form>
  104. <!-- 数据表 -->
  105. <div>
  106. <div style="margin-bottom: 2%;">
  107. <div style="margin-left:94.1%">
  108. <button (click)="addRow()" nz-button nzType="primary">{{ 'button.add' | translate }}</button>
  109. </div>
  110. </div>
  111. <nz-table nzSize="small" style="margin-bottom: 2.5%" [nzLoading]="isLoading" #editRowTable nzBordered [nzData]="hospitalContacts"
  112. [nzShowPagination]="false" [nzFrontPagination]="false">
  113. <thead>
  114. <tr>
  115. <!-- 联系人 -->
  116. <th nzAlign="center">{{'customer.contacts.name' | translate}}
  117. </th>
  118. <!-- 联系人电话 -->
  119. <th nzAlign="center">{{ 'customer.contacts.telephone' | translate }}
  120. <!-- 联系人邮箱 -->
  121. <th nzAlign="center">{{ 'customer.contacts.mail' | translate }}
  122. <!-- 联系地址 -->
  123. <th nzAlign="center">{{ 'hospital.contact.address' | translate }}
  124. <!-- 是否默认 -->
  125. <th nzAlign="center">{{ 'customer.is.it.default' | translate }}
  126. </th>
  127. <!-- 操作 -->
  128. <th nzAlign="center">{{ 'table.operation' | translate }}</th>
  129. </tr>
  130. </thead>
  131. <tbody>
  132. <tr *ngFor="let data of hospitalContacts">
  133. <td nzAlign="center">
  134. {{data.contactPsn}}
  135. </td>
  136. <td nzAlign="center">
  137. {{data.contactTel}}
  138. </td>
  139. <td nzAlign="center">
  140. {{data.email}}
  141. </td>
  142. <td nzAlign="center">
  143. {{data.address}}
  144. </td>
  145. <td nzAlign="center">
  146. <nz-switch [nzDisabled]="true" [(ngModel)]="data.isDefault"></nz-switch>
  147. </td>
  148. <td nzAlign="center">
  149. <a (click)="updateRow(data.id)">{{ 'milestone.update' | translate }}</a>
  150. <nz-divider nzType="vertical"></nz-divider>
  151. <a nz-popconfirm nzTitle="{{ 'pm.contract.contract.payment.delete' | translate }}"
  152. (nzOnConfirm)="confirmDel(data.id)">
  153. <!-- 删除 -->
  154. {{ 'pm.contract.delete' | translate }}</a>
  155. </td>
  156. </tr>
  157. </tbody>
  158. </nz-table>
  159. </div>