|
@@ -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);
|