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