提交代码

master
胡锐 2 years ago
parent 21c0565e08
commit 3262442c29
  1. 30
      src/app/admin/trade-order/trade-order-list/trade-order-list.component.html
  2. 22
      src/app/admin/trade-order/trade-order-list/trade-order-list.component.ts
  3. 2
      src/app/pipes/platform-type.pipe.ts
  4. 2
      src/app/pipes/trade-order/pay-mode.pipe.ts
  5. 13
      src/app/services/trade-order.service.ts

@ -2,7 +2,7 @@
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<nz-spin [nzSpinning]="loading" nzTip="处理中...">
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row>
@ -94,10 +94,8 @@
<div class="inner-content">
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<!-- <button nz-button nzType="primary" class="right-btn" [routerLink]="'/admin/agent/add'"><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
-->
<button nz-button nzType="primary" class="right-btn" (click)="exportTradeOrder()" >导出交易</button>
</div>
<!--数组表格 -->
<nz-table #basicTable
[nzData]="dataObject.list"
@ -111,19 +109,18 @@
<tr>
<th nzWidth="100px">序号</th>
<th nzWidth="150px">商户名称</th>
<th nzWidth="160px">平台商户号</th>
<th nzWidth="150px">门店名称</th>
<th nzWidth="200px">设备编号SN</th>
<th nzWidth="250px">商户订单号</th>
<th nzWidth="100px">支付模式</th>
<th nzWidth="100px">平台类型</th>
<th nzWidth="270px">商户订单号</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">交易金额</th>
<th nzWidth="100px">门店优惠</th>
<th nzWidth="130px">优惠券优惠</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="100px">业务员</th>
<th nzWidth="100px">状态</th>
<th nzWidth="160px">创建时间</th>
<th nzWidth="160px">支付时间</th>
<th nzWidth="160px">取消时间</th>
<th nzWidth="160px">入账商户号</th>
<th nzWidth="100px">业务员</th>
<th nzWidth="150px" nzRight="0px">操作</th>
</tr>
</thead>
@ -131,19 +128,18 @@
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i + 1}}</td>
<td>{{data.merName}}</td>
<td>{{data.platformMerNo}}</td>
<td>{{data.storeName}}</td>
<td>{{data.deviceSn}}</td>
<td>{{data.outTradeNo}}</td>
<td>{{data.payMode | payMode}}</td>
<td>{{data.platformType | platformType}}</td>
<td>¥{{data.tradeAmount}}</td>
<td>{{data.tradeActualAmount?'¥'+data.tradeActualAmount:'¥0'}}</td>
<td>{{data.salesmanName}}</td>
<td>¥{{data.storeDiscountActualPrice?data.storeDiscountActualPrice:0}}</td>
<td>¥{{data.userDiscountActualPrice?data.userDiscountActualPrice:0}}</td>
<td>¥{{data.tradeActualAmount?data.tradeActualAmount:0}}</td>
<td>{{data.status | tradeOrderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.platformMerNo}}</td>
<td>{{data.salesmanName}}</td>
<td nzRight="0px" class="table-td-operation">
<a [routerLink]="['/admin/trade-order/trade-order-detail']" [queryParams]="{outTradeNo: data.outTradeNo}">详情</a>
<a nz-dropdown [nzDropdownMenu]="menu">其他操作 <i nz-icon nzType="down"></i> </a>

@ -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;
});
}
}

@ -13,6 +13,8 @@ export class PlatformTypePipe implements PipeTransform {
return '国通';
case 3:
return '建行';
case 4:
return '微信';
default:
return '未知';
}

@ -15,8 +15,6 @@ export class PayModePipe implements PipeTransform {
return '银联';
case 'DRAGON':
return '龙支付';
default:
return '未知';
}
}

@ -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

Loading…
Cancel
Save