diff --git a/src/app/data/goods/goods.namespace.ts b/src/app/data/goods/goods.namespace.ts
index ce12f75..514be3f 100644
--- a/src/app/data/goods/goods.namespace.ts
+++ b/src/app/data/goods/goods.namespace.ts
@@ -11,7 +11,14 @@ export const orderGoodsStatus = [
{name: "已退货" , key: 7},
{name: "待支付" , key: 8}
];
-
+export const orderGoodsChild = [
+ {name: "待支付" , key: 1} ,
+ {name: "已支付" , key: 2},
+ {name: "已完成" , key: 3},
+ {name: "已退款" , key: 4},
+ {name: "已取消" , key: 5},
+ {name: "退款中" , key: 6}
+];
export const orderCinemaStatus = [
{name: "未上送" , key: 0} ,
@@ -21,3 +28,26 @@ export const orderCinemaStatus = [
{name: "已取消" , key: -5},
];
+export const orderStarbucksStatus = [
+ {name: "待付款" , key: 0} ,
+ {name: "已支付" , key: 5},
+ {name: "出单中" , key: 10},
+ {name: "出单成功" , key: 15},
+ {name: "配送中" , key: 20},
+ {name: "配送完成" , key: 25},
+ {name: "已取消" , key: -5},
+ {name: "失败" , key: -10},
+
+];
+export const orderPayType = [
+ {name: "微信" , key: 1} ,
+ {name: "支付宝" , key: 2},
+ {name: "快捷支付" , key: 3},
+ {name: "工会卡" , key: 4}
+];
+
+export const hltLogo = "./assets/order/hlt.png";
+export const gzBankLogo = "./assets/order/gzbank.png";
+export const wxLogo = "./assets/order/wx.png";
+export const aliLogo = "./assets/order/ali.png";
+export const noPayLogo = "./assets/order/noPay.png";
diff --git a/src/app/pages/trade/order-starbucks/order-starbucks.component.html b/src/app/pages/trade/order-starbucks/order-starbucks.component.html
new file mode 100644
index 0000000..3235114
--- /dev/null
+++ b/src/app/pages/trade/order-starbucks/order-starbucks.component.html
@@ -0,0 +1,202 @@
+
+
+
+
+
+ 商品名称 |
+ 门店名称 |
+ 门店地址 |
+ 用户手机号 |
+ 订单号 |
+ 子订单号 |
+ 渠道订单号 |
+ 订单价格 |
+
+ 创建时间 |
+ 更新时间 |
+ 支付类型 |
+ 状态 |
+ 操作 |
+
+
+
+
+ {{data.productName}} | {{data.productSpecName}} |
+ {{data.storeName}} |
+ {{data.storeAddress}} |
+ {{data.userPhone}} |
+ {{data.orderNo}} |
+ {{data.childOrderNo}} |
+ {{data.channelOrderNo}} |
+ ¥{{data.productPrice}} |
+
+ {{ data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{ data.updateTime | date: 'yyyy-MM-dd HH:mm'}} |
+
+
+ |
+ {{data.status | orderChildStatus}} |
+
+ 详情
+ |
+
+
+ 总计 {{ total }} 条
+
+
+
+
+
+
+
+
+
+
+
+ {{ orderGoodsData?.userPhone }}
+
+
+
+ {{ orderChild?.business['storeName'] }}
+ {{ orderChild?.business['storeAddress'] }}
+
+
+
+
+
+
+
+ 产品名称 |
+ 产品图片 |
+ 规格 |
+ 数量 |
+ 单价 |
+ 总价 |
+
+
+
+
+ {{data.name}} |
+
+
+ |
+ {{data.speList}} |
+ {{data.num}} |
+ ¥{{data.price}} |
+ ¥{{data.totalPrice}} |
+
+
+
+
+
+
+ {{ orderChild?.orderNo }}
+ {{ orderChild?.childOrderNo }}
+ {{ orderGoodsData?.paySerialNo }}
+ ¥{{ orderGoodsData?.totalPrice }}
+ ¥{{ orderChild?.couponDiscountPrice }}
+ ¥{{ orderChild?.integralDiscountPrice/100 }}
+ ¥{{ orderChild?.totalDeductionPrice }}
+ ¥{{ orderGoodsData?.payRealPrice }}
+
+
+
+
+ {{ orderGoodsData?.createTime | date: 'yyyy-MM-dd HH:mm' }}
+ {{ orderGoodsData?.payTime | date: 'yyyy-MM-dd HH:mm' }}
+ {{ orderGoodsData?.cancelTime | date: 'yyyy-MM-dd HH:mm' }}
+ {{ orderGoodsData?.refundTime | date: 'yyyy-MM-dd HH:mm' }}
+ {{ orderGoodsData?.finishTime | date: 'yyyy-MM-dd HH:mm' }}
+ {{ orderGoodsData?.updateTime | date: 'yyyy-MM-dd HH:mm' }}
+
+
+
+
+
+
diff --git a/src/app/pages/trade/order-starbucks/order-starbucks.component.less b/src/app/pages/trade/order-starbucks/order-starbucks.component.less
new file mode 100644
index 0000000..cb045d5
--- /dev/null
+++ b/src/app/pages/trade/order-starbucks/order-starbucks.component.less
@@ -0,0 +1,9 @@
+.search-area {
+ margin-bottom: 10px;
+}
+.search-area button {
+ margin-right: 8px;
+}
+.fontColor {
+ color: red;
+}
diff --git a/src/app/pages/trade/order-starbucks/order-starbucks.component.ts b/src/app/pages/trade/order-starbucks/order-starbucks.component.ts
new file mode 100644
index 0000000..69ad36c
--- /dev/null
+++ b/src/app/pages/trade/order-starbucks/order-starbucks.component.ts
@@ -0,0 +1,177 @@
+import { Component } from '@angular/core';
+import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
+import {NzMessageService} from "ng-zorro-antd/message";
+import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
+import {NzFormControlComponent, NzFormDirective, NzFormLabelComponent, NzFormModule} from "ng-zorro-antd/form";
+import {NzInputDirective} from "ng-zorro-antd/input";
+import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
+import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
+import {DatePipe, NgClass, NgForOf, NgIf, NgOptimizedImage} from "@angular/common";
+import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
+import {NzButtonComponent} from "ng-zorro-antd/button";
+import {NzCellFixedDirective, NzTableComponent, NzTableModule, NzThMeasureDirective} from "ng-zorro-antd/table";
+import {NzModalComponent, NzModalContentDirective, NzModalModule} from "ng-zorro-antd/modal";
+import {NzTabComponent, NzTabSetComponent} from "ng-zorro-antd/tabs";
+import {NzDescriptionsComponent, NzDescriptionsItemComponent} from "ng-zorro-antd/descriptions";
+import {NzImageDirective, NzImageGroupComponent, NzImageModule} from "ng-zorro-antd/image";
+import {OrderStarbucksService} from "../../../services/trade/order-starbucks.service";
+import {OrderStarbucksPipe} from "../../../pipes/goods/order-starbucks.pipe";
+import {
+ fallbackImg,
+ orderGoodsChild,
+ orderPayType,
+} from "../../../data/goods/goods.namespace";
+import {DateUtils} from "../../../utils/dateUtils.service";
+import {OrderChildStatusPipe} from "../../../pipes/goods/order-child-status.pipe";
+import {OrderService} from "../../../services/trade/order.service";
+import {OrderCinemaStatusPipe} from "../../../pipes/goods/order-cinema-status.pipe";
+import {PayTypePipe} from "../../../pipes/goods/pay-type.pipe";
+import {NzIconDirective, NzIconService} from "ng-zorro-antd/icon";
+import {IconService} from "../../../services/common/icon.service";
+import {NzBadgeComponent} from "ng-zorro-antd/badge";
+import {OrderStarbucksTypePipe} from "../../../pipes/goods/order-starbucks-type.pipe";
+
+@Component({
+ selector: 'app-order-starbucks',
+ standalone: true,
+ imports: [
+ ReactiveFormsModule,
+ NzRowDirective,
+ NzFormLabelComponent,
+ NzFormControlComponent,
+ NzColDirective,
+ NzInputDirective,
+ NzDatePickerComponent,
+ NzRadioGroupComponent,
+ NzRadioButtonDirective,
+ NzTableModule,
+ NzModalModule,
+ NzFormModule,
+ NgForOf,
+ NzRadioComponent,
+ NzSelectComponent,
+ NzButtonComponent,
+ NzTableComponent,
+ NzThMeasureDirective,
+ NzCellFixedDirective,
+ NgClass,
+ DatePipe,
+ NzModalComponent,
+ NzTabSetComponent,
+ NzDescriptionsComponent,
+ NzTabComponent,
+ NzDescriptionsItemComponent,
+ NzImageGroupComponent,
+ NzImageDirective,
+ NzFormDirective,
+ NzImageModule,
+ NzModalContentDirective,
+ OrderStarbucksPipe,
+ NzOptionComponent,
+ NzRangePickerComponent,
+ OrderChildStatusPipe,
+ NgIf,
+ OrderCinemaStatusPipe,
+ PayTypePipe,
+ NgOptimizedImage,
+ NzIconDirective,
+ NzBadgeComponent,
+ OrderStarbucksTypePipe
+ ],
+ templateUrl: './order-starbucks.component.html',
+ styleUrl: './order-starbucks.component.less'
+})
+export class OrderStarbucksComponent {
+ // 表单页数
+ tablePageNum = 1;
+ // 表单数据
+ tableData: any = {
+ total: 0,
+ loading: false,
+ list: [],
+ };
+ // 搜索表单
+ searchForm: FormGroup;
+ orderDetailModal = false;
+ orderGoodsData: any;
+ orderChild: any;
+
+ protected readonly orderGoodsChild = orderGoodsChild;
+ protected readonly orderPayType = orderPayType;
+
+ constructor(private fb: NonNullableFormBuilder,
+ private msg: NzMessageService,
+ private iconService: IconService,
+ private orderService: OrderService,
+ private orderStarbucks: OrderStarbucksService) {
+
+ // 初始化搜索框
+ this.searchForm = this.fb.group({
+ orderNo: [''],
+ childOrderNo: [''],
+ userPhone: [''],
+ productName: [''],
+ storeName: [''],
+ storeAddress: [''],
+ createTimeArray: [[]],
+ createTimeS: [''],
+ createTimeE: [''],
+ goodsName: [''],
+ payType: [''],
+ status: [''],
+ });
+ this.getRequest();
+ }
+
+ // 查询列表
+ public getRequest(reset: boolean = false) {
+
+ if (this.searchForm.controls['createTimeArray'].value != null
+ && this.searchForm.controls['createTimeArray'].value.length > 0) {
+ this.searchForm.controls['createTimeS'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['createTimeArray'].value[0]) , 1).getTime());
+ this.searchForm.controls['createTimeE'].setValue(DateUtils.getDateHMS(new Date(this.searchForm.controls['createTimeArray'].value[1]) , 2).getTime());
+ } else {
+ this.searchForm.controls['createTimeS'].setValue(null)
+ this.searchForm.controls['createTimeE'].setValue(null)
+ }
+
+ this.tableData.loading = true;
+ if (reset) {
+ this.tablePageNum = 1;
+ }
+ this.searchForm.value.pageNum = this.tablePageNum;
+ this.searchForm.value.pageSize = 10;
+ this.searchForm.value.time = new Date().getTime();
+
+ this.orderStarbucks.getListStarbucks(this.searchForm.value , (data: any) => {
+ if (data['return_code'] == '000000') {
+ this.tableData = data['return_data'];
+ } else {
+ this.msg.error(data['return_msg']);
+ }
+ this.tableData.loading = false;
+ });
+ }
+
+ // 重制
+ public reset() {
+ this.searchForm.reset();
+ this.getRequest();
+ }
+
+ // 查询详情
+ showDetail(orderNo: string): void {
+ this.orderService.queryOrder(orderNo , (data: any) => {
+ if (data['return_code'] == '000000') {
+ this.orderGoodsData = data['return_data'];
+ this.orderChild = this.orderGoodsData['orderChildList'][0]
+ } else {
+ this.msg.error(data['return_msg']);
+ }
+ })
+ this.orderDetailModal = true;
+ }
+
+
+ protected readonly fallbackImg = fallbackImg;
+}
diff --git a/src/app/pages/trade/trade.routes.ts b/src/app/pages/trade/trade.routes.ts
index e7cedec..c018d56 100644
--- a/src/app/pages/trade/trade.routes.ts
+++ b/src/app/pages/trade/trade.routes.ts
@@ -4,6 +4,7 @@ import {OrderAfterSalesComponent} from "./order-after-sales/order-after-sales.co
import {GoodsListComponent} from "./goods-list/goods-list.component";
import {OrderRefundComponent} from "./order-refund/order-refund.component";
import {OrderCinemaComponent} from "./order-cinema/order-cinema.component";
+import {OrderStarbucksComponent} from "./order-starbucks/order-starbucks.component";
export const TRADE_ROUTES: Routes = [
{ path: 'goods-list', component: GoodsListComponent },
@@ -11,4 +12,5 @@ export const TRADE_ROUTES: Routes = [
{ path: 'order-after-sales', component: OrderAfterSalesComponent },
{ path: 'order-refund', component: OrderRefundComponent },
{ path: 'order-cinema', component: OrderCinemaComponent },
+ { path: 'order-starbucks', component: OrderStarbucksComponent },
];
diff --git a/src/app/pipes/goods/order-child-status.pipe.ts b/src/app/pipes/goods/order-child-status.pipe.ts
new file mode 100644
index 0000000..5fd6ba5
--- /dev/null
+++ b/src/app/pipes/goods/order-child-status.pipe.ts
@@ -0,0 +1,28 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'orderChildStatus',
+ standalone: true
+})
+export class OrderChildStatusPipe implements PipeTransform {
+
+ transform(value: number): any {
+ switch (value) {
+ case 1:
+ return '待支付';
+ case 2:
+ return '已支付';
+ case 3:
+ return '已完成';
+ case 4:
+ return '已退款';
+ case 5:
+ return '已取消';
+ case 6:
+ return '退款中';
+ default:
+ return '未知状态'
+ }
+ }
+
+}
diff --git a/src/app/pipes/goods/order-starbucks-type.pipe.ts b/src/app/pipes/goods/order-starbucks-type.pipe.ts
new file mode 100644
index 0000000..cb51a51
--- /dev/null
+++ b/src/app/pipes/goods/order-starbucks-type.pipe.ts
@@ -0,0 +1,32 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'orderStarbucksType',
+ standalone: true
+})
+export class OrderStarbucksTypePipe implements PipeTransform {
+
+ transform(value: number): any {
+ switch (value) {
+ case 0:
+ return 'warning';
+ case 5:
+ return 'processing';
+ case 10:
+ return 'processing';
+ case 15:
+ return 'success';
+ case 20:
+ return 'processing';
+ case 25:
+ return 'success';
+ case -5:
+ return 'default';
+ case -10:
+ return 'error';
+ default:
+ return 'error'
+ }
+ }
+
+}
diff --git a/src/app/pipes/goods/order-starbucks.pipe.ts b/src/app/pipes/goods/order-starbucks.pipe.ts
new file mode 100644
index 0000000..b19f57d
--- /dev/null
+++ b/src/app/pipes/goods/order-starbucks.pipe.ts
@@ -0,0 +1,32 @@
+import { Pipe, PipeTransform } from '@angular/core';
+
+@Pipe({
+ name: 'orderStarbucks',
+ standalone: true
+})
+export class OrderStarbucksPipe implements PipeTransform {
+
+
+ transform(value: number): any {
+ switch (value) {
+ case 0:
+ return '待付款';
+ case 5:
+ return '已支付';
+ case 10:
+ return '出单中';
+ case 15:
+ return '出单成功';
+ case 20:
+ return '配送中';
+ case 25:
+ return '配送完成';
+ case -5:
+ return '已取消';
+ case -10:
+ return '失败';
+ default:
+ return '未知状态'
+ }
+ }
+}
diff --git a/src/app/pipes/goods/pay-type.pipe.ts b/src/app/pipes/goods/pay-type.pipe.ts
new file mode 100644
index 0000000..5eae8f9
--- /dev/null
+++ b/src/app/pipes/goods/pay-type.pipe.ts
@@ -0,0 +1,25 @@
+import { Pipe, PipeTransform } from '@angular/core';
+import {aliLogo, gzBankLogo, hltLogo, noPayLogo, wxLogo} from "../../data/goods/goods.namespace";
+
+@Pipe({
+ name: 'payType',
+ standalone: true
+})
+export class PayTypePipe implements PipeTransform {
+
+ transform(value: number): any {
+ switch (value) {
+ case 1:
+ return "icon-weixin";
+ case 2:
+ return "icon-zhifubao";
+ case 3:
+ return "icon-guizhouyinhanglogo";
+ case 4:
+ return "icon-work_icon_party-01";
+ default:
+ return "icon-daizhifu"
+ }
+ }
+
+}
diff --git a/src/app/services/common/icon.service.ts b/src/app/services/common/icon.service.ts
new file mode 100644
index 0000000..5189b6d
--- /dev/null
+++ b/src/app/services/common/icon.service.ts
@@ -0,0 +1,14 @@
+import { Injectable } from '@angular/core';
+import {NzIconService} from "ng-zorro-antd/icon";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class IconService {
+
+ constructor(private iconService: NzIconService) {
+ this.iconService.fetchFromIconfont({
+ scriptUrl: 'https://at.alicdn.com/t/c/font_4647823_zeitf111aa.js'
+ });
+ }
+}
diff --git a/src/app/services/trade/order-starbucks.service.ts b/src/app/services/trade/order-starbucks.service.ts
new file mode 100644
index 0000000..5de0c4e
--- /dev/null
+++ b/src/app/services/trade/order-starbucks.service.ts
@@ -0,0 +1,24 @@
+import { Injectable } from '@angular/core';
+import {HttpClient} from "@angular/common/http";
+import {environment} from "../../../environments/environment";
+import {ObjectData} from "../../utils/objectData.service";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class OrderStarbucksService {
+
+ constructor(private http: HttpClient) { }
+
+ /**
+ * 查询订单列表
+ * @param param
+ * @param callBack
+ */
+ public getListStarbucks(param: object, callBack:any) {
+ this.http.get(environment.orderUrl + 'orderStarbucks/getListStarbucks?'+ObjectData.objectByString(param)).subscribe(data => {
+ callBack(data);
+ });
+ }
+
+}
diff --git a/src/app/services/trade/order.service.ts b/src/app/services/trade/order.service.ts
new file mode 100644
index 0000000..8a5d404
--- /dev/null
+++ b/src/app/services/trade/order.service.ts
@@ -0,0 +1,23 @@
+import { Injectable } from '@angular/core';
+import {HttpClient} from "@angular/common/http";
+import {environment} from "../../../environments/environment";
+import {ObjectData} from "../../utils/objectData.service";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class OrderService {
+
+ constructor(private http: HttpClient) { }
+
+ /**
+ * 查询订单
+ * @param orderNo
+ * @param callBack
+ */
+ public queryOrder(orderNo: string, callBack:any) {
+ this.http.get(environment.orderUrl + 'queryOrder?orderNo='+ orderNo).subscribe(data => {
+ callBack(data);
+ });
+ }
+}
diff --git a/src/app/utils/dateUtils.service.ts b/src/app/utils/dateUtils.service.ts
index 7ef2e54..05bbb81 100644
--- a/src/app/utils/dateUtils.service.ts
+++ b/src/app/utils/dateUtils.service.ts
@@ -119,4 +119,23 @@ export class DateUtils {
return returnObj;
}
+
+ /**
+ * 获取时间
+ * @param currentDate 当前时间
+ * @param type 1;开始时间 2:结束时间
+ */
+ public static getDateHMS(currentDate: Date , type: number): any {
+ if (type == 1) {
+ currentDate.setHours(0);
+ currentDate.setMinutes(0);
+ currentDate.setSeconds(0);
+ }
+ if (type == 2) {
+ currentDate.setHours(23);
+ currentDate.setMinutes(59);
+ currentDate.setSeconds(59);
+ }
+ return currentDate;
+ }
}