parent
99f4cf4cbd
commit
7354d4502a
@ -1 +1,185 @@ |
|||||||
<p>order-coupon-list works!</p> |
<!-- start 面包屑 --> |
||||||
|
<app-breadcrumb></app-breadcrumb> |
||||||
|
<!-- end 面包屑 --> |
||||||
|
<!--条件搜索--> |
||||||
|
|
||||||
|
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}"> |
||||||
|
<div class="inner-content"> |
||||||
|
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)"> |
||||||
|
<div nz-row> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">订单号</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="orderNo" /> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">客户电话</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="memPhone" /> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">卡券名称</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="couponName" /> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">支付卡号</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="couponName" /> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">支付方式</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select nzAllowClear formControlName="payType"> |
||||||
|
<nz-option nzValue="1" nzLabel="支付宝"></nz-option> |
||||||
|
<nz-option nzValue="2" nzLabel="微信"></nz-option> |
||||||
|
<nz-option nzValue="3" nzLabel="积分抵扣"></nz-option> |
||||||
|
<nz-option nzValue="4" nzLabel="汇联通工会卡"></nz-option> |
||||||
|
<nz-option nzValue="5" nzLabel="银联"></nz-option> |
||||||
|
<nz-option nzValue="6" nzLabel="银联分期"></nz-option> |
||||||
|
<nz-option nzValue="7" nzLabel="嗨森逛油卡"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">订单状态</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select nzAllowClear formControlName="orderStatus"> |
||||||
|
<nz-option nzValue="1" nzLabel="待支付"></nz-option> |
||||||
|
<nz-option nzValue="2" nzLabel="已支付"></nz-option> |
||||||
|
<nz-option nzValue="3" nzLabel="已完成"></nz-option> |
||||||
|
<nz-option nzValue="4" nzLabel="已退款"></nz-option> |
||||||
|
<nz-option nzValue="5" nzLabel="已取消"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
<div nz-row *ngIf="isCollapse"> |
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">创建时间</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="createTime"></nz-range-picker> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">支付时间</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="payTime"></nz-range-picker> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">完成时间</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-range-picker [nzShowTime]="{ nzFormat: 'yyyy-MM-dd HH:mm:ss' }" formControlName="finishTime"></nz-range-picker> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-row> |
||||||
|
<div nz-col nzSpan="24" class="search-button"> |
||||||
|
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button> |
||||||
|
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button> |
||||||
|
<a class="collapse" (click)="toggleCollapse()">更多条件<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i></a> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="inner-content"> |
||||||
|
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span> |
||||||
|
<div class="operating-button"> |
||||||
|
<button nz-button nzType="primary" class="right-btn" (click)="exportExcel()" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!--数组表格 --> |
||||||
|
<nz-table #basicTable |
||||||
|
[nzData]="dataObject.list" |
||||||
|
[nzTotal]="dataObject.total" |
||||||
|
[nzFrontPagination]="false" |
||||||
|
[nzLoading]="tableLoading" |
||||||
|
[nzPageIndex]="whereObject.pageNum" |
||||||
|
(nzPageIndexChange)="requestData($event)" |
||||||
|
[nzScroll]="{ x: '1100px'}"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th nzWidth="60px">序号</th> |
||||||
|
<th nzWidth="200px">交易单号</th> |
||||||
|
<th nzWidth="120px">客户电话</th> |
||||||
|
<th nzWidth="200px">卡券名称</th> |
||||||
|
<th nzWidth="100px">卡券面值</th> |
||||||
|
<th nzWidth="100px">订单总额</th> |
||||||
|
<th nzWidth="100px">优惠金额</th> |
||||||
|
<th nzWidth="100px">应付金额</th> |
||||||
|
<th nzWidth="100px">积分抵扣</th> |
||||||
|
<th nzWidth="100px">实付金额</th> |
||||||
|
<th nzWidth="100px">支付方式</th> |
||||||
|
<th nzWidth="140px">支付卡号</th> |
||||||
|
<th nzWidth="100px">订单状态</th> |
||||||
|
<th nzWidth="180px">创建时间</th> |
||||||
|
<th nzWidth="180px">支付时间</th> |
||||||
|
<th nzWidth="180px">完成时间</th> |
||||||
|
<!-- <th nzWidth="110px" nzRight="0px">操作</th>--> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr *ngFor="let data of basicTable.data;let i = index"> |
||||||
|
<td>{{i+1}}</td> |
||||||
|
<td>{{data.orderNo}}</td> |
||||||
|
<td>{{data.memPhone}}</td> |
||||||
|
<td>{{data.couponName}}</td> |
||||||
|
<td>¥{{data.couponPrice}}</td> |
||||||
|
<td>¥{{data.totalPrice}}</td> |
||||||
|
<td>¥{{data.deductionPrice}}</td> |
||||||
|
<td>¥{{data.payablePrice}}</td> |
||||||
|
<td>¥{{data.payGold / 100}}</td> |
||||||
|
<td>¥{{data.payPrice}}</td> |
||||||
|
<td>{{data.payType}}</td> |
||||||
|
<td>{{data.memCardNo}}</td> |
||||||
|
<td>{{data.orderStatus}}</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.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td> |
||||||
|
<!-- <td nzRight="0px" class="table-td-operation"> |
||||||
|
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a> |
||||||
|
<nz-dropdown-menu #menu="nzDropdownMenu"> |
||||||
|
<ul nz-menu nzSelectable> |
||||||
|
<li nz-menu-item ><a>二维码</a></li> |
||||||
|
</ul> |
||||||
|
</nz-dropdown-menu> |
||||||
|
</td>--> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
</div> |
||||||
|
</nz-spin> |
||||||
|
|
||||||
|
@ -0,0 +1,6 @@ |
|||||||
|
.collapse { |
||||||
|
margin-left: 15px; |
||||||
|
} |
||||||
|
nz-range-picker { |
||||||
|
width: 100%; |
||||||
|
} |
@ -0,0 +1,40 @@ |
|||||||
|
import { Injectable } from '@angular/core'; |
||||||
|
import {HttpClient} from '@angular/common/http'; |
||||||
|
import {CommonsService} from '../commons.service'; |
||||||
|
import {environment} from '../../../environments/environment'; |
||||||
|
|
||||||
|
@Injectable({ |
||||||
|
providedIn: 'root' |
||||||
|
}) |
||||||
|
export class OrderCouponService { |
||||||
|
|
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private common: CommonsService |
||||||
|
) { } |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询订单列表 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public getOrderList(param: object, callBack) { |
||||||
|
this.http.get(environment.orderUrl + 'coupon/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询订单详情 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public getCouponOrderDetail(param: object, callBack) { |
||||||
|
this.http.get(environment.orderUrl + 'coupon/getCouponOrderDetail?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
import { Injectable } from '@angular/core'; |
||||||
|
import {HttpClient} from '@angular/common/http'; |
||||||
|
import {CommonsService} from '../commons.service'; |
||||||
|
import {environment} from '../../../environments/environment'; |
||||||
|
|
||||||
|
@Injectable({ |
||||||
|
providedIn: 'root' |
||||||
|
}) |
||||||
|
export class OrderManageService { |
||||||
|
|
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private common: CommonsService |
||||||
|
) { |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 交易订单退款 |
||||||
|
* |
||||||
|
* @param paramsObject 参数 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public refundOrder(orderNo: string, remarks: string, callBack) { |
||||||
|
this.http.post(environment.orderUrl + 'refundOrder', { orderNo: orderNo, remarks: remarks}).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue