瀏覽代碼

巡检页码自己填写

seimin 9 月之前
父節點
當前提交
fca1ba5726

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

@@ -192,6 +192,14 @@
192 192
                 </nz-input-group>
193 193
               </nz-form-control>
194 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 203
           </form>
196 204
         </div>
197 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 165
   initPageForm() {
166 166
     this.validatePageForm = this.fb.group({
167 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 408
       postData = {
408 409
         name: this.validatePageForm.value.name,
409
-        orders: this.pageList.length + 1,
410
+        orders: this.validatePageForm.value.orders,
410 411
         hosId: this.currentHospital.id,
411 412
         formId: +this.route.snapshot.paramMap.get("id"),
412 413
       };
@@ -416,6 +417,7 @@ export class InspectionConfigurationItemComponent implements OnInit, AfterViewIn
416 417
         ...this.coopData,
417 418
         ...{
418 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 452
     this.pageModal = true;
451 453
     this.coopData = data;
452 454
     this.validatePageForm.controls.name.setValue(data.name); //名称
455
+    this.validatePageForm.controls.orders.setValue(data.orders); //页码
453 456
   }
454 457
 
455 458
   // 展示信息提示框(con:提示信息,success:操作是否成功,promptInfo:操作结果提示信息)