diff --git a/src/app/admin/agent/agent-list/agent-list.component.html b/src/app/admin/agent/agent-list/agent-list.component.html index 639c67b..dcd6068 100644 --- a/src/app/admin/agent/agent-list/agent-list.component.html +++ b/src/app/admin/agent/agent-list/agent-list.component.html @@ -1,7 +1,7 @@ - +
@@ -109,11 +109,14 @@
+
优惠券 - @@ -144,6 +148,27 @@ + +
+ + 优惠券包 + + + + + + + + 数量 + + + + + +
+
+ - + + +
+
+ + +
+ +
+
+ +
+
diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts deleted file mode 100644 index e343a3d..0000000 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { PetrolStationManageComponent } from './petrol-station-manage'; - -describe('PetrolStationManageComponent', () => { - let component: PetrolStationManageComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ PetrolStationManageComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PetrolStationManageComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts index aa6c41c..d75ab0e 100644 --- a/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts +++ b/src/app/admin/tuanyou-agent/petrol-station-manage/petrol-station-manage.ts @@ -58,14 +58,16 @@ export class PetrolStationManageComponent implements OnInit { discountConfigData: PetrolStationManage[] = []; oilConfigModal = false; + priceRateConfigModal = false; oilNoArray = []; - - formatterPercent = (value: number) => `${value} 折`; - parserPercent = (value: string) => value.replace(' 折', ''); + priceRate = 100; + storeId; + formatterPercent = (value: number) => `${value} %`; + parserPercent = (value: string) => value.replace(' %', ''); constructor(private modal: NzModalService, - private message: NzMessageService, + private common: CommonsService, private tyAgentService: TyAgentService, private commonsService: CommonsService, private gasService: GasService, @@ -178,6 +180,29 @@ export class PetrolStationManageComponent implements OnInit { this.assignOrgModal = true; } + submitPriceRateConfig() { + let data = { + "codeType": this.storeId, + "codeValue": this.priceRate + } + + this.common.editConfig(data, data => { + if (data['return_code'] === '000000') { + this.modal.success({ + nzTitle: '提示', + nzContent: '操作成功', + }); + this.getOilStationPrice(this.storeId); + this.priceRateConfigModal = false; + } else { + this.modal.error({ + nzTitle: '提示', + nzContent: data['return_msg'], + }); + } + }); + } + /** * 关闭分配代理公司模态框 */ @@ -767,6 +792,14 @@ export class PetrolStationManageComponent implements OnInit { this.oilConfigModal = true; } + showPriceRateModalSubmit(storeId) { + this.priceRateConfigModal = true; + this.storeId = storeId; + this.commonsService.mappingSysNameOl(storeId, data => { + this.priceRate = data['return_data']['codeValue']; + }); + } + /** * 关闭油品配置模态框 */ diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 162724a..197c99d 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -25,6 +25,8 @@ import { DiscountStatusPipe, DisplayAreaPipe, DiscountCodeStatusPipe, + DiscountCodeStatusPipe2, + PhoneTranslate, RechargePricePipe, RechargeStatusPipe, ChannelMarkPipe, @@ -100,6 +102,8 @@ const PIPES = [ DiscountStatusPipe, DisplayAreaPipe, DiscountCodeStatusPipe, + DiscountCodeStatusPipe2, + PhoneTranslate, RechargePricePipe, RechargeStatusPipe, ChannelMarkPipe, diff --git a/src/app/app.module.ts b/src/app/app.module.ts index aaa238d..38039df 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -17,11 +17,8 @@ import {NavigationModule} from './admin/navigation/navigation.module'; import {AppCommonModule} from './app-common.module'; import {NgxEchartsModule} from 'ngx-echarts'; import {HashLocationStrategy, LocationStrategy} from '@angular/common'; -import {RouterModule} from '@angular/router'; registerLocaleData(zh); - - @NgModule({ declarations: [ AppComponent, diff --git a/src/app/pipes/api-coupon/sc-printer.pipe.ts b/src/app/pipes/api-coupon/sc-printer.pipe.ts index 0213112..bd45c31 100644 --- a/src/app/pipes/api-coupon/sc-printer.pipe.ts +++ b/src/app/pipes/api-coupon/sc-printer.pipe.ts @@ -23,3 +23,5 @@ export class ScPrinterPipe implements PipeTransform { } } + + diff --git a/src/app/pipes/discount-code-status.pipe.ts b/src/app/pipes/discount-code-status.pipe.ts index ac390ef..b980386 100644 --- a/src/app/pipes/discount-code-status.pipe.ts +++ b/src/app/pipes/discount-code-status.pipe.ts @@ -21,3 +21,37 @@ export class DiscountCodeStatusPipe implements PipeTransform { } } + +@Pipe({ + name: 'discountCodeStatus2' +}) +export class DiscountCodeStatusPipe2 implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 0: + return '已过期'; + case 1: + return '未使用'; + case 2: + return '已使用'; + } + } + +} + +@Pipe({ + name: 'phoneTranslate' +}) +export class PhoneTranslate implements PipeTransform { + + transform(value: string): string { + if(value&&value.length==11){ + return value.substring(0, 3) + "****"+value.substring(7, 11); + }else{ + return value + } + + } + +} \ No newline at end of file diff --git a/src/app/pipes/display-area.pipe.ts b/src/app/pipes/display-area.pipe.ts index b7eee82..545961d 100644 --- a/src/app/pipes/display-area.pipe.ts +++ b/src/app/pipes/display-area.pipe.ts @@ -8,7 +8,7 @@ export class DisplayAreaPipe implements PipeTransform { transform(value: any): string { switch (value) { case 1: - return '赠券专区'; + return '加油专区'; case 2: return '金币专区'; case 3: @@ -17,6 +17,8 @@ export class DisplayAreaPipe implements PipeTransform { return '优选商品'; case 5: return '工会卡专区'; + case 7: + return '停车券专区'; case null: return '消费券'; } diff --git a/src/app/pipes/index/product-config.pipe.ts b/src/app/pipes/index/product-config.pipe.ts index cdef8f9..c1e240f 100644 --- a/src/app/pipes/index/product-config.pipe.ts +++ b/src/app/pipes/index/product-config.pipe.ts @@ -19,6 +19,8 @@ export class ProductConfigPipe implements PipeTransform { return '在线加油接口'; case 'STARBUCKS_CONFIG': return '星巴克接口'; + case 'PETRO_COUPON': + return '中石油'; } } diff --git a/src/app/pipes/order/order-product-type.pipe.ts b/src/app/pipes/order/order-product-type.pipe.ts index f256d70..42aec27 100644 --- a/src/app/pipes/order/order-product-type.pipe.ts +++ b/src/app/pipes/order/order-product-type.pipe.ts @@ -24,6 +24,8 @@ export class OrderProductTypePipe implements PipeTransform { return '汇联通充值'; case 9: return '话费充值'; + case 18: + return '中石油'; case 99: return '商户充值'; default: diff --git a/src/app/pipes/recharge-price/recharge-platform.pipe.ts b/src/app/pipes/recharge-price/recharge-platform.pipe.ts index 3fb7e97..eef26d7 100644 --- a/src/app/pipes/recharge-price/recharge-platform.pipe.ts +++ b/src/app/pipes/recharge-price/recharge-platform.pipe.ts @@ -20,7 +20,10 @@ export class RechargePlatformPipe implements PipeTransform { string = string + '城宇,'; } if (Number(i) === 4) { - string = string + '畅停,'; + string = string + '嗨购,'; + } + if (Number(i) === 5) { + string = string + '简牛,'; } } diff --git a/src/app/pipes/third-product/product-type.pipe.ts b/src/app/pipes/third-product/product-type.pipe.ts index bd7d297..4c1ff9f 100644 --- a/src/app/pipes/third-product/product-type.pipe.ts +++ b/src/app/pipes/third-product/product-type.pipe.ts @@ -10,11 +10,12 @@ export class ProductTypePipe implements PipeTransform { 2: ['肯德基'], 3: ['第三方产品'], 4: ['积分充值'], - 5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油'], - 6: [''], + 5: ['中石化', '消费券', '其他卡券' , '贵州中石化' , '重庆中石油','停车券','四川中石油','贵州中石油'], + 6: ['在线加油'], 7: ['优惠券包'], 8: ['汇联通充值'], 10: ['实物购买'], + 16: ['个人油卡充值'], 17: ['团购套餐'], }; diff --git a/src/app/services/Interceptor.service.ts b/src/app/services/Interceptor.service.ts index 957b29e..7ec7ac8 100644 --- a/src/app/services/Interceptor.service.ts +++ b/src/app/services/Interceptor.service.ts @@ -6,7 +6,6 @@ import {catchError, finalize} from 'rxjs/operators'; import {mergeMap} from 'rxjs/operators'; import {Observable} from 'rxjs'; import {NzMessageService} from 'ng-zorro-antd'; -import {Router} from '@angular/router'; import {LocalStorageService} from './local-storage.service'; import {TOKEN} from './local-storage.namespace'; @@ -14,7 +13,6 @@ import {TOKEN} from './local-storage.namespace'; export class InterceptorService implements HttpInterceptor { constructor( private message: NzMessageService, - private router: Router, private storage: LocalStorageService, ) { } diff --git a/src/app/services/agent.service.ts b/src/app/services/agent.service.ts index f1cf4f1..a9f729f 100644 --- a/src/app/services/agent.service.ts +++ b/src/app/services/agent.service.ts @@ -203,6 +203,14 @@ export class AgentService { } + public generateDiscountPackageAgentCode(params: object, callBack) { + this.http.post(environment.baseUrl + 'discountPackageAgent/generateDiscountPackageAgentCode', params).subscribe(data => { + callBack(data); + }); + + } + + /* 获取优惠券包列表 */ @@ -213,8 +221,8 @@ export class AgentService { } /* 获取优惠券包代理商关联列表 */ - public getDiscountPackageAgentRelList(agentId: number, callBack) { - this.http.get(environment.baseUrl + 'discountPackageAgent/getDiscountPackageAgentRelList?agentId=' + agentId).subscribe(data => { + public getDiscountPackageAgentRelList(agentId: number, type: number , callBack) { + this.http.get(environment.baseUrl + 'discountPackageAgent/getDiscountPackageAgentRelList?agentId=' + agentId + '&type=' + type).subscribe(data => { callBack(data); }); } diff --git a/src/app/services/coupon.service.ts b/src/app/services/coupon.service.ts index a055d15..f0a94ac 100644 --- a/src/app/services/coupon.service.ts +++ b/src/app/services/coupon.service.ts @@ -183,8 +183,8 @@ export class CouponService { * * @param callBack 返回参数 */ - public synCouponRule(callBack) { - this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule').subscribe(data => { + public synCouponRule(params: object, callBack) { + this.http.get(environment.baseUrl + 'apiCoupon/synCouponRule?' + this.common.getWhereCondition(params)).subscribe(data => { callBack(data); }); } @@ -197,7 +197,7 @@ export class CouponService { * @param id 用户id * @param callBack 返回参数 */ - public getCouponSalesPrice(params: object, callBack) { + public getCouponSalesPrice(params: object, callBack) { this.http.get(environment.baseUrl + 'coupon/getCouponSalesPrice?' + this.common.getWhereCondition(params)).subscribe(data => { callBack(data); }); diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 3318a5e..bfb1deb 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -355,4 +355,13 @@ export class OrderService { callBack(data); }); } + + /* + 查询代理商赠送优惠券 + */ + public getAgentDiscountList(param: object , callBack) { + this.http.get(environment.baseUrl + '/discount/getAgentDiscountList?'+ this.common.getWhereCondition(param)).subscribe( data => { + callBack(data); + }); + } } diff --git a/src/app/services/order/order-api-mer.service.ts b/src/app/services/order/order-api-mer.service.ts new file mode 100644 index 0000000..7b2862a --- /dev/null +++ b/src/app/services/order/order-api-mer.service.ts @@ -0,0 +1,43 @@ +import { Injectable } from '@angular/core'; +import {CommonsService} from '../commons.service'; +import {environment} from '../../../environments/environment'; +import {HttpClient} from '@angular/common/http'; + +@Injectable({ + providedIn: 'root' +}) +export class OrderApiMerService { + + constructor( + private http: HttpClient, + private common: CommonsService + ) { } + + /** + * @Author Sum1Dream + * @methodName getOrderKfcList + * @Description // 查询肯德基订单 + * @Date 17:20 2022/10/27 + * @Param param + */ + public getOrderList(param: object, callBack) { + this.http.get(environment.orderUrl + 'apiMerOrder/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName getOrderDetail + * @Description // 根据订单号查询订单详情 + * @Date 14:38 2022/10/28 + * @Param orderNo: string, callBack + */ + public getOrderDetail(orderNo: string, callBack) { + this.http.get(environment.orderUrl + 'apiMerOrder/getOrderDetail?orderNo=' + orderNo).subscribe(data => { + callBack(data); + }); + } + + +} diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 3661fbd..d25e70f 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,9 @@ export const environment = { production: false, - baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // baseUrl: 'https://hsg.dctpay.com/brest/', // 正式环境服务器地址(请求数据地址) + baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'https://hsg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsgcs.dctpay.com/filesystem/', diff --git a/src/index.html b/src/index.html index 7e90525..bb6df91 100644 --- a/src/index.html +++ b/src/index.html @@ -5,9 +5,10 @@ 嗨森逛 - + + - +