seimin 1 anno fa
parent
commit
ba3e3871d7

+ 54 - 0
src/app/share/relationTrans-detail-modal/relationTrans-detail-modal.component.html

@@ -0,0 +1,54 @@
1
+<div class="modal display_flex justify-content_flex-center align-items_center" *ngIf="show">
2
+  <div class="modalBody" style="width: 1200px;">
3
+    <div class="title">{{otherBindConfigDto.relationTrans.name}}<i class="icon_transport transport-guanbi" (click)="hideModal()"></i></div>
4
+    <div class="content">
5
+      <!-- 血制品 -->
6
+      <nz-table class="hospitalTable" [nzData]="dataList" nzSize="middle" [nzShowPagination]="false" [nzData]="dataList"
7
+        [nzLoading]="hsLoading" (nzCurrentPageDataChange)="currentPageDataChange($event)" [nzScroll]="{ y: '500px' }">
8
+        <thead>
9
+          <tr class="thead">
10
+            <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked" [nzIndeterminate]="isIndeterminate"
11
+              (nzCheckedChange)="checkAll($event)"></th>
12
+            <th nzWidth="5%">序号</th>
13
+            <th nzWidth="10%">住院号</th>
14
+            <th nzWidth="10%">次数</th>
15
+            <th nzWidth="10%">姓名</th>
16
+            <th nzWidth="10%">性别</th>
17
+            <th nzWidth="10%">床位</th>
18
+            <th nzWidth="10%">医疗小组</th>
19
+            <th nzWidth="10%">出院时间</th>
20
+            <th nzWidth="10%">条形码</th>
21
+            <th nzWidth="10%">出院科室</th>
22
+          </tr>
23
+        </thead>
24
+        <tbody>
25
+          <tr *ngFor="let data of dataList;let i = index;" (click)="selectedListData(data.id)">
26
+            <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" [nzDisabled]="data.disabled" (nzCheckedChange)="refreshStatus()"></td>
27
+            <td>{{ (pageIndex - 1) * pageSize + i + 1 }}</td>
28
+            <td>{{ data.residenceNo || ''}}</td>
29
+            <td>{{ data.extra2 || '' }}</td>
30
+            <td>{{ data.patientName || '' }}</td>
31
+            <td>{{ data.extra3 || '' }}</td>
32
+            <td>{{ data.extra4 || '' }}</td>
33
+            <td>{{ data.extra5 || '' }}</td>
34
+            <td>{{ data.extra1Time | date:"yyyy-MM-dd" }}<br>{{ data.extra1Time | date:"HH:mm:ss" }}</td>
35
+            <td>{{ data.code || '' }}</td>
36
+            <td>{{ data.startDept || '' }}</td>
37
+          </tr>
38
+        </tbody>
39
+      </nz-table>
40
+
41
+      <div class="pagination">
42
+        <ng-template #totalTemplate let-total> 共 {{ total }} 条 </ng-template>
43
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="total"
44
+          [(nzPageSize)]="pageSize" (nzPageIndexChange)="getList()"
45
+          (nzPageSizeChange)="getList()" [nzShowTotal]="totalTemplate">
46
+        </nz-pagination>
47
+      </div>
48
+    </div>
49
+    <div class="display_flex justify-content_flex-center">
50
+      <button class="btn" nz-button nzType="primary" (click)="confirmModal()">确认</button>
51
+      <button class="btn cancel" nz-button nzType="default" (click)="hideModal()">取消</button>
52
+    </div>
53
+  </div>
54
+</div>

+ 201 - 0
src/app/share/relationTrans-detail-modal/relationTrans-detail-modal.component.less

@@ -0,0 +1,201 @@
1
+@import "../../../../src/theme.less";
2
+.modal {
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: 999;
10
+  .hospitalTable {
11
+    width: 100%;
12
+    td {
13
+      text-align: center !important;
14
+      position: relative;
15
+      word-break: break-all;
16
+    }
17
+    .thead {
18
+      background-image: linear-gradient(to right, @bg-start, @bg-end);
19
+      th {
20
+        text-align: center !important;
21
+        color: #fff;
22
+        background: transparent;
23
+      }
24
+    }
25
+  }
26
+
27
+  .ji {
28
+    position: absolute;
29
+    right: 0px;
30
+    top: -3px;
31
+    width: 30px;
32
+  }
33
+
34
+  .list-template__top{
35
+    div{
36
+      text-align: left!important;
37
+    }
38
+  }
39
+
40
+  .tab {
41
+    width: 100%;
42
+    height: 60px;
43
+    border-bottom: 1px solid #e5e9ed;
44
+    background-color: #fff;
45
+
46
+    .item {
47
+      text-align: center;
48
+      line-height: 60px;
49
+      height: 100%;
50
+      border-right: 1px solid #e5e9ed;
51
+
52
+      &:nth-last-child(1) {
53
+        border: none;
54
+      }
55
+
56
+      &.checked {
57
+        background: #f0f6ed;
58
+      }
59
+    }
60
+  }
61
+
62
+  .modalBody {
63
+    width: 700px;
64
+    min-height: 220px;
65
+    background: #fff;
66
+    border-radius: 5px;
67
+    padding: 10px 20px;
68
+    color: #333;
69
+    &.modalBody-search {
70
+      width: 480px;
71
+      min-height: 250px;
72
+    }
73
+
74
+    .title {
75
+      width: 100%;
76
+      text-align: center;
77
+      font-size: 18px;
78
+      position: relative;
79
+
80
+      i {
81
+        position: absolute;
82
+        right: 0;
83
+        top: 0;
84
+        font-size: 20px;
85
+        color: #666;
86
+        cursor: pointer;
87
+        padding: 0 5px;
88
+      }
89
+    }
90
+
91
+    .content {
92
+      min-height: 117px;
93
+      background: #f9fafb;
94
+      border: 1px solid #e5e9ed;
95
+      border-radius: 5px;
96
+      overflow: hidden;
97
+      margin-top: 12px;
98
+      display: flex;
99
+      flex-direction: column;
100
+      justify-content: center;
101
+      align-items: center;
102
+      &.content-search {
103
+        min-height: 147px;
104
+        justify-content: start;
105
+        .defeat-search {
106
+          width: 100%;
107
+          height: 52px;
108
+          display: flex;
109
+          justify-content: center;
110
+          align-items: center;
111
+          border-bottom: solid 1px #e5e9ed;
112
+          em {
113
+            color: #666;
114
+            font-style: normal;
115
+          }
116
+        }
117
+        .form {
118
+          width: 100%;
119
+          padding: 0 16px;
120
+          .ant-form-item-label,
121
+          .ant-form-explain {
122
+            text-align: left !important;
123
+          }
124
+        }
125
+      }
126
+
127
+      div {
128
+        text-align: center;
129
+        margin: 0;
130
+
131
+        &.defeat {
132
+          color: #333;
133
+          font-size: 28px;
134
+        }
135
+        &.countDown {
136
+          font-size: 14px;
137
+          color: 666;
138
+          em {
139
+            font-style: normal;
140
+            color: @primary-color;
141
+          }
142
+        }
143
+
144
+        &.pagination {
145
+          font-size: 14px;
146
+          color: #666;
147
+          padding-top: 16px;
148
+          padding-bottom: 16px;
149
+        }
150
+      }
151
+    }
152
+
153
+    button {
154
+      margin-top: 10px;
155
+
156
+      &.btn {
157
+        margin-left: 8px;
158
+      }
159
+    }
160
+  }
161
+
162
+  // 新增
163
+  &.add {
164
+    .modalBody {
165
+      width: 480px;
166
+      height: auto;
167
+
168
+      .content {
169
+        width: 100%;
170
+        height: auto;
171
+        padding: 18px 14px 0 14px;
172
+
173
+        .addForm {
174
+          .ant-form-item {
175
+            margin-bottom: 15px;
176
+
177
+            .ant-form-item-label {
178
+              line-height: 0;
179
+            }
180
+          }
181
+        }
182
+
183
+        .editForm {
184
+          .ant-form-item {
185
+            margin-bottom: 15px;
186
+
187
+            .ant-form-item-label {
188
+              line-height: 0;
189
+            }
190
+          }
191
+        }
192
+      }
193
+
194
+      button {
195
+        &:nth-child(1) {
196
+          margin-right: 20px;
197
+        }
198
+      }
199
+    }
200
+  }
201
+}

+ 143 - 0
src/app/share/relationTrans-detail-modal/relationTrans-detail-modal.component.ts

@@ -0,0 +1,143 @@
1
+import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
2
+import { MainService } from '../../services/main.service';
3
+import { ToolService } from 'src/app/services/tool.service';
4
+@Component({
5
+  selector: 'app-relationTrans-detail-modal',
6
+  templateUrl: './relationTrans-detail-modal.component.html',
7
+  styleUrls: ['./relationTrans-detail-modal.component.less']
8
+})
9
+export class RelationTransDetailModalComponent implements OnInit {
10
+  // 切换科室,切换弹窗
11
+  isAllDisplayDataChecked = false;
12
+  listOfDisplayData: any[] = [];
13
+  mapOfCheckedId: { [key: string]: boolean } = {};
14
+  isIndeterminate = false;
15
+
16
+  hosId;
17
+  hsLoading = false;
18
+  dataList: any = [];// 血制品列表
19
+  pageIndex: number = 1;//表格当前页码
20
+  pageSize: number = 5;//表格每页展示条数
21
+  total: number = 0;//表格总数据量
22
+  searchCriteria:any = {
23
+    stype: 0,
24
+    specimenDesc: 0,
25
+  }
26
+  @Input() show: Boolean;
27
+  @Input() otherBindConfigDto: any;
28
+
29
+  @Output() closeModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
30
+  @Output() confirmModelHs = new EventEmitter<any>();//1.组件暴露一个 EventEmitter 属性,当事件发生时,子组件利用该属性 emits(向上弹射)事件
31
+
32
+  constructor(private mainService: MainService, private tool: ToolService) { }
33
+
34
+  ngOnInit() {
35
+    this.hosId = this.tool.getCurrentHospital().id;
36
+    this.tabType = 1;
37
+    this.getOtherTransState();
38
+  }
39
+
40
+  currentPageDataChange($event: any[]): void {
41
+    this.listOfDisplayData = this.dataList; //改变页数,长度也要变
42
+    this.refreshStatus();
43
+  }
44
+
45
+  refreshStatus(): void {
46
+    this.isAllDisplayDataChecked = this.listOfDisplayData.every(
47
+      (item) => this.mapOfCheckedId[item.id]
48
+    );
49
+    this.isIndeterminate =
50
+      this.listOfDisplayData.some((item) => this.mapOfCheckedId[item.id]) &&
51
+      !this.isAllDisplayDataChecked;
52
+  }
53
+
54
+  // 开通科室选择整行
55
+  selectedListData(id) {
56
+    this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
57
+    this.refreshStatus();
58
+  }
59
+
60
+  checkAll(value: boolean): void {
61
+    this.listOfDisplayData.forEach(
62
+      (item) => (this.mapOfCheckedId[item.id] = value)
63
+    );
64
+    this.refreshStatus();
65
+  }
66
+
67
+  // 确认弹窗
68
+  confirmModal() {
69
+    console.log(this.mapOfCheckedId);
70
+    let otherList = [];
71
+    for (const key in this.mapOfCheckedId) {
72
+      if (this.mapOfCheckedId[key]) {
73
+        otherList.push({id: key});
74
+      }
75
+    }
76
+    this.confirmModelHs.emit(JSON.stringify({ show: false, otherList }));//emits(向上弹射)事件
77
+  }
78
+
79
+  // 关闭弹窗
80
+  hideModal() {
81
+    this.closeModelHs.emit(JSON.stringify({ show: false }));//emits(向上弹射)事件
82
+  }
83
+
84
+  // 切换tab栏
85
+  tabType: number = 1; //tab栏
86
+  checkTab(type) {
87
+    this.tabType = type;
88
+  }
89
+
90
+  // 切换标本类型下拉框
91
+  selectStype(e){
92
+    console.log(e);
93
+    this.searchCriteria.specimenDesc = 0;
94
+  }
95
+
96
+  // 切换标本类型下拉框
97
+  selectDesc(e){
98
+    console.log(e);
99
+  }
100
+
101
+  // 分页获取数据
102
+  getList(){
103
+    this.getOther();
104
+  }
105
+
106
+  //获取状态
107
+  other_trans_state1; // 未建单
108
+  getOtherTransState() {
109
+    this.mainService.getDictionary("list", "other_trans_state").subscribe((data) => {
110
+      this.other_trans_state1 = data.find(v => v.value == 1);
111
+      if(this.other_trans_state1){
112
+        this.getOther(1);
113
+      }
114
+    });
115
+  }
116
+
117
+  // 获取列表数据
118
+  getOther(idx?) {
119
+    if (idx) {
120
+      this.pageIndex = 1;
121
+    }
122
+    let postData = {
123
+      idx: this.pageIndex - 1,
124
+      sum: this.pageSize,
125
+      other: {
126
+        taskTypeId: this.otherBindConfigDto.taskTypeId,
127
+        relationTrans: this.otherBindConfigDto.relationTrans,
128
+        hosId: this.hosId,
129
+        state: this.other_trans_state1,
130
+      }
131
+    }
132
+    this.hsLoading = true;
133
+    this.mainService.getFetchDataList('simple/data','other',postData).subscribe(data => {
134
+      this.hsLoading = false;
135
+      this.dataList = data.list || [];
136
+      this.total = data.totalNum || 0;
137
+    })
138
+  }
139
+
140
+}
141
+
142
+
143
+

+ 4 - 0
src/app/share/share.module.ts

@@ -38,6 +38,7 @@ import { ImageViewerComponent } from './image-viewer/image-viewer.component';
38 38
 import { SpePromptModalComponent } from './spe-prompt-modal/spe-prompt-modal.component';
39 39
 import { OrderPromptModalComponent } from './order-prompt-modal/order-prompt-modal.component';
40 40
 import { BusinessDataDetailModalComponent } from './businessData-detail-modal/businessData-detail-modal.component';
41
+import { RelationTransDetailModalComponent } from './relationTrans-detail-modal/relationTrans-detail-modal.component';
41 42
 import { DetailBloodComponent } from './detail-blood/detail-blood.component';
42 43
 import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/blood-history-prompt-modal.component';
43 44
 
@@ -56,6 +57,7 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
56 57
     HsPromptModalComponent,
57 58
     HistoryPromptModalComponent,
58 59
     BusinessDataDetailModalComponent,
60
+    RelationTransDetailModalComponent,
59 61
     BxPromptModalComponent,
60 62
     AppraiseDetailComponent,
61 63
     OrderDetailComponent,
@@ -77,6 +79,7 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
77 79
     SpePromptModalComponent,
78 80
     OrderPromptModalComponent,
79 81
     BusinessDataDetailModalComponent,
82
+    RelationTransDetailModalComponent,
80 83
     DetailBloodComponent,
81 84
     BloodHistoryPromptModalComponent,
82 85
   ],
@@ -104,6 +107,7 @@ import { BloodHistoryPromptModalComponent } from './blood-history-prompt-modal/b
104 107
     HsPromptModalComponent,
105 108
     HistoryPromptModalComponent,
106 109
     BusinessDataDetailModalComponent,
110
+    RelationTransDetailModalComponent,
107 111
     BxPromptModalComponent,
108 112
     AppraiseDetailComponent,
109 113
     OrderDetailComponent,

+ 14 - 0
src/app/views/associated-data/associated-data-routing.module.ts

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

+ 113 - 0
src/app/views/associated-data/associated-data.component.html

@@ -0,0 +1,113 @@
1
+<div class="list-template">
2
+  <div class="list-template__content">
3
+    <div class="list-template__top" nz-row>
4
+      <div nz-col nzXl='18' class="list-template__searchBox"></div>
5
+      <div nz-col nzLg="6" class="list-template__btns">
6
+        <button nz-button *ngIf="coopBtns.add" class="btn default" (click)="addModal()">新增</button>
7
+      </div>
8
+    </div>
9
+    <div class="list-template__bottom">
10
+      <nz-table class="list-template__nzTable" [nzData]="listOfData" nzSize="middle" [nzShowPagination]="false"
11
+        [nzLoading]="loading1">
12
+        <thead>
13
+          <tr class="thead">
14
+            <th nzWidth="5%">序号</th>
15
+            <th nzWidth="15%">业务名称</th>
16
+            <th nzWidth="15%">任务类型</th>
17
+            <th nzWidth="15%">关联业务</th>
18
+            <th nzWidth="15%">关联表</th>
19
+            <th nzWidth="10%">发起时是否弹窗选择</th>
20
+            <th nzWidth="25%">操作</th>
21
+          </tr>
22
+        </thead>
23
+        <tbody>
24
+          <tr *ngFor="let data of listOfData;let index = index">
25
+            <td>{{index+(pageIndex-1) * pageSize + 1}}</td>
26
+            <td>{{data.name || ''}}</td>
27
+            <td>{{data.taskTypeDTO ? data.taskTypeDTO.taskName : ''}}</td>
28
+            <td>{{data.relationTrans ? data.relationTrans.name : ''}}</td>
29
+            <td>{{data.relationTable || ''}}</td>
30
+            <td>{{data.startAlert == 1 ? '是' : '否'}}</td>
31
+            <td>
32
+              <div class="coop">
33
+                <span *ngIf="coopBtns.del&&!data.status" (click)="showDelModal(data,'您确认要删除吗?','删除','del')">删除</span>
34
+                <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
35
+              </div>
36
+            </td>
37
+          </tr>
38
+        </tbody>
39
+      </nz-table>
40
+      <div class="list-template__pagination">
41
+        <nz-pagination [(nzPageIndex)]="pageIndex" [(nzTotal)]="listLength" [(nzPageSize)]="pageSize"
42
+          (nzPageIndexChange)="getList(0)" (nzPageSizeChange)="getList(0)">
43
+        </nz-pagination>
44
+      </div>
45
+    </div>
46
+  </div>
47
+
48
+  <!-- 新增/编辑/复制模态框 -->
49
+  <div class="save display_flex justify-content_flex-center align-items_center add" *ngIf="modal">
50
+    <div class="modalBody">
51
+      <div class="title">{{modelName}}<i class="icon_transport transport-guanbi" (click)="hideAddModal()"></i></div>
52
+      <div class="content">
53
+        <form nz-form [formGroup]="validateForm" class="addForm">
54
+          <nz-form-item>
55
+            <nz-form-label [nzSpan]="24" nzRequired nzFor="name">业务名称</nz-form-label>
56
+            <nz-form-control nzErrorTip="请输入业务名称!">
57
+              <nz-input-group>
58
+                <input nz-input formControlName="name" placeholder="请输入业务名称" />
59
+              </nz-input-group>
60
+            </nz-form-control>
61
+          </nz-form-item>
62
+          <nz-form-item>
63
+            <nz-form-label [nzSpan]="24" nzRequired nzFor="taskType">任务类型</nz-form-label>
64
+            <nz-form-control nzErrorTip="请选择任务类型!">
65
+              <nz-select class="formItem" (nzOnSearch)="changeInp($event, 'taskType')" [nzDropdownMatchSelectWidth]="false" nzServerSearch nzShowSearch nzPlaceHolder="请选择任务类型" formControlName="taskType" (nzOpenChange)="getTaskTypeList($event)">
66
+                <ng-container *ngFor="let option of taskTypeList">
67
+                  <nz-option *ngIf="!isLoading" [nzLabel]="option.taskName" [nzValue]="option.id"></nz-option>
68
+                </ng-container>
69
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
70
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
71
+                </nz-option>
72
+              </nz-select>
73
+            </nz-form-control>
74
+          </nz-form-item>
75
+          <nz-form-item>
76
+            <nz-form-label [nzSpan]="24" nzRequired nzFor="relationTrans">业务类型</nz-form-label>
77
+            <nz-form-control nzErrorTip="请选择业务类型!">
78
+              <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" nzShowSearch nzPlaceHolder="请选择业务类型" formControlName="relationTrans" (nzOpenChange)="getRelationTransList($event)">
79
+                <ng-container *ngFor="let option of relationTransList">
80
+                  <nz-option *ngIf="!isLoading" [nzLabel]="option.name" [nzValue]="option.id"></nz-option>
81
+                </ng-container>
82
+                <nz-option *ngIf="isLoading" nzDisabled nzCustomContent>
83
+                  <i nz-icon nzType="loading" class="loading-icon"></i> 搜索中...
84
+                </nz-option>
85
+              </nz-select>
86
+            </nz-form-control>
87
+          </nz-form-item>
88
+          <nz-form-item>
89
+            <nz-form-label [nzSpan]="10" nzRequired nzFor="startAlert">发起时是否弹窗选择</nz-form-label>
90
+            <nz-form-control [nzSpan]="14" nzErrorTip="请选择发起时是否弹窗选择!">
91
+              <nz-radio-group formControlName="startAlert">
92
+                <label nz-radio [nzValue]="1">是</label>
93
+                <label nz-radio [nzValue]="0">否</label>
94
+              </nz-radio-group>
95
+            </nz-form-control>
96
+          </nz-form-item>
97
+        </form>
98
+      </div>
99
+      <div class=" display_flex justify-content_flex-center">
100
+        <button nzType="primary" nz-button (click)="submitForm()" [nzLoading]="btnLoading">确认</button>
101
+        <button class="btn cancel" nz-button nzType="default" (click)="hideAddModal()">取消</button>
102
+      </div>
103
+    </div>
104
+  </div>
105
+  <!-- 删除模态框 -->
106
+  <app-dialog-delete [delModal]="delModal" (hideDelModalEvent)="hideDelModal()" [btnLoading]="btnLoading"
107
+    (confirmDelEvent)="confirmDel()" [content]="tipsMsg1"></app-dialog-delete>
108
+</div>
109
+<!-- 操作成功/失败提示框 -->
110
+<app-prompt-modal *ngIf="promptModalShow" [content]="promptContent" [success]="ifSuccess" [show]="promptModalShow"
111
+  [info]="promptInfo">
112
+</app-prompt-modal>
113
+

+ 167 - 0
src/app/views/associated-data/associated-data.component.less

@@ -0,0 +1,167 @@
1
+@import "../../../../src/theme.less";
2
+
3
+:host {
4
+  ::ng-deep .ant-calendar-picker {
5
+    width: 100% !important;
6
+  }
7
+}
8
+.save {
9
+  position: fixed;
10
+  left: 0;
11
+  top: 0;
12
+  width: 100%;
13
+  height: 100%;
14
+  background: rgba(0, 0, 0, 0.4);
15
+  z-index: 99;
16
+
17
+  .modalBody {
18
+    width: 350px;
19
+    background: #fff;
20
+    border-radius: 5px;
21
+    padding: 10px 20px;
22
+    color: #333;
23
+
24
+    .title {
25
+      width: 100%;
26
+      text-align: center;
27
+      font-size: 18px;
28
+      position: relative;
29
+
30
+      i {
31
+        position: absolute;
32
+        right: 0;
33
+        top: 0;
34
+        font-size: 20px;
35
+        color: #666;
36
+        cursor: pointer;
37
+        padding: 0 5px;
38
+      }
39
+    }
40
+
41
+    .content {
42
+      width: 310px;
43
+      background: #f9fafb;
44
+      border: 1px solid #e5e9ed;
45
+      border-radius: 5px;
46
+      overflow: hidden;
47
+      margin-top: 12px;
48
+      padding: 16px 0;
49
+
50
+      & > div {
51
+        text-align: center;
52
+        margin: 0;
53
+
54
+        &.icon {
55
+          // margin-top: 17px;
56
+
57
+          i {
58
+            color: #34b349;
59
+            font-size: 30px !important;
60
+
61
+            &.transport-wenhao {
62
+              color: #f5a523;
63
+            }
64
+
65
+            &.transport-shibai {
66
+              color: #ff3a52;
67
+            }
68
+          }
69
+        }
70
+
71
+        &.defeat {
72
+          color: #333;
73
+          font-size: 14px;
74
+        }
75
+
76
+        &:nth-child(3) {
77
+          font-size: 14px;
78
+          color: #666;
79
+        }
80
+      }
81
+      .workAssignmentTips {
82
+        font-size: 12px;
83
+      }
84
+    }
85
+
86
+    button {
87
+      margin-top: 10px;
88
+
89
+      &.btn {
90
+        margin-left: 8px;
91
+      }
92
+    }
93
+  }
94
+
95
+  // 新增
96
+  &.add {
97
+    .modalBody {
98
+      width: 480px;
99
+      height: auto;
100
+
101
+      .content {
102
+        width: 100%;
103
+        height: auto;
104
+        padding: 16px;
105
+        max-height: 497px;
106
+        overflow-y: auto;
107
+
108
+        .addForm {
109
+          .workAssignmentDescribe {
110
+            margin-top: 8px;
111
+          }
112
+          .ant-form-item {
113
+            margin-bottom: 0;
114
+
115
+            .ant-form-item-label {
116
+              text-align: left;
117
+            }
118
+
119
+            .desc {
120
+              margin-top: 5px;
121
+            }
122
+          }
123
+
124
+          .datesControl {
125
+            margin-top: -16px;
126
+
127
+            .ant-form-item-label {
128
+              line-height: 40px;
129
+            }
130
+          }
131
+
132
+          .timer {
133
+            .ant-form-item-label {
134
+              width: 100%;
135
+              text-align: left;
136
+            }
137
+
138
+            .numInp {
139
+              margin-right: 5px;
140
+            }
141
+
142
+            .line {
143
+              margin-right: 5px;
144
+            }
145
+          }
146
+
147
+          .timer2 {
148
+            .ant-form-item-label {
149
+              line-height: 20px;
150
+            }
151
+          }
152
+        }
153
+
154
+        .editForm {
155
+          .ant-form-item {
156
+            margin-bottom: 15px;
157
+
158
+            .ant-form-item-label {
159
+              line-height: 14px;
160
+              text-align: left;
161
+            }
162
+          }
163
+        }
164
+      }
165
+    }
166
+  }
167
+}

+ 301 - 0
src/app/views/associated-data/associated-data.component.ts

@@ -0,0 +1,301 @@
1
+import { Component, OnInit } from "@angular/core";
2
+import { ActivatedRoute } from "@angular/router";
3
+import { FormBuilder, Validators, FormGroup } from "@angular/forms";
4
+
5
+import { ToolService } from "../../services/tool.service";
6
+import { AssociatedDataService } from './associated-data.service';
7
+import { Subject } from 'rxjs';
8
+import { debounceTime } from 'rxjs/operators';
9
+import { NzMessageService } from 'ng-zorro-antd/message';
10
+@Component({
11
+  selector: "app-associated-data",
12
+  templateUrl: "./associated-data.component.html",
13
+  styleUrls: ["./associated-data.component.less"],
14
+})
15
+export class AssociatedDataComponent implements OnInit {
16
+  constructor(
17
+    private fb: FormBuilder,
18
+    private associatedDataService: AssociatedDataService,
19
+    private route: ActivatedRoute,
20
+    private tool: ToolService,
21
+    private message: NzMessageService,
22
+  ) {}
23
+
24
+  userInfo: any = JSON.parse(localStorage.getItem("user")) || {}; //登录用户信息
25
+  listOfData: any[] = []; //表格数据
26
+  pageIndex: number = 1; //表格当前页码
27
+  pageSize: number = 10; //表格每页展示条数
28
+  listLength: number = 10; //表格总数据量
29
+  tableHeight: number; //表格动态高
30
+  modal: boolean = false; //新增/编辑模态框
31
+  add: boolean; //true:新增;false:编辑
32
+  validateForm: FormGroup; //新增/编辑表单
33
+  coopId: any; //当前操作列
34
+  currentHospital; //当前院区
35
+
36
+  btnLoading: boolean = false; //提交按钮loading状态
37
+
38
+  promptContent: string; //操作提示框提示信息
39
+  ifSuccess: boolean; //操作成功/失败
40
+  promptInfo: string; //操作结果提示信息
41
+  promptModalShow: boolean; //操作提示框是否展示
42
+  modelName = ""; //模态框名称
43
+
44
+  changeInpSubject = new Subject(); //防抖
45
+
46
+  ngOnInit() {
47
+    //防抖
48
+    this.changeInpSubject.pipe(debounceTime(500)).subscribe((v) => {
49
+      if(v[1] === 'taskType'){
50
+        this.getTaskTypeList(true, v[0]);
51
+      }
52
+    });
53
+    this.currentHospital = this.tool.getCurrentHospital();
54
+    this.coopBtns = this.tool.initCoopBtns(this.route);
55
+    this.initForm();
56
+    this.getList(1);
57
+  }
58
+
59
+  // 初始化增删改按钮
60
+  coopBtns: any = {};
61
+
62
+  // 表格数据
63
+  loading1 = false;
64
+  getList(type) {
65
+    if (type == 1) {
66
+      this.pageIndex = 1;
67
+    }
68
+    let data = {
69
+      idx: this.pageIndex - 1,
70
+      sum: this.pageSize,
71
+      otherBindConfig: {
72
+        hosId: this.currentHospital.id,
73
+      },
74
+    };
75
+    this.loading1 = true;
76
+    this.associatedDataService
77
+      .getFetchDataList(data)
78
+      .subscribe((data) => {
79
+        this.loading1 = false;
80
+        if (data.status == 200) {
81
+          this.listOfData = data.list;
82
+          this.listLength = data.totalNum;
83
+        }
84
+      });
85
+  }
86
+
87
+  //打开查询任务类型下拉框
88
+  isLoading:boolean = false;
89
+  taskTypeList:any[] = [];
90
+  getTaskTypeList(flag, keyWord = '') {
91
+    if (flag) {
92
+      let postData = {
93
+        idx: 0,
94
+        sum: 9999,
95
+        taskType: {
96
+          simpleQuery: true,
97
+          taskName: keyWord,
98
+          bindTrans: 1,
99
+          associationType: {
100
+            key: 'association_types',
101
+            value: 'other',
102
+          },
103
+          hosId: {
104
+            id: this.currentHospital.id,
105
+          },
106
+        }
107
+      };
108
+      this.isLoading = true;
109
+      this.associatedDataService
110
+      .getTaskTypes(postData)
111
+      .subscribe((data) => {
112
+        this.isLoading = false;
113
+        if (data.status == 200) {
114
+          this.taskTypeList = data.list;
115
+        }
116
+      });
117
+    }
118
+  }
119
+
120
+  //打开查询业务类型下拉框
121
+  relationTransList:any[] = [];
122
+  getRelationTransList(flag) {
123
+    if (flag) {
124
+      this.isLoading = true;
125
+      this.associatedDataService
126
+      .getDictionary('other_relation_trans')
127
+      .subscribe((data) => {
128
+        this.isLoading = false;
129
+        this.relationTransList = data || [];
130
+      });
131
+    }
132
+  }
133
+
134
+  //搜索
135
+  changeInp(e, type) {
136
+    this.isLoading = true;
137
+    this.changeInpSubject.next([e, type]);
138
+  }
139
+
140
+  // 新增弹框
141
+  addModal() {
142
+    this.modelName = "新增";
143
+    this.add = true; //新增
144
+    this.modal = true;
145
+    this.initForm();
146
+  }
147
+  //关闭新增/编辑弹框
148
+  hideAddModal() {
149
+    this.modal = false;
150
+    this.initForm();
151
+  }
152
+
153
+  // 初始化新增form表单
154
+  initForm() {
155
+    this.validateForm = this.fb.group({
156
+      name: ['', [Validators.required]],
157
+      taskType: [null, [Validators.required]],
158
+      relationTrans: [null, [Validators.required]],
159
+      startAlert: [0, [Validators.required]],
160
+    });
161
+  }
162
+
163
+  // 新增/编辑表单提交
164
+  submitForm(): void {
165
+    for (const i in this.validateForm.controls) {
166
+      this.validateForm.controls[i].markAsDirty();
167
+      this.validateForm.controls[i].updateValueAndValidity();
168
+    }
169
+    if (this.validateForm.invalid) {
170
+      return;
171
+    }
172
+    if((/^\s+/.test(this.validateForm.value.name) || /\s+$/.test(this.validateForm.value.name)) && !this.validateForm.value.name.trim()){
173
+      this.message.info('请设置业务名称!');
174
+      return;
175
+    }
176
+
177
+    this.btnLoading = true;
178
+    let data = {};
179
+
180
+    if (this.add) {
181
+      //增加
182
+      data = {
183
+        name: this.validateForm.value.name.trim(),
184
+        taskTypeId: this.validateForm.value.taskType,
185
+        relationTrans: {id: this.validateForm.value.relationTrans},
186
+        startAlert: this.validateForm.value.startAlert,
187
+        hosId: this.currentHospital.id,
188
+      };
189
+    } else {
190
+      //编辑
191
+      data = {
192
+        ...this.coopId,
193
+        name: this.validateForm.value.name.trim(),
194
+        taskTypeId: this.validateForm.value.taskType,
195
+        relationTrans: {id: this.validateForm.value.relationTrans},
196
+        startAlert: this.validateForm.value.startAlert,
197
+        hosId: this.currentHospital.id,
198
+      };
199
+    }
200
+    this.associatedDataService
201
+      .simplePost("addData", "otherBindConfig", data)
202
+      .subscribe((result) => {
203
+        this.btnLoading = false;
204
+        this.hideAddModal();
205
+        this.initForm();
206
+        if (result.status == 200) {
207
+          if (this.add) {
208
+            this.showPromptModal("新增", true, "");
209
+            this.listLength++;
210
+          }else{
211
+            this.showPromptModal("编辑", true, "");
212
+          }
213
+        } else {
214
+          this.showPromptModal(this.add ? '新增' : '修改', false, result.msg);
215
+        }
216
+      });
217
+  }
218
+
219
+  // 编辑
220
+  edit(data) {
221
+    console.log(data);
222
+    this.modelName = "编辑";
223
+    this.add = false;
224
+    this.modal = true;
225
+    this.coopId = data;
226
+
227
+    this.taskTypeList = data.taskTypeDTO ? [data.taskTypeDTO] : [];
228
+    this.validateForm.controls.taskType.setValue(data.taskTypeId); //任务类型
229
+
230
+    this.relationTransList = data.relationTrans ? [data.relationTrans] : [];
231
+    this.validateForm.controls.relationTrans.setValue(data.relationTrans ? data.relationTrans.id : null); //业务类型
232
+
233
+    this.validateForm.controls.startAlert.setValue(data.startAlert); //发起时是否弹窗选择
234
+
235
+    this.validateForm.controls.name.setValue(data.name); //业务名称
236
+  }
237
+
238
+  // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
239
+  showPromptModal(con, success, promptInfo?) {
240
+    this.promptModalShow = false;
241
+    this.promptContent = con;
242
+    this.ifSuccess = success;
243
+    this.promptInfo = promptInfo;
244
+    setTimeout(() => {
245
+      this.promptModalShow = true;
246
+    }, 100);
247
+    this.getList(0);
248
+  }
249
+
250
+  delModal: boolean = false; //删除模态框
251
+  tipsMsg1: string; //提示框信息
252
+  tipsMsg2: string; //操作后信息
253
+  confirmDelType: string; //确认的类型(启用/停用,删除)
254
+  showDelModal(
255
+    data,
256
+    tipsMsg1: string,
257
+    tipsMsg2: string,
258
+    type: string,
259
+  ) {
260
+    this.confirmDelType = type;
261
+    this.delModal = true;
262
+    this.coopId = data;
263
+    this.tipsMsg1 = tipsMsg1;
264
+    this.tipsMsg2 = tipsMsg2;
265
+  }
266
+  // 隐藏删除框
267
+  hideDelModal() {
268
+    this.delModal = false;
269
+  }
270
+  // 确认删除
271
+  confirmDel() {
272
+    this.btnLoading = true;
273
+    if (this.confirmDelType === "del") {
274
+      //删除
275
+      this.associatedDataService
276
+        .simplePost("rmvData", "otherBindConfig", [this.coopId.id])
277
+        .subscribe((data) => {
278
+          this.btnLoading = false;
279
+          this.delModal = false;
280
+          if (data.status == 200) {
281
+            if (
282
+              this.listOfData.length == 1 &&
283
+              this.pageIndex == Math.ceil(this.listLength / this.pageSize)
284
+            ) {
285
+              this.listLength--;
286
+              if (this.listLength === 0) {
287
+                this.pageIndex = 1;
288
+              } else {
289
+                this.pageIndex = Math.ceil(this.listLength / this.pageSize);
290
+              }
291
+            }
292
+            this.showPromptModal(this.tipsMsg2, true, "");
293
+          } else {
294
+            this.showPromptModal(this.tipsMsg2, false, data.msg);
295
+          }
296
+        });
297
+    }
298
+  }
299
+}
300
+
301
+

+ 19 - 0
src/app/views/associated-data/associated-data.module.ts

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

+ 53 - 0
src/app/views/associated-data/associated-data.service.ts

@@ -0,0 +1,53 @@
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 AssociatedDataService {
9
+
10
+  constructor(
11
+    private mainService: MainService,
12
+  ) { }
13
+
14
+  // simple增删改
15
+  simplePost(type, model, postData) {
16
+    return this.mainService.simplePost(type, model, postData);
17
+  }
18
+
19
+  // 获取任务类型列表
20
+  getTaskTypes(postData) {
21
+    return this.mainService.getFetchDataList("simple/data", "taskType", postData).pipe(map((v:any) => {
22
+      if(Array.isArray(v.list)){
23
+        v.list = v.list.map(vv => ({id: vv.id, taskName: vv.taskName}));
24
+      }else{
25
+        v.list = [];
26
+      }
27
+      return v;
28
+    }));
29
+  }
30
+
31
+  // 查询
32
+  getFetchDataList(postData) {
33
+    return this.mainService.getFetchDataList("simple/data", "otherBindConfig", postData).pipe(map((v:any) => {
34
+      if(Array.isArray(v.list)){
35
+        v.list = v.list.map(vv => ({
36
+          ...vv,
37
+          buildingListNames: vv.buildingList ? vv.buildingList.map(v => v.buildingName).toString() : '',
38
+          deptListNames: vv.deptList ? vv.deptList.map(v => v.dept).toString() : '',
39
+        }));
40
+      }else{
41
+        v.list = [];
42
+      }
43
+      return v;
44
+    }));;
45
+  }
46
+
47
+  // 字典
48
+  getDictionary(type) {
49
+    return this.mainService.getDictionary("list", type);
50
+  }
51
+}
52
+
53
+

+ 6 - 0
src/app/views/hushijiandan/hushijiandan.component.html

@@ -3792,6 +3792,9 @@
3792 3792
 <app-dialog-delete [delModal]="pickUpModal" (hideDelModalEvent)="hidePickUpModal()" [btnLoading]="btnLoading"
3793 3793
 (confirmDelEvent)="confirmPickUp()" [content]="pickUpInfo"></app-dialog-delete>
3794 3794
 
3795
+<!-- 其他临床服务-关联数据-模态框 -->
3796
+<app-dialog-delete [delModal]="otherDataModal" (hideDelModalEvent)="hideOtherDataModal()" (confirmDelEvent)="confirmOtherData()" [content]="otherDataInfo"></app-dialog-delete>
3797
+
3795 3798
 <!-- 手术即将开始通知 -->
3796 3799
 <app-dialog-surgery [delModal]="surgeryModal" (hideDelModalEvent)="hideSurgeryModal()" [btnLoading]="btnLoading"
3797 3800
 (confirmDelEvent)="confirmSurgery($event)" [content]="surgeryInfo" [dataObj]="surgeryItem"></app-dialog-surgery>
@@ -3807,3 +3810,6 @@
3807 3810
 <!-- 是否限制业务发起时间模态框 -->
3808 3811
 <app-dialog-delete [delModal]="limitTimeModal" (hideDelModalEvent)="hideLimitTimeModal()" [btnLoading]="limitTimeLoading"
3809 3812
 (confirmDelEvent)="confirmLimitTime()" [content]="limitTimeInfo" confirmTxt="继续建单" [isShowConfirm]="isShowConfirm" [isShowConfirmInfo]="isShowConfirmInfo"></app-dialog-delete>
3813
+
3814
+<!-- 关联业务查看 -->
3815
+<app-relationTrans-detail-modal *ngIf="relationTransModalShow" [show]="relationTransModalShow" [otherBindConfigDto]="otherBindConfigDto" (closeModelHs)="closeModelRelationTrans($event)" (confirmModelHs)="confirmModelRelationTrans($event)"></app-relationTrans-detail-modal>

+ 92 - 34
src/app/views/hushijiandan/hushijiandan.component.ts

@@ -1812,7 +1812,27 @@ export class HushijiandanComponent implements OnInit {
1812 1812
       });
1813 1813
   }
1814 1814
   // -----------------
1815
+  // --------------------------------------------------------start
1816
+  otherDataModal: boolean = false; //模态框
1817
+  otherDataInfo:string = '';
1818
+  otherDataItem: any = {};
1819
+  hideOtherDataModal() {
1820
+    this.otherDataModal = false;
1821
+  }
1822
+  // 确认
1823
+  confirmOtherData() {
1824
+    console.log(this.otherDataItem);
1825
+    this.otherBuildOrder(JSON.parse(this.otherDataItem).otherList);
1826
+    this.otherDataModal = false;
1827
+    this.relationTransModalShow = JSON.parse(this.otherDataItem).show;
1828
+  }
1815 1829
 
1830
+  otherDataConfirm(e){
1831
+    this.otherDataModal = true;
1832
+    this.otherDataItem = e;
1833
+    this.otherDataInfo = `您本次送${this.otherBindConfigDto.relationTrans.name}选择了${JSON.parse(this.otherDataItem).otherList.length}本${this.otherBindConfigDto.relationTrans.name},您确认要建单配送吗?`;
1834
+  }
1835
+  // --------------------------------------------------------end
1816 1836
   pickUpModal: boolean = false; //模态框
1817 1837
   pickUpInfo:string = '';
1818 1838
   pickUpItem: any = {};
@@ -2892,9 +2912,27 @@ export class HushijiandanComponent implements OnInit {
2892 2912
   changeAccount(e){
2893 2913
     this.userAccount =this.accountList.find(v => v.id == e);
2894 2914
   }
2915
+
2916
+  // 查看关联业务
2917
+  otherBindConfigDto:any = {};
2918
+  relationTransModalShow = false; //关联业务弹窗开关
2919
+  // 关闭关联业务弹窗
2920
+  closeModelRelationTrans(e) {
2921
+    this.relationTransModalShow = JSON.parse(e).show;
2922
+  }
2923
+  // 确定关联业务弹窗
2924
+  confirmModelRelationTrans(e) {
2925
+    if(JSON.parse(e).otherList.length){
2926
+      this.otherDataConfirm(e);
2927
+    }else{
2928
+      this.message.info('请选择病历!');
2929
+    }
2930
+
2931
+  }
2932
+
2895 2933
   // 一键发起建单保存
2896 2934
   loading5 = false;
2897
-  confirmShortcut() {
2935
+  async confirmShortcut() {
2898 2936
     var that = this;
2899 2937
     for (const i in that.shortcutForm.controls) {
2900 2938
       that.shortcutForm.controls[i].markAsDirty();
@@ -2903,40 +2941,60 @@ export class HushijiandanComponent implements OnInit {
2903 2941
     console.log(that.shortcutForm);
2904 2942
     if (that.shortcutForm.invalid) return;
2905 2943
     that.loading5 = true;
2906
-    let postData;
2907 2944
     that.buildType = "other";
2908
-    if (that.buildType == "other") {
2909
-      if(this.buildMsg.reserveUserSwitch == 1 && !this.userAccount){
2910
-        this.message.info('请选择工号!');
2911
-        this.loading5 = false;
2912
-        return;
2913
-      }
2914
-      // 其他
2915
-      postData = {
2916
-        workOrder: {
2917
-          sourceId: SourceId.hushi,
2918
-          workOrderRemark: this.userAccount ? `${this.userAccount.account}-${this.userAccount.name}:${this.workOrderRemark}` : this.workOrderRemark,
2919
-          taskType: { id: that.shortcutMsg.id },
2920
-          createDept: that.loginUserDeptId,
2921
-          startDept: { id: that.buildMsg.startDept },
2922
-          endDepts: [{ id: that.buildMsg.endDept }],
2923
-        },
2924
-      };
2925
-      if (
2926
-        (that.buildMsg.status == 100013 || that.buildMsg.status == 100015) &&
2927
-        that.shortcutForm.value.originOffice
2928
-      ) {
2929
-        postData.workOrder.startDept.id = that.shortcutForm.value.originOffice;
2930
-      }
2931
-      if (that.shortcutForm.value.targetOffice) {
2932
-        postData.workOrder["endDepts"] = [
2933
-          { id: that.shortcutForm.value.targetOffice },
2934
-        ];
2935
-      } else {
2936
-        postData.workOrder["endDepts"] = [
2937
-          { id: that.buildMsg.end.end.list[0].id },
2938
-        ];
2939
-      }
2945
+    if(this.buildMsg.reserveUserSwitch == 1 && !this.userAccount){
2946
+      this.message.info('请选择工号!');
2947
+      this.loading5 = false;
2948
+      return;
2949
+    }
2950
+
2951
+    // 判断改任务类型是否开启关联数据
2952
+    let taskTypeDtoPromise = await this.mainService.getFetchDataList('simple/data', 'otherBindConfig', {"idx":0,"sum":10,"otherBindConfig":{"hosId":1}}).toPromise();
2953
+    console.log(taskTypeDtoPromise);
2954
+    console.log(that.shortcutMsg);
2955
+    let otherBindConfigDto = taskTypeDtoPromise.list.find(v => v.taskTypeId == that.shortcutMsg.id);
2956
+    if(taskTypeDtoPromise.status == 200 && otherBindConfigDto && otherBindConfigDto.startAlert == 1 && that.shortcutMsg.bindTrans == 1){
2957
+      this.otherBindConfigDto = otherBindConfigDto;
2958
+      this.relationTransModalShow = true;
2959
+      that.loading5 = false;
2960
+      return;
2961
+    }
2962
+    this.otherBuildOrder();
2963
+  }
2964
+  otherBuildOrder(otherList?){
2965
+    var that = this;
2966
+    // 其他
2967
+    let workOrderRemark = '';
2968
+    if(otherList){
2969
+      workOrderRemark = this.userAccount ? `${this.userAccount.account}-${this.userAccount.name}:${this.workOrderRemark}${otherList.length}本${this.otherBindConfigDto.relationTrans.name}` : this.workOrderRemark + `${otherList.length}本${this.otherBindConfigDto.relationTrans.name}`;
2970
+    }else{
2971
+      workOrderRemark = this.userAccount ? `${this.userAccount.account}-${this.userAccount.name}:${this.workOrderRemark}` : this.workOrderRemark;
2972
+    }
2973
+    let postData = {
2974
+      workOrder: {
2975
+        sourceId: SourceId.hushi,
2976
+        workOrderRemark,
2977
+        taskType: { id: that.shortcutMsg.id },
2978
+        createDept: that.loginUserDeptId,
2979
+        startDept: { id: that.buildMsg.startDept },
2980
+        endDepts: [{ id: that.buildMsg.endDept }],
2981
+        otherList: otherList || undefined,
2982
+      },
2983
+    };
2984
+    if (
2985
+      (that.buildMsg.status == 100013 || that.buildMsg.status == 100015) &&
2986
+      that.shortcutForm.value.originOffice
2987
+    ) {
2988
+      postData.workOrder.startDept.id = that.shortcutForm.value.originOffice;
2989
+    }
2990
+    if (that.shortcutForm.value.targetOffice) {
2991
+      postData.workOrder["endDepts"] = [
2992
+        { id: that.shortcutForm.value.targetOffice },
2993
+      ];
2994
+    } else {
2995
+      postData.workOrder["endDepts"] = [
2996
+        { id: that.buildMsg.end.end.list[0].id },
2997
+      ];
2940 2998
     }
2941 2999
     console.log(postData);
2942 3000
     this.newOrderTimeFun(postData.workOrder, () => {

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

@@ -103,6 +103,11 @@ const routes: Routes = [
103 103
         path: "limitInitiationTime",
104 104
         loadChildren: () => import("../limit-initiation-time/limit-initiation-time.module").then((m) => m.LimitInitiationTimeModule),
105 105
       },
106
+      // 关联数据
107
+      {
108
+        path: "associatedData",
109
+        loadChildren: () => import("../associated-data/associated-data.module").then((m) => m.AssociatedDataModule),
110
+      },
106 111
       // 工作分配方案列表
107 112
       {
108 113
         path: "workAssignment",