From 7821421839afb705745f4ec0e8888688c1235358 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Tue, 1 Nov 2022 16:43:41 +0800 Subject: [PATCH] Merge branch 'order' of http://139.159.177.244:3000/yuanye/high-web into order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 'order' of http://139.159.177.244:3000/yuanye/high-web: 提交代码 # Conflicts: # src/app/admin/order-manage/order-manage.module.ts --- .../member-charge-order-list.component.html | 272 ++++++++++++++++++ .../member-charge-order-list.component.scss | 3 + .../member-charge-order-list.component.ts | 163 +++++++++++ .../starbucks-order-list.component.html | 272 ++++++++++++++++++ .../starbucks-order-list.component.scss | 3 + .../starbucks-order-list.component.ts | 163 +++++++++++ 6 files changed, 876 insertions(+) create mode 100644 src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.html create mode 100644 src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.scss create mode 100644 src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.ts create mode 100644 src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.html create mode 100644 src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.scss create mode 100644 src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.ts diff --git a/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.html b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.html new file mode 100644 index 0000000..88d481d --- /dev/null +++ b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.html @@ -0,0 +1,272 @@ + + + + + + +
+
+
+
+ +
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+
+ + 分公司 + + + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+
+ + 支付卡号 + + + + +
+
+ + 支付时间 + + + + +
+ + + + +
+ + 创建时间 + + + + +
+ +
+ + 退款时间 + + + + +
+
+
+ +
+
+
+
+ + + +
+ 共计 {{total?total:0}} 条数据 +
+ +
+ + + + + + 交易单号 + 客户电话 + 订单名称 + 订单金额 + 支付金额 + 支付方式 + 支付卡号 + 订单状态 + 创建时间 + 操作 + + + + + {{data.orderNo}} + {{data.memPhone}} + {{data.title}} + ¥{{data.totalPrice}} + ¥{{data.payPrice}} + {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} + {{data.memCardNo}} + {{data.orderStatus | orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + 操作列表 + + + + + + + +
+
+ + + + + + + {{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/member-charge-order/member-charge-order-list/member-charge-order-list.component.scss b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.scss new file mode 100644 index 0000000..363c972 --- /dev/null +++ b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.scss @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.ts b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.ts new file mode 100644 index 0000000..3309fe5 --- /dev/null +++ b/src/app/admin/order-manage/member-charge-order/member-charge-order-list/member-charge-order-list.component.ts @@ -0,0 +1,163 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {ADMIN_INFO_OBJECT} from '../../../../services/local-storage.namespace'; +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 {NzMessageService} from 'ng-zorro-antd'; +import {OrderThirdPartyService} from '../../../../services/order/order-third-party.service'; +import {environment} from "../../../../../environments/environment"; +@Component({ + selector: 'app-member-charge-order-list', + animations: [ + trigger('openClose', [ + state('open', style({ + height: '260px', + opacity: 1, + backgroundColor: 'white' + })), + state('closed', style({ + opacity: 1, + backgroundColor: 'white' + })), + transition('open => closed', [ + animate('0.3s') + ]), + transition('closed => open', [ + animate('0.3s') + ]), + ]), + ], + templateUrl: './member-charge-order-list.component.html', + styleUrls: ['./member-charge-order-list.component.scss'] +}) +export class MemberChargeOrderListComponent implements OnInit { + + + // 搜索框 + searchForm: FormGroup; + // 搜索框折叠 + isCollapse = false; + // 订单状态数据 + orderStatusArray = []; + // 公司数据 + companyArray = []; + // 角色类型 + roleType: number; + // 列表相关参数 + // 总条数 + total: number; + // 页码 + pageNum = 1; + // 条码 + pageSize = 10; + // 列表数据 + requestData = []; + // 列表加载 + loading = true; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private thirdPartyOrder: OrderThirdPartyService, + private companyService: CompanyService, + private commonsService: CommonsService, + ) { } + + ngOnInit(): void { + // 搜索表单初始化 + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + payTimeArray: [null], + orderStatus: [null], + createTimeArray: [null], + refundTimeArray: [null], + companyId: [null], + payType: [null], + memCardNo: [null], + productType: [3], + }); + // 角色类型初始化 + this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); + // 查询公司列表 + if (this.roleType === 0 || this.roleType === 1) { + this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => { + this.companyArray = data['return_data']['list']; + }); + } + // 查询订单状态数据 + this.commonsService.getDictionary('ORDER_OIL_STATUS', data => { + this.orderStatusArray = data['return_data']; + }); + this.getRequest(true, this.searchForm.value); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + this.loading = true; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.thirdPartyOrder.getOrderList(whereObject, data => { + this.loading = false; + if (data['return_code'] === '000000') { + console.log(data); + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 展示订单详情 + 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; + }); + + } + + // 导出数据 + public excelOrder(whereObject) { + this.loadingObject.status = true; + this.loadingObject.title = '数据导出中...'; + this.thirdPartyOrder.exportThirdPartyOrderList(whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.status = false; + }); + } +} + + diff --git a/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.html b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.html new file mode 100644 index 0000000..88d481d --- /dev/null +++ b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.html @@ -0,0 +1,272 @@ + + + + + + +
+
+
+
+ +
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+
+ + 分公司 + + + + + + +
+ +
+ + 支付方式 + + + + + + + + + + + + +
+
+ + 支付卡号 + + + + +
+
+ + 支付时间 + + + + +
+ + + + +
+ + 创建时间 + + + + +
+ +
+ + 退款时间 + + + + +
+
+
+ +
+
+
+
+ + + +
+ 共计 {{total?total:0}} 条数据 +
+ +
+ + + + + + 交易单号 + 客户电话 + 订单名称 + 订单金额 + 支付金额 + 支付方式 + 支付卡号 + 订单状态 + 创建时间 + 操作 + + + + + {{data.orderNo}} + {{data.memPhone}} + {{data.title}} + ¥{{data.totalPrice}} + ¥{{data.payPrice}} + {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} + {{data.memCardNo}} + {{data.orderStatus | orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + + 操作列表 + + + + + + + +
+
+ + + + + + + {{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/starbucks-order/starbucks-order-list/starbucks-order-list.component.scss b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.scss new file mode 100644 index 0000000..363c972 --- /dev/null +++ b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.scss @@ -0,0 +1,3 @@ +img { + width: 60px; +} diff --git a/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.ts b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.ts new file mode 100644 index 0000000..2ba9c8c --- /dev/null +++ b/src/app/admin/order-manage/starbucks-order/starbucks-order-list/starbucks-order-list.component.ts @@ -0,0 +1,163 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup} from '@angular/forms'; +import {ADMIN_INFO_OBJECT} from '../../../../services/local-storage.namespace'; +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 {NzMessageService} from 'ng-zorro-antd'; +import {OrderThirdPartyService} from '../../../../services/order/order-third-party.service'; +import {environment} from "../../../../../environments/environment"; +@Component({ + selector: 'app-starbucks-order-list', + animations: [ + trigger('openClose', [ + state('open', style({ + height: '260px', + opacity: 1, + backgroundColor: 'white' + })), + state('closed', style({ + opacity: 1, + backgroundColor: 'white' + })), + transition('open => closed', [ + animate('0.3s') + ]), + transition('closed => open', [ + animate('0.3s') + ]), + ]), + ], + templateUrl: './starbucks-order-list.component.html', + styleUrls: ['./starbucks-order-list.component.scss'] +}) +export class StarbucksOrderListComponent implements OnInit { + + + // 搜索框 + searchForm: FormGroup; + // 搜索框折叠 + isCollapse = false; + // 订单状态数据 + orderStatusArray = []; + // 公司数据 + companyArray = []; + // 角色类型 + roleType: number; + // 列表相关参数 + // 总条数 + total: number; + // 页码 + pageNum = 1; + // 条码 + pageSize = 10; + // 列表数据 + requestData = []; + // 列表加载 + loading = true; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private thirdPartyOrder: OrderThirdPartyService, + private companyService: CompanyService, + private commonsService: CommonsService, + ) { } + + ngOnInit(): void { + // 搜索表单初始化 + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + payTimeArray: [null], + orderStatus: [null], + createTimeArray: [null], + refundTimeArray: [null], + companyId: [null], + payType: [null], + memCardNo: [null], + productType: [1], + }); + // 角色类型初始化 + this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType); + // 查询公司列表 + if (this.roleType === 0 || this.roleType === 1) { + this.companyService.selectCompanyList({ pageNum: 1, pageSize: 999 }, data => { + this.companyArray = data['return_data']['list']; + }); + } + // 查询订单状态数据 + this.commonsService.getDictionary('ORDER_OIL_STATUS', data => { + this.orderStatusArray = data['return_data']; + }); + this.getRequest(true, this.searchForm.value); + } + + // 查询列表 + public getRequest(reset: boolean = false, whereObject: object) { + this.loading = true; + if (reset) { + this.pageNum = 1; + } + whereObject['pageNum'] = this.pageNum; + whereObject['pageSize'] = this.pageSize; + this.thirdPartyOrder.getOrderList(whereObject, data => { + this.loading = false; + if (data['return_code'] === '000000') { + console.log(data); + this.requestData = data['return_data'].list; + this.total = data['return_data'].total; + } else { + this.message.error(data['return_msg']); + } + }); + } + + // 展示订单详情 + 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; + }); + + } + + // 导出数据 + public excelOrder(whereObject) { + this.loadingObject.status = true; + this.loadingObject.title = '数据导出中...'; + this.thirdPartyOrder.exportThirdPartyOrderList(whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.status = false; + }); + } +} + +