提交代码

pull/1/head
胡锐 2 years ago
parent 7354d4502a
commit 0baf73e78d
  1. 100
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.html
  2. 39
      src/app/admin/order-manage/order-coupon/order-coupon-list/order-coupon-list.component.ts
  3. 229
      src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html
  4. 6
      src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.scss
  5. 173
      src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.ts
  6. 4
      src/app/admin/order-manage/order-manage-routing.module.ts
  7. 3
      src/app/admin/order-manage/order-manage.module.ts
  8. 16
      src/app/services/order/order-coupon.service.ts
  9. 51
      src/app/services/order/order-integral-recharge.service.ts

@ -65,7 +65,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="8">订单状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="orderStatus">
<nz-select nzAllowClear formControlName="status">
<nz-option nzValue="1" nzLabel="待支付"></nz-option>
<nz-option nzValue="2" nzLabel="已支付"></nz-option>
<nz-option nzValue="3" nzLabel="已完成"></nz-option>
@ -148,7 +148,7 @@
<th nzWidth="180px">创建时间</th>
<th nzWidth="180px">支付时间</th>
<th nzWidth="180px">完成时间</th>
<!-- <th nzWidth="110px" nzRight="0px">操作</th>-->
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
@ -169,17 +169,97 @@
<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>-->
<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 (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="closeOrderDetail()" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '5px 5px 30px 5px'}">
<nz-spin [nzSpinning]="orderDetailModalLoading">
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" class="order-oil-tab">
<nz-tab nzTitle="交易信息">
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易订单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="第三方交易号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户手机号">{{orderDetailObject.tradeOrder.memPhone}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus | orderStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | orderPayType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付卡号" *ngIf="orderDetailObject.tradeOrder.payType == 4 || orderDetailObject.tradeOrder.payType == 7">
{{orderDetailObject.tradeOrder.memCardNo}}
</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券">{{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="返利">{{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="备注">{{orderDetailObject.tradeOrder.remarks}}</nz-descriptions-item>
</nz-descriptions>
<nz-divider nzText="支付信息"></nz-divider>
<nz-descriptions nzBordered [nzColumn]="3" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易总额">{{orderDetailObject.tradeOrder.totalPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠金额">{{orderDetailObject.tradeOrder.deductionPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="应付金额">{{orderDetailObject.tradeOrder.payablePrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzSpan="2" nzTitle="积分抵扣">{{orderDetailObject.tradeOrder.payGold / 100}} 元 </nz-descriptions-item>
<nz-descriptions-item nzTitle="实付金额">
{{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}}
</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="交易时间">
<nz-card>
<nz-timeline>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.createTime != null">
<p>创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.cancelTime != null">
<p>取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.payTime != null">支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.finishTime != null">完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.refundTime != null">退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
</nz-timeline>
</nz-card>
</nz-tab>
<nz-tab nzTitle="产品信息">
<nz-table #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true">
<thead>
<tr>
<th nzWidth="60px">产品类型</th>
<th nzWidth="150px">产品名称</th>
<th nzWidth="80px">产品规格</th>
<th nzWidth="20px">数量</th>
<th nzWidth="20px">单价</th>
<th nzWidth="20px">总价</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of childOrder.data">
<td>{{ data.goodsType | orderChildGoodsType}}</td>
<td>
{{ data.goodsName }}
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag>
</td>
<td>{{ data.goodsSpecName }}</td>
<td>{{ data.saleCount }}</td>
<td>{{ data.goodsActualPrice }} 元</td>
<td>{{ data.totalActualPrice }} 元</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</nz-spin>
</nz-modal>

@ -33,6 +33,13 @@ export class OrderCouponListComponent implements OnInit {
positionTypeArray = [];
orderDetailModal = false;
orderDetailModalLoading = false;
orderDetailObject: any = {
tradeOrder: {},
gasOrder: {},
};
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
@ -52,7 +59,7 @@ export class OrderCouponListComponent implements OnInit {
memPhone: [null],
couponName: [null],
payType: [null],
orderStatus: [null],
status: [null],
createTime: [null],
payTime: [null],
finishTime: [null],
@ -123,6 +130,32 @@ export class OrderCouponListComponent implements OnInit {
this.isCollapse = !this.isCollapse;
}
/**
*
*/
showOrderDetail(orderNo: string) {
this.orderDetailModal = true;
this.orderDetailModalLoading = true;
this.orderCouponService.getCouponOrderDetail(orderNo, data => {
if (data['return_code'] === '000000') {
this.orderDetailObject = data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.orderDetailModalLoading = false;
});
}
/**
*
*/
closeOrderDetail() {
this.orderDetailModal = false;
}
/**
* Excel
@ -131,11 +164,11 @@ export class OrderCouponListComponent implements OnInit {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
/*this.orderService.exportOrderCouponExcel(this.whereObject, data => {
this.orderCouponService.exportOrderCouponExcel(this.whereObject, data => {
this.loadingObject.spinning = false;
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
}
});*/
});
}
}

@ -0,0 +1,229 @@
<!-- 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">
<nz-select nzAllowClear formControlName="status">
<nz-option nzValue="1" nzLabel="待支付"></nz-option>
<nz-option nzValue="3" 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-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-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>
<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="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="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.goodsPrice}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.deductionPrice}}</td>
<td>¥{{data.payablePrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.payType}}</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 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 (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="closeOrderDetail()" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '5px 5px 30px 5px'}">
<nz-spin [nzSpinning]="orderDetailModalLoading">
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" class="order-oil-tab">
<nz-tab nzTitle="交易信息">
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易订单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="第三方交易号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户手机号">{{orderDetailObject.tradeOrder.memPhone}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus | orderStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | orderPayType}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付卡号" *ngIf="orderDetailObject.tradeOrder.payType == 4 || orderDetailObject.tradeOrder.payType == 7">
{{orderDetailObject.tradeOrder.memCardNo}}
</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券">{{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="返利">{{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="备注">{{orderDetailObject.tradeOrder.remarks}}</nz-descriptions-item>
</nz-descriptions>
<nz-divider nzText="支付信息"></nz-divider>
<nz-descriptions nzBordered [nzColumn]="3" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易总额">{{orderDetailObject.tradeOrder.totalPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠金额">{{orderDetailObject.tradeOrder.deductionPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="应付金额">{{orderDetailObject.tradeOrder.payablePrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzSpan="2" nzTitle="积分抵扣">{{orderDetailObject.tradeOrder.payGold / 100}} 元 </nz-descriptions-item>
<nz-descriptions-item nzTitle="实付金额">
{{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}}
</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
<nz-tab nzTitle="交易时间">
<nz-card>
<nz-timeline>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.createTime != null">
<p>创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.cancelTime != null">
<p>取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
<p>备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}</p>
</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.payTime != null">支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.finishTime != null">完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.refundTime != null">退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item>
</nz-timeline>
</nz-card>
</nz-tab>
<nz-tab nzTitle="产品信息">
<nz-table #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true">
<thead>
<tr>
<th nzWidth="60px">产品类型</th>
<th nzWidth="150px">产品名称</th>
<th nzWidth="80px">产品规格</th>
<th nzWidth="20px">数量</th>
<th nzWidth="20px">单价</th>
<th nzWidth="20px">总价</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of childOrder.data">
<td>{{ data.goodsType | orderChildGoodsType}}</td>
<td>
{{ data.goodsName }}
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag>
</td>
<td>{{ data.goodsSpecName }}</td>
<td>{{ data.saleCount }}</td>
<td>{{ data.goodsActualPrice }} 元</td>
<td>{{ data.totalActualPrice }} 元</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</nz-spin>
</nz-modal>

@ -0,0 +1,6 @@
.collapse {
margin-left: 15px;
}
nz-range-picker {
width: 100%;
}

@ -0,0 +1,173 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {OrderManageService} from '../../../services/order/order-manage.service';
import {CommonsService} from '../../../services/commons.service';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {OrderIntegralRechargeService} from '../../../services/order/order-integral-recharge.service';
@Component({
selector: 'app-order-integral-recharge',
templateUrl: './order-integral-recharge.component.html',
styleUrls: ['./order-integral-recharge.component.scss']
})
export class OrderIntegralRechargeComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
isCollapse = false;
orderDetailModal = false;
orderDetailModalLoading = false;
orderDetailObject: any = {
tradeOrder: {},
gasOrder: {},
};
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private orderManageService: OrderManageService,
private orderIntegralRechargeService: OrderIntegralRechargeService,
private commonsService: CommonsService,
private router: Router,
private form: FormBuilder) {
this.roleType = Number(this.store.get(ADMIN_INFO_OBJECT)['secRole'].roleType);
this.adminFlag = Number(this.store.get(ADMIN_INFO_OBJECT)['secUser'].adminFlag);
}
ngOnInit(): void {
this.searchForm = this.form.group({
orderNo: [null],
memPhone: [null],
couponName: [null],
payType: [null],
status: [null],
createTime: [null],
payTime: [null],
finishTime: [null],
});
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.orderIntegralRechargeService.getOrderList(this.whereObject, data => {
if (data['return_code'] === '000000') {
this.dataObject = data['return_data'];
} else {
this.modal.error(data['return_msg']);
}
this.tableLoading = false;
});
}
/**
*
* @param whereObject
*/
search(whereObject: object) {
if (whereObject['createTime'] != null) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
} else {
whereObject['createTimeS'] = null;
whereObject['createTimeE'] = null;
}
if (whereObject['payTime'] != null) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
} else {
whereObject['payTimeS'] = null;
whereObject['payTimeE'] = null;
}
if (whereObject['finishTime'] != null) {
whereObject['finishTimeS'] = whereObject['finishTime'][0].getTime();
whereObject['finishTimeE'] = whereObject['finishTime'][1].getTime();
} else {
whereObject['finishTimeS'] = null;
whereObject['finishTimeE'] = null;
}
this.whereObject = whereObject;
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
*
*/
toggleCollapse(): void {
this.isCollapse = !this.isCollapse;
}
/**
*
*/
showOrderDetail(orderNo: string) {
this.orderDetailModal = true;
this.orderDetailModalLoading = true;
this.orderIntegralRechargeService.getCouponOrderDetail(orderNo, data => {
if (data['return_code'] === '000000') {
this.orderDetailObject = data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
this.orderDetailModalLoading = false;
});
}
/**
*
*/
closeOrderDetail() {
this.orderDetailModal = false;
}
/**
* Excel
*/
exportExcel(): void {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.orderIntegralRechargeService.exportOrder(this.whereObject, data => {
this.loadingObject.spinning = false;
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
}
});
}
}

@ -2,11 +2,13 @@ import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {OrderOilListComponent} from './order-oil/order-oil-list/order-oil-list.component';
import {OrderCouponListComponent} from './order-coupon/order-coupon-list/order-coupon-list.component';
import {OrderIntegralRechargeComponent} from './order-integral-recharge/order-integral-recharge.component';
const routes: Routes = [
{ path: 'order-oil-list', component: OrderOilListComponent },
{ path: 'order-coupon-list', component: OrderCouponListComponent }
{ path: 'order-coupon-list', component: OrderCouponListComponent },
{ path: 'order-integral-recharge-list', component: OrderIntegralRechargeComponent}
];
@NgModule({

@ -8,10 +8,11 @@ import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {AppCommonModule} from '../../app-common.module';
import { OrderCouponListComponent } from './order-coupon/order-coupon-list/order-coupon-list.component';
import { OrderIntegralRechargeComponent } from './order-integral-recharge/order-integral-recharge.component';
@NgModule({
declarations: [OrderOilListComponent, OrderCouponListComponent],
declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent],
imports: [
CommonModule,
OrderManageRoutingModule,

@ -28,11 +28,23 @@ export class OrderCouponService {
/**
*
*
* @param orderNo
* @param callBack
*/
public getCouponOrderDetail(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'coupon/getOrderDetail?orderNo=' + orderNo).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 => {
public exportOrderCouponExcel(param: object, callBack) {
this.http.get(environment.orderUrl + 'coupon/exportOrderCouponExcel?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}

@ -0,0 +1,51 @@
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 OrderIntegralRechargeService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param paramsObject
* @param callBack
*/
public getOrderList(param: object, callBack) {
this.http.get(environment.orderUrl + 'integralRecharge/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param orderNo
* @param callBack
*/
public getCouponOrderDetail(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'integralRecharge/getOrderDetail?orderNo=' + orderNo).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public exportOrder(param: object, callBack) {
this.http.get(environment.orderUrl + 'integralRecharge/exportOrder?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}
Loading…
Cancel
Save