seimin 1 год назад
Родитель
Сommit
4141cc2818

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

+ 15 - 13
src/app/views/data-dictionary/data-dictionary.component.html

@@ -11,13 +11,15 @@
11 11
   <div class="userInfo">
12 12
     <div class="top display_flex justify-content_space-between align-items_center">
13 13
       <div class="searchItem">
14
-        <span class="label">父级被服分类</span>:
15
-        <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
16
-          nzPlaceHolder="请选择父级被服分类" [(ngModel)]="searchDto.parent" (ngModelChange)="getAll()">
17
-          <ng-container *ngFor="let data of parentList">
18
-            <nz-option [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
19
-          </ng-container>
20
-        </nz-select>
14
+        <ng-container *ngIf="checkedDictionary.type === 'dictionaryTree'">
15
+          <span class="label">父级被服分类</span>:
16
+          <nz-select class="formItem" [nzDropdownMatchSelectWidth]="false" [nzShowSearch]="false" nzAllowClear
17
+            nzPlaceHolder="请选择父级被服分类" [(ngModel)]="searchDto.parent" (ngModelChange)="getAll()">
18
+            <ng-container *ngFor="let data of parentList">
19
+              <nz-option [nzLabel]="data.name" [nzValue]="data.id"></nz-option>
20
+            </ng-container>
21
+          </nz-select>
22
+        </ng-container>
21 23
       </div>
22 24
       <div class="display_flex align-items_center">
23 25
         <span>已选择 {{selectedDictionary.length}} 个</span>
@@ -35,10 +37,10 @@
35 37
             <th nzWidth="5%" nzShowCheckbox [(nzChecked)]="isAllDisplayDataChecked"
36 38
               (nzCheckedChange)="checkAll($event)"></th>
37 39
             <th nzWidth="15%">名称</th>
38
-            <th nzWidth="15%">父级被服分类</th>
40
+            <th nzWidth="15%" *ngIf="checkedDictionary.type === 'dictionaryTree'">父级被服分类</th>
39 41
             <th nzWidth="10%">值</th>
40 42
             <th nzWidth="10%">排序号</th>
41
-            <th nzWidth="10%">单价</th>
43
+            <th nzWidth="10%" *ngIf="checkedDictionary.type === 'dictionaryTree'">单价</th>
42 44
             <th nzWidth="15%">附加说明</th>
43 45
             <th nzWidth="20%">操作</th>
44 46
           </tr>
@@ -48,10 +50,10 @@
48 50
             <td nzShowCheckbox [(nzDisabled)]="!coopBtns.edit" [(nzChecked)]="mapOfCheckedId[data.id]"
49 51
               (nzCheckedChange)="refreshStatus()"></td>
50 52
             <td>{{ data.name }}</td>
51
-            <td>{{ data.parentName }}</td>
53
+            <td *ngIf="checkedDictionary.type === 'dictionaryTree'">{{ data.parentName }}</td>
52 54
             <td>{{ data.value }}</td>
53 55
             <td>{{ data.orders }}</td>
54
-            <td>{{ data.extra3 }}</td>
56
+            <td *ngIf="checkedDictionary.type === 'dictionaryTree'">{{ data.extra3 }}</td>
55 57
             <td>{{ data.desc }}</td>
56 58
             <td>
57 59
               <button nz-button nzType="primary" *ngIf="coopBtns.edit" nzSize="small" (click)="showModal($event,'edit',data)">编辑</button>
@@ -80,7 +82,7 @@
80 82
               </nz-select>
81 83
             </nz-form-control>
82 84
           </nz-form-item>
83
-          <nz-form-item>
85
+          <nz-form-item *ngIf="checkedDictionary.type === 'dictionaryTree'">
84 86
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="parent">父级被服分类</nz-form-label>
85 87
             <nz-form-control nzErrorTip="请选择父级被服分类!">
86 88
               <nz-select formControlName="parent" nzPlaceHolder="请选择父级被服分类">
@@ -113,7 +115,7 @@
113 115
               </nz-input-group>
114 116
             </nz-form-control>
115 117
           </nz-form-item>
116
-          <nz-form-item>
118
+          <nz-form-item *ngIf="checkedDictionary.type === 'dictionaryTree'">
117 119
             <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="extra3">单价</nz-form-label>
118 120
             <nz-form-control nzErrorTip="请输入单价!">
119 121
               <nz-input-group>

+ 117 - 57
src/app/views/data-dictionary/data-dictionary.component.ts

@@ -54,7 +54,6 @@ export class DataDictionaryComponent implements OnInit {
54 54
     this.coopBtns = this.tool.initCoopBtns(this.route);
55 55
     this.hosId = this.tool.getCurrentHospital().id;
56 56
     this.getDictionaryList();
57
-    this.getParentList();
58 57
     this.tableHeight = document.body.clientHeight - 312;
59 58
   }
60 59
 
@@ -65,6 +64,13 @@ export class DataDictionaryComponent implements OnInit {
65 64
         id: -1,
66 65
         dictionaryName: '被服种类',
67 66
         key: 'clothes_type',
67
+        type: 'dictionaryTree',
68
+      },
69
+      {
70
+        id: -2,
71
+        dictionaryName: '统计分类',
72
+        key: 'statistics_date_type',
73
+        type: 'dictionary',
68 74
       }
69 75
     ];
70 76
     if (Object.keys(this.checkedDictionary).length) {
@@ -106,19 +112,31 @@ export class DataDictionaryComponent implements OnInit {
106 112
   // 获取选中数据字典列表
107 113
   getAll() {
108 114
     this.dictionaryLoading = true;
109
-    let postData = {
110
-      idx: 0,
111
-      sum: 9999,
112
-      dictionaryTree: {
113
-        hosId: this.hosId,
114
-        level: 2,
115
-        parent: this.searchDto.parent || undefined,
116
-        key: this.checkedDictionary.key,
117
-        deleted: 0,
118
-      },
119
-    };
115
+    let postData = {};
116
+    if(this.checkedDictionary.type === 'dictionary'){
117
+      postData = {
118
+        idx: 0,
119
+        sum: 9999,
120
+        dictionary: {
121
+          key: this.checkedDictionary.key,
122
+          deleted: 0,
123
+        },
124
+      }
125
+    }else if(this.checkedDictionary.type === 'dictionaryTree'){
126
+      postData = {
127
+        idx: 0,
128
+        sum: 9999,
129
+        dictionaryTree: {
130
+          hosId: this.hosId,
131
+          level: 2,
132
+          parent: this.searchDto.parent || undefined,
133
+          key: this.checkedDictionary.key,
134
+          deleted: 0,
135
+        },
136
+      }
137
+    }
120 138
     this.mainService
121
-      .getFetchDataList("simple/data", "dictionaryTree", postData)
139
+      .getFetchDataList("simple/data", this.checkedDictionary.type, postData)
122 140
       .subscribe((result) => {
123 141
         this.dictionaryLoading = false;
124 142
         if (result.status == 200) {
@@ -134,6 +152,7 @@ export class DataDictionaryComponent implements OnInit {
134 152
     this.checkedDictionary = data ? data : {};
135 153
     this.mapOfCheckedId = {};
136 154
     this.getAll();
155
+    this.checkedDictionary.type === 'dictionaryTree' && this.getParentList();
137 156
   }
138 157
 
139 158
   selectedUser(data) {
@@ -161,22 +180,31 @@ export class DataDictionaryComponent implements OnInit {
161 180
 
162 181
   // 新增/编辑模态框
163 182
   showModal(e, type, data?) {
183
+    e.stopPropagation();
164 184
     this.dictionaryModal = true;
165 185
     this.add = type == "add";
166 186
     if (type == "edit") {
167 187
       this.initForm();
168 188
       this.dataEdit = data;
169
-      this.validateForm.controls.key.setValue(data.key);
170
-      this.validateForm.controls.parent.setValue(data.parent);
171
-      this.validateForm.controls.name.setValue(data.name);
172
-      this.validateForm.controls.value.setValue(data.value);
173
-      this.validateForm.controls.orders.setValue(data.orders);
174
-      this.validateForm.controls.extra3.setValue(data.extra3);
175
-      this.validateForm.controls.desc.setValue(data.desc);
189
+      if(this.checkedDictionary.type === 'dictionaryTree'){
190
+        this.validateForm.controls.key.setValue(data.key);
191
+        this.validateForm.controls.parent.setValue(data.parent);
192
+        this.validateForm.controls.name.setValue(data.name);
193
+        this.validateForm.controls.value.setValue(data.value);
194
+        this.validateForm.controls.orders.setValue(data.orders);
195
+        this.validateForm.controls.extra3.setValue(data.extra3);
196
+        this.validateForm.controls.desc.setValue(data.desc);
197
+      } else if(this.checkedDictionary.type === 'dictionary'){
198
+        this.validateForm.controls.key.setValue(data.key);
199
+        this.validateForm.controls.name.setValue(data.name);
200
+        this.validateForm.controls.value.setValue(data.value);
201
+        this.validateForm.controls.orders.setValue(data.orders);
202
+        this.validateForm.controls.desc.setValue(data.desc);
203
+      }
204
+
176 205
     } else {
177 206
       this.initForm();
178 207
     }
179
-    e.stopPropagation();
180 208
   }
181 209
 
182 210
   // 隐藏模态框
@@ -186,15 +214,26 @@ export class DataDictionaryComponent implements OnInit {
186 214
 
187 215
   // 初始化新增form表单dictionary
188 216
   initForm() {
189
-    this.validateForm = this.fb.group({
190
-      key: [this.checkedDictionary.key, [Validators.required]],
191
-      parent: [null, [Validators.required]],
192
-      name: [null, [Validators.required]],
193
-      value: [null, [Validators.required]],
194
-      orders: [0, [Validators.required]],
195
-      extra3: [0, [Validators.required]],
196
-      desc: [null, [Validators.required]],
197
-    });
217
+    if(this.checkedDictionary.type === 'dictionaryTree'){
218
+      this.validateForm = this.fb.group({
219
+        key: [this.checkedDictionary.key, [Validators.required]],
220
+        parent: [null, [Validators.required]],
221
+        name: [null, [Validators.required]],
222
+        value: [null, [Validators.required]],
223
+        orders: [0, [Validators.required]],
224
+        extra3: [0, [Validators.required]],
225
+        desc: [null, [Validators.required]],
226
+      });
227
+    } else if(this.checkedDictionary.type === 'dictionary'){
228
+      this.validateForm = this.fb.group({
229
+        key: [this.checkedDictionary.key, [Validators.required]],
230
+        name: [null, [Validators.required]],
231
+        value: [null, [Validators.required]],
232
+        orders: [0, [Validators.required]],
233
+        desc: [null, [Validators.required]],
234
+      });
235
+    }
236
+
198 237
   }
199 238
 
200 239
   // 新增/编辑提交
@@ -207,31 +246,52 @@ export class DataDictionaryComponent implements OnInit {
207 246
     this.btnLoading = true;
208 247
     let postData;
209 248
 
210
-    if (this.add) {
211
-      postData = {
212
-        hosId: this.hosId,
213
-        key: this.validateForm.value.key,
214
-        parent: this.validateForm.value.parent,
215
-        name: this.validateForm.value.name,
216
-        value: this.validateForm.value.value,
217
-        orders: this.validateForm.value.orders,
218
-        extra3: this.validateForm.value.extra3,
219
-        desc: this.validateForm.value.desc,
220
-        level: 2,
221
-      };
222
-    } else {
223
-      postData = {
224
-        hosId: this.hosId,
225
-        key: this.validateForm.value.key,
226
-        parent: this.validateForm.value.parent,
227
-        name: this.validateForm.value.name,
228
-        value: this.validateForm.value.value,
229
-        orders: this.validateForm.value.orders,
230
-        extra3: this.validateForm.value.extra3,
231
-        desc: this.validateForm.value.desc,
232
-        id: this.dataEdit.id,
233
-        level: 2,
234
-      };
249
+    if(this.checkedDictionary.type === 'dictionaryTree'){
250
+      if (this.add) {
251
+        postData = {
252
+          hosId: this.hosId,
253
+          key: this.validateForm.value.key,
254
+          parent: this.validateForm.value.parent,
255
+          name: this.validateForm.value.name,
256
+          value: this.validateForm.value.value,
257
+          orders: this.validateForm.value.orders,
258
+          extra3: this.validateForm.value.extra3,
259
+          desc: this.validateForm.value.desc,
260
+          level: 2,
261
+        };
262
+      } else {
263
+        postData = {
264
+          hosId: this.hosId,
265
+          key: this.validateForm.value.key,
266
+          parent: this.validateForm.value.parent,
267
+          name: this.validateForm.value.name,
268
+          value: this.validateForm.value.value,
269
+          orders: this.validateForm.value.orders,
270
+          extra3: this.validateForm.value.extra3,
271
+          desc: this.validateForm.value.desc,
272
+          id: this.dataEdit.id,
273
+          level: 2,
274
+        };
275
+      }
276
+    }else if(this.checkedDictionary.type === 'dictionary'){
277
+      if (this.add) {
278
+        postData = {
279
+          key: this.validateForm.value.key,
280
+          name: this.validateForm.value.name,
281
+          value: this.validateForm.value.value,
282
+          orders: this.validateForm.value.orders,
283
+          desc: this.validateForm.value.desc,
284
+        };
285
+      } else {
286
+        postData = {
287
+          key: this.validateForm.value.key,
288
+          name: this.validateForm.value.name,
289
+          value: this.validateForm.value.value,
290
+          orders: this.validateForm.value.orders,
291
+          desc: this.validateForm.value.desc,
292
+          id: this.dataEdit.id,
293
+        };
294
+      }
235 295
     }
236 296
     this.addHandler(postData);
237 297
   }
@@ -239,7 +299,7 @@ export class DataDictionaryComponent implements OnInit {
239 299
   //新增/编辑
240 300
   addHandler(postData) {
241 301
     this.mainService
242
-      .simplePost("addData", "dictionaryTree", postData)
302
+      .simplePost("addData", this.checkedDictionary.type, postData)
243 303
       .subscribe((result) => {
244 304
         this.hideModal();
245 305
         this.btnLoading = false;
@@ -278,7 +338,7 @@ export class DataDictionaryComponent implements OnInit {
278 338
     this.btnLoading = true;
279 339
     let selectedDictionary = this.selectedDictionary.map((item) => item.id);
280 340
     let postData = this.isDelSingle ? [this.dataEdit.id] : selectedDictionary;
281
-    this.mainService.simplePost("rmvData", "dictionaryTree", postData).subscribe((result) => {
341
+    this.mainService.simplePost("rmvData", this.checkedDictionary.type, postData).subscribe((result) => {
282 342
       this.hideDelDictionaryModal();
283 343
       this.btnLoading = false;
284 344
       if (result.status == 200) {

+ 27 - 17
src/app/views/task-type-management/task-type-management.component.html

@@ -42,20 +42,24 @@
42 42
     <div class="list" *ngIf="!taskTypeLoading&&!loading4&&((add&&allTaskType.length===0)||allTaskType.length)">
43 43
       <!-- 基础信息 -->
44 44
       <div *ngIf="tabModalName=='jcxx'">
45
-        <nz-form-label class="label" nzRequired>类型名称</nz-form-label>
46
-        <input nz-input class="mb8" [(ngModel)]="taskName" placeholder="请填写类型名称" nzSize="default" />
47
-        <div nz-row class="mb8">
48
-          <nz-form-label class="label" nzRequired nz-col nzSpan="5" style="text-align: left;">关联班次</nz-form-label>
49
-          <div nz-col nzSpan="18" class="mt8">
45
+        <div nz-row class="mb8 display_flex align-items_center">
46
+          <nz-form-label class="label" nzRequired>类型名称</nz-form-label>
47
+          <input nz-input class="flex_1" [(ngModel)]="taskName" placeholder="请填写类型名称" nzSize="default" />
48
+        </div>
49
+        <div nz-row class="mb8 display_flex align-items_center">
50
+          <nz-form-label class="label" nzRequired nz-col style="text-align: left;">关联班次</nz-form-label>
51
+          <div nz-col class="flex_1">
50 52
             <nz-checkbox-group class="w100" [(ngModel)]="allScheduleClass"></nz-checkbox-group>
51 53
           </div>
52 54
         </div>
53
-        <nz-form-label class="label" nzRequired>关联类型</nz-form-label>
54
-        <!-- 关联类型禁止修改 -->
55
-        <nz-select class="mb8 w100" nzShowSearch nzPlaceHolder="请选择关联类型" [ngModel]="association.id"
56
-          (ngModelChange)="asso($event)" [nzDisabled]="!add">
57
-          <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allAssociation"></nz-option>
58
-        </nz-select>
55
+        <div nz-row class="mb8 display_flex align-items_center">
56
+          <nz-form-label class="label" nzRequired>关联类型</nz-form-label>
57
+          <!-- 关联类型禁止修改 -->
58
+          <nz-select class="flex_1" nzShowSearch nzPlaceHolder="请选择关联类型" [ngModel]="association.id"
59
+            (ngModelChange)="asso($event)" [nzDisabled]="!add">
60
+            <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allAssociation"></nz-option>
61
+          </nz-select>
62
+        </div>
59 63
         <ng-container *ngIf="association.value == 'ordinary'">
60 64
           <nz-form-label class="label" nzRequired>关联业务</nz-form-label>
61 65
           <!-- 关联业务禁止修改 -->
@@ -275,17 +279,23 @@
275 279
           <nz-form-label class="label">携带设备</nz-form-label>
276 280
           <nz-checkbox-group class="handlerType" [nzDisabled]="isRemarks == 1" [(ngModel)]="carryEquipmentIds"></nz-checkbox-group>
277 281
         </div>
278
-        <div nz-row>
282
+        <div nz-row class="mb8 display_flex align-items_center">
279 283
           <nz-form-label class="label">急单权重</nz-form-label>
280
-          <input nz-input type="number" class="mb8" [(ngModel)]="urgeWeight" placeholder="请填写急单权重" nzSize="default" />
284
+          <input nz-input type="number" class="flex_1" [(ngModel)]="urgeWeight" placeholder="请填写急单权重" nzSize="default" />
281 285
         </div>
282
-        <div nz-row>
286
+        <div nz-row class="mb8 display_flex align-items_center">
283 287
           <nz-form-label class="label">普单权重</nz-form-label>
284
-          <input nz-input type="number" class="mb8" [(ngModel)]="commonWeight" placeholder="请填写普单权重" nzSize="default" />
288
+          <input nz-input type="number" class="flex_1" [(ngModel)]="commonWeight" placeholder="请填写普单权重" nzSize="default" />
285 289
         </div>
286
-        <div nz-row>
290
+        <div nz-row class="mb8 display_flex align-items_center">
287 291
           <nz-form-label class="label">统计备注</nz-form-label>
288
-          <input nz-input type="text" class="mb8" [(ngModel)]="countRemark" placeholder="请填写统计备注" nzSize="default" />
292
+          <input nz-input type="text" class="flex_1" [(ngModel)]="countRemark" placeholder="请填写统计备注" nzSize="default" />
293
+        </div>
294
+        <div nz-row class="mb8 display_flex align-items_center">
295
+          <nz-form-label class="label">统计分类</nz-form-label>
296
+          <nz-select class="flex_1" nzShowSearch nzPlaceHolder="请选择统计分类" [(ngModel)]="statisticsDateType.id">
297
+            <nz-option nzLabel="{{data.name}}" nzValue="{{data.id}}" *ngFor="let data of allStatisticsDateType"></nz-option>
298
+          </nz-select>
289 299
         </div>
290 300
       </div>
291 301
       <!-- 规则信息 -->

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

@@ -77,6 +77,7 @@ export class TaskTypeManagementComponent implements OnInit {
77 77
   //基础信息请求参数
78 78
   hosId; //当前院区
79 79
   allAssociation: Array<any>; //关联类型
80
+  allStatisticsDateType: Array<any>; //统计分类
80 81
   allRelatedBusiness: Array<any>; //关联业务
81 82
   allTaskType = []; //任务类型列表
82 83
   allTaskTypeShow; //任务类型列表选择标识
@@ -91,6 +92,10 @@ export class TaskTypeManagementComponent implements OnInit {
91 92
     id: "",
92 93
     value: "",
93 94
   }; //关联类型
95
+  statisticsDateType: any = {
96
+    id: "",
97
+    value: "",
98
+  }; //统计分类
94 99
   relatedBusiness: any = {
95 100
     id: "",
96 101
     value: "",
@@ -321,6 +326,7 @@ export class TaskTypeManagementComponent implements OnInit {
321 326
 
322 327
     this.getAllHospital(); // 获取所有院区
323 328
     this.getAllAssociation(); // 获取所有关联类型
329
+    this.getallStatisticsDateType(); // 获取统计分类
324 330
     this.getAllRelatedBusiness(); // 获取所有关联业务
325 331
     this.getAllGoods(); //获取携带设备
326 332
     this.getAllScheduleClass(); //获取班次列表
@@ -615,6 +621,15 @@ export class TaskTypeManagementComponent implements OnInit {
615 621
         that.allAssociation = data;
616 622
       });
617 623
   }
624
+  // 获取统计分类
625
+  getallStatisticsDateType() {
626
+    var that = this;
627
+    that.mainService
628
+      .getDictionary("list", "statistics_date_type")
629
+      .subscribe((data) => {
630
+        that.allStatisticsDateType = data;
631
+      });
632
+  }
618 633
   // 获取是否限制业务发起时间-字典
619 634
   getReserveType() {
620 635
     this.mainService
@@ -839,6 +854,17 @@ export class TaskTypeManagementComponent implements OnInit {
839 854
       id: data.associationType.id + "",
840 855
       value: data.associationType.value,
841 856
     };
857
+    if(data.statisticsDateType){
858
+      this.statisticsDateType = {
859
+        id: data.statisticsDateType.id + "",
860
+        value: data.statisticsDateType.value,
861
+      };
862
+    }else{
863
+      this.statisticsDateType = {
864
+        id: null,
865
+        value: "",
866
+      };
867
+    }
842 868
     this.getType();
843 869
     this.departments = [];
844 870
     this.mapOfCheckedId = {};
@@ -1152,6 +1178,9 @@ export class TaskTypeManagementComponent implements OnInit {
1152 1178
       that.showPromptModal(that.add ? "新增" : "编辑", false, "请选择关联类型");
1153 1179
       return;
1154 1180
     }
1181
+    if (this.statisticsDateType.id) {
1182
+      this.taskData.taskType["statisticsDateType"] = this.statisticsDateType;
1183
+    }
1155 1184
     if (this.tabModalName == "ysgc") {
1156 1185
       if (!this.departmentStrategy.idv) {
1157 1186
         that.showPromptModal(

+ 3 - 0
src/common.less

@@ -16,6 +16,9 @@
16 16
 .w100 {
17 17
   width: 100% !important;
18 18
 }
19
+.w135 {
20
+  width: 135px !important;
21
+}
19 22
 .wp75 {
20 23
   width: 75% !important;
21 24
 }