|
|
|
@ -41,7 +41,7 @@ export class DiscountPackageEditComponent implements OnInit { |
|
|
|
|
previewImage: string | undefined = ''; |
|
|
|
|
previewVisible = false; |
|
|
|
|
discountList = []; // 列表数据
|
|
|
|
|
usingScope = []; // 列表数据
|
|
|
|
|
agentData = []; // 列表数据
|
|
|
|
|
listImg = []; |
|
|
|
|
bannerImg = []; |
|
|
|
|
detailsImg = []; |
|
|
|
@ -63,8 +63,17 @@ export class DiscountPackageEditComponent implements OnInit { |
|
|
|
|
this.commonsService.getDictionary('USING_ATTRIBUTION', data => { |
|
|
|
|
this.usingAttribution = data['return_data']; |
|
|
|
|
}); |
|
|
|
|
this.commonsService.getDictionary('USING_RANGE', data => { |
|
|
|
|
this.usingScope = data['return_data']; |
|
|
|
|
const whereObject = { |
|
|
|
|
pageNum: 1 , |
|
|
|
|
pageSize: 800 , |
|
|
|
|
type: 1 |
|
|
|
|
}; |
|
|
|
|
this.agent.getListAgent(whereObject, data => { |
|
|
|
|
if (data['return_code'] === '000000') { |
|
|
|
|
this.agentData = data['return_data'].list; |
|
|
|
|
} else { |
|
|
|
|
this.message.error(data['return_msg']); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.activatedRoute.queryParams.subscribe(queryParams => { |
|
|
|
|
if (queryParams.id != null) { |
|
|
|
@ -84,7 +93,7 @@ export class DiscountPackageEditComponent implements OnInit { |
|
|
|
|
this.validateFormAward = this.fb.group({ |
|
|
|
|
discountId: [null, [Validators.required]], |
|
|
|
|
num: [null, [Validators.required]], |
|
|
|
|
usingScope: [null, [Validators.required]], |
|
|
|
|
agentId: [null, [Validators.required]], |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -329,10 +338,10 @@ export class DiscountPackageEditComponent implements OnInit { |
|
|
|
|
const params = { |
|
|
|
|
pageNum: 1, |
|
|
|
|
pageSize: 10000, |
|
|
|
|
useScope: e |
|
|
|
|
agentId: e |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
this.discount.getDiscountList(params , data => { |
|
|
|
|
this.agent.getDiscountAgentList(params , data => { |
|
|
|
|
this.discountList = data['return_data'].list; |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|