From d8f88d77f5584bfb844ba81ff6d2a39bfa19b646 Mon Sep 17 00:00:00 2001 From: Sum1Dream <418471657@qq.com> Date: Wed, 17 May 2023 15:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=95=86=E5=93=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../goods-child-order.component.html | 227 ++++++++++++++++++ .../goods-child-order.component.scss | 9 + .../goods-child-order.component.ts | 176 ++++++++++++++ 3 files changed, 412 insertions(+) create mode 100644 src/app/admin/order-manage/goods-child-order/goods-child-order.component.html create mode 100644 src/app/admin/order-manage/goods-child-order/goods-child-order.component.scss create mode 100644 src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts diff --git a/src/app/admin/order-manage/goods-child-order/goods-child-order.component.html b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.html new file mode 100644 index 0000000..c568dfe --- /dev/null +++ b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.html @@ -0,0 +1,227 @@ + + + + + +
+
+
+ +
+ + 交易单号 + + + + +
+ +
+ + 客户电话 + + + + +
+
+ + 交易状态 + + + + + + +
+
+ +
+ + 创建时间 + + + + +
+
+
+ + +
+
+
+
+ + + +
+ 共计 {{total?total:0}} 条数据 +
+ +
+ + + + + + 交易单号 + 客户电话 + 订单名称 + 订单金额 + 支付金额 + 支付方式 + 订单状态 + 创建时间 + 物流状态 + 操作 + + + + + {{data.orderNo}} + {{data.memPhone}} + {{data.title}} + ¥{{data.totalPrice}} + ¥{{data.payPrice}} + {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} + {{data.orderStatus | orderStatus}} + {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.logisticsStatus | logisticsStatus}} + + 操作列表 + + + + + + + +
+
+ + + + + + + {{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.goodsName }} + 赠品 + + {{ data.goodsPrice }} 元 + {{ data.goodsActualPrice }} 元 + {{ data.saleCount }} + {{ data.totalActualPrice }} 元 + + + + + + + +

{{item['desc']}}

+

{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}

+
+
+ +
+
+
+
+ + +
+
+ + 物流单号 + + + + +
+
+
diff --git a/src/app/admin/order-manage/goods-child-order/goods-child-order.component.scss b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.scss new file mode 100644 index 0000000..50bea78 --- /dev/null +++ b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.scss @@ -0,0 +1,9 @@ +img { + width: 60px; +} +.fontColor { + color: red; +} +.fontColorBlue { + color: #00a2d4; +} diff --git a/src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts new file mode 100644 index 0000000..68ccae6 --- /dev/null +++ b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts @@ -0,0 +1,176 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; +import {environment} from '../../../../environments/environment'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {NzMessageService, NzNotificationService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {OrderThirdPartyService} from '../../../services/order/order-third-party.service'; +import {GoodsService} from '../../../services/goods/goods.service'; +import {CompanyService} from '../../../services/company.service'; +import {CommonsService} from '../../../services/commons.service'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; + +@Component({ + selector: 'app-goods-child-order', + templateUrl: './goods-child-order.component.html', + styleUrls: ['./goods-child-order.component.scss'] +}) +export class GoodsChildOrderComponent implements OnInit { + + + // 搜索框 + searchForm: FormGroup; + // 搜索框折叠 + isCollapse = false; + // 订单状态数据 + orderStatusArray = []; + // 公司数据 + companyArray = []; + // 角色类型 + roleType: number; + // 列表相关参数 + // 总条数 + total: number; + // 页码 + pageNum = 1; + // 条码 + pageSize = 10; + // 列表数据 + requestData = []; + // 列表加载 + loading = true; + isVisible = false; + // 订单详情相关参数 + // 详情模态框 + orderDetailModal = false; + // 详情模态框数据等待 + orderDetailModalLoading = false; + // 订单详情数据 + orderDetailObject: any = { + tradeOrder: {}, + goodsOrder: { + logisticsNo: null + }, + }; + // 数据加载中参数 + loadingObject = { + title: '加载中...', + status: false, + }; + // 请求地址参数 + FILE_URL = environment.imageUrl; + orderNo; + logisticsNo; + logisticsTraceDetails; + constructor( + private form: FormBuilder, + private store: LocalStorageService, + private message: NzMessageService, + private thirdPartyOrder: OrderThirdPartyService, + private goods: GoodsService, + private companyService: CompanyService, + private commonsService: CommonsService, + private notification: NzNotificationService, + ) { } + + ngOnInit(): void { + // 搜索表单初始化 + this.searchForm = this.form.group({ + orderNo: [null], + memPhone: [null], + status: [null], + createTimeArray: [null], + + }); + // 角色类型初始化 + 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_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; + + if (whereObject['createTimeArray'] != null && whereObject['createTimeArray'].length !== 0) { + whereObject['createTimeS'] = whereObject['createTimeArray'][0].getTime(); + whereObject['createTimeE'] = whereObject['createTimeArray'][1].getTime(); + } + this.goods.getOrderChildList(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.goods.getGoodsOrderDetail(orderNo, data => { + if (data['return_code'] === '000000') { + console.log(data); + this.orderDetailObject = data['return_data']; + this.logisticsTraceDetails = data['return_data']['logisticsTraceDetails']; + console.log(this.logisticsTraceDetails); + } 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; + }); + } + + // 更新运费单号 + public updateLogisticsNo(order: string): void { + this.orderNo = order; + this.isVisible = true; + } + + public handleOk(): void { + this.goods.updateLogisticsNo({ + orderNo: this.orderNo , + logisticsNo: this.logisticsNo + } , data => { + if (data['return_code'] === '000000') { + this.isVisible = false; + this.notification.success('成功' , '更新成功'); + } else { + this.notification.error( '失败' , '更新成功'); + } + }); + } + +}