diff --git a/src/app/admin/audit/refund-audit/refund-audit.component.html b/src/app/admin/audit/refund-audit/refund-audit.component.html index ba3bd2d..0fc246a 100644 --- a/src/app/admin/audit/refund-audit/refund-audit.component.html +++ b/src/app/admin/audit/refund-audit/refund-audit.component.html @@ -106,15 +106,15 @@ {{i+1}} {{data.refundSource | refundSource}} {{data.sourceOrderNo}} - {{data.payPrice}} + {{data.refundPrice}} {{data.createdUserName == null ? '暂无': data.createdUserName}} {{data.createdTime | date: 'yyyy-MM-dd HH:mm:ss'}} {{data.payType | rechargePayType}} {{data.status | refundStatus}} - 详情 + 详情 - 通过 + 通过 驳回 @@ -122,14 +122,14 @@ - - + + {{data['remarks']}} {{data['rechargeModel'] | rechargePrice}} {{data['orderNo']}} {{data['userName'] == null ? '暂无': data['userName']}} {{data['rechargeContent'] == null ? '暂无': data['rechargeContent']}} - {{data['idCard']}} + {{data['idCard']}} {{data['rechargeName']}} {{data['orderPrice']}} {{data['payPrice']}} @@ -141,8 +141,17 @@ {{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} {{data['status'] | rechargeStatus}} -
- -
+ + + {{data['highChildOrderList'][0]['goodsName']}} + {{data['payType'] | paytype}} + {{data['payPrice']}} + {{data['memName']}} + {{data['memPhone']}} + {{data['orderNo']}} + {{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data['orderStatus'] | orderCouponStatus}} +
diff --git a/src/app/admin/audit/refund-audit/refund-audit.component.ts b/src/app/admin/audit/refund-audit/refund-audit.component.ts index 24895b6..f741b8c 100644 --- a/src/app/admin/audit/refund-audit/refund-audit.component.ts +++ b/src/app/admin/audit/refund-audit/refund-audit.component.ts @@ -10,7 +10,8 @@ import {RechargeService} from '../../../services/recharge.service'; import {NzMessageService, NzNotificationService} from 'ng-zorro-antd'; import {FormBuilder, FormGroup, Validators} from '@angular/forms'; import {Router} from '@angular/router'; -import {AuditService} from "../../../services/audit.service"; +import {AuditService} from '../../../services/audit.service'; +import {OrderService} from '../../../services/order.service'; @Component({ selector: 'app-refund-audit', @@ -30,6 +31,7 @@ export class RefundAuditComponent implements OnInit { loading = true; isVisible = false; id: number; + refundSource: number; edit = false; data = {}; private timer; // 定时器 @@ -43,6 +45,7 @@ export class RefundAuditComponent implements OnInit { private message: NzMessageService, private router: Router, private notification: NzNotificationService, + private order: OrderService, private common: CommonsService ) { } @@ -107,16 +110,27 @@ export class RefundAuditComponent implements OnInit { } // 详情 - public getDetail(id: number): void { + public getDetail(id: number , refundSource: number): void { this.id = id; - this.recharge.getOrderById(id , data => { - if (data['return_code'] === '000000') { - console.log(data); - this.data = data['return_data']; - } else { - this.message.error(data['return_msg']); - } - }); + this.refundSource = refundSource; + if (refundSource === 1) { + this.recharge.getOrderById(id , data => { + if (data['return_code'] === '000000') { + console.log(data); + this.data = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + } else { + this.order.getOrderById(id , data => { + if (data['return_code'] === '000000') { + this.data = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + } this.isVisible = true; } @@ -128,17 +142,29 @@ export class RefundAuditComponent implements OnInit { - public orderToRefund(id): void { + public orderToRefund(id , refundSource: number): void { this.common.showConfirm('确认订单是否退款', item => { if (item) { - this.recharge.orderToRefund(id, data => { - if (data['return_code'] === '000000') { - this.message.success('退款成功'); - this.getRequest(false, this.searchForm.value); - } else { - this.message.error(data['return_msg']); - } - }); + if (refundSource === 1) { + this.recharge.orderToRefund(id, data => { + if (data['return_code'] === '000000') { + this.message.success('退款成功'); + this.getRequest(false, this.searchForm.value); + } else { + this.message.error(data['return_msg']); + } + }); + } else { + this.recharge.orderToRefundPre(id, data => { + if (data['return_code'] === '000000') { + this.message.success('退款成功'); + this.getRequest(false, this.searchForm.value); + } else { + this.message.error(data['return_msg']); + } + }); + } + } }); } diff --git a/src/app/admin/config-manage/brand/brand.component.html b/src/app/admin/config-manage/brand/brand.component.html index b45f4d0..b2676e4 100644 --- a/src/app/admin/config-manage/brand/brand.component.html +++ b/src/app/admin/config-manage/brand/brand.component.html @@ -1 +1,122 @@ -

brand works!

+ + + + + +
+
+
+
+ + 标题 + + + + +
+
+ + 商品类别 + + + + + + +
+
+ +
+
+ + +
+
+
+
+ + +
+ 共计 {{total}} 条数据 +
+ +
+ + + + 编号 + 标题 + 图片 + 创建时间 + 更新时间 + 操作 + + + + + {{i+1}} + {{data.title}} + + + + {{data.createdTime | date: 'yyyy-MM-dd HH:mm'}} + {{data.updatedTime | date: 'yyyy-MM-dd HH:mm'}} + + 编辑 + + 删除 + + + +
+ + +
+ + 标题 + + + + + + 商品类别 + + + + + + + + 图片 + + + +
上传图片
+
+ + + + + +
+
+
+
diff --git a/src/app/admin/config-manage/brand/brand.component.scss b/src/app/admin/config-manage/brand/brand.component.scss index e69de29..8bee3fb 100644 --- a/src/app/admin/config-manage/brand/brand.component.scss +++ b/src/app/admin/config-manage/brand/brand.component.scss @@ -0,0 +1,4 @@ +.head_img { + height: 60px; + width: 60px; +} diff --git a/src/app/admin/config-manage/brand/brand.component.spec.ts b/src/app/admin/config-manage/brand/brand.component.spec.ts deleted file mode 100644 index 54396a4..0000000 --- a/src/app/admin/config-manage/brand/brand.component.spec.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { async, ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BrandComponent } from './brand.component'; - -describe('BrandComponent', () => { - let component: BrandComponent; - let fixture: ComponentFixture; - - beforeEach(async(() => { - TestBed.configureTestingModule({ - declarations: [ BrandComponent ] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(BrandComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/admin/config-manage/brand/brand.component.ts b/src/app/admin/config-manage/brand/brand.component.ts index c99868c..e2fc3e5 100644 --- a/src/app/admin/config-manage/brand/brand.component.ts +++ b/src/app/admin/config-manage/brand/brand.component.ts @@ -1,4 +1,19 @@ import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms'; +import {IconService} from '../../../services/icon.service'; +import {NzMessageService, NzModalService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {Router} from '_@angular_router@9.0.7@@angular/router'; +import {ConfigService} from '../../../services/config.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-brand', @@ -7,9 +22,197 @@ import { Component, OnInit } from '@angular/core'; }) export class BrandComponent implements OnInit { - constructor() { } + WEB_SERVE_URL = environment.baseUrl; + searchForm: FormGroup; // 搜索框 + requestData = []; // 列表数据 + total: number; // 页码 + pageNum = 1; // 页码 + pageSize = 10; // 条码 + loading = true; + isVisible = false; + editFlag = false; + id: number; + validateForm!: FormGroup; + imgFile = []; + previewImage: string | undefined = ''; + previewVisible = false; + + goodTypData; + constructor( + private form: FormBuilder, + private config: ConfigService, + private iconService: IconService, + private message: NzMessageService, + private router: Router, + private modalService: NzModalService, + private fb: FormBuilder, + ) { + } ngOnInit(): void { + this.init(); + } + + public init(): void { + this.searchForm = this.form.group({ + title: [null], + goodTypeId: [null], + }); + this.validateForm = this.fb.group({ + title: [null, [Validators.required]], + goodTypeId: [null, [Validators.required]], + }); + this.getRequest(true, this.searchForm.value); + + this.config.getListGoodsType({ + pageNum: 1 , + pageSize: 1000000 , + } , data => { + this.goodTypData = data['return_data']['list']; + }); + } + + // 图片查看 + 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; + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + + this.loading = false; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.config.getBrandByList(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 getEdit(id?: number): void { + this.validateForm.reset(); + this.editFlag = false; + this.imgFile = []; + this.id = id; + if (id != null) { + this.editFlag = true; + this.config.findById(id , data => { + data['return_data'].goodTypeId = String(data['return_data'].goodTypeId); + if (data['return_data']['img'] != null && data['return_data']['img'] !== '') { + const img = String(data['return_data']['img']); + const imgArray = []; + imgArray.push( + { + uid: 1, + name: img, + status: 'done', + url: environment.imageUrl + img + }); + this.imgFile = imgArray; + } + this.validateForm.patchValue(data['return_data']); + }); + } + this.isVisible = true; + } + + // 查看详情 + public getDetail(id: number): void { + this.router.navigate(['/admin/company/company-detail'], { + queryParams: { + companyId: id + } + }).then(r => console.log(r)); + } + + handleOk(): 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; + } + } + + if (this.imgFile.length !== 0) { + if (this.imgFile[0]['response'] != null) { + this.validateForm.value.img = this.imgFile[0]['response']['return_data'][0]; + } else { + this.validateForm.value.img = this.imgFile[0].name; + } + } + if (this.editFlag) { + this.validateForm.value.id = this.id; + this.config.updateBrand(this.validateForm.value, data => { + if (data['return_code'] === '000000') { + this.message.success('修改成功'); + this.isVisible = false; + this.getRequest(true, this.searchForm.value); + } else { + this.message.create('error', data['return_msg']); + } + }); + } else { + this.config.insertBrand(this.validateForm.value, data => { + if (data['return_code'] === '000000') { + this.message.success('添加成功'); + this.isVisible = false; + this.getRequest(true, this.searchForm.value); + } else { + this.message.create('error', data['return_msg']); + } + }); + } } + handleCancel(): void { + this.isVisible = false; + } + + + // 對話框删除 + showDeleteConfirm(id): void { + this.modalService.confirm({ + nzTitle: '确定删除', + nzOkText: '是', + nzOnOk: () => this.onDelete(id), + nzCancelText: '否', + }); + } + + onDelete(ids) { + this.config.getByDelete({ + id: ids + }, data => { + if (data['return_code'] === '000000') { + this.message.create('success', `删除成功!`); + this.getRequest(true, this.searchForm.value); + } else { + this.message.create('error', data['return_msg']); + } + }); + } } + diff --git a/src/app/admin/config-manage/goods-type/goods-type.component.html b/src/app/admin/config-manage/goods-type/goods-type.component.html index 471427f..756f91c 100644 --- a/src/app/admin/config-manage/goods-type/goods-type.component.html +++ b/src/app/admin/config-manage/goods-type/goods-type.component.html @@ -57,7 +57,7 @@ {{i+1}} - {{data.titile}} + {{data.title}} @@ -66,6 +66,7 @@ 编辑 + 删除 @@ -75,7 +76,7 @@
标题 - + diff --git a/src/app/admin/config-manage/goods-type/goods-type.component.ts b/src/app/admin/config-manage/goods-type/goods-type.component.ts index 72d7123..ca5b006 100644 --- a/src/app/admin/config-manage/goods-type/goods-type.component.ts +++ b/src/app/admin/config-manage/goods-type/goods-type.component.ts @@ -2,7 +2,7 @@ import { Component, OnInit } from '@angular/core'; import {environment} from '../../../../environments/environment'; import {FormBuilder, FormGroup, Validators} from '_@angular_forms@9.0.7@@angular/forms'; import {IconService} from '../../../services/icon.service'; -import {NzMessageService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {NzMessageService, NzModalService, NzUploadFile} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; import {Router} from '_@angular_router@9.0.7@@angular/router'; import {ConfigService} from '../../../services/config.service'; @@ -42,6 +42,7 @@ export class GoodsTypeComponent implements OnInit { private iconService: IconService, private message: NzMessageService, private router: Router, + private modalService: NzModalService, private fb: FormBuilder, ) { } @@ -99,6 +100,28 @@ export class GoodsTypeComponent implements OnInit { // 修改 public getEdit(id?: number): void { this.id = id; + if (id != null) { + this.editFlag = true; + this.config.getGoodsTypeById(id , data => { + if (data['return_data']['img'] != null && data['return_data']['img'] !== '') { + const img = String(data['return_data']['img']); + const imgArray = []; + imgArray.push( + { + uid: 1, + name: img, + status: 'done', + url: environment.imageUrl + img + }); + this.imgFile = imgArray; + } + this.validateForm.patchValue(data['return_data']); + }); + } else { + this.validateForm.reset(); + this.editFlag = false; + this.imgFile = []; + } this.isVisible = true; } @@ -131,19 +154,21 @@ export class GoodsTypeComponent implements OnInit { } if (this.editFlag) { this.validateForm.value.id = this.id; - this.config.insertGoodsType(this.validateForm.value, data => { + this.config.updateGoodsType(this.validateForm.value, data => { if (data['return_code'] === '000000') { this.message.success('修改成功'); + this.isVisible = false; + this.getRequest(true, this.searchForm.value); } else { - this.message.create('error', '修改失败'); + this.message.create('error', data['return_msg']); } }); } else { - this.config.insertGoodsType(this.validateForm.value, data => { - console.log(data); if (data['return_code'] === '000000') { this.message.success('添加成功'); + this.isVisible = false; + this.getRequest(true, this.searchForm.value); } else { this.message.create('error', data['return_msg']); } @@ -155,5 +180,28 @@ export class GoodsTypeComponent implements OnInit { this.isVisible = false; } + + // 對話框删除 + showDeleteConfirm(id): void { + this.modalService.confirm({ + nzTitle: '确定删除', + nzOkText: '是', + nzOnOk: () => this.onDelete(id), + nzCancelText: '否', + }); + } + + onDelete(ids) { + this.config.getGoodsTypeByDelete({ + id: ids + }, data => { + if (data['return_code'] === '000000') { + this.message.create('success', `删除成功!`); + this.getRequest(true, this.searchForm.value); + } else { + this.message.create('error', data['return_msg']); + } + }); + } } diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html index ed71824..c1e1302 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -43,6 +43,7 @@ +
展示区域 @@ -51,6 +52,7 @@ + @@ -124,11 +126,33 @@
+
- 归库天数 - - + 商品分类 + + + + + + +
+
+ + 品牌 + + + + + + +
+ +
+ + 是否预约产品 + +
@@ -141,6 +165,14 @@ +
+ + 归库天数 + + + + +
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts index 01fbc0c..48f83a4 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts @@ -7,6 +7,7 @@ import {ActivatedRoute} from '@angular/router'; import {CouponService} from '../../../services/coupon.service'; import {IconService} from '../../../services/icon.service'; import {CommonsService} from '../../../services/commons.service'; +import {ConfigService} from "../../../services/config.service"; function getBase64(file: File): Promise { return new Promise((resolve, reject) => { const reader = new FileReader(); @@ -46,11 +47,14 @@ export class CouponEditComponent implements OnInit { pageNumCoupon = 1; couponName: string; content: string; + goodsTypeData; + brandData; constructor( private fb: FormBuilder, private merchant: MerchantService, private coupon: CouponService, private common: CommonsService, + private config: ConfigService, private message: NzMessageService, // 信息提示 private activatedRoute: ActivatedRoute, ) { @@ -79,6 +83,7 @@ export class CouponEditComponent implements OnInit { discountPrice: [null, [Validators.required]], merchantId: [null, [Validators.required]], isPresent: [false], + reserveStatus: [false], payType: [null, [Validators.required]], displayArea: [null], couponSource: [null], @@ -86,10 +91,20 @@ export class CouponEditComponent implements OnInit { status: [null], couponKey: [null], createTime: [null], + brandId: [null], + goodsTypeId: [null], secUser: {}, }); - } + const params = { + pageNum: 1, + pageSize: 10000 + }; + this.config.getListGoodsType(params , data => { + this.goodsTypeData = data['return_data'].list; + }); + + } // 查询商户 loadMore(): void { @@ -102,6 +117,7 @@ export class CouponEditComponent implements OnInit { this.getMerchantList(paramsObject); } + // 搜索商户 search(e): void { this.optionList = []; @@ -155,6 +171,19 @@ export class CouponEditComponent implements OnInit { this.getCouponList(paramsObject); } + public getBrandByList(e): void { + + const params = { + pageNum: 1, + pageSize: 10000, + goodTypeId: e + }; + + this.config.getBrandByList(params , data => { + this.brandData = data['return_data'].list; + }); + } + // 查询卡券 public getCouponList(paramsObject): void { this.coupon.getCouponList(paramsObject , data => { @@ -284,6 +313,8 @@ export class CouponEditComponent implements OnInit { data['return_data']['couponType'] = String(data['return_data']['couponType']); data['return_data']['displayArea'] = String(data['return_data']['displayArea']); data['return_data']['payType'] = String(data['return_data']['payType']); + data['return_data']['brandId'] = String(data['return_data']['brandId']); + data['return_data']['goodsTypeId'] = String(data['return_data']['goodsTypeId']); data['return_data']['couponSource'] = String(data['return_data']['couponSource']); if (data['return_data']['couponImg'] != null && data['return_data']['couponImg'] !== '') { const couponImg = String(data['return_data']['couponImg']); diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.html b/src/app/admin/coupon/coupon-list/coupon-list.component.html index 0440f7c..4c01bfd 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.html +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.html @@ -15,6 +15,26 @@
+
+ + 商品分类 + + + + + + +
+
+ + 品牌 + + + + + + +
商户 diff --git a/src/app/admin/coupon/coupon-list/coupon-list.component.ts b/src/app/admin/coupon/coupon-list/coupon-list.component.ts index 67930c9..ae92454 100644 --- a/src/app/admin/coupon/coupon-list/coupon-list.component.ts +++ b/src/app/admin/coupon/coupon-list/coupon-list.component.ts @@ -6,6 +6,7 @@ import {ActivatedRoute, Router} from '@angular/router'; import {CommonsService} from '../../../services/commons.service'; import {CouponService} from '../../../services/coupon.service'; import {MerchantService} from '../../../services/merchant.service'; +import {ConfigService} from "../../../services/config.service"; @Component({ selector: 'app-coupon-list', @@ -26,6 +27,8 @@ export class CouponListComponent implements OnInit { optionList: string[] = []; isLoading = false; pageNumMer = 1; + goodsTypeData; + brandData; constructor( private form: FormBuilder, private coupon: CouponService, @@ -33,6 +36,7 @@ export class CouponListComponent implements OnInit { private iconService: IconService, private message: NzMessageService, private router: Router, + private config: ConfigService, private activatedRoute: ActivatedRoute, private common: CommonsService ) { @@ -41,6 +45,27 @@ export class CouponListComponent implements OnInit { ngOnInit(): void { this.init(); + const params = { + pageNum: 1, + pageSize: 10000 + }; + this.config.getListGoodsType(params , data => { + this.goodsTypeData = data['return_data'].list; + }); + + } + + public getBrandByList(e): void { + + const params = { + pageNum: 1, + pageSize: 10000, + goodTypeId: e + }; + + this.config.getBrandByList(params , data => { + this.brandData = data['return_data'].list; + }); } public init(): void { @@ -54,6 +79,8 @@ export class CouponListComponent implements OnInit { merchantId: [null], couponName: [null], couponType: [null], + goodsTypeId: [null], + brandId: [null], status: [null], }); this.getRequest(true, this.searchForm.value); diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html index 2eb37f9..245c602 100644 --- a/src/app/admin/order/order-list/order-list.component.html +++ b/src/app/admin/order/order-list/order-list.component.html @@ -6,9 +6,9 @@
-
+
- 区域名称 + 区域公司 @@ -16,9 +16,9 @@
-
+
- 商户名称 + 商户 diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts index f363372..f118787 100644 --- a/src/app/admin/order/order-list/order-list.component.ts +++ b/src/app/admin/order/order-list/order-list.component.ts @@ -8,6 +8,8 @@ import {Router} from '@angular/router'; import {CommonsService} from '../../../services/commons.service'; import {OrderService} from '../../../services/order.service'; import {CompanyService} from '../../../services/company.service'; +import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace"; +import {LocalStorageService} from "../../../services/local-storage.service"; @Component({ selector: 'app-order-list', @@ -29,6 +31,7 @@ export class OrderListComponent implements OnInit { id: number; // 订单ID isVisible = false; refundContent: string; + roleType: number; constructor( private form: FormBuilder, private order: OrderService, @@ -37,12 +40,14 @@ export class OrderListComponent implements OnInit { private router: Router, private company: CompanyService, private merchant: MerchantService, + private store: LocalStorageService, // 数据请求 private common: CommonsService ) { } ngOnInit(): void { this.init(); + this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType']; const whereObject = {}; whereObject['pageNum'] = 1; whereObject['pageSize'] = 10000; @@ -53,7 +58,12 @@ export class OrderListComponent implements OnInit { this.message.error(data['return_msg']); } }); - this.getMerchantListByCompany(this.searchForm.value.companyId); + if (this.roleType === 5) { + this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']); + } else { + this.getMerchantListByCompany(this.searchForm.value.companyId); + } + } public init(): void { @@ -179,5 +189,4 @@ export class OrderListComponent implements OnInit { handleCancel(): void { this.isVisible = false; } - } diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts index 31aa3da..6cd9dc2 100644 --- a/src/app/admin/order/order-routing.module.ts +++ b/src/app/admin/order/order-routing.module.ts @@ -8,7 +8,8 @@ import {OrderTListComponent} from './order-Tlist/order-Tlist.component'; import {OrderCListComponent} from './order-c-list/order-c-list.component'; import {OrderKListComponent} from './order-k-list/order-k-list.component'; import {OrderHListComponent} from './order-h-list/order-h-list.component'; -import {OrderAgentComponent} from "./order-agent/order-agent.component"; +import {OrderAgentComponent} from './order-agent/order-agent.component'; +import {PreOrderComponent} from './pre-order/pre-order.component'; const routes: Routes = [ @@ -21,6 +22,7 @@ const routes: Routes = [ { path: 'order-k-list', component: OrderKListComponent }, { path: 'order-h-list', component: OrderHListComponent }, { path: 'order-agent', component: OrderAgentComponent }, + { path: 'pre-order', component: PreOrderComponent }, ]; @NgModule({ diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts index 814e92e..fd6d2bc 100644 --- a/src/app/admin/order/order.module.ts +++ b/src/app/admin/order/order.module.ts @@ -17,10 +17,11 @@ import { OrderKListComponent } from './order-k-list/order-k-list.component'; import {OrderCListComponent} from './order-c-list/order-c-list.component'; import { OrderHListComponent } from './order-h-list/order-h-list.component'; import { OrderAgentComponent } from './order-agent/order-agent.component'; +import { PreOrderComponent } from './pre-order/pre-order.component'; @NgModule({ - declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent], + declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent], imports: [ CommonModule, OrderRoutingModule, diff --git a/src/app/admin/order/pre-order/pre-order.component.html b/src/app/admin/order/pre-order/pre-order.component.html new file mode 100644 index 0000000..6deb195 --- /dev/null +++ b/src/app/admin/order/pre-order/pre-order.component.html @@ -0,0 +1,236 @@ + + + + + +
+ +
+
+ + 区域公司 + + + + + + +
+
+ + 商户 + + + + + + +
+
+ + 门店 + + + + + + +
+
+ + 订单号 + + + + +
+
+ + 预约订单号 + + + + +
+
+ + 商品名称 + + + + +
+
+ + 用户名称 + + + + +
+
+ + 用户电话 + + + + +
+
+ + 状态 + + + + + + + + + +
+
+ + 时间区间 + + + + +
+
+ +
+
+ + +
+
+ +
+ + +
+ 共计 {{total}} 条数据 +
+ +
+ + + + 编号 + 商品名称 + 用户名称 + 用户电话 + 订单号 + 预约订单号 + 实付金额 + 生成时间 + 额外状态 + 状态 + 操作 + + + + + {{i+1}} + {{data.goodsName}} + {{data.preUserName}} + {{data.preUserPhone}} + {{data.orderNo}} + {{data.preOrderNo}} + {{data.payRealPrice}} + {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} + {{data.ext1 === null ? '暂无' : data.ext1 }} + {{data.status | preOrderStatus}} + + 详情 + + + 更多 + + +
    + + + +
+
+ + +
+
+ + + + + 预计时间 + + + + + + 安装地址 + + + + + + 预约备注 + + + + + + + + + 失败备注 + + + + + + + + + + {{orderDetail['highChildOrderList'][0]['goodsName']}} + {{orderDetail['payType'] | paytype}} + {{orderDetail['payPrice']}} + {{orderDetail['memName']}} + {{orderDetail['memPhone']}} + {{orderDetail['orderNo']}} + {{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} + {{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}} + {{orderDetail['orderStatus'] | orderCouponStatus}} + + + + {{preOrderDetail['goodsName']}} + {{preOrderDetail['opUserName']}} + {{preOrderDetail['preOrderNo']}} + {{preOrderDetail['preUserRemark'] == null ? '暂无': preOrderDetail['preUserRemark']}} + {{preOrderDetail['preUserName']}} + {{preOrderDetail['preUserPhone']}} + {{preOrderDetail['reachAddress'] == null ? '暂无': preOrderDetail['reachAddress']}} + {{preOrderDetail['reachTime'] == null ? '暂无': preOrderDetail['reachTime'] | date: 'yyyy-MM-dd'}} + {{preOrderDetail['preTime'] | date: 'yyyy-MM-dd'}} + {{preOrderDetail['createTime'] | date: 'yyyy-MM-dd'}} + {{preOrderDetail['statusFailDesc']}} + {{preOrderDetail['status'] | preOrderStatus}} + + + + diff --git a/src/app/admin/order/pre-order/pre-order.component.scss b/src/app/admin/order/pre-order/pre-order.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/order/pre-order/pre-order.component.ts b/src/app/admin/order/pre-order/pre-order.component.ts new file mode 100644 index 0000000..1315ede --- /dev/null +++ b/src/app/admin/order/pre-order/pre-order.component.ts @@ -0,0 +1,287 @@ +import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {MerchantService} from '../../../services/merchant.service'; +import {IconService} from '../../../services/icon.service'; +import {NzMessageService} from 'ng-zorro-antd'; +import {Router} from '@angular/router'; +import {CommonsService} from '../../../services/commons.service'; +import {OrderService} from '../../../services/order.service'; +import {CompanyService} from '../../../services/company.service'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {MerchantStoreService} from '../../../services/merchant-store.service'; +import {RechargeService} from '../../../services/recharge.service'; + +@Component({ + selector: 'app-pre-order', + templateUrl: './pre-order.component.html', + styleUrls: ['./pre-order.component.scss'] +}) +export class PreOrderComponent implements OnInit { + + WEB_SERVE_URL = environment.baseUrl; + FILE_URL = environment.imageUrl; + searchForm: FormGroup; // 搜索框 + requestData = []; // 列表数据 + companyData = []; // 列表数据 + merchantData = []; // 列表数据 + merchantStoreData = []; // 列表数据 + total: number; // 页码 + pageNum = 1; // 页码 + pageSize = 10; // 条码 + loading = true; + id: number; // 订单ID + isVisible = false; + isVisibleFail = false; + isVisibleDetail = false; + preUserRemark: string; + statusFailDesc: string; + reachAddress: string; + reachTime; + roleType: number; + orderDetail: any = { + highChildOrderList: [{ + goodsName: '' + }] + }; + preOrderDetail: any = {}; + constructor( + private form: FormBuilder, + private order: OrderService, + private iconService: IconService, + private message: NzMessageService, + private router: Router, + private company: CompanyService, + private recharge: RechargeService, + private merchant: MerchantService, + private store: LocalStorageService, // 数据请求 + private merchantStore: MerchantStoreService, + private common: CommonsService + ) { + } + + ngOnInit(): void { + this.init(); + this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType']; + const whereObject = {}; + whereObject['pageNum'] = 1; + whereObject['pageSize'] = 10000; + this.company.selectCompanyList(whereObject, data => { + if (data['return_code'] === '000000') { + this.companyData = data['return_data'].list; + } else { + this.message.error(data['return_msg']); + } + }); + + if (this.roleType === 5) { + this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']); + } else { + this.getMerchantListByCompany(this.searchForm.value.companyId); + } + + } + + public init(): void { + this.searchForm = this.form.group({ + companyId: [null], + merchantId: [null], + merchantStoreId: [null], + orderNo: [null], + preOrderNo: [null], + userPhone: [null], + preUserName: [null], + goodsType: [null], + goodsName: [null], + status: [null], + createTime: [null] + }); + this.getRequest(true, this.searchForm.value); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + + if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { + whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); + } + + + this.loading = false; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.order.getListPreOrder(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 getMerchantListByCompany(companyId: number): void { + this.merchant.getMerchantListByCompany(companyId, data => { + if (data['return_code'] === '000000') { + if (data['return_code'] === '000000') { + this.merchantData = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + } else { + this.message.error(data['return_msg']); + } + }); + } + + + // 查询商户 + public getMerchantStoreById(merchantIds: number): void { + + const params = { + pageNum: 1, + pageSize: 1000000, + merchantId: merchantIds + }; + + this.merchantStore.getStoreListByCompany(params, data => { + if (data['return_code'] === '000000') { + this.merchantStoreData = data['return_data'].list; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 重置 + public resetForm(): void { + this.searchForm.reset(); + } + + + // 查看详情 + public getDetail(orderId: number , id: number): void { + this.order.getOrderById(orderId , data => { + if (data['return_code'] === '000000') { + this.orderDetail = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + this.order.getPreOrderById(id , data => { + if (data['return_code'] === '000000') { + this.preOrderDetail = data['return_data']; + console.log(this.preOrderDetail); + } else { + this.message.error(data['return_msg']); + } + }); + this.isVisibleDetail = true; + } + + // 下载模板 + downloadTemplate(whereObject) { + if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) { + whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); + } + this.order.exportListPreOrder(whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + }); + } + + + getPreSuccess(id): void { + this.id = id; + this.isVisible = true; + } + + getPreFail(id: number): void { + this.id = id; + this.isVisibleFail = true; + } + + handleOkFail(): void { + this.common.showConfirm('是否确认预约失败', item => { + if (item) { + const params = { + id: this.id , + statusFailDesc: this.statusFailDesc + }; + this.order.preOrderFail(params, data => { + if (data['return_code'] === '000000') { + this.getRequest(false, this.searchForm.value); + this.isVisibleFail = false; + this.message.success('操作成功'); + } else { + this.message.error(data['return_msg']); + } + }); + } + }); + } + + handleCancelFail() { + this.isVisibleFail = false; + } + + handleOk(): void { + this.common.showConfirm('是否确认预约', item => { + if (item) { + const params = { + id: this.id , + reachAddress: this.reachAddress, + reachTime: this.reachTime, + preUserRemark: this.preUserRemark, + }; + this.order.preOrderSuccess(params, data => { + if (data['return_code'] === '000000') { + this.getRequest(false, this.searchForm.value); + this.isVisible = false; + this.message.success('预约成功'); + } else { + this.message.error(data['return_msg']); + } + }); + } + }); + } + + handleCancel(): void { + this.isVisible = false; + } + + handleCancelOrder(): void { + this.isVisibleDetail = false; + } + + public postRefund(orderNo): void { + this.common.showConfirm('确认订单申请退款', item => { + if (item) { + this.recharge.postRefund({ + refundSource: 2 , + sourceOrderNo: orderNo + }, data => { + if (data['return_code'] === '000000') { + this.message.success('申请成功'); + this.getRequest(false, this.searchForm.value); + } else { + this.message.error(data['return_msg']); + } + }); + } + }); + } + + +} diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts index 8a7af29..740d54e 100644 --- a/src/app/app-common.module.ts +++ b/src/app/app-common.module.ts @@ -33,6 +33,8 @@ import { RefundSourcePipe, RefundStatusPipe } from './pipes'; +import { PreOrderStatusPipe } from './pipes/order/pre-order-status.pipe'; +import { ButtonPipe } from './pipes/commons/button.pipe'; @@ -60,6 +62,8 @@ const PIPES = [ RechargePayTypePipe, RefundSourcePipe, RefundStatusPipe, + PreOrderStatusPipe, + ButtonPipe, ]; diff --git a/src/app/pipes/audit/refund-source.pipe.ts b/src/app/pipes/audit/refund-source.pipe.ts index c6ba944..c76eef9 100644 --- a/src/app/pipes/audit/refund-source.pipe.ts +++ b/src/app/pipes/audit/refund-source.pipe.ts @@ -9,6 +9,8 @@ export class RefundSourcePipe implements PipeTransform { switch (value) { case 1: return '话费退款'; + case 2: + return '优选商品退款'; } } diff --git a/src/app/pipes/commons/button.pipe.ts b/src/app/pipes/commons/button.pipe.ts new file mode 100644 index 0000000..ad8d493 --- /dev/null +++ b/src/app/pipes/commons/button.pipe.ts @@ -0,0 +1,19 @@ +import { Pipe, PipeTransform } from '@angular/core'; +import {LocalStorageService} from '../../services/local-storage.service'; +import {ADMIN_INFO_OBJECT} from '../../services/local-storage.namespace'; +@Pipe({ + name: 'button' +}) +export class ButtonPipe implements PipeTransform { + + constructor( + private store: LocalStorageService, // 数据请求 + ) { } + + transform(button: string): boolean { + const buttonArray = new Set(); + buttonArray.add(button); + console.log(this.store.get(ADMIN_INFO_OBJECT)['buttonList']); + return this.store.get(ADMIN_INFO_OBJECT)['buttonList'].filter(i => buttonArray.has(i.permissionCode)).length > 0; + } +} diff --git a/src/app/pipes/display-area.pipe.ts b/src/app/pipes/display-area.pipe.ts index 893c1cb..d0c7d84 100644 --- a/src/app/pipes/display-area.pipe.ts +++ b/src/app/pipes/display-area.pipe.ts @@ -13,6 +13,8 @@ export class DisplayAreaPipe implements PipeTransform { return '金币专区'; case 3: return '银联专区'; + case 4: + return '优选商品'; case null: return '消费券'; } diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts index faf4379..2069b2d 100644 --- a/src/app/pipes/index.ts +++ b/src/app/pipes/index.ts @@ -20,3 +20,5 @@ export * from './activate/status.pipe'; export * from './recharge-pay-type.pipe'; export * from './audit/refund-source.pipe'; export * from './audit/refund-status.pipe'; +export * from './order/pre-order-status.pipe'; +export * from './commons/button.pipe'; diff --git a/src/app/pipes/order/order-coupon-status.pipe.ts b/src/app/pipes/order/order-coupon-status.pipe.ts index f0c6b8f..b9f913a 100644 --- a/src/app/pipes/order/order-coupon-status.pipe.ts +++ b/src/app/pipes/order/order-coupon-status.pipe.ts @@ -17,6 +17,10 @@ export class OrderCouponStatusPipe implements PipeTransform { return '已退款'; case 5: return '已取消'; + case 6: + return '退款中'; + case 7: + return '拒绝退款'; } } } diff --git a/src/app/pipes/order/pre-order-status.pipe.ts b/src/app/pipes/order/pre-order-status.pipe.ts new file mode 100644 index 0000000..09904c6 --- /dev/null +++ b/src/app/pipes/order/pre-order-status.pipe.ts @@ -0,0 +1,20 @@ +import { Pipe, PipeTransform } from '@angular/core'; + +@Pipe({ + name: 'preOrderStatus' +}) +export class PreOrderStatusPipe implements PipeTransform { + + transform(value: number): string { + switch (value) { + case 1: + return '预约中'; + case 2: + return '预约成功'; + case 3: + return '预约完成'; + case 4: + return '预约失败'; + } + } +} diff --git a/src/app/pipes/paytype.pipe.ts b/src/app/pipes/paytype.pipe.ts index e47fd25..412ce30 100644 --- a/src/app/pipes/paytype.pipe.ts +++ b/src/app/pipes/paytype.pipe.ts @@ -13,6 +13,10 @@ export class PaytypePipe implements PipeTransform { return '微信'; case 3: return '金币'; + case 4: + return '汇联通工会卡'; + case 5: + return '银联'; } } } diff --git a/src/app/services/config.service.ts b/src/app/services/config.service.ts index bbe6f41..34c827c 100644 --- a/src/app/services/config.service.ts +++ b/src/app/services/config.service.ts @@ -13,7 +13,7 @@ export class ConfigService { ) { } /** - * 查询公司列表 + * 查询列表 * * @param paramsObject 对象 * @param callBack 回调 @@ -25,18 +25,81 @@ export class ConfigService { } /** - * 新增 + * @Author Sum1Dream + * @methodName insertGoodsType + * @Description // 新增 + * @Date 10:25 上午 2021/11/19 + * @Param [params , callBack] + */ + public insertGoodsType(params: object, callBack) { + this.http.post(environment.baseUrl + 'highGoodsType/insertGoodsType', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 修改卡券 * * @param params 上传对象 * @param callBack 回调 * @return data 返回结果 */ - public insertGoodsType(params: object, callBack) { - this.http.post(environment.baseUrl + 'highGoodsType/insertGoodsType', params).subscribe(data => { + public updateGoodsType(params: object, callBack) { + this.http.post(environment.baseUrl + 'highGoodsType/updateGoodsType', params).subscribe(data => { + callBack(data); + }); + } + + /** + * 根据id查询详情 + * + * @param id 公司id + * @param callBack 回调 + */ + public getGoodsTypeById(id: number, callBack) { + this.http.get(environment.baseUrl + 'highGoodsType/getGoodsTypeById?id=' + id).subscribe(data => { + callBack(data); + }); + } + + + /** + * 删除 + * + * @param params status + * @param callBack 返回参数 + */ + public getGoodsTypeByDelete(params: object, callBack) { + this.http.post(environment.baseUrl + 'highGoodsType/getGoodsTypeByDelete' , params).subscribe(data => { callBack(data); }); } + + /** + * 查询列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getBrandByList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highBrand/getBrandByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 新增 + * + * @param params 上传对象 + * @param callBack 回调 + * @return data 返回结果 + */ + public insertBrand(params: object, callBack) { + this.http.post(environment.baseUrl + 'highBrand/insertBrand', params).subscribe(data => { + }); + } + /** * 修改卡券 * @@ -44,8 +107,8 @@ export class ConfigService { * @param callBack 回调 * @return data 返回结果 */ - public updateCompany(params: object, callBack) { - this.http.post(environment.baseUrl + 'bsCompany/updateCompany', params).subscribe(data => { + public updateBrand(params: object, callBack) { + this.http.post(environment.baseUrl + 'highBrand/updateBrand', params).subscribe(data => { callBack(data); }); } @@ -53,25 +116,24 @@ export class ConfigService { /** * 根据id查询详情 * - * @param companyId 公司id + * @param id 公司id * @param callBack 回调 */ - public companyView(companyId: number, callBack) { - this.http.get(environment.baseUrl + 'bsCompany/companyView?companyId=' + companyId).subscribe(data => { + public findById(id: number, callBack) { + this.http.get(environment.baseUrl + 'highBrand/findById?id=' + id).subscribe(data => { callBack(data); }); } /** - * 修改公司状态 + * 删除 * - * @param id 用户id - * @param status status + * @param params status * @param callBack 返回参数 */ - public editStatus(id: number, status: number , callBack) { - this.http.get(environment.baseUrl + 'bsCompany/editStatus?companyId=' + id + '&status=' + status).subscribe(data => { + public getByDelete(params: object, callBack) { + this.http.get(environment.baseUrl + 'highBrand/getByDelete' , params).subscribe(data => { callBack(data); }); } diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 7bad9c9..22d1c0a 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -11,7 +11,8 @@ export class OrderService { constructor( private http: HttpClient, private common: CommonsService - ) { } + ) { + } /** * 查询订单列表 @@ -92,6 +93,28 @@ export class OrderService { }); } + /** + * @Author Sum1Dream + * @methodName exportListPreOrder + * @Description // 导出预约订单 + * @Date 6:33 下午 2021/11/21 + * @Param [paramsObject , callBack] + */ + public exportListPreOrder(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highOrderPre/exportListPreOrder?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + + + /** + * @Author Sum1Dream + * @methodName exportOrderListByIdCode + * @Description // 导出预约订单 + * @Date 9:58 上午 2021/11/22 + * @Param [paramsObject , callBack] + */ public exportOrderListByIdCode(paramsObject: object, callBack) { this.http.get(environment.baseUrl + 'highOrder/exportOrderListByIdCode?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { callBack(data); @@ -111,5 +134,64 @@ export class OrderService { }); } + /** + * @Author Sum1Dream + * @methodName preOrderSuccess + * @Description //TODO + * @Date 5:50 下午 2021/11/21 + * @Param [params , callBack] + */ + public preOrderSuccess(params: object, callBack) { + this.http.post(environment.baseUrl + 'highOrderPre/preOrderSuccess', params).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName preOrderFail + * @Description // 预约失败 + * @Date 9:59 上午 2021/11/22 + * @Param [params , callBack] + */ + public preOrderFail(params: object, callBack) { + this.http.post(environment.baseUrl + 'highOrderPre/preOrderFail', params).subscribe(data => { + callBack(data); + }); + } + + + + /** + * @Author Sum1Dream + * @methodName getListPreOrder + * @Description // 查询预约订单 + * @Date 2:35 下午 2021/11/19 + * @Param [params , callBack] + */ + public getListPreOrder(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highOrderPre/getListPreOrder?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName getOrderById + * @Description //TODO + * @Date 5:17 下午 2021/11/19 + * @Param [orderId , callBack] + */ + public getOrderById(orderId: number , callBack) { + this.http.get(environment.baseUrl + 'highOrder/getOrderById?orderId=' + orderId).subscribe( data => { + callBack(data); + }); + } + + public getPreOrderById(id: number , callBack) { + this.http.get(environment.baseUrl + 'highOrderPre/getPreOrderById?id=' + id).subscribe( data => { + callBack(data); + }); + } } diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts index 4f8d571..63cd81e 100644 --- a/src/app/services/recharge.service.ts +++ b/src/app/services/recharge.service.ts @@ -138,6 +138,19 @@ export class RechargeService { }); } + /** + * @Author Sum1Dream + * @methodName orderToRefundPre + * @Description // 预约订单退款 + * @Date 11:17 上午 2021/11/23 + * @Param [id: number, callBack] + */ + public orderToRefundPre(id: number, callBack) { + this.http.get(environment.baseUrl + 'highOrderPre/orderToRefund?orderId=' + id).subscribe(data => { + callBack(data); + }); + } + /** * 申请退款 * @@ -210,6 +223,7 @@ export class RechargeService { }); } + /** * 到处订单统计 * diff --git a/src/environments/environment.ts b/src/environments/environment.ts index cc5edd5..a2d6d6f 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,8 +6,8 @@ export const environment = { production: false, baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) imageUrl: 'http://localhost:9302/filesystem/', - // baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://hsg.dctpay.com/filesystem/', + // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };