diff --git a/src/app/admin/goods/list/list.component.html b/src/app/admin/goods/list/list.component.html index d3caf7c..58eaacd 100644 --- a/src/app/admin/goods/list/list.component.html +++ b/src/app/admin/goods/list/list.component.html @@ -14,7 +14,7 @@ -
+
商品标签 @@ -71,7 +71,7 @@ 编号 商品名称 - 商品标签 + 商品标签 商品类型 列表图片 创建时间 @@ -83,7 +83,7 @@ {{i + 1}} {{data.name}} - {{data.goodsLabel }} + {{data.goodsLabel }} {{data.goodsTypeName }} @@ -91,17 +91,17 @@ {{data.createTime | date: 'yyyy-MM-dd'}} {{data.status | goodsStatus}} - 编辑 - + 编辑 + 更多操作 @@ -134,7 +134,7 @@ - + 商品标签 diff --git a/src/app/admin/goods/list/list.component.ts b/src/app/admin/goods/list/list.component.ts index 42f3b64..148090f 100644 --- a/src/app/admin/goods/list/list.component.ts +++ b/src/app/admin/goods/list/list.component.ts @@ -217,6 +217,7 @@ export class ListComponent implements OnInit { // 编辑产品 public getEdit(id?: number): void { this.isVisibleEdit = true; + this.resetForm(); this.goodsId = id; if (id != null) { this.editFlag = true; @@ -289,6 +290,15 @@ export class ListComponent implements OnInit { } } + // 清空上传表单 + private resetForm() { + this.editFlag = false; + this.validateForm.reset(); + this.listImg = []; + this.bannerImg = []; + this.detailImg = []; + } + // 图片查看 handlePreview = async (file: NzUploadFile) => { @@ -381,7 +391,16 @@ export class ListComponent implements OnInit { // 展示配置规则 public configPresent(id: number): void { this.goodsId = id; - this.listOfControl[0].goodsId = id; + this.listOfControl = [{ + isEdit: true, + agentId: null, + goodsId: id, + num: null, + sourceId: null, + agentName: null, + sourceName: null, + type: null, + }]; this.isVisiblePresent = true; } 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 index c568dfe..e105317 100644 --- 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 @@ -29,7 +29,11 @@ 交易状态 - + + + + + @@ -62,7 +66,7 @@
共计 {{total?total:0}} 条数据
- +
@@ -83,34 +87,44 @@ 交易单号 + 子订单号 + 物流单号 客户电话 - 订单名称 - 订单金额 - 支付金额 - 支付方式 - 订单状态 + 商品名称 + 商品规格 + 商品金额 + 售卖金额 + 商品数量 + 支付总金额 创建时间 - 物流状态 - 操作 + 收货信息 + 订单状态 + 物流状态 + 操作 - + {{data.orderNo}} + {{data.childOrderNo}} + {{data.logisticsNo === null ? '暂无物流信息' : data.logisticsNo}} {{data.memPhone}} - {{data.title}} - ¥{{data.totalPrice}} - ¥{{data.payPrice}} - {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} - {{data.orderStatus | orderStatus}} + {{data.goodsName}} + {{data.goodsSpecName}} + ¥{{data.goodsPrice}} + ¥{{data.goodsActualPrice}} + {{data.saleCount}} + ¥{{data.totalActualPrice}} {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.logisticsStatus | logisticsStatus}} - + {{data.deliveryAddressMsg }} + {{data.childOrderStatus | orderChildStatus}} + {{data.logisticsStatus == null ? '未发货' : data.logisticsStatus}} + 操作列表 @@ -120,96 +134,18 @@
- - - - - {{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'}}

-
-
+ + +

{{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.ts b/src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts index 68ccae6..df26d67 100644 --- 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 @@ -58,7 +58,7 @@ export class GoodsChildOrderComponent implements OnInit { }; // 请求地址参数 FILE_URL = environment.imageUrl; - orderNo; + orderId: number; logisticsNo; logisticsTraceDetails; constructor( @@ -112,7 +112,6 @@ export class GoodsChildOrderComponent implements OnInit { 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 { @@ -122,50 +121,31 @@ export class GoodsChildOrderComponent implements OnInit { } // 展示订单详情 - public showOrderDetail(orderNo: string) { + public showOrderDetail(orderId: number ) { 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.goods.getLogisticsMsg(orderId, data => { + this.logisticsTraceDetails = data['return_data']; 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; + public updateLogisticsNo(orderId: number): void { + this.orderId = orderId; this.isVisible = true; } public handleOk(): void { - this.goods.updateLogisticsNo({ - orderNo: this.orderNo , + this.goods.editLogisticsNo({ + orderId: this.orderId , logisticsNo: this.logisticsNo } , data => { if (data['return_code'] === '000000') { this.isVisible = false; + this.getRequest(false, this.searchForm.value); this.notification.success('成功' , '更新成功'); } else { this.notification.error( '失败' , '更新成功'); diff --git a/src/app/admin/order-manage/goods-order/goods-order.component.html b/src/app/admin/order-manage/goods-order/goods-order.component.html index 0f1247b..05c5f5f 100644 --- a/src/app/admin/order-manage/goods-order/goods-order.component.html +++ b/src/app/admin/order-manage/goods-order/goods-order.component.html @@ -159,12 +159,12 @@ 支付方式 订单状态 创建时间 - 物流状态 + 操作 - + {{data.orderNo}} {{data.memPhone}} {{data.title}} @@ -173,13 +173,13 @@ {{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}} {{data.orderStatus | orderStatus}} {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.logisticsStatus | logisticsStatus}} + 操作列表 @@ -242,18 +242,17 @@ - 产品类型 产品图片 产品名称 商品原价 支付价格 数量 支付总价 + 操作 - {{ data.goodsType | orderChildGoodsType}} @@ -265,19 +264,22 @@ {{ data.goodsActualPrice }} 元 {{ data.saleCount }} {{ data.totalActualPrice }} 元 + + 查看物流信息 + - - - -

{{item['desc']}}

-

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

-
-
+ + + + + + + -
+ @@ -294,3 +296,16 @@
+ + + + + +

{{item['desc']}}

+

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

+
+
+ +
+
diff --git a/src/app/admin/order-manage/goods-order/goods-order.component.ts b/src/app/admin/order-manage/goods-order/goods-order.component.ts index 0edf642..8ad7875 100644 --- a/src/app/admin/order-manage/goods-order/goods-order.component.ts +++ b/src/app/admin/order-manage/goods-order/goods-order.component.ts @@ -62,6 +62,7 @@ export class GoodsOrderComponent implements OnInit { // 订单详情相关参数 // 详情模态框 orderDetailModal = false; + orderDetailModalChild = false; // 详情模态框数据等待 orderDetailModalLoading = false; // 订单详情数据 @@ -171,6 +172,17 @@ export class GoodsOrderComponent implements OnInit { } + + public showOrderDetailChild(orderId: number ) { + this.orderDetailModalChild = true; + this.orderDetailModalLoading = true; + this.goods.getLogisticsMsg(orderId, data => { + this.logisticsTraceDetails = data['return_data']; + this.orderDetailModalLoading = false; + }); + + } + // 导出数据 public excelOrder(whereObject) { this.loadingObject.status = true; diff --git a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html index 52e119c..e021050 100644 --- a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html +++ b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html @@ -300,3 +300,7 @@ + + + + diff --git a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts index f49c1a3..4240ac3 100644 --- a/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts +++ b/src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import {Component, OnInit, TemplateRef} from '@angular/core'; import {environment} from '../../../../environments/environment'; import {CompanyService} from '../../../services/company.service'; import {LocalStorageService} from '../../../services/local-storage.service'; @@ -62,6 +62,7 @@ export class MobileRechargeOrderListComponent implements OnInit { orderDetailModal = false; // 详情模态框数据等待 orderDetailModalLoading = false; + isVisible = false; // 订单详情数据 orderDetailObject: any = { tradeOrder: {}, @@ -74,6 +75,8 @@ export class MobileRechargeOrderListComponent implements OnInit { }; // 请求地址参数 FILE_URL = environment.imageUrl; + percent = 0; + processRateInterval; constructor( private form: FormBuilder, private store: LocalStorageService, @@ -165,12 +168,18 @@ export class MobileRechargeOrderListComponent implements OnInit { // 导出数据 public excelOrder(whereObject) { - this.loadingObject.status = true; - this.loadingObject.title = '数据导出中...'; + + this.percent = 0; + whereObject['serialNumber'] = new Date().getTime(); + this.processRate(whereObject['serialNumber']); + this.isVisible = true; + this.orderMobileRechargeService.exportMobilePartyOrderList(whereObject, data => { if (data['return_code'] === '000000') { - window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; + // this.message.success('导出成功!'); + // window.location.href = this.FILE_URL + 'temporary/' + data['return_data']; } else { + this.isVisible = false; this.message.error(data['return_msg']); } this.loadingObject.status = false; @@ -218,5 +227,29 @@ export class MobileRechargeOrderListComponent implements OnInit { }); } + + // 获取导出百分比 + processRate(key: string) { + this.processRateInterval = setInterval(() => this.commonsService.getRedisValueByType(key, data => { + this.percent = data['return_data']; + if (this.percent === 100) { + clearTimeout(this.processRateInterval); + this.loadingObject.status = true; + this.loadingObject.title = '下载中...'; + const interval = setInterval(() => this.commonsService.getRedisValueByType(key + 'download', download => { + if (download['return_data'] != null) { + this.message.success('下载成功!'); + this.loadingObject.status = false; + window.location.href = this.FILE_URL + 'temporary/' + download['return_data']; + this.isVisible = false; + clearTimeout(interval); + } + }), 100); + } + }), 300); + + + } + } diff --git a/src/app/services/goods/goods.service.ts b/src/app/services/goods/goods.service.ts index e7d881e..e52fbf7 100644 --- a/src/app/services/goods/goods.service.ts +++ b/src/app/services/goods/goods.service.ts @@ -313,9 +313,24 @@ export class GoodsService { }); } + public editLogisticsNo(param: object, callBack) { + this.http.get(environment.orderUrl + 'goodsOrder/editLogisticsNo?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + public getGoodsOrderDetail(orderNo: string, callBack) { this.http.get(environment.orderUrl + 'goodsOrder/getGoodsOrderDetail?orderNo=' + orderNo).subscribe(data => { callBack(data); }); } + + public getLogisticsMsg(orderId: number , callBack) { + this.http.get(environment.baseUrl + 'goods/getLogisticsMsg?orderId=' + orderId).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 index ce83b0d..5b2a1d8 100644 --- a/src/app/services/order/order-third-party.service.ts +++ b/src/app/services/order/order-third-party.service.ts @@ -48,6 +48,7 @@ export class OrderThirdPartyService { * @Param param: object, callBack */ public exportThirdPartyOrderList(param: object, callBack) { + console.log(param); this.http.get(environment.orderUrl + 'thirdParty/exportThirdPartyOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { callBack(data); }); diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 1440ff1..0f718ac 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,10 @@ export const environment = { production: false, - baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) + // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + // orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址) + 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=',