From 1fb88abfa24186764387507e40cb5c13254bedc8 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 21 Mar 2023 17:31:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay-qr-code-list.component.html | 1 + .../pay-qr-code-list.component.ts | 15 +++++++++++- ...tore-discount-activity-edit.component.html | 22 ++++++++++++++++-- .../store-discount-activity-edit.component.ts | 23 ++++++++++++++++--- src/app/services/pay-qr-code.service.ts | 11 +++++++++ src/environments/environment.ts | 4 ++-- 6 files changed, 68 insertions(+), 8 deletions(-) diff --git a/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.html b/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.html index e706aea..e2c4192 100644 --- a/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.html +++ b/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.html @@ -127,6 +127,7 @@ + diff --git a/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.ts b/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.ts index d7d2e6e..bc3f4a6 100644 --- a/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.ts +++ b/src/app/admin/pay-qr-code/pay-qr-code-list/pay-qr-code-list.component.ts @@ -19,7 +19,7 @@ export class PayQrCodeListComponent implements OnInit { userType: number; baseUrl = environment.baseUrl; - + FILE_URL = environment.imageUrl; loadingObject = { spinning: false, msg: '加载中' @@ -545,4 +545,17 @@ export class PayQrCodeListComponent implements OnInit { this.salesmanDataArray = []; } } + + exportQrCode() { + this.loadingObject.spinning = true; + this.loadingObject.msg = '导出中...'; + this.payQrCodeService.exportQrCodeList(this.whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.spinning = false; + }); + } } diff --git a/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html b/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html index fe17f1d..7819e34 100644 --- a/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html +++ b/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.html @@ -13,14 +13,32 @@
- 门店 + 商户 - + + + + + + + + 门店 + + + + 参与方式 + + + + + + + 优惠活动名称 diff --git a/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts b/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts index a5bf379..aebf0c0 100644 --- a/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts +++ b/src/app/admin/store-discount-activity/store-discount-activity-edit/store-discount-activity-edit.component.ts @@ -6,6 +6,8 @@ import {ValidatorsService} from '../../../services/validators.service'; import {StoreDiscountActivityService} from '../../../services/store-discount-activity.service'; import {StoreService} from '../../../services/store.service'; import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {MerService} from '../../../services/mer.service'; +import {CommonsService} from '../../../services/commons.service'; @Component({ selector: 'app-store-discount-activity-edit', @@ -18,10 +20,14 @@ export class StoreDiscountActivityEditComponent implements OnInit { btnLoading = false; storeArray = []; + merArray = []; + discountActivityPartakeWayArray = []; constructor(private form: FormBuilder, private modal: NzModalService, + private commonsService: CommonsService, private storeDiscountActivityService: StoreDiscountActivityService, + private merService: MerService, private storeService: StoreService, private activatedRoute: ActivatedRoute, private router: Router) { } @@ -29,7 +35,9 @@ export class StoreDiscountActivityEditComponent implements OnInit { ngOnInit(): void { this.dataForm = this.form.group({ id: [null], - storeId: [null, [Validators.required]], + merId: [null, [Validators.required]], + storeId: [null], + partakeWay: ['1', [Validators.required]], name: [null, [Validators.required]], discountType: [1, [Validators.required]], discountCondition: [0, [Validators.required]], @@ -38,6 +46,10 @@ export class StoreDiscountActivityEditComponent implements OnInit { endTime: [null, [Validators.required]], }); + this.commonsService.getDictionary('DISCOUNT_ACTIVITY_PARTAKE_WAY', data => { + this.discountActivityPartakeWayArray = data['return_data']; + }); + this.activatedRoute.queryParams.subscribe(queryParams => { if (queryParams['id'] != null) { this.storeDiscountActivityService.getActivityDetail(queryParams['id'], data => { @@ -48,8 +60,8 @@ export class StoreDiscountActivityEditComponent implements OnInit { } }); - this.storeService.getStoreList({pageNum: 1, pageSize: 99999}, data => { - this.storeArray = data['return_data']['list']; + this.merService.getMerList({pageNum: 1, pageSize: 99999}, data => { + this.merArray = data['return_data']['list']; }); } @@ -83,4 +95,9 @@ export class StoreDiscountActivityEditComponent implements OnInit { }); } + getStore(merId: number) { + this.storeService.getStoreListByMer({ merId: merId, pageNum: 1, pageSize: 99999}, data => { + this.storeArray = data['return_data']['list']; + }); + } } diff --git a/src/app/services/pay-qr-code.service.ts b/src/app/services/pay-qr-code.service.ts index 944f4dc..3909665 100644 --- a/src/app/services/pay-qr-code.service.ts +++ b/src/app/services/pay-qr-code.service.ts @@ -100,4 +100,15 @@ export class PayQrCodeService { callBack(data); }); } + + /** + * 查询二维码列表 + * @param paramObject 参数 + * @param callBack + */ + exportQrCodeList(param: object, callBack) { + this.http.get(environment.baseUrl + 'payQrCode/exportQrCodeList?' + this.commonsService.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 7fbf062..a67d196 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,8 +5,8 @@ export const environment = { production: false, // baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - baseUrl: 'http://localhost:9602/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'http://gratia-pay.dctpay.com/filesystem/', + baseUrl: 'https://gratia-pay.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://gratia-pay.dctpay.com/filesystem/', obsUrl: 'https://gratia-pay-test.obs.cn-southwest-2.myhuaweicloud.com', };