office-management.component.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzLg='14' class="list-template__searchBox">
  5. <div class="list-template__searchItem">
  6. <span class="label">科室名称:</span>
  7. <input nz-input class="formItem" [(ngModel)]="name" placeholder="请输入科室名称" nzSize="default" />
  8. </div>
  9. <div class="list-template__searchItem">
  10. <span class="label">别名:</span>
  11. <input nz-input class="formItem" [(ngModel)]="deptalias" placeholder="请输入别名" nzSize="default" />
  12. </div>
  13. <div class="list-template__searchItem">
  14. <span class="label">科室编码:</span>
  15. <input nz-input class="formItem" [(ngModel)]="num" placeholder="请输入科室编码" nzSize="default" />
  16. </div>
  17. <div class="list-template__searchItem">
  18. <span class="label">科室类型:</span>
  19. <nz-select [nzDropdownMatchSelectWidth]="false" style="width: 135px;" nzShowSearch nzAllowClear
  20. nzPlaceHolder="请选择科室类型" [(ngModel)]="type">
  21. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of types"></nz-option>
  22. </nz-select>
  23. </div>
  24. </div>
  25. <div nz-col nzLg="10" class="list-template__btns">
  26. <button class="btn default" (click)='search()'>搜索</button>
  27. <button class="btn default ml8" (click)='reset()'>重置</button>
  28. <button *ngIf="coopBtns.add" class="btn default ml8" (click)="showModal()">新增</button>
  29. <button class="btn default ml8" nzType="primary" nz-button [disabled]="!checkedDepIds.length"
  30. (click)="print($event,true)">批量打印</button>
  31. <button class="btn default ml8" nzType="primary" nz-button *ngIf="coopBtns.del"
  32. [disabled]="!checkedDepIds.length" (click)="showDelModal($event,true,checkedDepIds)">批量删除</button>
  33. </div>
  34. </div>
  35. <div class="list-template__bottom">
  36. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  37. [nzLoading]="loading1">
  38. <thead>
  39. <tr class="thead">
  40. <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
  41. (nzCheckedChange)="checkAll($event)"></th>
  42. <th nzWidth="15%">科室名称</th>
  43. <th nzWidth="10%">别名</th>
  44. <th nzWidth="10%">科室编码</th>
  45. <th nzWidth="10%">科室电话</th>
  46. <th nzWidth="10%">科室类型</th>
  47. <th nzWidth="15%">科室位置</th>
  48. <th nzWidth="25%">操作</th>
  49. </tr>
  50. </thead>
  51. <tbody>
  52. <tr *ngFor="let data of listOfData" (click)="selectedListData(data.id)">
  53. <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
  54. <td>{{ data.dept||'无' }}</td>
  55. <td>{{ data.deptalias||'无' }}</td>
  56. <td>{{ data.pcode||'无' }}</td>
  57. <td>
  58. <div class="targetDept" nz-tooltip nzTooltipTitle="{{data.manyPhone||'无'}}">{{ data.manyPhone||'无' }}
  59. </div>
  60. </td>
  61. <td>{{ data.type?data.type.name:'无' }}</td>
  62. <td>{{ data.building?data.building.buildingName:'-'
  63. }}栋{{data.floor?data.floor.floorName:'-'}}层{{data.address}}</td>
  64. <td>
  65. <div class="coop">
  66. <span *ngIf="coopBtns.look" (click)="detail($event,data.id)">查看</span>
  67. <span *ngIf="coopBtns.edit" (click)="edit($event,data)">编辑</span>
  68. <span *ngIf="coopBtns.del" (click)="showDelModal($event,false,data.id)">删除</span>
  69. <span (click)="print($event,false,data.id)">打印</span>
  70. </div>
  71. </td>
  72. </tr>
  73. </tbody>
  74. </nz-table>
  75. <div class="list-template__pagination">
  76. <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
  77. (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
  78. </nz-pagination>
  79. </div>
  80. </div>
  81. </div>
  82. <!-- 新增/编辑模态框 -->
  83. <div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
  84. <div class="modalBody">
  85. <div class="title">{{add?"新增":"编辑"}}科室信息<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
  86. </div>
  87. <overlay-scrollbars #osComponentRef1 class="content">
  88. <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
  89. <nz-form-item>
  90. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="officeName">科室名称</nz-form-label>
  91. <nz-form-control nzErrorTip="请填写科室名称!">
  92. <nz-input-group>
  93. <input type="officeName" nz-input formControlName="officeName" placeholder="请填写科室名称" />
  94. </nz-input-group>
  95. </nz-form-control>
  96. </nz-form-item>
  97. <nz-form-item>
  98. <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="deptalias">别名</nz-form-label>
  99. <nz-form-control nzErrorTip="请填写别名!">
  100. <nz-input-group>
  101. <input nz-input formControlName="deptalias" placeholder="请填写别名" />
  102. </nz-input-group>
  103. </nz-form-control>
  104. </nz-form-item>
  105. <nz-form-item *ngIf="add">
  106. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="officeNo">科室编码</nz-form-label>
  107. <nz-form-control nzErrorTip="请填写科室编码!">
  108. <nz-input-group>
  109. <input nz-input formControlName="officeNo" placeholder="请填写科室编码" />
  110. </nz-input-group>
  111. </nz-form-control>
  112. </nz-form-item>
  113. <nz-form-item>
  114. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="officeNum">科室电话</nz-form-label>
  115. <nz-form-control nzErrorTip="请填写科室电话!">
  116. <nz-input-group>
  117. <input (ngModelChange)="deptsPhoneChange()" type="officeNum" nz-input formControlName="officeNum"
  118. placeholder="请填写科室电话" />
  119. </nz-input-group>
  120. </nz-form-control>
  121. </nz-form-item>
  122. <nz-input-group *ngFor="let phone of deptPhones;let index = index" class="dynamic">
  123. <input nz-input [ngModel]="phone.phone" [ngModelOptions]="{standalone: true}" placeholder="请填写科室电话"
  124. (ngModelChange)="deptsPhoneChange($event,phone)" />
  125. <i nz-icon nzType="minus-circle-o" (click)="removeDeptPhone(index, $event)"></i>
  126. </nz-input-group>
  127. <button nz-button nzType="dashed" [disabled]="isAddDeptsPhone" class="add-button"
  128. (click)="addDeptPhone($event)">
  129. <i nz-icon nzType="plus"></i>
  130. 添加科室号码
  131. </button>
  132. <nz-form-item style="display: inline-block;vertical-align:bottom;">
  133. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="building">科室位置</nz-form-label>
  134. <nz-form-control style="display: inline-block;">
  135. <nz-select [nzDropdownMatchSelectWidth]="false" style="width:120px;" class="mr8" type="building"
  136. nzShowSearch nzAllowClear formControlName="building" nzPlaceHolder="请选择楼栋"
  137. (ngModelChange)="changeBuilding($event)">
  138. <nz-option nzLabel="{{data.buildingName}}" nzValue="{{data.id}}" *ngFor="let data of buildings">
  139. </nz-option>
  140. </nz-select>
  141. </nz-form-control>
  142. <nz-form-control style="display: inline-block;">
  143. <nz-select [nzDropdownMatchSelectWidth]="false" style="width:120px;" class="mr8" type="floor" nzShowSearch
  144. nzAllowClear formControlName="floor" nzPlaceHolder="请选择楼层">
  145. <nz-option nzLabel="{{data.floorName}}" nzValue="{{data.id}}" *ngFor="let data of floors"></nz-option>
  146. </nz-select>
  147. </nz-form-control>
  148. <nz-form-control style="display: inline-block;">
  149. <nz-input-group>
  150. <input style="width:148px;" type="officeAddress" nz-input formControlName="officeAddress"
  151. placeholder="请填写科室详细位置" />
  152. </nz-input-group>
  153. </nz-form-control>
  154. <div style="text-align: left; color: red;"
  155. *ngIf="(validateForm.get('building').dirty||validateForm.get('floor').dirty||validateForm.get('officeAddress').dirty)&&(!validateForm.value.building||!validateForm.value.floor||!validateForm.value.officeAddress)">
  156. 请输入科室位置!</div>
  157. </nz-form-item>
  158. <nz-form-item>
  159. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="officeType">科室类型</nz-form-label>
  160. <nz-form-control nzErrorTip="请选择科室类型!">
  161. <nz-select [nzDropdownMatchSelectWidth]="false" type="officeType" nzShowSearch nzAllowClear
  162. formControlName="officeType" nzPlaceHolder="请选择科室类型">
  163. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of types"></nz-option>
  164. </nz-select>
  165. </nz-form-control>
  166. </nz-form-item>
  167. <nz-form-item>
  168. <nz-form-label [nzSm]="24" [nzXs]="24">服务时间</nz-form-label>
  169. <nz-form-control nzErrorTip="不能为空!">
  170. <nz-time-picker nzFormat="HH:mm" formControlName="startTime1" [nzDisabledHours]="startTime1Hourdis"
  171. [nzDisabledMinutes]="startTime1Mindis" (nzOpenChange)="timeChange($event,'startTime',1)">
  172. </nz-time-picker>-
  173. <nz-time-picker nzFormat="HH:mm" formControlName="endTime1" [nzDisabledHours]="endTime1Hourdis"
  174. [nzDisabledMinutes]="endTime1Mindis" (nzOpenChange)="timeChange($event,'endTime',1)"></nz-time-picker>
  175. </nz-form-control>
  176. <div style="text-align: left;color: red;"
  177. *ngIf="(validateForm.value.startTime1||validateForm.value.endTime1)&&!(validateForm.value.startTime1&&validateForm.value.endTime1)">
  178. 请选择完整的服务时间</div>
  179. </nz-form-item>
  180. <nz-form-item>
  181. <nz-form-label [nzSm]="24" [nzXs]="24" hidden>服务时间</nz-form-label>
  182. <nz-form-control nzErrorTip="不能为空!">
  183. <nz-time-picker nzFormat="HH:mm" formControlName="startTime2" [nzDisabledHours]="startTime2Hourdis"
  184. [nzDisabledMinutes]="startTime2Mindis" (nzOpenChange)="timeChange($event,'startTime',2)">
  185. </nz-time-picker>-
  186. <nz-time-picker nzFormat="HH:mm" formControlName="endTime2" [nzDisabledHours]="endTime2Hourdis"
  187. [nzDisabledMinutes]="endTime2Mindis" (nzOpenChange)="timeChange($event,'endTime',2)"></nz-time-picker>
  188. </nz-form-control>
  189. <div style="text-align: left;color: red;"
  190. *ngIf="(validateForm.value.startTime2||validateForm.value.endTime2)&&!(validateForm.value.startTime2&&validateForm.value.endTime2)">
  191. 请选择完整的服务时间</div>
  192. </nz-form-item>
  193. </form>
  194. </overlay-scrollbars>
  195. <div class=" display_flex justify-content_flex-center">
  196. <button nzType="primary" nz-button [nzLoading]="btnLoading" (click)="submitForm()">确认</button>
  197. <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
  198. </div>
  199. </div>
  200. </div>
  201. <!-- 删除模态框 -->
  202. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  203. (confirmDelEvent)="confirmDel()" content="您确认要删除科室吗?"></app-dialog-delete>
  204. <!-- 二维码打印 -->
  205. <div id="report" style="display: none">
  206. <div *ngFor="let img of codes" style="display: inline-block;">
  207. <img style="width: 200px;height:200px;" [src]="img.base64" alt="">
  208. <p style="margin: 0;text-align: center; font-size: 20px;width: 200px;">{{img.name}}</p>
  209. <p style="margin: 0;text-align: center; font-size: 20px;width: 200px;">支助中心专用</p>
  210. </div>
  211. </div>
  212. </div>
  213. <!-- 操作成功/失败提示框 -->
  214. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  215. [info]="promptInfo"></app-prompt-modal>
  216. <!-- 查看详情 -->
  217. <router-outlet></router-outlet>
  218. <!-- 遮罩 -->
  219. <app-mask *ngIf="maskFlag"></app-mask>