Merge branch 'master' into api-dev

* master:
  1
pull/1/head
袁野 2 years ago
commit f0d6e18ef4
  1. 2
      src/app/admin/index/index/index.component.ts
  2. 208
      src/app/admin/order/order-h-list/order-h-list.component.html
  3. 310
      src/app/admin/order/order-h-list/order-h-list.component.ts
  4. 12
      src/app/admin/recharge-order/order-list/order-list.component.html
  5. 396
      src/app/admin/recharge-order/order-list/order-list.component.ts
  6. 2
      src/app/pipes/recharge-status.pipe.ts
  7. 8
      src/environments/environment.ts

@ -21,7 +21,7 @@ export class IndexComponent implements OnInit {
isVisibleOil = false;
balance: number;
price: number;
code = 60;
code = 23;
listOfData;
countData: any = {};
data: any = {};

@ -6,109 +6,123 @@
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8" *ngIf="roleType === 1">
<nz-form-item>
<nz-form-label [nzSpan]="6">区域公司</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select [nzPlaceHolder]="'请选择区域公司...'" nzShowSearch nzAllowClear [formControlName]="'companyId'">
<nz-option *ngFor="let item of companyData" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值内容</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入充值内容..." [formControlName]="'rechargeContent'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单状态</nz-form-label>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'"/>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="status" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已取消" nzValue="4"></nz-option>
<nz-option nzLabel="已退款" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-select nzShowSearch nzAllowClear formControlName="payStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="101"></nz-option>
<nz-option nzLabel="已支付" nzValue="102"></nz-option>
<nz-option nzLabel="已完成" nzValue="100"></nz-option>
<nz-option nzLabel="已取消" nzValue="104"></nz-option>
<nz-option nzLabel="已退款" nzValue="105"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-label [nzSpan]="6">充值状态</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="rechargeModel" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="电信充值" nzValue="1"></nz-option>
<nz-option nzLabel="移动充值" nzValue="2"></nz-option>
<nz-option nzLabel="联通充值" nzValue="3"></nz-option>
<nz-select nzShowSearch nzAllowClear formControlName="rechargeStatus" nzPlaceHolder="请选择充值状态">
<nz-option nzLabel="充值中" nzValue="201"></nz-option>
<nz-option nzLabel="充值成功" nzValue="202"></nz-option>
<nz-option nzLabel="充值失败" nzValue="203"></nz-option>
<nz-option nzLabel="未充值" nzValue="204"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-label [nzSpan]="6">运营商类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="payType" nzPlaceHolder="支付方式">
<nz-option nzLabel="微信" nzValue="1"></nz-option>
<nz-option nzLabel="工会卡" nzValue="2"></nz-option>
<nz-option nzLabel="积分" nzValue="3"></nz-option>
<nz-option nzLabel="银联" nzValue="4"></nz-option>
<nz-select nzShowSearch nzAllowClear formControlName="operatorType" nzPlaceHolder="请选择运营商类型">
<nz-option nzLabel="电信运营商" nzValue="1"></nz-option>
<nz-option nzLabel="移动运营商" nzValue="2"></nz-option>
<nz-option nzLabel="联通运营商" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值号码</nz-form-label>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入充值号码..." [formControlName]="'rechargeContent'" />
<nz-select nzShowSearch nzAllowClear formControlName="rechargeType" nzPlaceHolder="请选择充值类型">
<nz-option nzLabel="快充" nzValue="1"></nz-option>
<nz-option nzLabel="慢充" nzValue="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">订单号</nz-form-label>
<nz-form-label [nzSpan]="6">支付方式</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入订单号..." [formControlName]="'orderNo'" />
<nz-select nzShowSearch nzAllowClear formControlName="payType" nzPlaceHolder="支付方式">
<nz-option nzLabel="微信支付" nzValue="2"></nz-option>
<nz-option nzLabel="工会卡支付" nzValue="3"></nz-option>
<nz-option nzLabel="银联支付" nzValue="4"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">工会卡卡号</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input placeholder="请输入工会卡卡号..." [formControlName]="'idCard'" />
<input nz-input placeholder="请输入工会卡卡号..." [formControlName]="'laborUnionCard'"/>
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col nzSpan="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">用户电话</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16">-->
<!-- <input nz-input placeholder="请输入用户电话..." [formControlName]="'userPhone'" />-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">支付时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="payTime"></nz-range-picker>
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="payTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值类型</nz-form-label>
<nz-form-label [nzSpan]="6">创建时间</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear formControlName="rechargeType" nzPlaceHolder="请选择充值类型">
<nz-option nzLabel="快充" [nzValue]="1"></nz-option>
<nz-option nzLabel="慢充" [nzValue]="2"></nz-option>
</nz-select>
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }"
formControlName="createTime"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<!-- <div nz-col nzSpan="8">-->
<!-- <nz-form-item>-->
<!-- <nz-form-label [nzSpan]="6">创建时间</nz-form-label>-->
<!-- <nz-form-control [nzSpan]="16">-->
<!-- <nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" formControlName="createTime"></nz-range-picker>-->
<!-- </nz-form-control>-->
<!-- </nz-form-item>-->
<!-- </div>-->
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
@ -142,64 +156,88 @@
<thead nzSingleSort>
<tr>
<th nzWidth="80px">编号</th>
<th nzWidth="180px">订单名称</th>
<th nzWidth="180px">订单类型</th>
<th nzWidth="180px">充值类型</th>
<th nzWidth="180px">工会卡号</th>
<th nzWidth="180px">订单号</th>
<th nzWidth="120px">客户名称</th>
<th nzWidth="130px">充值号码</th>
<th nzWidth="100px">充值类型</th>
<th nzWidth="120px">运营商</th>
<th nzWidth="180px">充值内容</th>
<th nzWidth="100px">充值金额</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="180px">充值订单号</th>
<th nzWidth="120px">客户名称</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="100px" nzRight>支付方式</th>
<th nzWidth="100px" nzRight>状态</th>
<th nzWidth="100px" nzRight>操作</th>
<th nzWidth="90px" nzRight>充值状态</th>
<th nzWidth="100px" nzRight>支付状态</th>
<th nzWidth="180px" nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.remarks}}</td>
<td>{{data.rechargeModel | rechargePrice}}</td>
<td>{{data.rechargeType== 1? '快充':'慢充'}}</td>
<td>{{data.idCard }}</td>
<td>{{i + 1}}</td>
<td>{{data.type == 1 ? '话费充值' : ''}}</td>
<td>{{data.operatorName}}</td>
<td>{{data.rechargeContent}} | {{data.rechargeType == 1 ? '快充' : '慢充'}}</td>
<td>¥{{data.rechargePrice}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.userName == null ? '暂无': data.userName}}</td>
<td>{{data.rechargeContent == null ? '暂无': data.rechargeContent}}</td>
<td>{{data.orderPrice}}</td>
<td>{{data.payPrice}}</td>
<td>{{data.userName == null ? '暂无' : data.userName}}</td>
<td>{{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight>{{data.payType | rechargePayType}}</td>
<td nzRight>{{data.status | rechargeStatus}}</td>
<td nzRight>{{data.rechargeStatus | rechargeStatus}}</td>
<td nzRight>{{data.payStatus | payStatus}}</td>
<td nzRight class="table-td-operation">
<a (click)="getDetail(data.id)">详情</a>
<a (click)="getDetail(data.id)">详情</a>
<!-- <nz-divider nzType="vertical"></nz-divider>-->
<!-- <a (click)="getChildOrder(data.id)">查看子订单</a>-->
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="订单详情" nzWidth="1200">
<nz-modal [(nzVisible)]="isVisible" nzTitle="订单详情" nzWidth="1200" (nzOnOk)="isVisible = false"
(nzOnCancel)="isVisible = false">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="订单名称">{{data['remarks']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单类型">{{data['rechargeModel'] | rechargePrice}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{data['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{data['userName'] == null ? '暂无': data['userName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值号码">{{data['rechargeContent'] == null ? '暂无': data['rechargeContent']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="身份证号" *ngIf="data['rechargeModel'] === 3 ">{{data['idCard']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值姓名" *ngIf="data['rechargeModel'] === 3 ">{{data['rechargeName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值金额">{{data['orderPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="退款金额" *ngIf="data['refundFee'] != null">{{data['refundFee']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值类型">{{data['type'] == 1 ? '话费充值' : ''}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="运营商">{{data['operatorName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值内容">{{data['rechargeContent']}} | {{data['rechargeType'] == 1 ? '快充' : '慢充'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值金额">¥{{data['rechargePrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="应付金额">¥{{data['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="积分抵扣金额">¥{{data['integralDeductionPrice'] == null ? '0' : data['integralDeductionPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券抵扣金额">¥{{data['discountDeductionPrice'] == null ? '0' : data['discountDeductionPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="实付金额">¥{{data['payRealPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="退款金额" *ngIf="data['refundFee'] != null">¥{{data['refundFee']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券名称" *ngIf="data['memDiscountName'] != null">{{data['memDiscountName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付流水号">{{data['paySerialNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="生成时间">{{data['createTimed'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['cancelTime'] != null" nzTitle="取消时间">{{data['cancelTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['finishTime'] != null" nzTitle="完成时间">{{data['finishTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['payTime'] != null" nzTitle="支付时间">{{data['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['refundTime'] != null" nzTitle="退款时间">{{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="状态">{{data['status'] | rechargeStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{data['payType'] | rechargePayType}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['laborUnionCard'] != null" nzTitle="工会卡号">{{data['laborUnionCard']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="充值状态">{{data['rechargeStatus'] | rechargeStatus}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付状态">{{data['payStatus'] | payStatus}}</nz-descriptions-item>
</nz-descriptions>
<div *nzModalFooter>
<button nz-button nzType="default" (click)="handleCancel()">关闭</button>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleChild" nzWidth="700" nzTitle="子订单记录" (nzOnCancel)="isVisibleChild = false" (nzOnOk)="isVisibleChild = false">
<nz-table #basicTable [nzData]="childData">
<thead>
<tr>
<th>订单号</th>
<th>充值平台</th>
<th>充值状态</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.orderNo}}</td>
<td>{{data.rechargePlatform == 1 ? '尖椒':'龙阅'}}</td>
<td>{{data.status | chlidRechargeStatus}}</td>
<td>{{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}}</td>
</tr>
</tbody>
</nz-table>
</nz-modal>

@ -1,16 +1,14 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {IconService} from '../../../services/icon.service';
import {NzMessageService, NzNotificationService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {LocalStorageService} from "../../../services/local-storage.service";
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
import {CompanyService} from '../../../services/company.service';
@Component({
selector: 'app-order-h-list',
@ -19,140 +17,192 @@ import {LocalStorageService} from "../../../services/local-storage.service";
})
export class OrderHListComponent implements OnInit {
FILE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id: number;
edit = false;
data = {};
private timer; // 定时器
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private coupon: CouponService,
private store: LocalStorageService, // 数据请求
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
console.log(typeof this.store.get(ADMIN_INFO_OBJECT)['bsCompany'].id);
}
public init(): void {
this.searchForm = this.form.group({
status: [null],
orderNo: [null],
rechargeModel: [null],
rechargeType: [null],
rechargeContent: [null],
idCard: [null],
userPhone: [null],
payTime: [null],
payType: [null],
createTime: [null],
});
this.validateForm = this.form.group({
type: [null, [Validators.required]],
price: [null, [Validators.required]],
realPrice: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) {
whereObject['code'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
childData = []; // 列表数据
importErrorStudentArray = [];
errorStudentVisible = false;
isVisibleChild = false;
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id: number;
edit = false;
data = {};
roleType: number;
companyData = []; // 列表数据
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
private company: CompanyService,
private store: LocalStorageService, // 数据请求
) {
}
if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany'].id === 3) {
whereObject['code'] = 60;
ngOnInit(): void {
this.init();
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType'];
const whereObject = {};
whereObject['pageNum'] = 1;
whereObject['pageSize'] = 10000;
this.company.selectCompanyList(whereObject, data => {
if (data['return_code'] === '000000') {
this.companyData = data['return_data'].list;
} else {
this.message.error(data['return_msg']);
}
});
}
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
public init(): void {
this.searchForm = this.form.group({
payStatus: [null], // 支付状态
rechargeStatus: [null], // 充值状态
companyId: [null], // 充值状态
orderNo: [null], // 订单号
operatorType: [null], // 运营商类型
laborUnionCard: [null], // 工会卡号
rechargeContent: [null], // 充值内容
userPhone: [null], // 用户电话
rechargeType: [null], // 充值类型
payTime: [null], // 支付时间
payType: [null], // 支付方式
createTime: [null], // 创建时间
});
this.validateForm = this.form.group({
type: [null, [Validators.required]],
price: [null, [Validators.required]],
realPrice: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.recharge.getOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
this.loading = false;
if (reset) {
this.pageNum = 1;
// 重置
public resetForm(): void {
this.searchForm.reset();
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.recharge.getOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 详情
public getDetail(id: number): void {
this.id = id;
this.recharge.getOrderById(id , data => {
if (data['return_code'] === '000000') {
console.log(data);
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.isVisible = true;
}
handleCancel(): void {
this.isVisible = false;
}
// 下载模板
downloadTemplate(whereObject) {
if (this.store.get(ADMIN_INFO_OBJECT)['highAgent'] != null) {
whereObject['code'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
// 详情
public getDetail(id: number): void {
this.id = id;
this.recharge.getOrderById(id, data => {
if (data['return_code'] === '000000') {
console.log(data);
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.isVisible = true;
}
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
handleCancel(): void {
this.isVisible = false;
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTimeS'][0].getTime();
whereObject['createTimeE'] = whereObject['createTimeE'][1].getTime();
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTimeS'][0].getTime();
whereObject['createTimeE'] = whereObject['createTimeE'][1].getTime();
}
this.recharge.exportOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
handleChange(info: NzUploadChangeParam): void {
if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') {
this.loading = false;
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.message.success('导入成功');
this.getRequest(true, this.searchForm.value);
} else {
this.modal.warning({
nzTitle: '提示',
nzOkText: '查看失败数据',
nzContent: '只有部分数据导入成功',
nzOnOk: () => this.showErrorStudentModal(info.file.response.return_data)
});
}
} else {
this.loading = false;
this.message.error(info.file.response.return_msg);
}
} else if (info.file.status === 'error') {
this.message.error('上传错误');
}
}
this.recharge.exportOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
// 打开模态框
showErrorStudentModal(data: []) {
this.getRequest(true, this.searchForm.value);
this.importErrorStudentArray = data['errorData'];
this.errorStudentVisible = true;
}
// 查询子订单
public getChildOrder(id: number): void {
this.isVisibleChild = true;
this.recharge.getChildOrder(id, data => {
if (data['return_code'] === '000000') {
this.childData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -6,6 +6,16 @@
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8" *ngIf="roleType === 1">
<nz-form-item>
<nz-form-label [nzSpan]="6">区域公司</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select [nzPlaceHolder]="'请选择区域公司...'" nzShowSearch nzAllowClear [formControlName]="'companyId'">
<nz-option *ngFor="let item of companyData" nzValue="{{item.id}}" nzLabel="{{item.name}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">充值内容</nz-form-label>
@ -233,7 +243,7 @@
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.orderNo}}</td>
<td>{{data.rechargePlatform == 1 ? '尖椒':'龙阅'}}</td>
<td>{{data.rechargePlatform == 2 ? '龙阅':'尖椒'}}</td>
<td>{{data.status | chlidRechargeStatus}}</td>
<td>{{data['createTime'] | date: 'yyyy-MM-dd HH:mm'}}</td>
</tr>

@ -10,207 +10,223 @@ import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService, NzModalService, NzNotificationService, NzUploadChangeParam} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {CompanyService} from "../../../services/company.service";
import {MerchantService} from "../../../services/merchant.service";
import {LocalStorageService} from "../../../services/local-storage.service";
@Component({
selector: 'app-order-list',
templateUrl: './order-list.component.html',
styleUrls: ['./order-list.component.scss']
selector: 'app-order-list',
templateUrl: './order-list.component.html',
styleUrls: ['./order-list.component.scss']
})
export class OrderListComponent implements OnInit , OnDestroy {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
childData = []; // 列表数据
importErrorStudentArray = [];
errorStudentVisible = false;
isVisibleChild = false;
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id: number;
edit = false;
data = {};
private timer; // 定时器
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private notification: NzNotificationService,
private common: CommonsService
) {
}
ngOnInit(): void {
this.init();
// this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
// this.recharge.countOrder(data => {
// if (data['return_data'] > 0) {
// this.getRequest(true, this.searchForm.value);
// this.notification.info(
// '充值订单',
// '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
// ).onClick.subscribe(() => {
// this.searchForm.value.status = 2;
// this.getRequest(true, this.searchForm.value);
// });
// }
// });
// }, 10000);
}
// 销毁
ngOnDestroy() {
if (this.timer) {
clearInterval(this.timer);
export class OrderListComponent implements OnInit, OnDestroy {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
childData = []; // 列表数据
importErrorStudentArray = [];
errorStudentVisible = false;
isVisibleChild = false;
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id: number;
edit = false;
data = {};
roleType: number;
companyData = []; // 列表数据
private timer; // 定时器
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
private company: CompanyService,
private store: LocalStorageService, // 数据请求
) {
}
}
public init(): void {
this.searchForm = this.form.group({
payStatus: [null], // 支付状态
rechargeStatus: [null], // 充值状态
orderNo: [null], // 订单号
operatorType: [null], // 运营商类型
laborUnionCard: [null], // 工会卡号
rechargeContent: [null], // 充值内容
userPhone: [null], // 用户电话
rechargeType: [null], // 充值类型
payTime: [null], // 支付时间
payType: [null], // 支付方式
createTime: [null], // 创建时间
});
this.validateForm = this.form.group({
type: [null, [Validators.required]],
price: [null, [Validators.required]],
realPrice: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
ngOnInit(): void {
this.init();
this.roleType = this.store.get(ADMIN_INFO_OBJECT)['secRole']['roleType'];
const whereObject = {};
whereObject['pageNum'] = 1;
whereObject['pageSize'] = 10000;
this.company.selectCompanyList(whereObject, data => {
if (data['return_code'] === '000000') {
this.companyData = data['return_data'].list;
} else {
this.message.error(data['return_msg']);
}
});
// this.timer = setInterval(() => { // 设置定时刷新事件,每隔1分钟刷新
// this.recharge.countOrder(data => {
// if (data['return_data'] > 0) {
// this.getRequest(true, this.searchForm.value);
// this.notification.info(
// '充值订单',
// '您有' + data['return_data'] + '条未充值的订单,请尽快充值,点击可查看未充值订单!'
// ).onClick.subscribe(() => {
// this.searchForm.value.status = 2;
// this.getRequest(true, this.searchForm.value);
// });
// }
// });
// }, 10000);
}
// 销毁
ngOnDestroy() {
if (this.timer) {
clearInterval(this.timer);
}
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
public init(): void {
this.searchForm = this.form.group({
payStatus: [null], // 支付状态
rechargeStatus: [null], // 充值状态
companyId: [null], // 充值状态
orderNo: [null], // 订单号
operatorType: [null], // 运营商类型
laborUnionCard: [null], // 工会卡号
rechargeContent: [null], // 充值内容
userPhone: [null], // 用户电话
rechargeType: [null], // 充值类型
payTime: [null], // 支付时间
payType: [null], // 支付方式
createTime: [null], // 创建时间
});
this.validateForm = this.form.group({
type: [null, [Validators.required]],
price: [null, [Validators.required]],
realPrice: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
}
this.loading = false;
if (reset) {
this.pageNum = 1;
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.recharge.getOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.recharge.getOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 详情
public getDetail(id: number): void {
this.id = id;
this.recharge.getOrderById(id , data => {
if (data['return_code'] === '000000') {
console.log(data);
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.isVisible = true;
}
handleCancel(): void {
this.isVisible = false;
}
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
// 重置
public resetForm(): void {
this.searchForm.reset();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTimeS'][0].getTime();
whereObject['createTimeE'] = whereObject['createTimeE'][1].getTime();
// 详情
public getDetail(id: number): void {
this.id = id;
this.recharge.getOrderById(id, data => {
if (data['return_code'] === '000000') {
console.log(data);
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.isVisible = true;
}
this.recharge.exportOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
handleChange(info: NzUploadChangeParam): void {
if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') {
this.loading = false;
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.message.success('导入成功');
this.getRequest(true, this.searchForm.value);
} else {
this.modal.warning({
nzTitle: '提示',
nzOkText: '查看失败数据',
nzContent: '只有部分数据导入成功',
nzOnOk: () => this.showErrorStudentModal(info.file.response.return_data)
});
handleCancel(): void {
this.isVisible = false;
}
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
} else {
this.loading = false;
this.message.error(info.file.response.return_msg);
}
} else if (info.file.status === 'error') {
this.message.error('上传错误');
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTimeS'][0].getTime();
whereObject['createTimeE'] = whereObject['createTimeE'][1].getTime();
}
this.recharge.exportOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
handleChange(info: NzUploadChangeParam): void {
if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') {
this.loading = false;
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.message.success('导入成功');
this.getRequest(true, this.searchForm.value);
} else {
this.modal.warning({
nzTitle: '提示',
nzOkText: '查看失败数据',
nzContent: '只有部分数据导入成功',
nzOnOk: () => this.showErrorStudentModal(info.file.response.return_data)
});
}
} else {
this.loading = false;
this.message.error(info.file.response.return_msg);
}
} else if (info.file.status === 'error') {
this.message.error('上传错误');
}
}
// 打开模态框
showErrorStudentModal(data: []) {
this.getRequest(true, this.searchForm.value);
this.importErrorStudentArray = data['errorData'];
this.errorStudentVisible = true;
}
// 查询子订单
public getChildOrder(id: number): void {
this.isVisibleChild = true;
this.recharge.getChildOrder(id, data => {
if (data['return_code'] === '000000') {
this.childData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
}
// 打开模态框
showErrorStudentModal(data: []) {
this.getRequest(true, this.searchForm.value);
this.importErrorStudentArray = data['errorData'];
this.errorStudentVisible = true;
}
// 查询子订单
public getChildOrder(id: number): void {
this.isVisibleChild = true;
this.recharge.getChildOrder(id , data => {
if (data['return_code'] === '000000') {
this.childData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -14,7 +14,7 @@ export class RechargeStatusPipe implements PipeTransform {
case 203:
return '充值失败';
case 204:
return '充值';
return '充值';
}
}

@ -4,10 +4,10 @@
export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
// baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'http://localhost:9302/filesystem/',
baseUrl: 'https://hsg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsg.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
};

Loading…
Cancel
Save