From be6cff36c46e0ddde2e72031cf55aba4629b23ac Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Mon, 29 Nov 2021 22:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../discount-package-edit.component.html | 255 +++++++++++ .../discount-package-edit.component.scss | 66 +++ .../discount-package-edit.component.ts | 409 ++++++++++++++++++ .../discount-package-list.component.html | 118 +++++ .../discount-package-list.component.scss | 3 + .../discount-package-list.component.ts | 125 ++++++ .../discount-package-routing.module.ts | 16 + .../discount-package.module.ts | 29 ++ src/app/app-routing.module.ts | 6 +- src/app/services/discount-package.service.ts | 49 +++ 10 files changed, 1075 insertions(+), 1 deletion(-) create mode 100644 src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.html create mode 100644 src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.scss create mode 100644 src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts create mode 100644 src/app/admin/discount-package/discount-package-list/discount-package-list.component.html create mode 100644 src/app/admin/discount-package/discount-package-list/discount-package-list.component.scss create mode 100644 src/app/admin/discount-package/discount-package-list/discount-package-list.component.ts create mode 100644 src/app/admin/discount-package/discount-package-routing.module.ts create mode 100644 src/app/admin/discount-package/discount-package.module.ts create mode 100644 src/app/services/discount-package.service.ts diff --git a/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.html b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.html new file mode 100644 index 0000000..3f08de5 --- /dev/null +++ b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.html @@ -0,0 +1,255 @@ + + + + 优惠包管理 + + + 编辑优惠券包 + + + +
+
+ + + + +
+
+
+ + 优惠券包标题 + + + + +
+
+ + 使用归属 + + + + + + +
+
+ + 优惠券包类型 + + + + + + + +
+
+ + 售卖价格 + + + + + + +
+
+ + 限购数量 + + + + +
+
+ + 列表展示图 + + + +
上传图片
+
+ + + + + +
+
+
+ +
+ + 轮播展示图 + + + +
上传图片
+
+ + + + + +
+
+
+
+ + 详情展示图 + + + +
上传图片
+
+ + + + + +
+
+
+
+
+ +
+ 共计 {{11}} 条数据 +
+ +
+ + + + 奖励名称 + 数量 + 图片 + 操作 + + + + + {{ data.name }} + {{ data.num }} + + + + + 删除 + + + + + +
+
+
+ + +
+
+
+
+ + + + +
基本信息
+
+ + 奖励名称 + + + + + + 奖励数量 + + + + + + 奖励图片 + + + +
上传图片
+
+ + + + + +
+
+
+
奖品信息
+
+
+
+ + 代理商 + + + + + {{control.agentName}} + + +
+
+ + 优惠券 + + + + + {{control.prizeName}} + + +
+
+ + 奖励数量 + + + {{control.prizeNum}} + + +
+
+
+ +
+ +
+
+
diff --git a/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.scss b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.scss new file mode 100644 index 0000000..0d27102 --- /dev/null +++ b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.scss @@ -0,0 +1,66 @@ +.main { + width: 90%; + margin-left: 5%; + .idCard { + img { + width: 200px; + } + .userImg { + width: 90px; + } + } + .post_p_l { + margin-left: 5% ; + } + .main_post_p { + font-size: 12px; + color: #999999; + margin-top: -10px; + } + .btn { + margin-top: 20px; + } + .bottom_solid { + border-bottom: 1px solid #e4e4e4; + } + .btn-post { + width: 20%; + margin-left: 40%; + margin-top: 40px; + } + +} +.pics{ + display: flex; + align-items: center; + +} +.pic{ + width:10rem; + height:8rem; + margin-right: 1rem; + position: relative; +} +.delPic{ + width:1rem !important; + height:1rem; + position: absolute; + right: -10px;top:-10px; +} +.btn { + margin-top: 20px; +} +.title { + width: 100%; + height: 46px; + line-height: 46px; + font-size: 16px; + text-align: center; + color: #1890ff; + background-color: #f3f9ff; + margin-bottom: 20px; +} +.head_img { + height: 60px; + width: 60px; +} diff --git a/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts new file mode 100644 index 0000000..8cdfe8b --- /dev/null +++ b/src/app/admin/discount-package/discount-package-edit/discount-package-edit.component.ts @@ -0,0 +1,409 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup, Validators} from '@angular/forms'; +import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {ActivatedRoute} from '_@angular_router@9.0.7@@angular/router'; +import {CouponService} from '../../../services/coupon.service'; +import {ActivateService} from '../../../services/activate.service'; +import {NzUploadFile} from 'ng-zorro-antd'; +import {environment} from '../../../../environments/environment'; +import {AgentService} from '../../../services/agent.service'; +import {CommonsService} from "../../../services/commons.service"; +import {DiscountPackageService} from "../../../services/discount-package.service"; + +function getBase64(file: File): Promise { + return new Promise((resolve, reject) => { + const reader = new FileReader(); + reader.readAsDataURL(file); + reader.onload = () => resolve(reader.result); + reader.onerror = error => reject(error); + }); +} + +@Component({ + selector: 'app-discount-package-edit', + templateUrl: './discount-package-edit.component.html', + styleUrls: ['./discount-package-edit.component.scss'] +}) +export class DiscountPackageEditComponent implements OnInit { + + validateForm!: FormGroup; + validateFormAward!: FormGroup; + data: any; + editFlag = false; + id: number; + agentId: number; + listOfOption: string[] = []; + listOfData = []; + agentData = []; + usingAttribution = []; + current = 0; + listOfControl = [{ + isEdit: true, + agentId: null, + agentName: null, + prizeNum: null, + prizeId: null, + prizeName: null, + loading : false + }]; + FILE_URL = environment.imageUrl; + POST_URL = environment.baseUrl; + isVisible = false; + logoFile = []; + previewImage: string | undefined = ''; + previewVisible = false; + discountList = []; // 列表数据 + + listImg = []; + bannerImg = []; + detailsImg = []; + constructor( + private fb: FormBuilder, + private coupon: CouponService, + private activate: ActivateService, + private message: NzMessageService, // 信息提示 + private activatedRoute: ActivatedRoute, + private agent: AgentService, + private commonsService: CommonsService, + private disCountPackage: DiscountPackageService, + ) { } + + ngOnInit(): void { + this.commonsService.getDictionary('USING_ATTRIBUTION', data => { + this.usingAttribution = data['return_data']; + }); + this.activatedRoute.queryParams.subscribe(queryParams => { + if (queryParams.id != null) { + this.editFlag = true; + this.id = queryParams.id; + this.getDetails(queryParams.id); + } + }); + this.validateForm = this.fb.group({ + title: [null, [Validators.required]], + usingAttribution: [null, [Validators.required]], + salesType: [null, [Validators.required]], + price: [null], + purchaseNum: [null], + }); + + this.validateFormAward = this.fb.group({ + name: [null, [Validators.required]], + num: [null, [Validators.required]], + }); + + const whereObject = { + pageNum: 1 , + pageSize: 800 , + status: 2 + }; + + const whereObjectA = { + pageNum: 1 , + pageSize: 800 , + type: 1 + }; + + this.getCouponList(whereObject); + this.getListAgent(whereObjectA); + + + } + + public getCouponList(whereObject) { + whereObject.status = 2; + this.coupon.getCouponList(whereObject, data => { + if (data['return_code'] === '000000') { + this.listOfOption = data['return_data'].list; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 绑定优惠券 + public getDiscount(id: number , i ): void { + this.listOfControl[i].agentName = this.agentData.find(item => { + return item.id === id; + }).agentName; + this.agentId = id; + const whereObject = {}; + whereObject['pageNum'] = 1; + whereObject['pageSize'] = 10000; + whereObject['agentId'] = id; + this.agent.getDiscountAgentList(whereObject, data => { + if (data['return_code'] === '000000') { + this.discountList = data['return_data'].list; + } else { + this.message.error(data['return_msg']); + } + }); + } + + getDiscountName(id: number , i ) { + this.listOfControl[i].prizeName = this.discountList.find(item => { + return item['highDiscount'].id === id; + })['highDiscount'].discountName; + console.log(this.listOfControl); + } + + public getListAgent(whereObject) { + this.agent.getListAgent(whereObject, data => { + if (data['return_code'] === '000000') { + this.agentData = data['return_data'].list; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 图片查看 + handlePreview = async (file: NzUploadFile) => { + if (!file.url && !file.preview) { + // tslint:disable-next-line:no-non-null-assertion + file.preview = await getBase64(file.originFileObj!); + } + this.previewImage = file.url || file.preview; + this.previewVisible = true; + } + + // 返回 + getBack() { + history.back(); + } + + // 重置 + public resetForm(): void { + this.validateForm.reset(); + } + + // 基本信息提交 + public editInfo(): void { + // tslint:disable-next-line:forin + for (const i in this.validateForm.controls) { + this.validateForm.controls[i].markAsDirty(); + this.validateForm.controls[i].updateValueAndValidity(); + if (this.validateForm.controls[i].errors != null) { + this.message.error('必填项不能为空'); + return; + } + } + + // 图片判断 + this.imgIsPost(); + + + if (this.editFlag) { + this.validateForm.value.id = this.id; + this.disCountPackage.updateCouponPackageInfo(this.validateForm.value, data => { + if (data['return_code'] === '000000') { + this.editFlag = true; + this.id = data['return_data'].id; + this.current += 1; + this.message.success('编辑成功'); + } else { + this.message.create('error', '编辑失败'); + } + }); + } else { + this.disCountPackage.insertCouponPackageInfo(this.validateForm.value, data => { + if (data['return_code'] === '000000') { + this.editFlag = true; + this.id = data['return_data'].id; + this.current += 1; + this.message.success('编辑成功'); + } else { + this.message.create('error', '编辑失败'); + } + }); + } + + } + + public imgIsPost(): boolean { + if (this.listImg.length !== 0) { + if (this.listImg[0]['response'] != null) { + this.validateForm.value.couponImg = this.listImg[0]['response']['return_data'][0]; + } else { + this.validateForm.value.couponImg = this.listImg[0].name; + } + } else { + this.message.error('请上传列表图片'); + return false; + } + + const bannerImg = []; + + if (this.bannerImg.length !== 0) { + for (const i of this.bannerImg) { + if (i['response'] != null) { + bannerImg.push(i['response']['return_data'][0]); + } else { + bannerImg.push(i.name); + } + } + } else { + this.message.error('请上传轮播展示图'); + return false; + } + const detailsImg = []; + + if (this.detailsImg.length !== 0) { + for (const i of this.detailsImg) { + if (i['response'] != null) { + detailsImg.push(i['response']['return_data'][0]); + } else { + detailsImg.push(i.name); + } + } + } else { + this.message.error('请上传详情展示图'); + return false; + } + } + + // 查询详情 + public getDetails(id) { + this.activate.getDetailById(id, data => { + if (data['return_code'] === '000000') { + data['return_data'].time = [new Date(data['return_data']['startTime']), new Date(data['return_data']['endTime'])]; + data['return_data'].type = String(data['return_data'].type); + data['return_data'].productIdArray = data['return_data'].ruleArray[0].productIdArray; + this.validateForm.patchValue(data['return_data']); + } else { + this.message.create('error', data['return_msg']); + } + }); + this.getListByActivityId(id); + + } + + getListByActivityId(id: number ) { + this.activate.getListByActivityId(id , data => { + if (data['return_code'] === '000000') { + this.listOfData = data['return_data']; + } else { + this.message.create('error', data['return_msg']); + } + }); + } + + // 上一步 + pre(): void { + this.current -= 1; + } + + // 下一步 + getNest(): void { + if (this.current === 0) { + this.editInfo(); + } else { + history.back(); + } + + } + + // 完成 + done(): void { + + } + + // 新增 + addField(i): void { + if ( + this.listOfControl[i].prizeId == null || + this.listOfControl[i].prizeNum == null || + this.listOfControl[i].agentId == null + ) { + this.message.error('请填写必填项!'); + return; + } + this.listOfControl[i].isEdit = false; + const control = { + isEdit: true, + agentId: null, + agentName: null, + prizeNum: null, + prizeId: null, + prizeName: null, + loading : false + }; + this.listOfControl.push(control); + + } + + // 删除资质 + removeField(i, e: MouseEvent): void { + e.preventDefault(); + if (this.listOfControl.length > 1) { + this.listOfControl.splice(i, 1); + this.listOfControl[i - 1].isEdit = true; + } + } + + + // 添加配置 + getAdd(): void { + this.isVisible = true; + } + + + handleOk(): void { + + // tslint:disable-next-line:forin + for (const i in this.validateFormAward.controls) { + this.validateFormAward.controls[i].markAsDirty(); + this.validateFormAward.controls[i].updateValueAndValidity(); + if (this.validateFormAward.controls[i].errors != null) { + this.message.error('必填项不能为空'); + return; + } + } + + if ( + this.listOfControl[this.listOfControl.length - 1].prizeId == null || + this.listOfControl[this.listOfControl.length - 1].prizeNum == null || + this.listOfControl[this.listOfControl.length - 1].agentId == null + ) { + this.message.error('请填写必填项!'); + return; + } + + this.validateFormAward.value.activityPrizes = this.listOfControl; + this.validateFormAward.value.activityInfoId = this.id; + if (this.logoFile.length !== 0) { + if (this.logoFile[0]['response'] != null) { + this.validateFormAward.value.img = this.logoFile[0]['response']['return_data'][0]; + } else { + this.validateFormAward.value.img = this.logoFile[0].name; + } + } + this.message.loading('生成奖品中!'); + this.activate.editActivityAward(this.validateFormAward.value , data => { + if (data['return_code'] === '000000') { + this.isVisible = false; + this.getListByActivityId(this.id); + this.message.success('编辑成功'); + } else { + this.message.create('error', '编辑失败'); + } + }); + + } + + handleCancel(): void { + this.isVisible = false; + } + + + deleteActivateAward(id: number) { + this.activate.deleteActivateAward(id , data => { + if (data['return_code'] === '000000') { + this.getListByActivityId(this.id); + this.message.success('成功'); + } else { + this.message.create('error', '编辑失败'); + } + }); + } +} diff --git a/src/app/admin/discount-package/discount-package-list/discount-package-list.component.html b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.html new file mode 100644 index 0000000..534cc4d --- /dev/null +++ b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.html @@ -0,0 +1,118 @@ + + + + + +
+
+
+
+ + 优惠券包名称 + + + + +
+
+ + 类型 + + + + + + + +
+
+ + 使用归属 + + + + + + +
+
+ + 优惠券包状态 + + + + + + + + +
+ +
+ +
+
+ + +
+
+
+
+ + +
+ 共计 {{total}} 条数据 +
+ +
+ + + + 编号 + 活动标题 + 活动类型 + 开始时间 + 结束时间 + 创建时间 + 活动状态 + 操作 + + + + + {{i+1}} + {{data.title}} + {{data.type | type}} + {{data.startTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.endTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.status | status}} + + 编辑 + 发布 + 结束 + 更多操作 + + + + + + +
+ + + diff --git a/src/app/admin/discount-package/discount-package-list/discount-package-list.component.scss b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.scss new file mode 100644 index 0000000..63e3f73 --- /dev/null +++ b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.scss @@ -0,0 +1,3 @@ +.table-td-operation a { + margin-right: 8px; +} diff --git a/src/app/admin/discount-package/discount-package-list/discount-package-list.component.ts b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.ts new file mode 100644 index 0000000..b348de3 --- /dev/null +++ b/src/app/admin/discount-package/discount-package-list/discount-package-list.component.ts @@ -0,0 +1,125 @@ +import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; +import {CompanyService} from '../../../services/company.service'; +import {ActivateService} from '../../../services/activate.service'; +import {IconService} from '../../../services/icon.service'; +import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {Router} from '_@angular_router@9.0.7@@angular/router'; +import {CommonsService} from '../../../services/commons.service'; +import {DiscountPackageService} from '../../../services/discount-package.service'; + +@Component({ + selector: 'app-discount-package-list', + templateUrl: './discount-package-list.component.html', + styleUrls: ['./discount-package-list.component.scss'] +}) +export class DiscountPackageListComponent implements OnInit { + + WEB_SERVE_URL = environment.imageUrl; + searchForm: FormGroup; // 搜索框 + requestData = []; // 列表数据 + usingAttribution = []; // 列表数据 + total: number; // 页码 + pageNum = 1; // 页码 + pageSize = 10; // 条码 + loading = true; + + constructor( + private form: FormBuilder, + private company: CompanyService, + private activate: ActivateService, + private iconService: IconService, + private message: NzMessageService, + private router: Router, + private discountPackage: DiscountPackageService, + private commonsService: CommonsService, + ) { + } + + ngOnInit(): void { + this.init(); + } + + public init(): void { + this.searchForm = this.form.group({ + title: [null], + salesType: [null], + usingAttribution: [null], + status: [null], + }); + this.getRequest(true, this.searchForm.value); + this.commonsService.getDictionary('USING_ATTRIBUTION ', data => { + this.usingAttribution = data['return_data']; + }); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + + this.loading = false; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.discountPackage.getDiscountPackageList(whereObject, data => { + if (data['return_code'] === '000000') { + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 重置 + public resetForm(): void { + this.searchForm.reset(); + } + + // 活动开始 + public startActivity(id: number): void { + this.activate.startActivity({activityId : id}, data => { + if (data['return_code'] === '000000') { + this.message.success(data['return_msg']); + this.getRequest(true, this.searchForm.value); + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 活动结束 + public endActivity(id: number): void { + this.activate.endActivity({activityId : id}, data => { + if (data['return_code'] === '000000') { + this.message.success(data['return_msg']); + this.getRequest(true, this.searchForm.value); + } else { + this.message.error(data['return_msg']); + } + }); + } + + + // 修改 + public getEdit(id: number): void { + this.router.navigate(['/admin/discount-package/discount-package-edit'], { + queryParams: { + id + } + }).then(r => console.log(r)); + } + + // 跳转中奖记录 + public jumpLotteryRecord(id: number): void { + this.router.navigate(['/admin/activate/activate-lottery-record'], { + queryParams: { + activityId: id + } + }).then(r => console.log(r)); + } + +} + diff --git a/src/app/admin/discount-package/discount-package-routing.module.ts b/src/app/admin/discount-package/discount-package-routing.module.ts new file mode 100644 index 0000000..527d51b --- /dev/null +++ b/src/app/admin/discount-package/discount-package-routing.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { Routes, RouterModule } from '@angular/router'; +import {DiscountPackageListComponent} from './discount-package-list/discount-package-list.component'; +import {DiscountPackageEditComponent} from './discount-package-edit/discount-package-edit.component'; + + +const routes: Routes = [ + { path: 'discount-package-list', component: DiscountPackageListComponent }, + { path: 'discount-package-edit', component: DiscountPackageEditComponent }, +]; + +@NgModule({ + imports: [RouterModule.forChild(routes)], + exports: [RouterModule] +}) +export class DiscountPackageRoutingModule { } diff --git a/src/app/admin/discount-package/discount-package.module.ts b/src/app/admin/discount-package/discount-package.module.ts new file mode 100644 index 0000000..1756814 --- /dev/null +++ b/src/app/admin/discount-package/discount-package.module.ts @@ -0,0 +1,29 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; + +import { DiscountPackageRoutingModule } from './discount-package-routing.module'; +import { DiscountPackageListComponent } from './discount-package-list/discount-package-list.component'; +import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {SeparateModule} from '../../common/separate/separate.module'; +import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms'; +import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module'; +import {RegionSelectorModule} from '../../common/region-selector/region-selector.module'; +import {AppCommonModule} from '../../app-common.module'; +import { DiscountPackageEditComponent } from './discount-package-edit/discount-package-edit.component'; + + +@NgModule({ + declarations: [DiscountPackageListComponent, DiscountPackageEditComponent], + imports: [ + CommonModule, + DiscountPackageRoutingModule, + NgZorroAntdModule, + SeparateModule, + ReactiveFormsModule, + FormsModule, + BreadcrumbModule, + RegionSelectorModule, + AppCommonModule + ] +}) +export class DiscountPackageModule { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index c6d7fd1..4bfd38e 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,7 +2,6 @@ import {NgModule} from '@angular/core'; import {Routes, RouterModule, RouteReuseStrategy} from '@angular/router'; import {NavigationComponent} from './admin/navigation/navigation.component'; import {InitGuardService} from './services/init-guard.service'; -import {RouteStrategyService} from "./services/route-strategy.service"; const routes: Routes = [ {path: '', pathMatch: 'full', redirectTo: 'adminLogin'}, @@ -97,6 +96,11 @@ const routes: Routes = [ loadChildren: () => import('./admin/config-manage/config-manage.module').then(m => m.ConfigManageModule), canActivate: [InitGuardService] }, + { + path: 'discount-package', + loadChildren: () => import('./admin/discount-package/discount-package.module').then(m => m.DiscountPackageModule), + canActivate: [InitGuardService] + }, ], }, ]; diff --git a/src/app/services/discount-package.service.ts b/src/app/services/discount-package.service.ts new file mode 100644 index 0000000..1e88154 --- /dev/null +++ b/src/app/services/discount-package.service.ts @@ -0,0 +1,49 @@ +import { Injectable } from '@angular/core'; +import {HttpClient} from '@angular/common/http'; +import {CommonsService} from './commons.service'; +import {environment} from '../../environments/environment'; + + +@Injectable({ + providedIn: 'root' +}) +export class DiscountPackageService { + + constructor( + private http: HttpClient, + private common: CommonsService + ) { } + + /** + * @Author Sum1Dream + * @methodName getDiscountPackageList + * @Description // 查询优惠券包列表 + * @Date 3:16 下午 2021/11/29 + * @Param [paramsObject , callBack] + */ + public getDiscountPackageList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highDiscountPackage/getDiscountPackageList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + + /** + * @Author Sum1Dream + * @methodName insertCouponPackageInfo + * @Description // 配置优惠券包基本信息 + * @Date 5:18 下午 2021/11/29 + * @Param [params: object, callBack] + */ + public insertCouponPackageInfo(params: object, callBack) { + this.http.post(environment.baseUrl + 'highDiscountPackage/insertCouponPackageInfo', params).subscribe(data => { + callBack(data); + }); + } + + public updateCouponPackageInfo(params: object, callBack) { + this.http.post(environment.baseUrl + 'highDiscountPackage/updateCouponPackageInfo', params).subscribe(data => { + callBack(data); + }); + } +}