seimin пре 2 месеци
родитељ
комит
415b247721

+ 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.129",
4 4
     "logLevel": "debug",
5 5
     "changeOrigin": true,
6 6
     "pathRewrite": {

+ 55 - 0
src/app/components/edit-work-order-remark/edit-work-order-remark.component.html

@@ -0,0 +1,55 @@
1
+<div class="save add display_flex align-items_center justify-content_flex-center">
2
+  <div class="modalBody">
3
+    <div class="title">修改备注<i class="icon_transport transport-guanbi" (click)="cancel()"></i>
4
+    </div>
5
+    <div class="contentBody">
6
+      <div class="body modalBody_box">
7
+        <div class="modalBody_left" *ngIf="!nLoading">
8
+          <overlay-scrollbars #osComponentRef2 class="modalBody_left_box">
9
+            <div class="modalBody_left_box">
10
+              <div style="flex:1 1 auto; display: flex; flex-direction: column; justify-content: center; align-items: center;">
11
+                <!-- 工单备注: -->
12
+                <div class="w100" *ngIf="buildMsg.remarksSwitch == 1">
13
+                  <div nz-row class="tabRow">
14
+                    <div nz-col [nzSpan]="6">
15
+                      <p>工单备注:</p>
16
+                    </div>
17
+                    <div nz-col [nzSpan]="14">
18
+                      <textarea nz-input [placeholder]="workOrderRemarkTips" [nzAutosize]="{minRows: 3, maxRows: 5}" maxlength="100" [(ngModel)]="workOrderRemark" #remarksEle></textarea>
19
+                    </div>
20
+                  </div>
21
+
22
+                  <div nz-row class="tabRow" *ngIf="customRemarks.length">
23
+                    <div nz-col [nzSpan]="6">
24
+                      <p>快捷输入:</p>
25
+                    </div>
26
+                    <div nz-col [nzSpan]="14">
27
+                      <span class="addRemarks" *ngFor="let item of customRemarks" (click)="addRemarks(item)">【{{ item }}】</span>
28
+                    </div>
29
+                  </div>
30
+
31
+                  <div nz-row class="tabRow" *ngIf="historyCustomRemarks.length">
32
+                    <div nz-col [nzSpan]="6">
33
+                      <p>历史输入:</p>
34
+                    </div>
35
+                    <div nz-col [nzSpan]="14">
36
+                      <span class="addRemarks" *ngFor="let item of historyCustomRemarks" (click)="addRemarks(item)">【{{item }}】</span>
37
+                    </div>
38
+                  </div>
39
+                </div>
40
+              </div>
41
+            </div>
42
+          </overlay-scrollbars>
43
+        </div>
44
+        <div class="modalBody_left nLoading" *ngIf="nLoading">
45
+          <img src="../../../assets/images/loading.gif" alt="" />
46
+          <div>加载中...</div>
47
+        </div>
48
+      </div>
49
+    </div>
50
+    <div class="display_flex justify-content_flex-center btns">
51
+      <button class="mr8" nzType="default" nz-button (click)="cancel()">取消</button>
52
+      <button nzType="primary" nz-button (click)="confirm()" [nzLoading]="loading5">确认</button>
53
+    </div>
54
+  </div>
55
+</div>

+ 157 - 0
src/app/components/edit-work-order-remark/edit-work-order-remark.component.less

@@ -0,0 +1,157 @@
1
+@import "../../../../src/theme.less";
2
+.save {
3
+  position: fixed;
4
+  left: 0;
5
+  top: 0;
6
+  width: 100%;
7
+  height: 100%;
8
+  background: rgba(0, 0, 0, 0.4);
9
+  z-index: 99;
10
+
11
+  .modalBody {
12
+    width: 700px;
13
+    height: 400px;
14
+    background: #fff;
15
+    border-radius: 4px;
16
+    padding: 14px 24px 10px 24px;
17
+    color: #333;
18
+
19
+    .title {
20
+      width: 100%;
21
+      text-align: center;
22
+      font-size: 16px;
23
+      position: relative;
24
+
25
+      i {
26
+        position: absolute;
27
+        right: 0;
28
+        top: 0;
29
+        font-size: 16px;
30
+        color: #666;
31
+        cursor: pointer;
32
+      }
33
+    }
34
+
35
+    .contentBody {
36
+      width: 100%;
37
+      height: 296px;
38
+      margin-top: 14px;
39
+      background: #F9FAFB;
40
+      border-radius: 4px;
41
+      border: 1px solid rgba(0,0,0,0.25);
42
+      display: flex;
43
+      overflow: hidden;
44
+      .nav{
45
+        width: 182px;
46
+        height: 100%;
47
+        flex-shrink: 1;
48
+        border-right: 1px solid #CCCCCC;
49
+        .navItem{
50
+          height: 48px;
51
+          line-height: 48px;
52
+          font-size: 14px;
53
+          padding: 0 16px;
54
+          cursor: pointer;
55
+          &.active{
56
+            background: #F0F6ED;
57
+            color: @primary-color;
58
+          }
59
+        }
60
+      }
61
+      .body{
62
+        flex: 1;
63
+        height: 100%;
64
+        .addRemarks {
65
+          color: @primary-color;
66
+          cursor: pointer;
67
+        }
68
+
69
+        .modalBody_left_box {
70
+          height: 100%;
71
+          box-sizing: border-box;
72
+          padding: 8px;
73
+          display: flex;
74
+          flex-direction: column;
75
+          justify-content: space-between;
76
+        }
77
+      }
78
+    }
79
+  }
80
+  .btns{
81
+    margin-top: 10px;
82
+  }
83
+  .modalBody_box {
84
+    width: 100%;
85
+    min-width: 0;
86
+    height: 100%;
87
+    display: flex;
88
+    flex-direction: column;
89
+    justify-content: space-between;
90
+
91
+    .content {
92
+      width: 100%;
93
+      display: flex;
94
+      flex-direction: column;
95
+      justify-content: center;
96
+      align-items: center;
97
+
98
+      & > div {
99
+        width: 100%;
100
+      }
101
+
102
+      .shortcutForm {
103
+        width: 100%;
104
+
105
+        .ant-form-item-label {
106
+          text-align: right;
107
+        }
108
+      }
109
+    }
110
+
111
+    .btns {
112
+      padding-bottom: 16px;
113
+      padding-top: 16px;
114
+    }
115
+  }
116
+  .defeat{
117
+    text-align: center;
118
+    margin-bottom: 16px;
119
+  }
120
+  .tabRow{
121
+    margin-bottom: 24px;
122
+    word-break: break-all;
123
+    &:first-of-type{
124
+      margin-top: 24px;
125
+    }
126
+    p{
127
+      text-align: right;
128
+      margin-bottom: 0;
129
+    }
130
+  }
131
+}
132
+.modalBody_left {
133
+  width: 100%;
134
+  height: 100%;
135
+  display: flex;
136
+  flex-direction: column;
137
+  justify-content: space-between;
138
+
139
+  &.nLoading,
140
+  &.noData {
141
+    justify-content: center;
142
+    align-items: center;
143
+
144
+    img {
145
+      width: 24px;
146
+    }
147
+
148
+    div {
149
+      display: inline-block;
150
+    }
151
+  }
152
+}
153
+:host .readonly{
154
+  ::ng-deep .ant-form-item-label,::ng-deep .ant-form-item-control{
155
+    line-height: normal!important;
156
+  }
157
+}

+ 87 - 0
src/app/components/edit-work-order-remark/edit-work-order-remark.component.ts

@@ -0,0 +1,87 @@
1
+import { Component, OnInit, Output, Input, ViewChild, ElementRef } from '@angular/core';
2
+import { EventEmitter } from '@angular/core';
3
+import { OverlayScrollbarsComponent } from 'overlayscrollbars-ngx';
4
+import { FormGroup, FormBuilder, FormControl } from '@angular/forms';
5
+import { MainService } from 'src/app/services/main.service';
6
+import { ToolService } from 'src/app/services/tool.service';
7
+import { Subject } from 'rxjs';
8
+import { debounceTime } from 'rxjs/operators';
9
+
10
+@Component({
11
+  selector: 'app-edit-work-order-remark',
12
+  templateUrl: './edit-work-order-remark.component.html',
13
+  styleUrls: ['./edit-work-order-remark.component.less']
14
+})
15
+export class EditWorkOrderRemarkComponent implements OnInit {
16
+  @ViewChild("osComponentRef1", {
17
+    read: OverlayScrollbarsComponent,
18
+    static: false,
19
+  })
20
+  osComponentRef1: OverlayScrollbarsComponent;
21
+  @ViewChild("remarksEle", { static: false }) remarksEle: ElementRef;
22
+  @Output() cancelModal = new EventEmitter();
23
+  @Output() confirmModal = new EventEmitter();
24
+  @Input() buildQuickConfirmData: any = {};//数据
25
+  @Input() loading5: boolean = false;//loading
26
+  hosLoading: boolean = false;//确定按钮的loading
27
+  constructor(
28
+    private mainService: MainService,
29
+    private fb: FormBuilder,
30
+    public tool: ToolService,
31
+  ) { }
32
+
33
+  ngOnInit() {
34
+    console.log(this.buildQuickConfirmData);
35
+    this.workOrderRemark = this.buildQuickConfirmData.workOrderRemark || "";
36
+    this.newShortcutOrder(this.buildQuickConfirmData.taskType);
37
+  }
38
+
39
+  // 建单条件
40
+  workOrderRemark = ""; //备注
41
+  customRemarks = []; //备注快速输入
42
+  buildMsg: any = {}; //一键发起返回信息
43
+  historyCustomRemarks = []; //历史快捷输入
44
+  workOrderRemarkTips = ""; //备注提示
45
+  nLoading = false;
46
+  newShortcutOrder(taskType) {
47
+    console.log(taskType);
48
+    this.nLoading = true;
49
+    this.buildMsg = taskType;
50
+    if (taskType.remarksSwitch == 1) {
51
+      if (taskType.customRemarks === null || taskType.customRemarks === "") {
52
+        this.customRemarks = [];
53
+      } else {
54
+        this.customRemarks = taskType.customRemarks.split("$");
55
+      }
56
+      this.workOrderRemarkTips = taskType.remarksPrompts || "请填写工单备注,不超过100个字符";
57
+      let user = JSON.parse(localStorage.getItem("user"));
58
+      this.mainService.postCustom("nurse", "workOrder/recentRemarks", {
59
+          deptId: user.user.dept.id,
60
+          taskTypeId: taskType.id,
61
+        })
62
+        .subscribe((result) => {
63
+          this.nLoading = false;
64
+          if (result.state == 200) {
65
+            this.historyCustomRemarks = result.data;
66
+          }
67
+        });
68
+    } else {
69
+      this.nLoading = false;
70
+    }
71
+  }
72
+
73
+  // 添加备注
74
+  addRemarks(item) {
75
+    this.remarksEle.nativeElement.focus();
76
+    this.workOrderRemark += item;
77
+  }
78
+
79
+  // 取消
80
+  cancel() {
81
+    this.cancelModal.emit(false)
82
+  }
83
+  // 确认
84
+  confirm() {
85
+    this.confirmModal.emit({workOrderRemark: this.workOrderRemark})
86
+  }
87
+}

+ 6 - 1
src/app/views/fuwutai/fuwutai.component.html

@@ -189,6 +189,7 @@
189 189
                 <div class="right_bots display_flex col-flex align-items_center justify-content_flex-center">
190 190
                   <input type="button" *ngIf="data.data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id)" />
191 191
                   <input type="button" *ngIf="!data.data.worker && data.data.gdState.value != 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id, 1)" />
192
+                  <input type="button" *ngIf="(data.data.gdState.value == 2 || data.data.gdState.value == 3 || data.data.gdState.value == 4) && data.data.taskType.remarksSwitch == 1" class="top_bot" value="修改备注" (click)="buildQuick(data.data)" />
192 193
                   <input type="button" *ngIf="data.data.gdState.value == 2 || ((data.data.gdState.value == 3 || data.data.gdState.value == 4) && data.data.worker)" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'hsms')" />
193 194
                 </div>
194 195
                 <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
@@ -369,7 +370,8 @@
369 370
                 </div>
370 371
                 <div class="right_bots display_flex col-flex align-items_center justify-content_space-around">
371 372
                   <input type="button" *ngIf="data.data.gdState.value == 2" class="top_bot" value="派单" (click)="allotWorker(data.data.id, data.data.gdState.id)" />
372
-                  <input type="button" *ngIf="data.data.gdState.value == 3 || data.data.gdState.value == 4" class="mid_bot" value="撤回" (click)="openRecallModal(data.data.id)" />
373
+                  <input type="button" *ngIf="data.data.gdState.value == 3 || data.data.gdState.value == 4" class="top_bot" value="撤回" (click)="openRecallModal(data.data.id)" />
374
+                  <input type="button" *ngIf="(data.data.gdState.value == 2 || data.data.gdState.value == 3 || data.data.gdState.value == 4) && data.data.taskType.remarksSwitch == 1" class="top_bot" value="修改备注" (click)="buildQuick(data.data)" />
373 375
                   <input type="button" *ngIf="data.data.gdState.value == 2 || data.data.gdState.value == 3 || data.data.gdState.value == 4" class="btm_bot" value="删除" (click)="openDelModal(data.data.id, 'hsms')" />
374 376
                 </div>
375 377
                 <div *ngIf="data.data.timeOut != true" class="slider sgreen" [ngStyle]="{ width: data.data.percent + '%' }"></div>
@@ -1893,3 +1895,6 @@
1893 1895
 
1894 1896
 <!-- 通话列表 -->
1895 1897
 <app-incident-ser-call [itsmData]="itsmData" [hsmsData]="hsmsData" *ngIf="callShow" (closeModelHs)="closeCall($event)"></app-incident-ser-call>
1898
+
1899
+<!-- 修改备注弹窗 -->
1900
+<app-edit-work-order-remark *ngIf="isShowBuildQuickConfirm" [buildQuickConfirmData]="buildQuickConfirmData" (cancelModal)="cancelBuildQuickConfirm($event)" (confirmModal)="confirmBuildQuickConfirm($event)" [loading5]="loadingQuick"></app-edit-work-order-remark>

+ 36 - 0
src/app/views/fuwutai/fuwutai.component.ts

@@ -5809,4 +5809,40 @@ export class FuwutaiComponent implements OnInit {
5809 5809
       }
5810 5810
     });
5811 5811
   }
5812
+
5813
+  // 修改备注
5814
+  isShowBuildQuickConfirm:boolean = false;
5815
+  buildQuickConfirmData:any = {};
5816
+  buildQuick(data){
5817
+    this.buildQuickConfirmData = data || {};
5818
+    this.isShowBuildQuickConfirm = true;
5819
+  }
5820
+  cancelBuildQuickConfirm(e){
5821
+    this.isShowBuildQuickConfirm = false;
5822
+  }
5823
+  loadingQuick:boolean = false;
5824
+  confirmBuildQuickConfirm(options){
5825
+    let { workOrderRemark} = options;
5826
+    this.maskFlag = this.msg.loading("正在加载中..", {
5827
+      nzDuration: 0,
5828
+    }).messageId;
5829
+
5830
+    let postData:any = {
5831
+      orderId: this.buildQuickConfirmData.id,
5832
+      workOrderRemark,
5833
+    };
5834
+
5835
+    this.mainService.coopWorkerOrder("editOrder", postData)
5836
+      .subscribe((result) => {
5837
+        this.msg.remove(this.maskFlag);
5838
+        this.maskFlag = false;
5839
+
5840
+        if (result.state == 200) {
5841
+          this.isShowBuildQuickConfirm = false;
5842
+          this.showPromptModal("修改备注", true, "");
5843
+        } else {
5844
+          this.showPromptModal("修改备注", false, result.msg || '');
5845
+        }
5846
+      });
5847
+  }
5812 5848
 }

+ 3 - 1
src/app/views/fuwutai/fuwutai.module.ts

@@ -3,6 +3,7 @@ import { CommonModule } from '@angular/common';
3 3
 
4 4
 import { FuwutaiRoutingModule } from './fuwutai-routing.module';
5 5
 import { FuwutaiComponent } from './fuwutai.component';
6
+import { EditWorkOrderRemarkComponent } from 'src/app/components/edit-work-order-remark/edit-work-order-remark.component'
6 7
 import { ShareModule } from 'src/app/share/share.module';
7 8
 
8 9
 import { NgxPrintModule } from 'ngx-print';
@@ -23,7 +24,8 @@ import { DisplayFormModule } from 'src/app/components/display-form/display-form.
23 24
 
24 25
 @NgModule({
25 26
   declarations: [
26
-    FuwutaiComponent
27
+    FuwutaiComponent,
28
+    EditWorkOrderRemarkComponent,
27 29
   ],
28 30
   imports: [
29 31
     CommonModule,