diff --git a/src/app/admin/trade-order/trade-order-list/trade-order-list.component.html b/src/app/admin/trade-order/trade-order-list/trade-order-list.component.html index c7d274e..b7329c1 100644 --- a/src/app/admin/trade-order/trade-order-list/trade-order-list.component.html +++ b/src/app/admin/trade-order/trade-order-list/trade-order-list.component.html @@ -2,7 +2,7 @@ - +
@@ -94,10 +94,8 @@
共计 {{dataObject.total?dataObject.total:0}} 条数据
- +
- 序号 商户名称 - 平台商户号 门店名称 - 设备编号SN - 商户订单号 - 支付模式 - 平台类型 + 商户订单号 + 支付方式 交易金额 + 门店优惠 + 优惠券优惠 实付金额 - 业务员 状态 创建时间 支付时间 - 取消时间 + 入账商户号 + 业务员 操作 @@ -131,19 +128,18 @@ {{i + 1}} {{data.merName}} - {{data.platformMerNo}} {{data.storeName}} - {{data.deviceSn}} {{data.outTradeNo}} {{data.payMode | payMode}} - {{data.platformType | platformType}} ¥{{data.tradeAmount}} - {{data.tradeActualAmount?'¥'+data.tradeActualAmount:'¥0'}} - {{data.salesmanName}} + ¥{{data.storeDiscountActualPrice?data.storeDiscountActualPrice:0}} + ¥{{data.userDiscountActualPrice?data.userDiscountActualPrice:0}} + ¥{{data.tradeActualAmount?data.tradeActualAmount:0}} {{data.status | tradeOrderStatus}} {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} - {{data.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}} + {{data.platformMerNo}} + {{data.salesmanName}} 详情 其他操作 diff --git a/src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts b/src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts index 112f0d8..77e33b5 100644 --- a/src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts +++ b/src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts @@ -5,6 +5,7 @@ import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; import {StoreService} from '../../../services/store.service'; import {FormBuilder, FormGroup} from '@angular/forms'; import {NzMessageService, NzModalService} from 'ng-zorro-antd'; +import {environment} from '../../../../environments/environment'; @Component({ selector: 'app-trade-order-list', @@ -12,17 +13,21 @@ import {NzMessageService, NzModalService} from 'ng-zorro-antd'; styleUrls: ['./trade-order-list.component.scss'] }) export class TradeOrderListComponent implements OnInit { - + FILE_URL = environment.imageUrl; loading = false; dataObject: any = {}; tableLoading = true; searchForm: FormGroup; pageNum: number; whereObject: any = {}; - userObjectType: number; storeArray = []; + loadingObject = { + spinning: false, + msg: '加载中' + }; + constructor(private store: LocalStorageService, // 数据请求 private modal: NzModalService, private message: NzMessageService, @@ -130,4 +135,17 @@ export class TradeOrderListComponent implements OnInit { }); } + exportTradeOrder() { + this.loadingObject.spinning = true; + this.loadingObject.msg = '导出中...'; + this.tradeOrderService.exportTradeOrder(this.whereObject, data => { + if (data['return_code'] === '000000') { + window.location.href = this.FILE_URL + data['return_data']; + } else { + this.message.error(data['return_msg']); + } + this.loadingObject.spinning = false; + }); + } + } diff --git a/src/app/pipes/platform-type.pipe.ts b/src/app/pipes/platform-type.pipe.ts index 5088e38..22af06f 100644 --- a/src/app/pipes/platform-type.pipe.ts +++ b/src/app/pipes/platform-type.pipe.ts @@ -13,6 +13,8 @@ export class PlatformTypePipe implements PipeTransform { return '国通'; case 3: return '建行'; + case 4: + return '微信'; default: return '未知'; } diff --git a/src/app/pipes/trade-order/pay-mode.pipe.ts b/src/app/pipes/trade-order/pay-mode.pipe.ts index c3738d5..ba45f8c 100644 --- a/src/app/pipes/trade-order/pay-mode.pipe.ts +++ b/src/app/pipes/trade-order/pay-mode.pipe.ts @@ -15,8 +15,6 @@ export class PayModePipe implements PipeTransform { return '银联'; case 'DRAGON': return '龙支付'; - default: - return '未知'; } } diff --git a/src/app/services/trade-order.service.ts b/src/app/services/trade-order.service.ts index defd3a0..2623881 100644 --- a/src/app/services/trade-order.service.ts +++ b/src/app/services/trade-order.service.ts @@ -14,7 +14,7 @@ export class TradeOrderService { ) { } /** - * 好像交易订单 + * 查询交易订单 * @param paramObject 参数 * @param callBack */ @@ -24,6 +24,17 @@ export class TradeOrderService { }); } + /** + * 好像交易订单 + * @param paramObject 参数 + * @param callBack + */ + exportTradeOrder(paramObject: object, callBack) { + this.http.get(environment.baseUrl + 'tradeOrder/exportTradeOrder?' + this.commonsService.getWhereCondition(paramObject)).subscribe(data => { + callBack(data); + }); + } + /** * 查询交易订单 * @param paramObject 参数