Bläddra i källkod

消毒供应任务类型配置

seimin 1 år sedan
förälder
incheckning
00f1d37e30

+ 1 - 1
proxy.conf.json

@@ -1,6 +1,6 @@
1 1
 {
2 2
   "/service": {
3
-    "target": "http://192.168.3.108",
3
+    "target": "http://192.168.4.240",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 24 - 0
src/app/views/task-type-management/task-type-management.component.html

@@ -232,6 +232,30 @@
232 232
             <label nz-radio nzValue='0'>否</label>
233 233
           </nz-radio-group>
234 234
         </div>
235
+        <div class="mb8 w100" *ngIf="association.value == 'other'">
236
+          <nz-form-label class="label" nzRequired>是否预定工单</nz-form-label>
237
+          <nz-radio-group class="handlerType" [(ngModel)]="reserveSwitch">
238
+            <label nz-radio nzValue='1'>是</label>
239
+            <label nz-radio nzValue='0'>否</label>
240
+          </nz-radio-group>
241
+        </div>
242
+        <div class="mb8 w100" *ngIf="association.value == 'other'">
243
+          <nz-form-label class="label" nzRequired>是否需要填写工号</nz-form-label>
244
+          <nz-radio-group class="handlerType" [(ngModel)]="reserveUserSwitch">
245
+            <label nz-radio nzValue='1'>是</label>
246
+            <label nz-radio nzValue='0'>否</label>
247
+          </nz-radio-group>
248
+        </div>
249
+        <div class="mb8 w100">
250
+          <nz-form-label class="label" nzRequired>是否限制业务发起时间</nz-form-label>
251
+          <nz-radio-group class="handlerType" [(ngModel)]="reserveType" (ngModelChange)="changeReserveType($event)">
252
+            <label nz-radio [nzValue]='option.value' *ngFor="let option of reserveTypes">{{option.name}}</label>
253
+          </nz-radio-group>
254
+        </div>
255
+        <div class="mb8 w100" *ngIf="reserveType == 3">
256
+          <nz-time-picker [(ngModel)]="reserveDate" nzFormat="HH:mm" class="mr8"></nz-time-picker>
257
+          <input nz-input style="width: 300px;" class="handlerType" [(ngModel)]="reserveMsg" placeholder="请填写超出时间提示用语" nzSize="default" />
258
+        </div>
235 259
         <div nz-row *ngIf="association.value == 'inspect' || association.value == 'patientTransport'">
236 260
           <nz-form-label class="label">携带设备</nz-form-label>
237 261
           <nz-checkbox-group class="handlerType" [nzDisabled]="isRemarks == 1" [(ngModel)]="carryEquipmentIds"></nz-checkbox-group>

+ 55 - 0
src/app/views/task-type-management/task-type-management.component.ts

@@ -7,6 +7,7 @@ import { ToolService } from "../../services/tool.service";
7 7
 import { Subject } from "rxjs";
8 8
 import { debounceTime } from "rxjs/operators";
9 9
 import { NzMessageService } from "ng-zorro-antd";
10
+import { format, startOfSecond } from 'date-fns';
10 11
 export interface Data {
11 12
   id: number;
12 13
   name: string;
@@ -109,6 +110,12 @@ export class TaskTypeManagementComponent implements OnInit {
109 110
   isDrugsCreateTime = "0"; //药品自动建单
110 111
   isOneClickSignIn = "0"; //是否允许一键签收
111 112
   isDigitalHandover = "0"; //是否允许数字交接
113
+  reserveSwitch = "0"; //是否预定工单
114
+  reserveUserSwitch = "0"; //是否需要填写工号
115
+  reserveType = "0"; //是否限制业务发起时间
116
+  reserveTypes:any = []; //是否限制业务发起时间-字典
117
+  reserveDate = null; //是否限制业务发起时间-时间
118
+  reserveMsg = ''; //是否限制业务发起时间-提示
112 119
   // wechatFocusSwitch = "0"; //支助中心端是否能标记重点关注
113 120
   isRemarks: any = "0"; //是否需要备注信息(其他类型)
114 121
   remarks = ""; //备注信息提示用语(其他类型)
@@ -305,6 +312,7 @@ export class TaskTypeManagementComponent implements OnInit {
305 312
     this.getAllTaskType(); //任务类型列表
306 313
     this.getSearchTaskList(); //任务类型列表,可搜索
307 314
     this.getSearchDeptList(); //标本配送,空单默认科室列表
315
+    this.getReserveType(); //获取是否限制业务发起时间-字典
308 316
   }
309 317
   // 搜索科室
310 318
   optionList = [];
@@ -502,6 +510,14 @@ export class TaskTypeManagementComponent implements OnInit {
502 510
         that.allAssociation = data;
503 511
       });
504 512
   }
513
+  // 获取是否限制业务发起时间-字典
514
+  getReserveType() {
515
+    this.mainService
516
+      .getDictionary("list", "reserveType")
517
+      .subscribe((data) => {
518
+        this.reserveTypes = data;
519
+      });
520
+  }
505 521
   // 获取所有关联业务
506 522
   getAllRelatedBusiness() {
507 523
     this.mainService
@@ -873,6 +889,20 @@ export class TaskTypeManagementComponent implements OnInit {
873 889
       !data.isDigitalHandover
874 890
         ? "0"
875 891
         : data.isDigitalHandover + ""; //是否允许数字交接
892
+    this.reserveSwitch =
893
+      !data.reserveSwitch
894
+        ? "0"
895
+        : data.reserveSwitch + ""; //是否预定工单
896
+    this.reserveUserSwitch =
897
+      !data.reserveUserSwitch
898
+        ? "0"
899
+        : data.reserveUserSwitch + ""; //是否需要填写工号
900
+    this.reserveType =
901
+      !data.reserveType
902
+        ? '1'
903
+        : data.reserveType.value + ""; //是否限制业务发起时间
904
+    this.reserveDate =  data.reserveDate === undefined ? null : data.reserveDate; //是否限制业务发起时间-时间
905
+    this.reserveMsg =  data.reserveMsg === undefined ? '' : data.reserveMsg; //是否限制业务发起时间-提示
876 906
     // this.wechatFocusSwitch =
877 907
     //   data.wechatFocusSwitch === undefined ? "0" : data.wechatFocusSwitch + ""; //支助中心端是否能标记重点关注
878 908
     this.leadTime =
@@ -968,6 +998,14 @@ export class TaskTypeManagementComponent implements OnInit {
968 998
   //提交数据
969 999
   loading5 = false; //保存按钮loading
970 1000
   submitForm() {
1001
+    if (this.reserveType == "3" && !this.reserveDate) {
1002
+      this.showPromptModal(this.add ? "新增" : "编辑", false, "<span class='red'>是否限制业务发起时间</span>选择<span class='red'>根据时间限制</span>时需要选择时间");
1003
+      return;
1004
+    }
1005
+    if (this.reserveType == "3" && !this.reserveMsg) {
1006
+      this.showPromptModal(this.add ? "新增" : "编辑", false, "<span class='red'>是否限制业务发起时间</span>选择<span class='red'>根据时间限制</span>时需要填写超出时间提示用语");
1007
+      return;
1008
+    }
971 1009
     //选择自动送回后,必须选择任务类型
972 1010
     //空单默认科室必选
973 1011
     if (
@@ -1204,6 +1242,15 @@ export class TaskTypeManagementComponent implements OnInit {
1204 1242
       this.taskData.taskType.isOneClickSignIn = parseInt(this.isOneClickSignIn); //是否允许一键签收
1205 1243
     }
1206 1244
     this.taskData.taskType.isDigitalHandover = this.isDigitalHandover === "1" ? 1 : 0; //是否允许数字交接
1245
+    this.taskData.taskType.reserveSwitch = this.reserveSwitch === "1" ? 1 : 0; //是否预定工单
1246
+    this.taskData.taskType.reserveUserSwitch = this.reserveUserSwitch === "1" ? 1 : 0; //是否需要填写工号
1247
+    this.taskData.taskType.reserveType = this.reserveTypes.find(v => v.value == this.reserveType); //是否限制业务发起时间-字典
1248
+    
1249
+    // 根据时间限制
1250
+    if(this.reserveType == '3'){
1251
+      this.taskData.taskType.reserveDate = this.reserveDate ? format(startOfSecond(this.reserveDate), 'yyyy-MM-dd HH:mm:ss') : undefined; //是否限制业务发起时间-时间
1252
+      this.taskData.taskType.reserveMsg = this.reserveMsg; //是否限制业务发起时间-提示
1253
+    }
1207 1254
     // this.taskData.taskType.wechatFocusSwitch =
1208 1255
     //   this.wechatFocusSwitch === "1" ? 1 : 0; //支助中心端重点关注开关
1209 1256
     this.taskData.taskType.remarksSwitch = this.isRemarks === "1" ? 1 : 0; //是否需要备注信息
@@ -2529,4 +2576,12 @@ export class TaskTypeManagementComponent implements OnInit {
2529 2576
       this.carryingCourses[this.indexs].actionRemarks = '';
2530 2577
     }
2531 2578
   }
2579
+
2580
+  // 修改是否限制业务发起时间
2581
+  changeReserveType(e){
2582
+    if(!e){
2583
+      this.reserveDate = null;
2584
+      this.reserveMsg = '';
2585
+    }
2586
+  }
2532 2587
 }

+ 1 - 1
src/main.ts

@@ -8,7 +8,7 @@ if (environment.production) {
8 8
   enableProdMode();
9 9
   if (window) {
10 10
     window.console.log = function () { };
11
-    console.info('v2.4.31');
11
+    console.info('v2.4.32');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)