round-robin.component.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <div class="list-template">
  2. <div class="list-template__content">
  3. <div class="list-template__top" nz-row>
  4. <div nz-col nzXl='15' class="list-template__searchBox">
  5. <div class="list-template__searchItem">
  6. <span class="label label--big">轮巡计划名称:</span>
  7. <input nz-input class="formItem" placeholder="请输入关键字" [(ngModel)]="searchCriteria.name" />
  8. </div>
  9. <div class="list-template__searchItem">
  10. <span class="label">终点科室:</span>
  11. <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzServerSearch nzShowSearch nzAllowClear
  12. nzPlaceHolder="请选择终点科室" [(ngModel)]="searchCriteria.endDepartment" (nzOnSearch)="changeInp($event,'search')"
  13. (nzOpenChange)="changeSearch($event)">
  14. <ng-container *ngFor="let data of departmentSearch">
  15. <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
  16. </ng-container>
  17. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  18. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  19. </nz-option>
  20. </nz-select>
  21. </div>
  22. </div>
  23. <div nz-col nzXl="9" class="list-template__btns">
  24. <button nz-button class="btn default" (click)='reset()'>重置</button>
  25. <button nz-button *ngIf="coopBtns.add" class="btn default ml8" (click)="addModal()">新增</button>
  26. <button nz-button class="btn default ml8" (click)='getList(1)'>搜索</button>
  27. </div>
  28. </div>
  29. <div class="list-template__bottom">
  30. <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
  31. [nzLoading]="loading1">
  32. <thead>
  33. <tr class="thead">
  34. <th nzWidth="5%">序号</th>
  35. <th nzWidth="10%">轮巡计划名称</th>
  36. <th nzWidth="10%">轮巡类型</th>
  37. <th nzWidth="15%">执行策略</th>
  38. <th nzWidth="15%">执行时间</th>
  39. <th nzWidth="20%">终点科室</th>
  40. <th nzWidth="25%">操作</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <tr *ngFor="let data of listOfData;let i = index">
  45. <td>{{ i+1 }}</td>
  46. <td>{{ data.title }}</td>
  47. <td>{{ data.taskType.taskName }}</td>
  48. <td [ngSwitch]="data.timeStep">
  49. <ng-container *ngSwitchCase="'day'">每日{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}</ng-container>
  50. <ng-container *ngSwitchCase="'week'">每周{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
  51. </ng-container>
  52. <ng-container *ngSwitchCase="'month'">每月{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
  53. </ng-container>
  54. <ng-container *ngSwitchCase="'year'">每年{{data.dayType == 0?'':'('+dayType[data.dayType]+')'}
  55. </ng-container>
  56. </td>
  57. <td [ngSwitch]="data.timeStep">
  58. <ng-container *ngSwitchCase="'day'">{{ data.executeTime|date:'HH时mm分' }}</ng-container>
  59. <ng-container *ngSwitchCase="'week'">{{data.weekName}} {{ data.executeTime|date:'HH时mm分' }}</ng-container>
  60. <ng-container *ngSwitchCase="'month'">{{data.extra1}}日 {{ data.executeTime|date:'HH时mm分' }}</ng-container>
  61. <ng-container *ngSwitchCase="'year'">{{ data.executeTime|date:'MM月dd日HH时mm分' }}</ng-container>
  62. </td>
  63. <td>
  64. <div class="targetDept" nz-tooltip nzTooltipTitle="{{data.targetDeptShow}}">{{ data.targetDeptShow }}
  65. </div>
  66. </td>
  67. <td>
  68. <div class="coop">
  69. <span *ngIf="coopBtns.edit&&data.taskType.associationType.value=='other'&&!data.taskTypeDeptOrder"
  70. (click)="batchOrdersHandler(data)">批量建单设置</span>
  71. <span *ngIf="coopBtns.look" (click)="detail(data.id)">查看</span>
  72. <span *ngIf="coopBtns.edit" (click)="edit(data)">修改</span>
  73. <span *ngIf="coopBtns.del" (click)="showDelModal(data.id,'您确认要删除此轮巡计划吗?','删除','del')">删除</span>
  74. <span *ngIf="coopBtns.isStartUp"
  75. (click)="showDelModal(data.id,data.flag?'您确认要停用该计划吗?':'您确认要启用该计划吗?',data.flag?'停用':'启用','switch',data.flag)">{{data.flag?'停用':'启用'}}</span>
  76. </div>
  77. </td>
  78. </tr>
  79. </tbody>
  80. </nz-table>
  81. <div class="list-template__pagination">
  82. <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
  83. (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
  84. </nz-pagination>
  85. </div>
  86. </div>
  87. </div>
  88. <!-- 新增/编辑模态框 -->
  89. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
  90. <div class="modalBody">
  91. <div class="title">{{add?"新增":"编辑"}}轮巡计划<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
  92. </div>
  93. <overlay-scrollbars #osComponentRef1 class="content">
  94. <p>创建人:{{createUser}}</p>
  95. <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
  96. <nz-form-item>
  97. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roundRobinName">轮巡计划名称</nz-form-label>
  98. <nz-form-control nzErrorTip="请输入轮巡计划名称!">
  99. <nz-input-group>
  100. <input nz-input formControlName="roundRobinName" placeholder="请输入轮巡计划名称" />
  101. </nz-input-group>
  102. </nz-form-control>
  103. </nz-form-item>
  104. <nz-form-item>
  105. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="roundRobinType">轮巡类型</nz-form-label>
  106. <nz-form-control nzErrorTip="请选择轮巡类型!">
  107. <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="roundRobinType" nzShowSearch nzAllowClear
  108. nzPlaceHolder="请选择轮巡类型" nzServerSearch (nzOnSearch)="changeInpTasktype($event)"
  109. (nzOpenChange)="changeFormTasktype($event)" (ngModelChange)="selectedTasktypeHandler($event)">
  110. <ng-container *ngFor="let data of roundRobinTypes">
  111. <nz-option *ngIf="!isLoading" [nzLabel]="data.taskName" [nzValue]="data.id"
  112. [nzDisabled]="!data.carryingCourses[0].departmentStrategy||!data.carryingCourses[1].departmentStrategy">
  113. </nz-option>
  114. </ng-container>
  115. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  116. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  117. </nz-option>
  118. </nz-select>
  119. </nz-form-control>
  120. </nz-form-item>
  121. <nz-form-item>
  122. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="datesType">工作日或节假日</nz-form-label>
  123. <nz-form-control nzErrorTip="请选择工作日或节假日!" class="datesGroup">
  124. <nz-checkbox-group formControlName="datesType" [(ngModel)]="oneOption">
  125. </nz-checkbox-group>
  126. </nz-form-control>
  127. </nz-form-item>
  128. <nz-form-item>
  129. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="timeStep">轮巡策略</nz-form-label>
  130. <nz-form-control nzErrorTip="请选择轮巡策略!">
  131. <nz-radio-group formControlName="timeStep" (ngModelChange)="timeStepChange($event)">
  132. <label nz-radio [nzValue]="data.key" *ngFor="let data of timeSteps">{{data.name}}</label>
  133. </nz-radio-group>
  134. </nz-form-control>
  135. </nz-form-item>
  136. <!-- <nz-form-item>
  137. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="executionTime">执行时间</nz-form-label>
  138. <nz-form-control nzErrorTip="请选择执行时间!">
  139. <nz-select formControlName="executionTime" class="select-seimin" nzMode="multiple" nzPlaceHolder="请选择执行时间"
  140. [(ngModel)]="timeSelectedValue" (nzFocus)="timeSelectFocus()">
  141. <nz-option *ngFor="let option of defaultSelectTimesOption" [nzLabel]="option" [nzValue]="option" nzHide>
  142. </nz-option>
  143. </nz-select>
  144. <nz-time-picker formControlName="time" class="time-picker-seimin" [(ngModel)]="time"
  145. [nzDefaultOpenValue]="defaultTimePickerOpenValue" [nzAddOn]="timePickerAddOnTemplate"
  146. [nzOpen]="timePickerOpen" nzFormat="HH:mm" (nzOpenChange)="timePickerChange()" nzPlaceHolder="请选择执行时间">
  147. </nz-time-picker>
  148. <ng-template #timePickerAddOnTemplate>
  149. <button nz-button nzSize="small" nzType="primary" (click)="timePickerClick()">确定</button>
  150. </ng-template>
  151. </nz-form-control>
  152. </nz-form-item> -->
  153. <nz-form-item *ngIf="validateForm.value.timeStep == 'week'">
  154. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="doWeek">计划执行周(每周)</nz-form-label>
  155. <nz-form-control nzErrorTip="请选择周!">
  156. <nz-select formControlName="doWeek" nzPlaceHolder="请选择周">
  157. <nz-option nzValue="1" nzLabel="周一"></nz-option>
  158. <nz-option nzValue="2" nzLabel="周二"></nz-option>
  159. <nz-option nzValue="3" nzLabel="周三"></nz-option>
  160. <nz-option nzValue="4" nzLabel="周四"></nz-option>
  161. <nz-option nzValue="5" nzLabel="周五"></nz-option>
  162. <nz-option nzValue="6" nzLabel="周六"></nz-option>
  163. <nz-option nzValue="7" nzLabel="周日"></nz-option>
  164. </nz-select>
  165. </nz-form-control>
  166. </nz-form-item>
  167. <nz-form-item *ngIf="validateForm.value.timeStep == 'month'">
  168. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="doMonth">计划执行(每月)</nz-form-label>
  169. <nz-form-control nzErrorTip="请选择日!">
  170. <nz-select formControlName="doMonth" nzPlaceHolder="请选择日">
  171. <nz-option nzValue="{{item}}" nzLabel="{{item}}号" *ngFor="let item of months">
  172. </nz-option>
  173. </nz-select>
  174. </nz-form-control>
  175. </nz-form-item>
  176. <nz-form-item *ngIf="validateForm.value.timeStep == 'year'">
  177. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="doYear">计划执行(每年)</nz-form-label>
  178. <nz-form-control nzErrorTip="请选择月日!">
  179. <nz-date-picker nzFormat="MM-dd" formControlName="doYear" nzPlaceHolder="请选择月日"></nz-date-picker>
  180. </nz-form-control>
  181. </nz-form-item>
  182. <nz-form-item>
  183. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="executeTime">执行时间</nz-form-label>
  184. <nz-form-control nzErrorTip="请选择执行时间!">
  185. <nz-time-picker nzFormat="HH:mm" formControlName="executeTime" class="w100" nzPlaceHolder="请选择执行时间"
  186. [nzAllowEmpty]="false">
  187. </nz-time-picker>
  188. </nz-form-control>
  189. </nz-form-item>
  190. <ng-container *ngIf="selectedTasktype">
  191. <nz-form-item *ngIf="selectedTasktype.associationType.value=='specimenPlan'">
  192. <nz-form-label [nzSm]="6" [nzXs]="24"
  193. [nzRequired]="selectedTasktype.associationType.value=='specimenPlan'" nzFor="endDepartment">终点科室
  194. </nz-form-label>
  195. <nz-form-control nzErrorTip="请选择终点科室!">
  196. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false" formControlName="endDepartment"
  197. nzShowSearch nzAllowClear nzPlaceHolder="请选择终点科室" nzServerSearch
  198. (nzOnSearch)="changeInp($event,'form')" (nzOpenChange)="changeForm($event)">
  199. <ng-container *ngFor="let data of department">
  200. <nz-option *ngIf="!isLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
  201. </ng-container>
  202. <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
  203. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  204. </nz-option>
  205. </nz-select>
  206. </nz-form-control>
  207. </nz-form-item>
  208. <nz-form-item
  209. *ngIf="selectedTasktype.associationType.value=='other'&&(selectedTasktype.carryingCourses[0].departmentStrategy.value==1||selectedTasktype.carryingCourses[1].departmentStrategy.value==1)">
  210. <nz-form-control>
  211. <label nz-checkbox formControlName="openDepartments">
  212. <span>是否根据开通科室建单</span>
  213. </label>
  214. </nz-form-control>
  215. <div class="red openDepartmentsTips">(勾选后系统默认将开通科室,设置为发起科室)</div>
  216. </nz-form-item>
  217. </ng-container>
  218. </form>
  219. <ng-container *ngIf="selectedTasktype">
  220. <p *ngIf="selectedTasktype.associationType.value=='specimenPlan'" class="roundRobinTips">
  221. 提示:起点科室即为标本开通科室;执行人即为科室绑定人员设定;前往设置<a [routerLink]="['/main','officeManagement']">开通科室</a>、<a
  222. [routerLink]="['/main','workAssignment']">工作分配</a>>>
  223. </p>
  224. <p *ngIf="selectedTasktype.associationType.value=='other'&&(selectedTasktype.carryingCourses[0].departmentStrategy.value==1||selectedTasktype.carryingCourses[1].departmentStrategy.value==1)"
  225. class="roundRobinTips">
  226. 提示:您选择的任务类型,需要根据发起科室进行建单,您需要再批量建单中增加发起科室。</p>
  227. <p *ngIf="selectedTasktype.associationType.value=='other'&&selectedTasktype.carryingCourses[0].departmentStrategy.value!=1&&selectedTasktype.carryingCourses[1].departmentStrategy.value!=1"
  228. class="roundRobinTips">
  229. 提示:您选择的任务类型,需要选择起点科室和终点科室,请在”批量建单“中进行设置。</p>
  230. </ng-container>
  231. </overlay-scrollbars>
  232. <div class=" display_flex justify-content_flex-center">
  233. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">保存</button>
  234. <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
  235. </div>
  236. </div>
  237. </div>
  238. <!-- 删除模态框 -->
  239. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  240. (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
  241. </div>
  242. <!-- 操作成功/失败提示框 -->
  243. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  244. [info]="promptInfo">
  245. </app-prompt-modal>
  246. <!-- 查看详情 -->
  247. <router-outlet></router-outlet>
  248. <!-- 遮罩 -->
  249. <app-mask *ngIf="maskFlag"></app-mask>
  250. <!-- 批量建单设置 -->
  251. <app-batch-orders *ngIf="batchOrdersFlag" [selectedBatchOrder]="selectedBatchOrder" (close)="close($event)">
  252. </app-batch-orders>