seimin 1 rok temu
rodzic
commit
92204cdcae

+ 5 - 0
src/app/views/main/main-routing.module.ts

@@ -193,6 +193,11 @@ const routes: Routes = [
193 193
         path: "shortcutBuildOrders",
194 194
         loadChildren: () => import("../shortcut-build-orders/shortcut-build-orders.module").then((m) => m.ShortcutBuildOrdersModule),
195 195
       },
196
+      // 快捷接单
197
+      {
198
+        path: "quickOrderAcceptance",
199
+        loadChildren: () => import("../quick-order-acceptance/quick-order-acceptance.module").then((m) => m.QuickOrderAcceptanceModule),
200
+      },
196 201
       // 通话记录列表
197 202
       {
198 203
         path: "callLog",

+ 15 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance-routing.module.ts

@@ -0,0 +1,15 @@
1
+import { NgModule } from '@angular/core';
2
+import { Routes, RouterModule } from '@angular/router';
3
+import { QuickOrderAcceptanceComponent } from './quick-order-acceptance.component';
4
+
5
+
6
+const routes: Routes = [{
7
+  path: '',
8
+  component: QuickOrderAcceptanceComponent,
9
+}];
10
+
11
+@NgModule({
12
+  imports: [RouterModule.forChild(routes)],
13
+  exports: [RouterModule]
14
+})
15
+export class QuickOrderAcceptanceRoutingModule { }

+ 130 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance.component.html

@@ -0,0 +1,130 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='6' class="list-template__searchBox">
5
+      </div>
6
+      <div nz-col nzXl='18' class="list-template__btns">
7
+        <button nz-button class="btn default" (click)='search()'>搜索</button>
8
+        <button nz-button *ngIf="coopBtns.add" class="btn ml8 default" (click)="showModal()">新增</button>
9
+        <button nz-button *ngIf="coopBtns.print" class="btn ml8 default" (click)="print($event,true)">批量打印</button>
10
+      </div>
11
+    </div>
12
+    <div class="list-template__bottom">
13
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
14
+        [nzLoading]="loading1">
15
+        <thead>
16
+          <tr class="thead">
17
+            <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
18
+              (nzCheckedChange)="checkAll($event)"></th>
19
+            <th nzWidth="15%">名称</th>
20
+            <th nzWidth="20%">绑定任务类型</th>
21
+            <th nzWidth="20%">绑定科室</th>
22
+            <th nzWidth="20%">快捷类型</th>
23
+            <th nzWidth="20%">操作</th>
24
+          </tr>
25
+        </thead>
26
+        <tbody>
27
+          <tr *ngFor="let data of listOfData;let index=index;">
28
+            <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
29
+            <td>{{ data.title }}</td>
30
+            <td>{{ data.taskNames }}</td>
31
+            <td>{{ data.deptNames }}</td>
32
+            <td>{{ data.type?.name }}</td>
33
+            <td>
34
+              <div class="coop">
35
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
36
+                <span *ngIf="coopBtns.del" (click)="del(data)">删除</span>
37
+              </div>
38
+            </td>
39
+          </tr>
40
+        </tbody>
41
+      </nz-table>
42
+      <div class="list-template__pagination">
43
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" nzShowSizeChanger [(nzPageSize)]="pageSize"
44
+          (nzPageIndexChange)="getList()" (nzPageSizeChange)="getList()">
45
+        </nz-pagination>
46
+      </div>
47
+    </div>
48
+  </div>
49
+</div>
50
+<!-- 新增/编辑模态框 -->
51
+<div class="save add display_flex align-items_center justify-content_flex-center" *ngIf="modal">
52
+  <div class="modalBody">
53
+    <div class="title">{{add?"新增":"编辑"}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i>
54
+    </div>
55
+    <overlay-scrollbars #osComponentRef1 class="content">
56
+      <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
57
+        <nz-form-item>
58
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">名称</nz-form-label>
59
+          <nz-form-control nzErrorTip="请填写名称!">
60
+            <nz-input-group>
61
+              <input type="text" nz-input formControlName="title" placeholder="请填写名称" />
62
+            </nz-input-group>
63
+          </nz-form-control>
64
+        </nz-form-item>
65
+        <nz-form-item>
66
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypeIds">绑定任务类型</nz-form-label>
67
+          <nz-form-control nzErrorTip="请选择绑定任务类型!">
68
+            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypeIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择绑定任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openTasktype($event)">
69
+              <ng-container *ngFor="let data of taskTypeList">
70
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
71
+                </nz-option>
72
+              </ng-container>
73
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
74
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
75
+              </nz-option>
76
+            </nz-select>
77
+          </nz-form-control>
78
+        </nz-form-item>
79
+        <nz-form-item>
80
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptIds">绑定科室</nz-form-label>
81
+          <nz-form-control nzErrorTip="请选择绑定科室!">
82
+            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="deptIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择绑定科室" nzServerSearch (nzOnSearch)="changeDeptInp($event)" (nzOpenChange)="openDept($event)">
83
+              <ng-container *ngFor="let data of deptList">
84
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
85
+                </nz-option>
86
+              </ng-container>
87
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
88
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
89
+              </nz-option>
90
+            </nz-select>
91
+          </nz-form-control>
92
+        </nz-form-item>
93
+        <nz-form-item>
94
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="type">快捷类型</nz-form-label>
95
+          <nz-form-control nzErrorTip="请选择快捷类型!">
96
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="type" nzShowSearch nzAllowClear nzPlaceHolder="请选择快捷类型" (nzOpenChange)="openSchedule($event)">
97
+              <ng-container *ngFor="let data of typeList">
98
+                <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
99
+                </nz-option>
100
+              </ng-container>
101
+              <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
102
+                <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
103
+              </nz-option>
104
+            </nz-select>
105
+          </nz-form-control>
106
+        </nz-form-item>
107
+      </form>
108
+    </overlay-scrollbars>
109
+    <div class="display_flex justify-content_flex-center">
110
+      <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
111
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
112
+    </div>
113
+  </div>
114
+</div>
115
+<!-- 删除模态框 -->
116
+<app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading" (confirmDelEvent)="confirmDel()" content="是否确认删除?"></app-dialog-delete>
117
+
118
+<!-- 操作成功/失败提示框 -->
119
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow" [info]="promptInfo"></app-prompt-modal>
120
+
121
+<!-- 遮罩 -->
122
+<app-mask *ngIf="maskFlag"></app-mask>
123
+
124
+<!-- 二维码打印 -->
125
+<div id="report" style="display: none">
126
+  <div *ngFor="let img of codes" style="display: inline-block;">
127
+    <img style="width: 200px;height:200px;" [src]="img.base64" alt="">
128
+    <p style="margin: 0;text-align: center; font-size: 20px;width: 200px;">{{img.name}}</p>
129
+  </div>
130
+</div>

+ 126 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance.component.less

@@ -0,0 +1,126 @@
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: 350px;
13
+    background: #fff;
14
+    border-radius: 5px;
15
+    padding: 10px 20px;
16
+    color: #333;
17
+
18
+    .title {
19
+      width: 100%;
20
+      text-align: center;
21
+      font-size: 18px;
22
+      position: relative;
23
+
24
+      i {
25
+        position: absolute;
26
+        right: 0;
27
+        top: 0;
28
+        font-size: 20px;
29
+        color: #666;
30
+        cursor: pointer;
31
+        padding: 0 5px;
32
+      }
33
+    }
34
+
35
+    .content {
36
+      width: 100%;
37
+      height: 117px;
38
+      background: #f9fafb;
39
+      border: 1px solid #e5e9ed;
40
+      border-radius: 5px;
41
+      overflow: hidden;
42
+      margin-top: 12px;
43
+
44
+      div {
45
+        text-align: center;
46
+        margin: 0;
47
+
48
+        &.icon {
49
+          margin-top: 17px;
50
+
51
+          i {
52
+            color: #34b349;
53
+            font-size: 30px !important;
54
+
55
+            &.transport-wenhao {
56
+              color: #f5a523;
57
+            }
58
+
59
+            &.transport-shibai {
60
+              color: #ff3a52;
61
+            }
62
+          }
63
+        }
64
+
65
+        &.defeat {
66
+          color: #333;
67
+          font-size: 18px;
68
+        }
69
+
70
+        &:nth-child(3) {
71
+          font-size: 14px;
72
+          color: #666;
73
+        }
74
+      }
75
+    }
76
+
77
+    button {
78
+      margin-top: 10px;
79
+
80
+      &.btn {
81
+        margin-left: 8px;
82
+      }
83
+    }
84
+  }
85
+
86
+  // 新增
87
+  &.add {
88
+    .modalBody {
89
+      width: 480px;
90
+      height: auto;
91
+
92
+      .content {
93
+        width: 100%;
94
+        height: auto;
95
+        padding: 19px 14px 0 14px;
96
+        max-height: 500px;
97
+        overflow-y: auto;
98
+
99
+        .addForm {
100
+          .ant-form-item {
101
+            margin-bottom: 8px;
102
+
103
+            .ant-form-item-label {
104
+              line-height: 14px;
105
+              text-align: left;
106
+            }
107
+          }
108
+        }
109
+
110
+        .editForm {
111
+          .ant-form-item {
112
+            margin-bottom: 14px;
113
+
114
+            .ant-form-item-label {
115
+              line-height: 0;
116
+            }
117
+          }
118
+        }
119
+      }
120
+
121
+      button:nth-child(1) {
122
+        margin-right: 20px;
123
+      }
124
+    }
125
+  }
126
+}

+ 361 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance.component.ts

@@ -0,0 +1,361 @@
1
+import { Component, OnInit, ViewChild } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { OverlayScrollbarsComponent } from "overlayscrollbars-ngx";
6
+import { ToolService } from "../../services/tool.service";
7
+import { Subject } from "rxjs";
8
+import { debounceTime } from "rxjs/operators";
9
+import { QuickOrderAcceptanceService } from './quick-order-acceptance.service';
10
+
11
+@Component({
12
+  selector: "app-quick-order-acceptance",
13
+  templateUrl: "./quick-order-acceptance.component.html",
14
+  styleUrls: ["./quick-order-acceptance.component.less"],
15
+})
16
+export class QuickOrderAcceptanceComponent implements OnInit {
17
+  @ViewChild("osComponentRef1", {
18
+    read: OverlayScrollbarsComponent,
19
+    static: false,
20
+  })
21
+  osComponentRef1: OverlayScrollbarsComponent;
22
+  constructor(
23
+    private fb: FormBuilder,
24
+    private route: ActivatedRoute,
25
+    private tool: ToolService,
26
+    private quickOrderAcceptanceService: QuickOrderAcceptanceService,
27
+  ) {}
28
+
29
+  listOfData: any[] = []; //表格数据
30
+
31
+  modal: boolean = false; //新增/编辑模态框
32
+  add: boolean; //true:新增;false:编辑
33
+  validateForm: FormGroup; //新增/编辑表单
34
+  coopId: number; //表格中执行操作的id
35
+  department: any; //所属科室
36
+  hosId: any; //院区(搜索)
37
+  typeList: Array<any>; //快捷类型
38
+  taskTypeList: Array<any>; //所有任务类型
39
+  deptList: Array<any>; //所有科室
40
+  pageIndex: number = 1; //页码
41
+  listLength: number = 10; //总条数
42
+  pageSize: number = 10; //每页条数
43
+
44
+  promptContent: string; //操作提示框提示信息
45
+  ifSuccess: boolean; //操作成功/失败
46
+  promptInfo: string; //操作结果提示信息
47
+  promptModalShow: boolean; //操作提示框是否展示
48
+
49
+  btnLoading: boolean = false; //提交按钮loading状态
50
+  changeInpSubject = new Subject(); //防抖
51
+  changeInpDeptSubject = new Subject(); //防抖
52
+
53
+  // 初始化增删改按钮
54
+  coopBtns: any = {};
55
+
56
+  ngOnInit() {
57
+    //防抖
58
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
59
+      this.getTasktype(v[0]);
60
+    });
61
+    //防抖
62
+    this.changeInpDeptSubject.pipe(debounceTime(500)).subscribe((v) => {
63
+      this.getDept(v[0]);
64
+    });
65
+    this.coopBtns = this.tool.initCoopBtns(this.route);
66
+    this.initForm();
67
+    this.hosId = this.tool.getCurrentHospital().id;
68
+    this.getList(true);
69
+  }
70
+
71
+  // 搜索
72
+  search() {
73
+    this.getList(true);
74
+  }
75
+  // 表格数据
76
+  loading1 = false;
77
+  getList(isResetPageIndex = false) {
78
+    isResetPageIndex && (this.pageIndex = 1);
79
+    let data = {
80
+      pageIndex: this.pageIndex,
81
+      pageSize: this.pageSize,
82
+      hosId: this.hosId,
83
+    };
84
+    this.loading1 = true;
85
+    this.mapOfCheckedId = {};
86
+    this.checkedDepIds = [];
87
+    this.isAllDisplayDataChecked = false;
88
+    this.quickOrderAcceptanceService
89
+      .query(data)
90
+      .subscribe((result) => {
91
+        this.loading1 = false;
92
+        result.list = result.list || [];
93
+        result.list.forEach(v => {
94
+          v.taskNames = v.taskTypeList.map(v => v.taskName).toString();
95
+          v.deptNames = v.deptList.map(v => v.dept).toString();
96
+        })
97
+        this.listOfData = result.list;
98
+        this.listLength = result.totalNum;
99
+      });
100
+  }
101
+
102
+  // 获取任务类型列表
103
+  getTasktype(keywords = '') {
104
+    let hosId = this.tool.getCurrentHospital().id;
105
+    this.isLoading = true;
106
+    this.quickOrderAcceptanceService.queryTasktype({
107
+      hosId,
108
+      keywords,
109
+    }).subscribe((res) => {
110
+      this.isLoading = false;
111
+      this.taskTypeList = res.list || [];
112
+    });
113
+  }
114
+
115
+  // 获取科室列表
116
+  getDept(keywords = '') {
117
+    let hosId = this.tool.getCurrentHospital().id;
118
+    this.isLoading = true;
119
+    this.quickOrderAcceptanceService.queryDept({
120
+      hosId,
121
+      keywords,
122
+    }).subscribe((res) => {
123
+      this.isLoading = false;
124
+      this.deptList = res.list || [];
125
+    });
126
+  }
127
+
128
+  // 获取快捷类型
129
+  getTypeList() {
130
+    this.isLoading = true;
131
+    this.quickOrderAcceptanceService.getDictionary("receiveRuleType").subscribe((res) => {
132
+      this.isLoading = false;
133
+      this.typeList = res || [];
134
+    });
135
+  }
136
+
137
+  // 新增弹框
138
+  showModal() {
139
+    this.add = true;
140
+    this.modal = true;
141
+    this.initForm();
142
+  }
143
+  hideModal() {
144
+    this.modal = false;
145
+    this.initForm();
146
+  }
147
+
148
+  // 初始化新增form表单
149
+  initForm() {
150
+    if (this.add) {
151
+      this.typeList = [];
152
+      this.taskTypeList = [];
153
+      this.deptList = [];
154
+    }
155
+    this.validateForm = this.fb.group({
156
+      title: ['', [Validators.required]],
157
+      taskTypeIds: [null, [Validators.required]],
158
+      deptIds: [null, [Validators.required]],
159
+      type: [null, [Validators.required]],
160
+    });
161
+  }
162
+  // 表单提交
163
+  submitForm(): void {
164
+    for (const i in this.validateForm.controls) {
165
+      this.validateForm.controls[i].markAsDirty({ onlySelf: true });
166
+      this.validateForm.controls[i].updateValueAndValidity();
167
+    }
168
+    if (this.validateForm.invalid) return;
169
+    this.btnLoading = true;
170
+    if(this.add){
171
+      this.quickOrderAcceptanceService
172
+      .add({
173
+        title: this.validateForm.value.title,
174
+        taskTypeIds: this.validateForm.value.taskTypeIds,
175
+        deptIds: this.validateForm.value.deptIds,
176
+        type: {id: this.validateForm.value.type},
177
+        hosId: this.hosId,
178
+      })
179
+      .subscribe((data) => {
180
+        this.btnLoading = false;
181
+        this.hideModal();
182
+        this.initForm();
183
+        if (data.status == 200) {
184
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
185
+        } else {
186
+          this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
187
+        }
188
+      });
189
+    }else{
190
+      this.quickOrderAcceptanceService
191
+      .update({
192
+        title: this.validateForm.value.title,
193
+        taskTypeIds: this.validateForm.value.taskTypeIds,
194
+        deptIds: this.validateForm.value.deptIds,
195
+        type: {id: this.validateForm.value.type},
196
+        coopData: this.coopData,
197
+      })
198
+      .subscribe((data) => {
199
+        this.btnLoading = false;
200
+        this.hideModal();
201
+        this.initForm();
202
+        if (data.status == 200) {
203
+          this.showPromptModal(this.add ? "新增" : "编辑", true, "");
204
+        } else {
205
+          this.showPromptModal(this.add ? "新增" : "编辑", false, data.msg);
206
+        }
207
+      });
208
+    }
209
+  }
210
+
211
+  // 选中表格中科室
212
+  mapOfCheckedId: { [key: string]: boolean } = {};
213
+  checkedDepIds = []; //已选中科室id
214
+  refreshStatus(): void {
215
+    this.isAllDisplayDataChecked = this.listOfData.every(
216
+      (item) => this.mapOfCheckedId[item.id]
217
+    );
218
+    let arr = [];
219
+    for (var k in this.mapOfCheckedId) {
220
+      if (this.mapOfCheckedId[k]) {
221
+        arr.push(Number(k));
222
+      }
223
+    }
224
+    this.checkedDepIds = arr;
225
+    console.log(this.checkedDepIds);
226
+  }
227
+
228
+  //表格整行选中
229
+  selectedListData(id) {
230
+    this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
231
+    this.refreshStatus();
232
+  }
233
+
234
+  // 全选
235
+  isAllDisplayDataChecked = false; //当前页是否全选
236
+  checkAll(value: boolean): void {
237
+    this.listOfData.forEach((item) => (this.mapOfCheckedId[item.id] = value));
238
+    this.refreshStatus();
239
+  }
240
+
241
+  // 打印
242
+  codes = []; //二维码
243
+  printLoading: boolean = false; //批量打印按钮loading状态
244
+  print(e, batch, id?) {
245
+    e.stopPropagation();
246
+    this.printLoading = true;
247
+    this.quickOrderAcceptanceService
248
+      .print({
249
+        ids: batch ? this.checkedDepIds.toString() : id.toString()
250
+      })
251
+      .subscribe((data) => {
252
+        this.codes = data.data;
253
+        this.printLoading = false;
254
+        setTimeout(() => {
255
+          const printContent = document.getElementById("report");
256
+          const WindowPrt = window.open("", "", "width=700,height=900");
257
+          WindowPrt.document.write(printContent.innerHTML);
258
+          WindowPrt.document.close();
259
+          WindowPrt.focus();
260
+          WindowPrt.print();
261
+          WindowPrt.close();
262
+        }, 100);
263
+      });
264
+  }
265
+
266
+  // 编辑
267
+  maskFlag: any = false;
268
+  coopData = {};
269
+  edit(data) {
270
+    this.validateForm.controls.title.setValue(data.title);
271
+    this.validateForm.controls.type.setValue(data.type ? data.type.id : null);
272
+    this.validateForm.controls.taskTypeIds.setValue(data.taskTypeList ? data.taskTypeList.map(v => v.id) : null);
273
+    this.validateForm.controls.deptIds.setValue(data.deptList ? data.deptList.map(v => v.id) : null);
274
+    this.modal = true;
275
+    this.add = false;
276
+    this.coopId = data.id;
277
+    this.coopData = data;
278
+    this.getTasktype();
279
+    this.getDept();
280
+    this.getTypeList();
281
+  }
282
+
283
+  // 删除
284
+  delModal: boolean = false; //删除模态框
285
+  del(data) {
286
+    this.coopId = data.id;
287
+    this.delModal = true;
288
+  }
289
+  // 确认删除
290
+  confirmDel() {
291
+    this.btnLoading = true;
292
+    this.quickOrderAcceptanceService
293
+      .delete({
294
+        id: this.coopId
295
+      })
296
+      .subscribe((data) => {
297
+        this.btnLoading = false;
298
+        this.hideDelModal();
299
+        if (data.status == 200) {
300
+          if (this.listOfData.length == 1 && this.pageIndex == Math.ceil(this.listLength / this.pageSize)) {
301
+            this.listLength--;
302
+            this.pageIndex = Math.ceil(this.listLength / this.pageSize);
303
+          }
304
+          this.showPromptModal("删除", true, "");
305
+        } else {
306
+          this.showPromptModal("删除", false, data.msg);
307
+        }
308
+      });
309
+  }
310
+
311
+  // 关闭删除模态框
312
+  hideDelModal() {
313
+    this.delModal = false;
314
+  }
315
+
316
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
317
+  showPromptModal(con, success, promptInfo?) {
318
+    this.promptModalShow = false;
319
+    this.promptContent = con;
320
+    this.ifSuccess = success;
321
+    this.promptInfo = promptInfo;
322
+    setTimeout(() => {
323
+      this.promptModalShow = true;
324
+    }, 100);
325
+    this.getList(true);
326
+  }
327
+
328
+  // 边输边搜节流阀
329
+  isLoading = false;
330
+  changeInp(e) {
331
+    this.changeInpSubject.next([e]);
332
+  }
333
+
334
+  // 边输边搜节流阀
335
+  changeDeptInp(e) {
336
+    this.changeInpDeptSubject.next([e]);
337
+  }
338
+
339
+  // 打开任务类型
340
+  openTasktype(e){
341
+    if(e){
342
+      this.getTasktype();
343
+    }
344
+  }
345
+
346
+  // 打开科室
347
+  openDept(e){
348
+    if(e){
349
+      this.getDept();
350
+    }
351
+  }
352
+
353
+  // 打开班次
354
+  openSchedule(e){
355
+    if(e){
356
+      this.getTypeList();
357
+    }
358
+  }
359
+}
360
+
361
+

+ 19 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance.module.ts

@@ -0,0 +1,19 @@
1
+import { NgModule } from '@angular/core';
2
+import { CommonModule } from '@angular/common';
3
+
4
+import { QuickOrderAcceptanceRoutingModule } from './quick-order-acceptance-routing.module';
5
+import { ShareModule } from 'src/app/share/share.module';
6
+import { QuickOrderAcceptanceComponent } from './quick-order-acceptance.component';
7
+
8
+
9
+@NgModule({
10
+  declarations: [
11
+    QuickOrderAcceptanceComponent,
12
+  ],
13
+  imports: [
14
+    CommonModule,
15
+    QuickOrderAcceptanceRoutingModule,
16
+    ShareModule,
17
+  ]
18
+})
19
+export class QuickOrderAcceptanceModule { }

+ 107 - 0
src/app/views/quick-order-acceptance/quick-order-acceptance.service.ts

@@ -0,0 +1,107 @@
1
+import { Injectable } from '@angular/core';
2
+import { MainService } from 'src/app/services/main.service';
3
+import { map } from 'rxjs/operators';
4
+
5
+@Injectable({
6
+  providedIn: 'root'
7
+})
8
+export class QuickOrderAcceptanceService {
9
+  constructor(
10
+    private mainService: MainService,
11
+  ) { }
12
+
13
+  // 列表-查
14
+  query({pageIndex, pageSize, hosId}) {
15
+    let data = {
16
+      idx: pageIndex - 1,
17
+      sum: pageSize,
18
+      receiveOrderRule: {
19
+        hosId,
20
+      },
21
+    };
22
+    return this.mainService.getFetchDataList("simple/data", "receiveOrderRule", data);
23
+  }
24
+
25
+  // 列表-删
26
+  delete({id}) {
27
+    return this.mainService.simplePost("rmvData", "receiveOrderRule", [id]);
28
+  }
29
+
30
+  // 列表-增
31
+  add({title, type, taskTypeIds, deptIds, hosId}) {
32
+    let data = {
33
+      title,
34
+      taskTypeIds: taskTypeIds.toString(),
35
+      deptIds: deptIds.toString(),
36
+      type,
37
+      hosId,
38
+    };
39
+    return this.mainService.simplePost("addData", "receiveOrderRule", data);
40
+  }
41
+
42
+  // 列表-改
43
+  update({title, type, taskTypeIds, deptIds, coopData}) {
44
+    let data = {
45
+      title,
46
+      taskTypeIds: taskTypeIds.toString(),
47
+      deptIds: deptIds.toString(),
48
+      type,
49
+    };
50
+    data = {...coopData, ...data};
51
+    return this.mainService.simplePost("addData", "receiveOrderRule", data);
52
+  }
53
+
54
+  // 查询任务类型
55
+  queryTasktype({hosId, keywords}){
56
+    let postData = {
57
+      taskType: {
58
+        simpleQuery: true,
59
+        hosId: {id: hosId},
60
+        taskName: keywords,
61
+      },
62
+      idx: 0,
63
+      sum: 9999,
64
+    };
65
+    return this.mainService.getFetchDataList("configuration", "taskType", postData).pipe(map((v:any) => {
66
+      if(Array.isArray(v.list)){
67
+        v.list = v.list.map(vv => ({id: vv.id, name: vv.taskName}));
68
+      }else{
69
+        v.list = [];
70
+      }
71
+      return v;
72
+    }));
73
+  }
74
+
75
+  // 查询科室
76
+  queryDept({hosId, keywords}){
77
+    let postData = {
78
+      department: {
79
+        simpleQuery: true,
80
+        hospital: {id: hosId},
81
+        dept: keywords,
82
+      },
83
+      idx: 0,
84
+      sum: 9999,
85
+    };
86
+    return this.mainService.getFetchDataList("data", "department", postData).pipe(map((v:any) => {
87
+      if(Array.isArray(v.list)){
88
+        v.list = v.list.map(vv => ({id: vv.id, name: vv.dept}));
89
+      }else{
90
+        v.list = [];
91
+      }
92
+      return v;
93
+    }));
94
+  }
95
+
96
+  // 字典
97
+  getDictionary(type) {
98
+    return this.mainService.getDictionary("list", type);
99
+  }
100
+
101
+  // 打印二维码
102
+  print(ids) {
103
+    return this.mainService.coopWorkerOrder("generateReceiveCodes", ids)
104
+  }
105
+}
106
+
107
+

+ 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.35');
11
+    console.info('v2.4.36');
12 12
   }
13 13
 }
14 14
 platformBrowserDynamic().bootstrapModule(AppModule)