浏览代码

巡检页码自己填写

seimin 9 月之前
父节点
当前提交
fca1ba5726

+ 8 - 0
src/app/views/inspection-configuration-item/inspection-configuration-item.component.html

@@ -192,6 +192,14 @@
192
                 </nz-input-group>
192
                 </nz-input-group>
193
               </nz-form-control>
193
               </nz-form-control>
194
             </nz-form-item>
194
             </nz-form-item>
195
+            <nz-form-item>
196
+              <nz-form-label [nzSpan]="4" nzRequired nzFor="orders">页码</nz-form-label>
197
+              <nz-form-control [nzSpan]="20" nzErrorTip="请输入页码!">
198
+                <nz-input-group>
199
+                  <nz-input-number class="w100" formControlName="orders" nzPlaceHolder="请输入页码" [nzMin]="1" [nzStep]="1" [nzPrecision]="0"></nz-input-number>
200
+                </nz-input-group>
201
+              </nz-form-control>
202
+            </nz-form-item>
195
           </form>
203
           </form>
196
         </div>
204
         </div>
197
         <div class=" display_flex justify-content_flex-center">
205
         <div class=" display_flex justify-content_flex-center">

+ 4 - 1
src/app/views/inspection-configuration-item/inspection-configuration-item.component.ts

@@ -165,6 +165,7 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
165
   initPageForm() {
165
   initPageForm() {
166
     this.validatePageForm = this.fb.group({
166
     this.validatePageForm = this.fb.group({
167
       name: [null, [Validators.required, Validators.pattern(/\S/)]],//标题
167
       name: [null, [Validators.required, Validators.pattern(/\S/)]],//标题
168
+      orders: [null, [Validators.required]],//页码
168
     });
169
     });
169
   }
170
   }
170
 
171
 
@@ -406,7 +407,7 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
406
       //增加
407
       //增加
407
       postData = {
408
       postData = {
408
         name: this.validatePageForm.value.name,
409
         name: this.validatePageForm.value.name,
409
-        orders: this.pageList.length + 1,
410
+        orders: this.validatePageForm.value.orders,
410
         hosId: this.currentHospital.id,
411
         hosId: this.currentHospital.id,
411
         formId: +this.route.snapshot.paramMap.get("id"),
412
         formId: +this.route.snapshot.paramMap.get("id"),
412
       };
413
       };
@@ -416,6 +417,7 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
416
         ...this.coopData,
417
         ...this.coopData,
417
         ...{
418
         ...{
418
           name: this.validatePageForm.value.name,
419
           name: this.validatePageForm.value.name,
420
+          orders: this.validatePageForm.value.orders,
419
         }
421
         }
420
       };
422
       };
421
     }
423
     }
@@ -450,6 +452,7 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
450
     this.pageModal = true;
452
     this.pageModal = true;
451
     this.coopData = data;
453
     this.coopData = data;
452
     this.validatePageForm.controls.name.setValue(data.name); //名称
454
     this.validatePageForm.controls.name.setValue(data.name); //名称
455
+    this.validatePageForm.controls.orders.setValue(data.orders); //页码
453
   }
456
   }
454
 
457
 
455
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)
458
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)