diff --git a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html index 190cfec..e8d1d64 100644 --- a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html +++ b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html @@ -30,7 +30,7 @@ 交易状态 - + @@ -179,7 +179,7 @@ 操作列表 @@ -188,3 +188,84 @@ + + + + + + {{orderDetailObject.tradeOrder.orderNo}} + {{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}} + {{orderDetailObject.tradeOrder.memPhone}} + {{orderDetailObject.tradeOrder.orderStatus | orderStatus}} + {{orderDetailObject.tradeOrder.payType | orderPayType}} + + {{orderDetailObject.tradeOrder.memCardNo}} + + {{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}} + {{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}} + {{orderDetailObject.tradeOrder.remarks}} + + + + + {{orderDetailObject.tradeOrder.totalPrice}} 元 + {{orderDetailObject.tradeOrder.totalDeductionPrice}} 元 + {{orderDetailObject.tradeOrder.deductionProductPrice}} 元 + {{orderDetailObject.tradeOrder.deductionCouponPrice}} 元 + {{orderDetailObject.tradeOrder.payablePrice}} 元 + {{orderDetailObject.tradeOrder.payGold / 100}} 元 + + {{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}} + + + + + + + +

创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}

+
+ +

取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}

+

备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}

+
+ 支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}} + 退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} +
+
+
+ + + + + 产品类型 + 门店 + 产品图片 + 产品名称 + 数量 + 单价 + 总价 + + + + + {{ data.goodsType | orderChildGoodsType}} + {{ data.storeName}} + + + {{ data.goodsName }} + 赠品 + + {{ data.saleCount }} + {{ data.goodsActualPrice }} 元 + {{ data.totalActualPrice }} 元 + + + + +
+
+
diff --git a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss index e69de29..363c972 100644 --- a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss +++ b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts index 164385e..e5d6336 100644 --- a/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts +++ b/src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts @@ -5,8 +5,8 @@ import {LocalStorageService} from '../../../../services/local-storage.service'; import {CompanyService} from '../../../../services/company.service'; import {CommonsService} from '../../../../services/commons.service'; import {animate, state, style, transition, trigger} from '@angular/animations'; -import {OrderKfcService} from '../../../../services/order/order-kfc.service'; import {NzMessageService} from 'ng-zorro-antd'; +import {OrderThirdPartyService} from '../../../../services/order/order-third-party.service'; @Component({ @@ -56,11 +56,20 @@ export class KfcOrderListComponent implements OnInit { requestData = []; // 列表加载 loading = true; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + }; constructor( private form: FormBuilder, private store: LocalStorageService, private message: NzMessageService, - private kfcOrder: OrderKfcService, + private thirdPartyOrder: OrderThirdPartyService, private companyService: CompanyService, private commonsService: CommonsService, ) { } @@ -71,7 +80,7 @@ export class KfcOrderListComponent implements OnInit { orderNo: [null], memPhone: [null], payTimeArray: [null], - status: [null], + orderStatus: [null], createTimeArray: [null], refundTimeArray: [null], companyId: [null], @@ -101,7 +110,8 @@ export class KfcOrderListComponent implements OnInit { } whereObject['pageNum'] = this.pageNum; whereObject['pageSize'] = this.pageSize; - this.kfcOrder.getOrderKfcList(whereObject, data => { + whereObject['productType'] = 2; + this.thirdPartyOrder.getOrderList(whereObject, data => { this.loading = false; if (data['return_code'] === '000000') { console.log(data); @@ -113,6 +123,21 @@ export class KfcOrderListComponent implements OnInit { }); } + // 展示订单详情 + public showOrderDetail(orderNo: string) { + this.orderDetailModal = true; + this.orderDetailModalLoading = true; + this.thirdPartyOrder.getOrderDetail(orderNo, data => { + if (data['return_code'] === '000000') { + this.orderDetailObject = data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.orderDetailModalLoading = false; + }); + + } + } diff --git a/src/app/admin/order-manage/order-manage-routing.module.ts b/src/app/admin/order-manage/order-manage-routing.module.ts index 097fdd5..c2d2ae1 100644 --- a/src/app/admin/order-manage/order-manage-routing.module.ts +++ b/src/app/admin/order-manage/order-manage-routing.module.ts @@ -5,6 +5,8 @@ import {OrderCouponListComponent} from './order-coupon/order-coupon-list/order-c import {OrderIntegralRechargeComponent} from './order-integral-recharge/order-integral-recharge.component'; import {OrderRefundListComponent} from './order-refund-list/order-refund-list.component'; import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; +import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component'; +import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component'; const routes: Routes = [ @@ -12,7 +14,9 @@ const routes: Routes = [ { path: 'order-coupon-list', component: OrderCouponListComponent }, { path: 'order-integral-recharge-list', component: OrderIntegralRechargeComponent }, { path: 'order-refund-list', component: OrderRefundListComponent }, - { path: 'order-kfc-list', component: KfcOrderListComponent} + { path: 'order-kfc-list', component: KfcOrderListComponent}, + { path: 'order-starbucks--list', component: StarbucksOrderListComponent}, + { path: 'order-member-charge--list', component: MemberChargeOrderListComponent} ]; @NgModule({ diff --git a/src/app/admin/order-manage/order-manage.module.ts b/src/app/admin/order-manage/order-manage.module.ts index 9badee3..92bc788 100644 --- a/src/app/admin/order-manage/order-manage.module.ts +++ b/src/app/admin/order-manage/order-manage.module.ts @@ -11,9 +11,11 @@ import { OrderCouponListComponent } from './order-coupon/order-coupon-list/order import { OrderIntegralRechargeComponent } from './order-integral-recharge/order-integral-recharge.component'; import { OrderRefundListComponent } from './order-refund-list/order-refund-list.component'; import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; +import { StarbucksOrderListComponent } from './starbucks-order/starbucks-order-list/starbucks-order-list.component'; +import { MemberChargeOrderListComponent } from './member-charge-order/member-charge-order-list/member-charge-order-list.component'; @NgModule({ - declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent], + declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent], imports: [ CommonModule, OrderManageRoutingModule, diff --git a/src/app/services/order/order-kfc.service.ts b/src/app/services/order/order-kfc.service.ts deleted file mode 100644 index a920995..0000000 --- a/src/app/services/order/order-kfc.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -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 OrderKfcService { - - constructor( - private http: HttpClient, - private common: CommonsService - ) { } - - /** - * @Author Sum1Dream - * @methodName getOrderKfcList - * @Description // 查询肯德基订单 - * @Date 17:20 2022/10/27 - * @Param param - */ - public getOrderKfcList(param: object, callBack) { - this.http.get(environment.orderUrl + 'thirdParty/getOrderKfcList?' + this.common.getWhereCondition(param)).subscribe(data => { - callBack(data); - }); - } -} diff --git a/src/app/services/order/order-third-party.service.ts b/src/app/services/order/order-third-party.service.ts new file mode 100644 index 0000000..e629d8e --- /dev/null +++ b/src/app/services/order/order-third-party.service.ts @@ -0,0 +1,42 @@ +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 OrderThirdPartyService { + + 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 + 'thirdParty/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * @Author Sum1Dream + * @methodName getOrderDetail + * @Description // 根据订单号查询订单详情 + * @Date 14:38 2022/10/28 + * @Param + */ + public getOrderDetail(orderNo: string, callBack) { + this.http.get(environment.orderUrl + 'thirdParty/getOrderDetail?orderNo=' + orderNo).subscribe(data => { + callBack(data); + }); + } +} diff --git a/src/environments/environment.test.ts b/src/environments/environment.test.ts index 48a753d..4ecaf9d 100644 --- a/src/environments/environment.test.ts +++ b/src/environments/environment.test.ts @@ -2,6 +2,7 @@ export const environment = { production: true, baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + orderUrl: 'https://hsgcs.dctpay.com/order/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 5b580fd..264e5d9 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -6,9 +6,10 @@ export const environment = { production: false, baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) orderUrl: 'http://localhost:9304/order/', - imageUrl: 'https://hsgcs.dctpay.com/filesystem/', - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + // orderUrl: 'https://hsgcs.dctpay.com/order/', + 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=', };