quick-combination.component.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345
  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__btns justify-content_flex-start">
  5. <h2 class="qName">方案名称:{{queryParamsName}}</h2>
  6. <button class="btn default mr8" nzType="primary" nz-button (click)="takeEffect()">生效</button>
  7. <button class="btn default mr8" nz-button (click)="goToOther()">切换</button>
  8. <button class="btn default" nz-button (click)="goToWorkAssignment()">返回</button>
  9. </div>
  10. <div nz-col nzXl="9" class="list-template__btns">
  11. <button class="btn default" nzType="primary" nz-button (click)="addModal()">新增快捷组合</button>
  12. <button [disabled]="!checkedDepIds.length||!listOfData.length" class="btn default ml8" nzType="primary"
  13. nz-button (click)="showDelModal($event,checkedDepIds,'是否确定批量删除选中的快捷组合?','删除','del')">批量删除</button>
  14. </div>
  15. </div>
  16. <div class="list-template__top" nz-row>
  17. <div nz-col nzXl='15' class="list-template__searchBox">
  18. <div class="list-template__searchItem">
  19. <span class="label label--big">快捷组合名称:</span>
  20. <input nz-input class="formItem" placeholder="请输入关键字" [(ngModel)]="searchCriteria.name" />
  21. </div>
  22. <div class="list-template__searchItem">
  23. <span class="label">工作模式:</span>
  24. <nz-select [nzDropdownMatchSelectWidth]="false" class="formItem" nzShowSearch nzPlaceHolder="请选择工作模式"
  25. [(ngModel)]="searchCriteria.workModel">
  26. <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allWorkModel"></nz-option>
  27. </nz-select>
  28. </div>
  29. </div>
  30. <div nz-col nzXl="9" class="list-template__btns">
  31. <button class="btn default" nzType="primary" nz-button (click)="reset()">重置</button>
  32. <button class="btn default ml8" nzType="primary" nz-button (click)="getList(1)">搜索</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]="queryParamsType==1?'10%':'19%'">名称</th>
  43. <th [nzWidth]="queryParamsType==1?'10%':'19%'">班次</th>
  44. <th nzWidth="8%">任务类型</th>
  45. <th nzWidth="16%">工作模式</th>
  46. <th nzWidth="10%" *ngIf="queryParamsType==1">科室</th>
  47. <th nzWidth="8%" *ngIf="queryParamsType==1">分配人员/组</th>
  48. <th nzWidth="8%" *ngIf="queryParamsType==2">分配组</th>
  49. <th nzWidth="8%">是否发送抢单提醒</th>
  50. <th nzWidth="25%">操作</th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <tr *ngFor="let data of listOfData;let i = index" (click)="selectedListData(data.id)">
  55. <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
  56. <td>{{data.configName||'-'}}</td>
  57. <td>
  58. {{data.classes?data.classes.name:'-'}}
  59. </td>
  60. <td>
  61. <div class="orderPlanTimeShow1" nz-tooltip nzTooltipTitle="{{data.taskTypesName?data.taskTypesName.join('、'):''}}">
  62. {{data.taskTypesName?data.taskTypesName.join('、'):''}}</div>
  63. </td>
  64. <td>
  65. {{data.ruleTypeName||'-'}}
  66. </td>
  67. <td *ngIf="queryParamsType==1">
  68. <div class="orderPlanTimeShow3" nz-tooltip nzTooltipTitle="{{data.departmentDTOSName?data.departmentDTOSName.join('、'):''}}">
  69. {{data.departmentDTOSName?data.departmentDTOSName.join('、'):''}}</div>
  70. </td>
  71. <td *ngIf="queryParamsType==1">
  72. <div class="orderPlanTimeShow2" nz-tooltip nzTooltipTitle="{{data.allName?data.allName.join('、'):''}}">
  73. {{data.allName?data.allName.join('、'):''}}</div>
  74. </td>
  75. <td *ngIf="queryParamsType==2">
  76. <div class="orderPlanTimeShow2" nz-tooltip nzTooltipTitle="{{data.allName?data.allName.join('、'):''}}">
  77. {{data.allName?data.allName.join('、'):''}}</div>
  78. </td>
  79. <td>
  80. <div *ngIf="data.sendOrderRemind != undefined">
  81. {{data.sendOrderRemind==1 ? '是' : '否'}}
  82. </div>
  83. </td>
  84. <td>
  85. <div class="coop">
  86. <span (click)="addPersonModal($event,data)" *ngIf="data.ruleType == 3&&queryParamsType==1">分配人员</span>
  87. <span (click)="addGroupsModal($event,data)"
  88. *ngIf="(data.ruleType == 2||data.ruleType == 4)&&queryParamsType==1">分配分组</span>
  89. <span (click)="copy($event,data)">复制</span>
  90. <span (click)="edit($event,data)">修改</span>
  91. <span (click)="showDelModal($event,data.id,'是否确定删除【'+data.configName+'】快捷组合?','删除','del')">删除</span>
  92. </div>
  93. </td>
  94. </tr>
  95. </tbody>
  96. </nz-table>
  97. <div class="list-template__pagination">
  98. <nz-pagination nzShowSizeChanger [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
  99. (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
  100. </nz-pagination>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- 新增/编辑模态框 -->
  105. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
  106. <div class="modalBody">
  107. <div class="title">{{add?"新增":"编辑"}}快捷组合<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i>
  108. </div>
  109. <div class="content">
  110. <form nz-form [formGroup]="validateForm" class="addForm">
  111. <nz-form-item>
  112. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationName">快捷组合名称</nz-form-label>
  113. <nz-form-control nzErrorTip="请输入快捷组合名称!">
  114. <nz-input-group>
  115. <input nz-input formControlName="quickCombinationName" placeholder="请输入快捷组合名称" />
  116. </nz-input-group>
  117. </nz-form-control>
  118. </nz-form-item>
  119. <nz-form-item>
  120. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationClass">班次</nz-form-label>
  121. <nz-form-control nzErrorTip="请输入班次!">
  122. <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="quickCombinationClass" nzShowSearch
  123. nzPlaceHolder="请输入班次" nzServerSearch (nzOpenChange)="getClassList($event)"
  124. (ngModelChange)="selectClass($event)">
  125. <ng-container *ngFor="let data of classList">
  126. <nz-option *ngIf="!cLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
  127. </ng-container>
  128. <nz-option *ngIf="cLoading" nzDisabled nzCustomContent>
  129. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  130. </nz-option>
  131. </nz-select>
  132. </nz-form-control>
  133. </nz-form-item>
  134. <nz-form-item>
  135. <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="quickCombinationType">任务类型</nz-form-label>
  136. <nz-form-control nzErrorTip="请输入任务类型!">
  137. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  138. formControlName="quickCombinationType" nzShowSearch nzAllowClear nzPlaceHolder="请输入任务类型" nzServerSearch
  139. (nzOnSearch)="searchTaskList($event)" (nzOpenChange)="searchTaskList1($event)"
  140. (ngModelChange)="selectTaskList($event)">
  141. <ng-container *ngFor="let data of taskList">
  142. <nz-option *ngIf="!tLoading" nzLabel="{{data.taskName}}" nzValue="{{data.id}}"
  143. [nzDisabled]="data.showFlag === 0"></nz-option>
  144. </ng-container>
  145. <nz-option *ngIf="tLoading" nzDisabled nzCustomContent>
  146. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  147. </nz-option>
  148. </nz-select>
  149. </nz-form-control>
  150. </nz-form-item>
  151. <nz-form-item>
  152. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationModel">工作模式</nz-form-label>
  153. <nz-form-control nzErrorTip="请输入工作模式!">
  154. <nz-radio-group [(ngModel)]="quickCombinationModel" formControlName="quickCombinationModel"
  155. [nzDisabled]="!taskListFlag" (ngModelChange)="radioIt()">
  156. <label nz-radio nzValue="1">自由抢单</label>
  157. <label nz-radio nzValue="2" *ngIf="queryParamsType==1">指定分组</label>
  158. <label nz-radio nzValue="3">科室绑定人员</label>
  159. <label nz-radio nzValue="4" *ngIf="queryParamsType==1">科室绑定分组</label>
  160. <label nz-radio nzValue="5" *ngIf="queryParamsType==2">科室绑定分组</label>
  161. <label nz-radio nzValue="6" *ngIf="queryParamsType==2">绑定分组</label>
  162. </nz-radio-group>
  163. </nz-form-control>
  164. </nz-form-item>
  165. <nz-form-item>
  166. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="sendOrderRemind">是否发送抢单提醒</nz-form-label>
  167. <nz-form-control nzErrorTip="请选择是否发送抢单提醒!">
  168. <nz-radio-group formControlName="sendOrderRemind">
  169. <label nz-radio nzValue="1">是</label>
  170. <label nz-radio nzValue="0">否</label>
  171. </nz-radio-group>
  172. </nz-form-control>
  173. </nz-form-item>
  174. <nz-form-item *ngIf="queryParamsType == 2 && quickCombinationModel == 3">
  175. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="requireDeptType" nzFor="deptTypeIds">选择科室类型
  176. </nz-form-label>
  177. <nz-form-control nzErrorTip="请选择科室类型!">
  178. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  179. formControlName="deptTypeIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择科室类型" nzServerSearch (nzOpenChange)="getDeptTypeList($event)">
  180. <ng-container *ngFor="let data of deptTypeList">
  181. <nz-option *ngIf="!dLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
  182. </ng-container>
  183. <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
  184. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  185. </nz-option>
  186. </nz-select>
  187. </nz-form-control>
  188. </nz-form-item>
  189. <nz-form-item *ngIf="queryParamsType==1"
  190. [hidden]="quickCombinationModel == 1||quickCombinationModel==2||quickCombinationModel===''">
  191. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="requireDept" nzFor="quickCombinationDept">选择科室
  192. </nz-form-label>
  193. <nz-form-control nzErrorTip="请选择科室!">
  194. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  195. formControlName="quickCombinationDept" nzShowSearch nzAllowClear nzPlaceHolder="请选择科室" nzServerSearch
  196. (nzOnSearch)="searchDeptList($event)" (nzOpenChange)="getDeptList($event)"
  197. (ngModelChange)="selectDeptList($event)">
  198. <ng-container *ngFor="let data of deptList">
  199. <nz-option *ngIf="!dLoading" nzLabel="{{data.dept}}" nzValue="{{data.id}}"></nz-option>
  200. </ng-container>
  201. <nz-option *ngIf="dLoading" nzDisabled nzCustomContent>
  202. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  203. </nz-option>
  204. </nz-select>
  205. </nz-form-control>
  206. </nz-form-item>
  207. <nz-form-item [hidden]="
  208. (queryParamsType==1&&(quickCombinationModel != 2||quickCombinationModel===''))||
  209. (queryParamsType==2&&((quickCombinationModel != 5 && quickCombinationModel != 6)||quickCombinationModel===''))">
  210. <nz-form-label [nzSm]="6" [nzXs]="24" [nzRequired]="requireGroup" nzFor="quickCombinationGroup">选择分组
  211. </nz-form-label>
  212. <nz-form-control nzErrorTip="请选择分组!">
  213. <nz-select [nzMode]="quickCombinationModel == 6?'default':'multiple'" [nzDropdownMatchSelectWidth]="false"
  214. formControlName="quickCombinationGroup" nzShowSearch nzAllowClear nzPlaceHolder="请选择分组" nzServerSearch
  215. (nzOnSearch)="searchGroupList($event)" (nzOpenChange)="getGroupList($event)"
  216. (ngModelChange)="selectGroupList($event)">
  217. <ng-container *ngFor="let data of groupList">
  218. <nz-option *ngIf="!gLoading" nzLabel="{{data.groupName}}" nzValue="{{data.id}}"></nz-option>
  219. </ng-container>
  220. <nz-option *ngIf="gLoading" nzDisabled nzCustomContent>
  221. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  222. </nz-option>
  223. </nz-select>
  224. </nz-form-control>
  225. </nz-form-item>
  226. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1)">
  227. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchMethod">派单方式</nz-form-label>
  228. <nz-form-control nzErrorTip="请选择派单方式!">
  229. <nz-radio-group formControlName="quickCombinationDispatchMethod" (ngModelChange)="radioDispatchMethod($event)">
  230. <label nz-radio [nzValue]="item.value" *ngFor="let item of dispatchMethods">{{item.name}}</label>
  231. </nz-radio-group>
  232. </nz-form-control>
  233. </nz-form-item>
  234. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1 && validateForm.value.quickCombinationDispatchMethod == 2)">
  235. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchType">自动派单类型</nz-form-label>
  236. <nz-form-control nzErrorTip="请选择自动派单类型!">
  237. <nz-radio-group formControlName="quickCombinationDispatchType" (ngModelChange)="radioDispatchType($event)">
  238. <label nz-radio [nzValue]="item.value" *ngFor="let item of dispatchTypes">{{item.name}}</label>
  239. </nz-radio-group>
  240. </nz-form-control>
  241. </nz-form-item>
  242. <nz-form-item [hidden]="!(queryParamsType == 1 && quickCombinationModel == 1 && validateForm.value.quickCombinationDispatchMethod == 2 && validateForm.value.quickCombinationDispatchType == 1)">
  243. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationDispatchWeight">最高权重</nz-form-label>
  244. <nz-form-control nzErrorTip="请选择最高权重!">
  245. <nz-input-group>
  246. <input nz-input type="number" formControlName="quickCombinationDispatchWeight" placeholder="请输入最高权重" />
  247. </nz-input-group>
  248. </nz-form-control>
  249. </nz-form-item>
  250. </form>
  251. </div>
  252. <div class=" display_flex justify-content_flex-center">
  253. <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">保存</button>
  254. <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
  255. </div>
  256. </div>
  257. </div>
  258. <!-- 分配人员模态框 -->
  259. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="personModal">
  260. <div class="modalBody">
  261. <div class="title">分配人员<i class="icon_transport transport-guanbi" (click)="hidePersonModal()"></i>
  262. </div>
  263. <div class="content">
  264. <form nz-form [formGroup]="validatePersonForm" class="addForm" (ngSubmit)="submitPersonForm()">
  265. <nz-form-item>
  266. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationPerson">人员选择</nz-form-label>
  267. <nz-form-control [nzSm]="24" [nzXs]="24" nzErrorTip="请选择人员!">
  268. <nz-select [nzDropdownMatchSelectWidth]="false"
  269. formControlName="quickCombinationPerson" nzShowSearch nzAllowClear nzPlaceHolder="请选择人员" nzServerSearch
  270. (nzOnSearch)="searchPersonList($event)" (nzOpenChange)="getPersonList($event)">
  271. <ng-container *ngFor="let data of personList">
  272. <nz-option *ngIf="!pLoading" nzLabel="{{data.name}}" nzValue="{{data.id}}"></nz-option>
  273. </ng-container>
  274. <nz-option *ngIf="pLoading" nzDisabled nzCustomContent>
  275. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  276. </nz-option>
  277. </nz-select>
  278. </nz-form-control>
  279. </nz-form-item>
  280. </form>
  281. </div>
  282. <div class=" display_flex justify-content_flex-center">
  283. <button nzType="primary" nz-button (click)="submitPersonForm()" [nzLoading]="btnLoading">确定</button>
  284. <button class="btn cancel" nz-button nzType="default" (click)="hidePersonModal()">取消</button>
  285. </div>
  286. </div>
  287. </div>
  288. <!-- 分配分组模态框 -->
  289. <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="groupsModal">
  290. <div class="modalBody">
  291. <div class="title">分配分组<i class="icon_transport transport-guanbi" (click)="hideGroupsModal()"></i>
  292. </div>
  293. <div class="content">
  294. <form nz-form [formGroup]="validateGroupForm" class="addForm" (ngSubmit)="submitGroupsForm()">
  295. <nz-form-item>
  296. <nz-form-label [nzSm]="24" [nzXs]="24" nzRequired nzFor="quickCombinationGroups">分组选择</nz-form-label>
  297. <nz-form-control [nzSm]="24" [nzXs]="24" nzErrorTip="请选择分组!">
  298. <nz-select [nzMode]="'multiple'" [nzDropdownMatchSelectWidth]="false"
  299. formControlName="quickCombinationGroups" nzShowSearch nzAllowClear nzPlaceHolder="请选择分组" nzServerSearch
  300. (nzOnSearch)="searchGroupsList($event)" (nzOpenChange)="getGroupsList($event)">
  301. <ng-container *ngFor="let data of groupsList">
  302. <nz-option *ngIf="!gpLoading" nzLabel="{{data.groupName}}" nzValue="{{data.id}}"></nz-option>
  303. </ng-container>
  304. <nz-option *ngIf="gpLoading" nzDisabled nzCustomContent>
  305. <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
  306. </nz-option>
  307. </nz-select>
  308. </nz-form-control>
  309. </nz-form-item>
  310. </form>
  311. </div>
  312. <div class=" display_flex justify-content_flex-center">
  313. <button nzType="primary" nz-button (click)="submitGroupsForm()" [nzLoading]="btnLoading">确定</button>
  314. <button class="btn cancel" nz-button nzType="default" (click)="hideGroupsModal()">取消</button>
  315. </div>
  316. </div>
  317. </div>
  318. <!-- 删除模态框 -->
  319. <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
  320. (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
  321. </div>
  322. <!-- 提示模态框 -->
  323. <div class="save display_flex justify-content_flex-center align-items_center" *ngIf="tipModal">
  324. <div class="modalBody">
  325. <div class="title">提示<i class="icon_transport transport-guanbi" (click)="hideTipModal()"></i></div>
  326. <div class="content">
  327. <div class="icon"><i class="icon_transport transport-wenhao"></i></div>
  328. <div class="defeat" style="font-size: 16px;">是否确定离开该界面,如果未点击生效,数据可能会遗失?</div>
  329. </div>
  330. <div class="display_flex justify-content_flex-center">
  331. <button nz-button nzType="primary" (click)="confirmTip()">确认</button>
  332. <button class="btn cancel " nz-button nzType="default" (click)="hideTipModal()">关闭</button>
  333. </div>
  334. </div>
  335. </div>
  336. <!-- 操作成功/失败提示框 -->
  337. <app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
  338. [info]="promptInfo" [loading]="showLoading">
  339. </app-prompt-modal>
  340. <!-- 查看详情 -->
  341. <router-outlet></router-outlet>
  342. <!-- 遮罩 -->
  343. <app-mask *ngIf="maskFlag"></app-mask>