Browse Source

轮巡建单样式修改

seimin 3 years ago
parent
commit
99224a6b39

+ 1 - 1
src/app/share/batch-orders/batch-orders.component.html

@@ -21,7 +21,7 @@
21 21
         </tr>
22 22
       </thead>
23 23
       <tbody>
24
-        <tr *ngFor="let data of listOfData;let index=index;">
24
+        <tr *ngFor="let data of listOfData;let index=index;" (click)="selectedListData(data.id)">
25 25
           <td nzShowCheckbox [(nzChecked)]="mapOfCheckedId[data.id]" (nzCheckedChange)="refreshStatus()"></td>
26 26
           <td>{{index+(pageIndex-1)*10+1}}</td>
27 27
           <td>{{data.createDept.dept}}</td>

+ 5 - 3
src/app/share/batch-orders/batch-orders.component.less

@@ -74,9 +74,9 @@
74 74
     }
75 75
   }
76 76
   .pagination {
77
-    margin-top: 14px;
78 77
     position: absolute;
79 78
     right: 5px;
79
+    bottom: 24px;
80 80
   }
81 81
   .detail {
82 82
     width: 1000px;
@@ -116,7 +116,9 @@
116 116
       width: 960px;
117 117
       border: 1px solid #e5e9ed;
118 118
       border-radius: 5px;
119
-      overflow: hidden;
119
+      max-height: 462px;
120
+      overflow: auto;
121
+
120 122
 
121 123
       .tab {
122 124
         width: 100%;
@@ -469,7 +471,7 @@
469 471
       justify-content: center;
470 472
       align-items: center;
471 473
       width: 60%;
472
-      margin: 48px auto 0;
474
+      margin: 16px auto 0;
473 475
 
474 476
       .btn {
475 477
         margin: 9px;

+ 24 - 17
src/app/share/batch-orders/batch-orders.component.ts

@@ -35,7 +35,7 @@ export class BatchOrdersComponent implements OnInit {
35 35
     private fb: FormBuilder,
36 36
     private mainService: MainService,
37 37
     private tool: ToolService,
38
-    private message: NzMessageService,
38
+    private message: NzMessageService
39 39
   ) {}
40 40
   // 初始化表单
41 41
   initForm() {
@@ -45,6 +45,11 @@ export class BatchOrdersComponent implements OnInit {
45 45
       endDepartment: [null, [Validators.required]],
46 46
     });
47 47
   }
48
+  //表格整行选中
49
+  selectedListData(id) {
50
+    this.mapOfCheckedId[id] = !this.mapOfCheckedId[id];
51
+    this.refreshStatus();
52
+  }
48 53
   // 关闭批量建单设置弹窗
49 54
   closeHandler() {
50 55
     this.close.emit("false");
@@ -285,23 +290,25 @@ export class BatchOrdersComponent implements OnInit {
285 290
   }
286 291
   confirmDel() {
287 292
     this.loading3 = true;
288
-    this.mainService.simplePost("rmvData", "orderPlanRule",this.coopId.split(',')).subscribe((data) => {
289
-      this.loading3 = false;
290
-      this.delModal = false;
291
-      if (data.status == 200) {
292
-        if (
293
-          this.listOfData.length == 1 &&
294
-          this.pageIndex == Math.ceil(this.listLength / this.pageSize)
295
-        ) {
296
-          this.listLength--;
297
-          this.pageIndex = Math.ceil(this.listLength / this.pageSize);
293
+    this.mainService
294
+      .simplePost("rmvData", "orderPlanRule", this.coopId.split(","))
295
+      .subscribe((data) => {
296
+        this.loading3 = false;
297
+        this.delModal = false;
298
+        if (data.status == 200) {
299
+          if (
300
+            this.listOfData.length == 1 &&
301
+            this.pageIndex == Math.ceil(this.listLength / this.pageSize)
302
+          ) {
303
+            this.listLength--;
304
+            this.pageIndex = Math.ceil(this.listLength / this.pageSize);
305
+          }
306
+          this.message.success("删除成功");
307
+          this.getList(1);
308
+        } else {
309
+          this.message.error("删除失败");
298 310
         }
299
-        this.message.success('删除成功');
300
-        this.getList(1);
301
-      } else {
302
-        this.message.error('删除失败');
303
-      }
304
-    });
311
+      });
305 312
   }
306 313
   ngOnInit() {
307 314
     console.log(this.selectedBatchOrder);