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 07ba408..cacf739 100644 --- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.html +++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.html @@ -12,6 +12,14 @@
+
+ + 卡券key + + + + +
卡券名称 @@ -40,11 +48,11 @@ +
-
展示区域 diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.html b/src/app/admin/order/order-coupon-list/order-coupon-list.component.html new file mode 100644 index 0000000..fa02bd5 --- /dev/null +++ b/src/app/admin/order/order-coupon-list/order-coupon-list.component.html @@ -0,0 +1,182 @@ + + + + + + +
+ +
+ +
+ + 订单号 + + + + +
+ +
+ + 客户电话 + + + + +
+ +
+ + 卡券名称 + + + + +
+ +
+ + 支付卡号 + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+ +
+ + 订单状态 + + + + + + + + + + +
+ +
+ + 创建时间 + + + + +
+ +
+ + 支付时间 + + + + +
+ +
+ + 完成时间 + + + + +
+ +
+ +
+
+ + +
+
+ +
+ +
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据 +
+ +
+ + + + + + 序号 + 订单号 + 客户电话 + 卡券名称 + 订单总额 + 优惠金额 + 应付金额 + 积分抵扣 + 实付金额 + 支付方式 + 支付卡号 + 订单状态 + 创建时间 + 支付时间 + 完成时间 + + + + + + {{i+1}} + {{data.orderNo}} + {{data.memPhone}} + {{data.couponName}} + {{data.totalPrice}} + {{data.deductionPrice}} + {{data.payablePrice}} + {{data.payGold / 100}} + {{data.payPrice}} + {{data.payType}} + {{data.memCardNo}} + {{data.orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + + + +
+
+ diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.scss b/src/app/admin/order/order-coupon-list/order-coupon-list.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts b/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts new file mode 100644 index 0000000..dc249f4 --- /dev/null +++ b/src/app/admin/order/order-coupon-list/order-coupon-list.component.ts @@ -0,0 +1,134 @@ +import { Component, OnInit } from '@angular/core'; +import {environment} from '../../../../environments/environment'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {NzMessageService, NzModalService} from 'ng-zorro-antd'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {GasStaffService} from '../../../services/gas-staff.service'; +import {CommonsService} from '../../../services/commons.service'; +import {Router} from '@angular/router'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {OrderService} from '../../../services/order.service'; + +@Component({ + selector: 'app-order-coupon-list', + templateUrl: './order-coupon-list.component.html', + styleUrls: ['./order-coupon-list.component.scss'] +}) +export class OrderCouponListComponent implements OnInit { + FILE_URL = environment.imageUrl; + roleType; + adminFlag; + loadingObject = { + spinning: false, + msg: '加载中' + }; + + dataObject: any = {}; + tableLoading = true; + searchForm: FormGroup; + pageNum: number; + whereObject: any = {}; + + positionTypeArray = []; + + gasStaffQrCodeImgUrl: string; + gasStaffQrCodeModal = false; + + constructor(private modal: NzModalService, + private message: NzMessageService, + private store: LocalStorageService, + private orderService: OrderService, + private commonsService: CommonsService, + private router: Router, + private form: FormBuilder) { + this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); + this.adminFlag = Number(this.store.get(ADMIN_INFO_OBJECT)['secUser'].adminFlag); + } + + ngOnInit(): void { + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + couponName: [null], + payType: [null], + orderStatus: [null], + createTime: [null], + payTime: [null], + finishTime: [null], + }); + this.requestData(1); + } + + /** + * 请求数据 + */ + requestData(pageNum) { + this.tableLoading = true; + this.whereObject['pageNum'] = pageNum; + this.whereObject['pageSize'] = 10; + this.orderService.getOrderCouponList(this.whereObject, data => { + if (data['return_code'] === '000000') { + this.dataObject = data['return_data']; + } else { + this.modal.error(data['return_msg']); + } + this.tableLoading = false; + }); + } + + /** + * 搜索 + * @param whereObject 条件 + */ + search(whereObject: object) { + if (whereObject['createTime'] != null) { + whereObject['createTimeS'] = whereObject['createTime'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTime'][1].getTime(); + } else { + whereObject['createTimeS'] = null; + whereObject['createTimeE'] = null; + } + + if (whereObject['payTime'] != null) { + whereObject['payTimeS'] = whereObject['payTime'][0].getTime(); + whereObject['payTimeE'] = whereObject['payTime'][1].getTime(); + } else { + whereObject['payTimeS'] = null; + whereObject['payTimeE'] = null; + } + + if (whereObject['finishTime'] != null) { + whereObject['finishTimeS'] = whereObject['finishTime'][0].getTime(); + whereObject['finishTimeE'] = whereObject['finishTime'][1].getTime(); + } else { + whereObject['finishTimeS'] = null; + whereObject['finishTimeE'] = null; + } + this.whereObject = whereObject; + this.requestData(1); + } + + /** + * 重置 + */ + resetForm(): void { + this.searchForm.reset(); + } + + + /** + * 导出Excel + */ + exportExcel(): void { + this.loadingObject.spinning = true; + this.loadingObject.msg = '处理中...'; + + this.orderService.exportOrderCouponExcel(this.whereObject, data => { + this.loadingObject.spinning = false; + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + data['return_data']; + } + }); + } + +} 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 f118787..95f3280 100644 --- a/src/app/admin/order/order-list/order-list.component.ts +++ b/src/app/admin/order/order-list/order-list.component.ts @@ -97,7 +97,7 @@ export class OrderListComponent implements OnInit { } whereObject['pageNum'] = this.pageNum; whereObject['pageSize'] = this.pageSize; - this.order.getOrderCouponList(whereObject, data => { + this.order.getGoodsOrderList(whereObject, data => { if (data['return_code'] === '000000') { this.requestData = data['return_data'].list; this.total = data['return_data'].total; diff --git a/src/app/admin/order/order-routing.module.ts b/src/app/admin/order/order-routing.module.ts index ddd9412..104b216 100644 --- a/src/app/admin/order/order-routing.module.ts +++ b/src/app/admin/order/order-routing.module.ts @@ -14,6 +14,7 @@ import {PackageRecordListComponent} from './package-record-list/package-record-l import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component'; import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component'; import {OilStationOrderComponent} from './oil-station-order/oil-station-order.component'; +import {OrderCouponListComponent} from './order-coupon-list/order-coupon-list.component'; const routes: Routes = [ @@ -22,6 +23,7 @@ const routes: Routes = [ { path: 'order-detail', component: OrderDetailComponent }, { path: 'order-coupons', component: OrderCouponsComponent }, { path: 'order-coupon', component: OrderCouponComponent }, + { path: 'order-coupon-list', component: OrderCouponListComponent }, { path: 'order-c-list', component: OrderCListComponent }, { path: 'order-k-list', component: OrderKListComponent }, { path: 'order-h-list', component: OrderHListComponent }, diff --git a/src/app/admin/order/order.module.ts b/src/app/admin/order/order.module.ts index eaa6357..f018e2a 100644 --- a/src/app/admin/order/order.module.ts +++ b/src/app/admin/order/order.module.ts @@ -23,9 +23,10 @@ import { DiscountUseConditionListComponent } from './discount-use-condition-list import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component"; import {NzSpaceModule} from "ng-zorro-antd/space"; import { OilStationOrderComponent } from './oil-station-order/oil-station-order.component'; +import { OrderCouponListComponent } from './order-coupon-list/order-coupon-list.component'; @NgModule({ - declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent], + declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent, OrderCouponListComponent], imports: [ CommonModule, OrderRoutingModule, diff --git a/src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts b/src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts index 9c691ad..9ea5757 100644 --- a/src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts +++ b/src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts @@ -1,11 +1,10 @@ import { Component, OnInit } from '@angular/core'; import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; 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 {DistributionService} from '../../../services/distribution.service'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {NzMessageService} from 'ng-zorro-antd'; @Component({ selector: 'app-distribution-integral-list', diff --git a/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts b/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts index 401c83a..efe8b85 100644 --- a/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts +++ b/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts @@ -1,9 +1,9 @@ import { Component, OnInit } from '@angular/core'; import {environment} from '../../../../environments/environment'; -import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; import {DistributionService} from '../../../services/distribution.service'; import {IconService} from '../../../services/icon.service'; -import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {NzMessageService} from 'ng-zorro-antd'; @Component({ selector: 'app-promotion-order-list', diff --git a/src/app/admin/promotion/promotion.module.ts b/src/app/admin/promotion/promotion.module.ts index a4e6705..ddf99bf 100644 --- a/src/app/admin/promotion/promotion.module.ts +++ b/src/app/admin/promotion/promotion.module.ts @@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common'; import { PromotionRoutingModule } from './promotion-routing.module'; import { DistributionIntegralListComponent } from './distribution-integral-list/distribution-integral-list.component'; import { PromotionOrderListComponent } from './promotion-order-list/promotion-order-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 {NgZorroAntdModule} from 'ng-zorro-antd'; +import {FormsModule, ReactiveFormsModule} from '@angular/forms'; @NgModule({ diff --git a/src/app/pipes/paytype.pipe.ts b/src/app/pipes/paytype.pipe.ts index 412ce30..da30703 100644 --- a/src/app/pipes/paytype.pipe.ts +++ b/src/app/pipes/paytype.pipe.ts @@ -12,11 +12,15 @@ export class PaytypePipe implements PipeTransform { case 2: return '微信'; case 3: - return '金币'; + return '积分抵扣'; case 4: - return '汇联通工会卡'; + return '贵州汇联通工会卡'; case 5: return '银联'; + case 6: + return '银联分期'; + case 7: + return '嗨森逛油卡'; } } } diff --git a/src/app/services/distribution.service.ts b/src/app/services/distribution.service.ts index 159feab..ee720bd 100644 --- a/src/app/services/distribution.service.ts +++ b/src/app/services/distribution.service.ts @@ -1,7 +1,7 @@ import { Injectable } from '@angular/core'; -import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http'; import {CommonsService} from './commons.service'; import {environment} from '../../environments/environment'; +import {HttpClient} from '@angular/common/http'; @Injectable({ providedIn: 'root' diff --git a/src/app/services/order.service.ts b/src/app/services/order.service.ts index 949ec41..2449a9d 100644 --- a/src/app/services/order.service.ts +++ b/src/app/services/order.service.ts @@ -34,12 +34,36 @@ export class OrderService { * @param paramsObject 对象 * @param callBack 回调 */ - public getOrderCouponList(paramsObject: object, callBack) { + public getGoodsOrderList(paramsObject: object, callBack) { this.http.get(environment.baseUrl + 'highOrder/getGoodsOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { callBack(data); }); } + /** + * 查询卡券订单列表 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public getOrderCouponList(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highOrder/getOrderCouponList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + + /** + * 导出卡券订单 + * + * @param paramsObject 对象 + * @param callBack 回调 + */ + public exportOrderCouponExcel(paramsObject: object, callBack) { + this.http.get(environment.baseUrl + 'highOrder/exportOrderCouponExcel?' + this.common.getWhereCondition(paramsObject)).subscribe(data => { + callBack(data); + }); + } + /** * 查询油站订单 *