提交修改

pull/1/head
袁野 3 years ago
parent 222d1026d0
commit 7ee96fa41a
  1. 3
      src/app/admin/navigation/navigation.component.html
  2. 177
      src/app/admin/order/order-Tlist/order-Tlist.component.html
  3. 4
      src/app/admin/order/order-Tlist/order-Tlist.component.scss
  4. 186
      src/app/admin/order/order-Tlist/order-Tlist.component.ts
  5. 23
      src/app/admin/order/order-list/order-list.component.html
  6. 40
      src/app/admin/order/order-list/order-list.component.ts
  7. 2
      src/app/admin/order/order-routing.module.ts
  8. 5
      src/app/admin/order/order.module.ts
  9. 25
      src/app/services/order.service.ts
  10. 8
      src/environments/environment.ts

@ -28,8 +28,7 @@
[nzType]="isCollapsed ? 'menu-unfold' : 'menu-fold'"
></i>
</span>
系统开关:
<nz-switch [ngModel]="switchValue" (click)="clickSwitch()" nzCheckedChildren="开" nzUnCheckedChildren="关"></nz-switch>
<span *ngIf="userInfo['secUser'].id == 3">系统开关: <nz-switch [ngModel]="switchValue" (click)="clickSwitch()" nzCheckedChildren="开" nzUnCheckedChildren="关"></nz-switch></span>
<a style="float: right; margin-right:30px;" nz-dropdown [nzDropdownMenu]="menu">
{{userInfo.secUser.userName}}
<i nz-icon nzType="down"></i>

@ -0,0 +1,177 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequest(true , searchForm.value)">
<div nz-row>
<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]="'companyId'" (ngModelChange)="getMerchantListByCompany($event)">
<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">
<nz-select nzShowSearch nzAllowClear [formControlName]="'merchantId'">
<nz-option *ngFor="let item of merchantData" nzValue="{{item.id}}" nzLabel="{{item.merchantName}}"></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 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">
<input nz-input formControlName="paySerialNo"/>
</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="payModel" 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-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-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">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择订单状态" formControlName="orderStatus">
<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-option nzLabel="退款失败" nzValue="7"></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">
<nz-range-picker [nzShowTime]="{ nzFormat: 'HH:mm' }" 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>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="downloadTemplate(searchForm.value)" ><i nz-icon nzType="download" nzTheme="outline"></i>导出订单</button>
</div>
<nz-table
class="table"
#ajaxTable
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="50px">编号</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="110px">支付模式</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzRight nzWidth="100px">状态</th>
<th nzWidth="80px" nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.giveawayType}}</td>
<td>{{data.goodsType}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.paySerialNo}}</td>
<td>{{data.memName == null ? '暂无': data.memName}}</td>
<td>{{data.memPhone == null ? '暂无': data.memPhone}}</td>
<td>{{data.payModel}}</td>
<td>{{data.payType}}</td>
<td>{{data.payPrice}}</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 nzRight>{{data.orderStatus}}</td>
<td nzRight class="table-td-operation">
<!-- <a *ngIf="data.status !== 101" (click)="getDetail(data.id)">订单详情</a>-->
<a *ngIf="data.orderStatusId == 2 && data.goodsTypeId == 3" (click)="showModal(data.orderId)">申请退款</a>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="退款理由" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-form-item>
<nz-form-label>退款理由</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="refundContent" nz-input rows="2" placeholder="请输入退款理由"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>

@ -0,0 +1,4 @@
.head_img {
height: 60px;
width: 60px;
}

@ -0,0 +1,186 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {MerchantService} from '../../../services/merchant.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {OrderService} from '../../../services/order.service';
import {CompanyService} from '../../../services/company.service';
@Component({
selector: 'app-order-tlist',
templateUrl: './order-Tlist.component.html',
styleUrls: ['./order-Tlist.component.scss']
})
export class OrderTListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
companyData = []; // 列表数据
merchantData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
id: number; // 订单ID
isVisible = false;
refundContent: string;
constructor(
private form: FormBuilder,
private order: OrderService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
private common: CommonsService
) {
}
ngOnInit(): void {
this.init();
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.getMerchantListByCompany(this.searchForm.value.companyId);
}
public init(): void {
this.searchForm = this.form.group({
companyId: [null],
merchantId: [null],
orderNo: [null],
paySerialNo: [null],
payModel: [null],
payType: [null],
orderStatus: [null],
payTime: [null]
});
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();
}
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.order.getGasOrderList(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 getMerchantListByCompany(companyId: number): void {
this.merchant.getMerchantListByCompany(companyId, data => {
if (data['return_code'] === '000000') {
if (data['return_code'] === '000000') {
this.merchantData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
} else {
this.message.error(data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
// 查看详情
public getDetail(id: number): void {
this.router.navigate(['/admin/order/order-detail'], {
queryParams: {
merchantId: id
}
}).then(r => console.log(r));
}
// 下载模板
downloadTemplate(whereObject) {
if (whereObject['payTime'] != null && whereObject['payTime'].length !== 0) {
whereObject['payTimeS'] = whereObject['payTime'][0].getTime();
whereObject['payTimeE'] = whereObject['payTime'][1].getTime();
}
this.order.exportGoodsOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
provinceChange(e) {
console.log(e);
}
// 退款
public orderToRefund(id): void {
}
showModal(id): void {
console.log(id);
this.id = id;
this.isVisible = true;
}
handleOk(): void {
if (this.refundContent == null || this.refundContent.length === 0) {
this.message.error('请输入退款原因');
return;
}
this.common.showConfirm('确认订单是否退款', item => {
if (item) {
const params = {
orderId: this.id ,
refundContent: this.refundContent
};
this.order.refuelingOrderRefund(params, data => {
if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
this.isVisible = false;
this.message.success('申请退款中');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
handleCancel(): void {
this.isVisible = false;
}
}

@ -76,6 +76,8 @@
<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-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -123,6 +125,7 @@
<th nzWidth="50px">编号</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>
@ -133,8 +136,8 @@
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzRight="0px" nzWidth="100px">状态</th>
<!-- <th nzWidth="150px" nzRight="0px">操作</th>-->
<th nzRight nzWidth="100px">状态</th>
<!-- <th nzWidth="80px" nzRight>操作</th>-->
</tr>
</thead>
<tbody>
@ -142,6 +145,7 @@
<td>{{i+1}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.giveawayType}}</td>
<td>{{data.goodsType}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.paySerialNo}}</td>
<td>{{data.memName == null ? '暂无': data.memName}}</td>
@ -152,13 +156,22 @@
<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 nzRight="0px">{{data.orderStatus}}</td>
<!-- <td nzRight="0px" class="table-td-operation">-->
<!-- <a *ngIf="data.status !== 101" (click)="getDetail(data.id)">订单详情</a>-->
<td nzRight>{{data.orderStatus}}</td>
<!-- <td nzRight class="table-td-operation">-->
<!--&lt;!&ndash; <a *ngIf="data.status !== 101" (click)="getDetail(data.id)">订单详情</a>&ndash;&gt;-->
<!--&lt;!&ndash; <a *ngIf="data.orderStatusId == 2 && data.goodsTypeId == 3" (click)="showModal(data.id)">退款</a>&ndash;&gt;-->
<!-- </td>-->
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="退款理由" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-form-item>
<nz-form-label>退款理由</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="refundContent" nz-input rows="2" placeholder="请输入退款理由"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>

@ -26,7 +26,9 @@ export class OrderListComponent implements OnInit {
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
id: number; // 订单ID
isVisible = false;
refundContent: string;
constructor(
private form: FormBuilder,
private order: OrderService,
@ -51,7 +53,7 @@ export class OrderListComponent implements OnInit {
this.message.error(data['return_msg']);
}
});
this.getMerchantListByCompany(this.searchForm.value.companyId)
this.getMerchantListByCompany(this.searchForm.value.companyId);
}
public init(): void {
@ -142,4 +144,38 @@ export class OrderListComponent implements OnInit {
console.log(e);
}
// 退款
public orderToRefund(id): void {
}
showModal(id): void {
this.id = id;
this.isVisible = true;
}
handleOk(): void {
this.common.showConfirm('确认订单是否退款', item => {
if (item) {
const params = {
orderId: this.id ,
refundContent: this.refundContent
};
this.order.refuelingOrderRefund(params, data => {
if (data['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
this.isVisible = false;
this.message.success('退款成功');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
handleCancel(): void {
this.isVisible = false;
}
}

@ -4,10 +4,12 @@ import {OrderListComponent} from './order-list/order-list.component';
import {OrderDetailComponent} from './order-detail/order-detail.component';
import {OrderCouponsComponent} from './order-coupons/order-coupons.component';
import {OrderCouponComponent} from './order-coupon/order-coupon.component';
import {OrderTListComponent} from './order-Tlist/order-Tlist.component';
const routes: Routes = [
{ path: 'order-list', component: OrderListComponent },
{ path: 'order-t-list', component: OrderTListComponent },
{ path: 'order-detail', component: OrderDetailComponent },
{ path: 'order-coupons', component: OrderCouponsComponent },
{ path: 'order-coupon', component: OrderCouponComponent },

@ -8,14 +8,15 @@ import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {AppCommonModule} from "../../app-common.module";
import {AppCommonModule} from '../../app-common.module';
import { OrderDetailComponent } from './order-detail/order-detail.component';
import { OrderCouponsComponent } from './order-coupons/order-coupons.component';
import { OrderCouponComponent } from './order-coupon/order-coupon.component';
import {OrderTListComponent} from './order-Tlist/order-Tlist.component';
@NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent],
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent],
imports: [
CommonModule,
OrderRoutingModule,

@ -25,6 +25,18 @@ export class OrderService {
});
}
/**
*
*
* @param paramsObject
* @param callBack
*/
public getGasOrderList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'highOrder/getGasOrderList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
*
*
@ -37,5 +49,18 @@ export class OrderService {
});
}
/**
* 退
*
* @param params
* @param callBack
* @return data
*/
public refuelingOrderRefund(params: object, callBack) {
this.http.post(environment.baseUrl + 'highGas/refuelingOrderRefund', params).subscribe(data => {
callBack(data);
});
}
}

@ -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://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
};

Loading…
Cancel
Save