浏览代码

临床其他建单接口联调

seimin 1 年之前
父节点
当前提交
436851740a

+ 1 - 1
proxy.conf.json

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

+ 26 - 15
src/app/views/other-auto/other-auto.component.html

@@ -14,18 +14,20 @@
14
         <thead>
14
         <thead>
15
           <tr class="thead">
15
           <tr class="thead">
16
             <th nzWidth="20%">自动建单名称</th>
16
             <th nzWidth="20%">自动建单名称</th>
17
-            <th nzWidth="20%">班次</th>
18
-            <th nzWidth="20%">任务类型</th>
19
-            <th nzWidth="20%">是否起始建单</th>
17
+            <th nzWidth="10%">班次</th>
18
+            <th nzWidth="30%">任务类型</th>
19
+            <th nzWidth="10%">是否起始建单</th>
20
+            <th nzWidth="10%">是否自动建单</th>
20
             <th nzWidth="20%">操作</th>
21
             <th nzWidth="20%">操作</th>
21
           </tr>
22
           </tr>
22
         </thead>
23
         </thead>
23
         <tbody>
24
         <tbody>
24
           <tr *ngFor="let data of listOfData;let index=index;">
25
           <tr *ngFor="let data of listOfData;let index=index;">
25
-            <td>{{ data.name || '' }}</td>
26
-            <td>{{ data.deptDTO ? data.deptDTO.dept : '' }}</td>
27
-            <td>{{ data.code || '' }}</td>
28
-            <td>{{ data.code || '' }}</td>
26
+            <td>{{ data.title || '' }}</td>
27
+            <td>{{ data.classDTO ? data.classDTO.name : '' }}</td>
28
+            <td>{{ data.taskNames || '' }}</td>
29
+            <td>{{ data.startCreated == 1 ? '是' : '否' }}</td>
30
+            <td>{{ data.autoCreate == 1 ? '是' : '否' }}</td>
29
             <td>
31
             <td>
30
               <div class="coop">
32
               <div class="coop">
31
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
33
                 <span *ngIf="coopBtns.edit" (click)="edit(data)">编辑</span>
@@ -51,17 +53,17 @@
51
     <overlay-scrollbars #osComponentRef1 class="content">
53
     <overlay-scrollbars #osComponentRef1 class="content">
52
       <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
54
       <form nz-form [formGroup]="validateForm" class="addForm" (ngSubmit)="submitForm()">
53
         <nz-form-item>
55
         <nz-form-item>
54
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="name">自动建单名称</nz-form-label>
56
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">自动建单名称</nz-form-label>
55
           <nz-form-control nzErrorTip="请填写自动建单名称!">
57
           <nz-form-control nzErrorTip="请填写自动建单名称!">
56
             <nz-input-group>
58
             <nz-input-group>
57
-              <input type="text" nz-input formControlName="name" placeholder="请填写自动建单名称" />
59
+              <input type="text" nz-input formControlName="title" placeholder="请填写自动建单名称" />
58
             </nz-input-group>
60
             </nz-input-group>
59
           </nz-form-control>
61
           </nz-form-control>
60
         </nz-form-item>
62
         </nz-form-item>
61
         <nz-form-item>
63
         <nz-form-item>
62
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="deptId">班次</nz-form-label>
64
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="classesId">班次</nz-form-label>
63
           <nz-form-control nzErrorTip="请选择班次!">
65
           <nz-form-control nzErrorTip="请选择班次!">
64
-            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="deptId" nzShowSearch nzAllowClear nzPlaceHolder="请选择班次" nzServerSearch (nzOnSearch)="changeSchedule($event)" (nzOpenChange)="openSchedule($event)">
66
+            <nz-select [nzDropdownMatchSelectWidth]="false" formControlName="classesId" nzShowSearch nzAllowClear nzPlaceHolder="请选择班次" nzServerSearch (nzOnSearch)="changeSchedule($event)" (nzOpenChange)="openSchedule($event)">
65
               <ng-container *ngFor="let data of scheduleList">
67
               <ng-container *ngFor="let data of scheduleList">
66
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
68
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
67
                 </nz-option>
69
                 </nz-option>
@@ -73,9 +75,9 @@
73
           </nz-form-control>
75
           </nz-form-control>
74
         </nz-form-item>
76
         </nz-form-item>
75
         <nz-form-item>
77
         <nz-form-item>
76
-          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypes">任务类型</nz-form-label>
78
+          <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="taskTypeIds">任务类型</nz-form-label>
77
           <nz-form-control nzErrorTip="请选择任务类型!">
79
           <nz-form-control nzErrorTip="请选择任务类型!">
78
-            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypes" nzShowSearch nzAllowClear nzPlaceHolder="请选择任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
80
+            <nz-select nzMode="multiple" [nzDropdownMatchSelectWidth]="false" formControlName="taskTypeIds" nzShowSearch nzAllowClear nzPlaceHolder="请选择任务类型" nzServerSearch (nzOnSearch)="changeInp($event)" (nzOpenChange)="openOtherTasktype($event)">
79
               <ng-container *ngFor="let data of taskTypeList">
81
               <ng-container *ngFor="let data of taskTypeList">
80
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
82
                 <nz-option *ngIf="!isLoading" [nzLabel]="data.name" [nzValue]="data.id">
81
                 </nz-option>
83
                 </nz-option>
@@ -87,9 +89,18 @@
87
           </nz-form-control>
89
           </nz-form-control>
88
         </nz-form-item>
90
         </nz-form-item>
89
         <nz-form-item>
91
         <nz-form-item>
90
-          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="gender">是否起始建单</nz-form-label>
92
+          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="startCreated">是否起始建单</nz-form-label>
91
           <nz-form-control nzErrorTip="请选择是否起始建单!">
93
           <nz-form-control nzErrorTip="请选择是否起始建单!">
92
-            <nz-radio-group type="gender" formControlName="gender">
94
+            <nz-radio-group formControlName="startCreated">
95
+              <label nz-radio [nzValue]="1">是</label>
96
+              <label nz-radio [nzValue]="0">否</label>
97
+            </nz-radio-group>
98
+          </nz-form-control>
99
+        </nz-form-item>
100
+        <nz-form-item>
101
+          <nz-form-label style="line-height:40px;" [nzSm]="6" [nzXs]="24" nzRequired nzFor="autoCreate">是否自动建单</nz-form-label>
102
+          <nz-form-control nzErrorTip="请选择是否自动建单!">
103
+            <nz-radio-group formControlName="autoCreate">
93
               <label nz-radio [nzValue]="1">是</label>
104
               <label nz-radio [nzValue]="1">是</label>
94
               <label nz-radio [nzValue]="0">否</label>
105
               <label nz-radio [nzValue]="0">否</label>
95
             </nz-radio-group>
106
             </nz-radio-group>

+ 25 - 11
src/app/views/other-auto/other-auto.component.ts

@@ -86,6 +86,9 @@ export class OtherAutoComponent implements OnInit {
86
       .subscribe((result) => {
86
       .subscribe((result) => {
87
         this.loading1 = false;
87
         this.loading1 = false;
88
         result.list = result.list || [];
88
         result.list = result.list || [];
89
+        result.list.forEach(v => {
90
+          v.taskNames = v.taskTypeList.map(v => v.taskName).toString();
91
+        })
89
         this.listOfData = result.list;
92
         this.listOfData = result.list;
90
         this.listLength = result.totalNum;
93
         this.listLength = result.totalNum;
91
       });
94
       });
@@ -122,7 +125,8 @@ export class OtherAutoComponent implements OnInit {
122
     this.add = true;
125
     this.add = true;
123
     this.modal = true;
126
     this.modal = true;
124
     this.initForm();
127
     this.initForm();
125
-    this.validateForm.controls.gender.setValue(0);
128
+    this.validateForm.controls.startCreated.setValue(0);
129
+    this.validateForm.controls.autoCreate.setValue(0);
126
   }
130
   }
127
   hideModal() {
131
   hideModal() {
128
     this.modal = false;
132
     this.modal = false;
@@ -136,10 +140,11 @@ export class OtherAutoComponent implements OnInit {
136
       this.taskTypeList = [];
140
       this.taskTypeList = [];
137
     }
141
     }
138
     this.validateForm = this.fb.group({
142
     this.validateForm = this.fb.group({
139
-      name: ['', [Validators.required]],
140
-      deptId: [null, [Validators.required]],
141
-      taskTypes: [null, [Validators.required]],
142
-      gender: [null, [Validators.required]],
143
+      title: ['', [Validators.required]],
144
+      classesId: [null, [Validators.required]],
145
+      taskTypeIds: [null, [Validators.required]],
146
+      startCreated: [null, [Validators.required]],
147
+      autoCreate: [null, [Validators.required]],
143
     });
148
     });
144
   }
149
   }
145
   // 表单提交
150
   // 表单提交
@@ -153,8 +158,11 @@ export class OtherAutoComponent implements OnInit {
153
     if(this.add){
158
     if(this.add){
154
       this.otherAutoService
159
       this.otherAutoService
155
       .add({
160
       .add({
156
-        name: this.validateForm.value.name,
157
-        deptId: this.validateForm.value.deptId,
161
+        title: this.validateForm.value.title,
162
+        classesId: this.validateForm.value.classesId,
163
+        taskTypeIds: this.validateForm.value.taskTypeIds,
164
+        startCreated: this.validateForm.value.startCreated,
165
+        autoCreate: this.validateForm.value.autoCreate,
158
         hosId: this.hosId,
166
         hosId: this.hosId,
159
       })
167
       })
160
       .subscribe((data) => {
168
       .subscribe((data) => {
@@ -170,8 +178,11 @@ export class OtherAutoComponent implements OnInit {
170
     }else{
178
     }else{
171
       this.otherAutoService
179
       this.otherAutoService
172
       .update({
180
       .update({
173
-        name: this.validateForm.value.name,
174
-        deptId: this.validateForm.value.deptId,
181
+        title: this.validateForm.value.title,
182
+        classesId: this.validateForm.value.classesId,
183
+        taskTypeIds: this.validateForm.value.taskTypeIds,
184
+        startCreated: this.validateForm.value.startCreated,
185
+        autoCreate: this.validateForm.value.autoCreate,
175
         coopData: this.coopData,
186
         coopData: this.coopData,
176
       })
187
       })
177
       .subscribe((data) => {
188
       .subscribe((data) => {
@@ -191,8 +202,11 @@ export class OtherAutoComponent implements OnInit {
191
   maskFlag: any = false;
202
   maskFlag: any = false;
192
   coopData = {};
203
   coopData = {};
193
   edit(data) {
204
   edit(data) {
194
-    this.validateForm.controls.name.setValue(data.name);
195
-    this.validateForm.controls.deptId.setValue(data.deptId);
205
+    this.validateForm.controls.title.setValue(data.title);
206
+    this.validateForm.controls.classesId.setValue(data.classesId);
207
+    this.validateForm.controls.taskTypeIds.setValue(data.taskTypeList ? data.taskTypeList.map(v => v.id) : null);
208
+    this.validateForm.controls.startCreated.setValue(data.startCreated);
209
+    this.validateForm.controls.autoCreate.setValue(data.autoCreate);
196
     this.modal = true;
210
     this.modal = true;
197
     this.add = false;
211
     this.add = false;
198
     this.coopId = data.id;
212
     this.coopId = data.id;

+ 17 - 11
src/app/views/other-auto/other-auto.service.ts

@@ -15,37 +15,43 @@ export class OtherAutoService {
15
     let data = {
15
     let data = {
16
       idx: pageIndex - 1,
16
       idx: pageIndex - 1,
17
       sum: pageSize,
17
       sum: pageSize,
18
-      qrCode: {
18
+      otherCreateOrderRule: {
19
         hosId,
19
         hosId,
20
       },
20
       },
21
     };
21
     };
22
-    return this.mainService.getFetchDataList("simple/data", "qrCode", data);
22
+    return this.mainService.getFetchDataList("simple/data", "otherCreateOrderRule", data);
23
   }
23
   }
24
 
24
 
25
   // 列表-删
25
   // 列表-删
26
   delete({id}) {
26
   delete({id}) {
27
-    return this.mainService.simplePost("rmvData", "qrCode", [id]);
27
+    return this.mainService.simplePost("rmvData", "otherCreateOrderRule", [id]);
28
   }
28
   }
29
 
29
 
30
   // 列表-增
30
   // 列表-增
31
-  add({name, deptId, hosId}) {
31
+  add({title, classesId, taskTypeIds, startCreated, autoCreate, hosId}) {
32
     let data = {
32
     let data = {
33
-      name,
34
-      deptId,
33
+      title,
34
+      classesId,
35
+      taskTypeIds: taskTypeIds.toString(),
36
+      startCreated,
37
+      autoCreate,
35
       hosId,
38
       hosId,
36
     };
39
     };
37
 
40
 
38
-    return this.mainService.simplePost("addData", "qrCode", data);
41
+    return this.mainService.simplePost("addData", "otherCreateOrderRule", data);
39
   }
42
   }
40
 
43
 
41
   // 列表-改
44
   // 列表-改
42
-  update({name, deptId, coopData}) {
45
+  update({title, classesId, taskTypeIds, startCreated, autoCreate, coopData}) {
43
     let data = {
46
     let data = {
44
-      name,
45
-      deptId,
47
+      title,
48
+      classesId,
49
+      taskTypeIds: taskTypeIds.toString(),
50
+      startCreated,
51
+      autoCreate,
46
     };
52
     };
47
     data = {...coopData, ...data};
53
     data = {...coopData, ...data};
48
-    return this.mainService.simplePost("addData", "qrCode", data);
54
+    return this.mainService.simplePost("addData", "otherCreateOrderRule", data);
49
   }
55
   }
50
 
56
 
51
   // 查询任务类型-其他临床服务
57
   // 查询任务类型-其他临床服务