提交代码

pull/1/head
胡锐 2 years ago
parent 8e4b4ec0b1
commit b96825ee0f
  1. 2
      src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html
  2. 2
      src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html
  3. 2
      src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html
  4. 2
      src/app/admin/oil-card/oil-card-list/oil-card-list.component.html
  5. 0
      src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.html
  6. 0
      src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.scss
  7. 0
      src/app/admin/order-manage/dicount-package-order-list/dicount-package-order-list.component.ts
  8. 0
      src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.html
  9. 0
      src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.scss
  10. 0
      src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.spec.ts
  11. 0
      src/app/admin/order-manage/discount-use-condition-list/discount-use-condition-list.component.ts
  12. 2
      src/app/admin/order-manage/order-integral-recharge/order-integral-recharge.component.html
  13. 7
      src/app/admin/order-manage/order-manage-routing.module.ts
  14. 11
      src/app/admin/order-manage/order-manage.module.ts
  15. 28
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html
  16. 34
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts
  17. 0
      src/app/admin/order-manage/pre-order/pre-order.component.html
  18. 0
      src/app/admin/order-manage/pre-order/pre-order.component.scss
  19. 0
      src/app/admin/order-manage/pre-order/pre-order.component.ts
  20. 25
      src/app/admin/order/discount-use-condition-list/discount-use-condition-list.component.spec.ts
  21. 372
      src/app/admin/order/oil-station-order/oil-station-order.component.html
  22. 353
      src/app/admin/order/oil-station-order/oil-station-order.component.ts
  23. 177
      src/app/admin/order/order-Tlist/order-Tlist.component.html
  24. 4
      src/app/admin/order/order-Tlist/order-Tlist.component.scss
  25. 186
      src/app/admin/order/order-Tlist/order-Tlist.component.ts
  26. 186
      src/app/admin/order/order-agent/order-agent.component.html
  27. 4
      src/app/admin/order/order-agent/order-agent.component.scss
  28. 188
      src/app/admin/order/order-agent/order-agent.component.ts
  29. 175
      src/app/admin/order/order-c-list/order-c-list.component.html
  30. 4
      src/app/admin/order/order-c-list/order-c-list.component.scss
  31. 187
      src/app/admin/order/order-c-list/order-c-list.component.ts
  32. 182
      src/app/admin/order/order-coupon-list/order-coupon-list.component.html
  33. 0
      src/app/admin/order/order-coupon-list/order-coupon-list.component.scss
  34. 134
      src/app/admin/order/order-coupon-list/order-coupon-list.component.ts
  35. 124
      src/app/admin/order/order-coupon/order-coupon.component.html
  36. 0
      src/app/admin/order/order-coupon/order-coupon.component.scss
  37. 95
      src/app/admin/order/order-coupon/order-coupon.component.ts
  38. 160
      src/app/admin/order/order-coupons/order-coupons.component.html
  39. 4
      src/app/admin/order/order-coupons/order-coupons.component.scss
  40. 150
      src/app/admin/order/order-coupons/order-coupons.component.ts
  41. 1
      src/app/admin/order/order-detail/order-detail.component.html
  42. 0
      src/app/admin/order/order-detail/order-detail.component.scss
  43. 15
      src/app/admin/order/order-detail/order-detail.component.ts
  44. 243
      src/app/admin/order/order-h-list/order-h-list.component.html
  45. 5
      src/app/admin/order/order-h-list/order-h-list.component.scss
  46. 208
      src/app/admin/order/order-h-list/order-h-list.component.ts
  47. 179
      src/app/admin/order/order-k-list/order-k-list.component.html
  48. 4
      src/app/admin/order/order-k-list/order-k-list.component.scss
  49. 186
      src/app/admin/order/order-k-list/order-k-list.component.ts
  50. 204
      src/app/admin/order/order-list/order-list.component.html
  51. 4
      src/app/admin/order/order-list/order-list.component.scss
  52. 210
      src/app/admin/order/order-list/order-list.component.ts
  53. 43
      src/app/admin/order/order-routing.module.ts
  54. 43
      src/app/admin/order/order.module.ts
  55. 103
      src/app/admin/order/package-record-list/package-record-list.component.html
  56. 0
      src/app/admin/order/package-record-list/package-record-list.component.scss
  57. 80
      src/app/admin/order/package-record-list/package-record-list.component.ts
  58. 3
      src/app/app-common.module.ts
  59. 5
      src/app/app-routing.module.ts
  60. 1
      src/app/pipes/index.ts
  61. 23
      src/app/pipes/order/order-oil-channel-type.pipe.ts
  62. 4
      src/app/pipes/order/order-pay-type.pipe.ts
  63. 4
      src/environments/environment.ts

@ -85,7 +85,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showDelConfirm(data.id)"><a>删除</a></li>
<li nz-menu-item [routerLink]="['/admin/fleet-oil-card/order-list']" [queryParams]="{ cardNo: data.fleetOilCardNo, carLicensePlate: data.carLicensePlate }"><a>消费订单</a></li>
<li nz-menu-item [routerLink]="['/admin/order-manage/order-oil-list']" [queryParams]="{ cardNo: data.fleetOilCardNo, carLicensePlate: data.carLicensePlate }"><a>消费订单</a></li>
</ul>
</nz-dropdown-menu>
</td>

@ -143,7 +143,7 @@
<li nz-menu-item *ngIf="data.status == 1" (click)="showDisabledConfirm(data.cardNo)"><a>禁用</a></li>
<li nz-menu-item *ngIf="data.status == 2" (click)="showEnableConfirm(data.cardNo)"><a>启用</a></li>
<li nz-menu-item [routerLink]="['/admin/fleet-oil-card/record-list']" [queryParams]="{ cardNo: data.cardNo}"><a>油卡账单</a></li>
<li nz-menu-item [routerLink]="['/admin/fleet-oil-card/order-list']" [queryParams]="{ cardNo: data.cardNo}"><a>消费订单</a></li>
<li nz-menu-item [routerLink]="['/admin/order-manage/order-oil-list']" [queryParams]="{ cardNo: data.cardNo}"><a>消费订单</a></li>
<li nz-menu-item (click)="showRecycleAmountModal(data)"><a>回收余额</a></li>
</ul>
</nz-dropdown-menu>

@ -90,7 +90,7 @@
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="showDelConfirm(data.id)"><a>删除</a></li>
<li nz-menu-item [routerLink]="['/admin/fleet-oil-card/order-list']" [queryParams]="{ cardNo: data.fleetOilCardNo, phone: data.contactPhone }"><a>消费订单</a></li>
<li nz-menu-item [routerLink]="['/admin/order-manage/order-oil-list']" [queryParams]="{ cardNo: data.fleetOilCardNo, phone: data.contactPhone }"><a>消费订单</a></li>
</ul>
</nz-dropdown-menu>
</td>

@ -185,7 +185,7 @@
<li nz-menu-item *ngIf="data.status == 2" (click)="showEnableConfirm(data.cardNo)"><a>启用</a></li>
<li nz-menu-item [routerLink]="['/admin/oil-card/record-op-list']" [queryParams]="{ cardNo: data.cardNo}"><a>变更记录</a></li>
<li nz-menu-item [routerLink]="['/admin/oil-card/record-list']" [queryParams]="{ cardNo: data.cardNo}"><a>油卡账单</a></li>
<li nz-menu-item [routerLink]="['/admin/oil-card/order']" [queryParams]="{ cardNo: data.cardNo}"><a>消费订单</a></li>
<li nz-menu-item [routerLink]="['/admin/order-manage/order-oil-list']" [queryParams]="{ cardNo: data.cardNo}"><a>消费订单</a></li>
<li nz-menu-item (click)="showRecycleAmountModal(data)"><a>回收余额</a></li>
</ul>
</nz-dropdown-menu>

@ -146,7 +146,7 @@
<td>{{data.memPhone}}</td>
<td>{{data.goodsPrice}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.deductionPrice}}</td>
<td>¥{{data.deductionPrice!=null?data.deductionPrice:0}}</td>
<td>¥{{data.payablePrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.payType}}</td>

@ -7,11 +7,10 @@ import {OrderRefundListComponent} from './order-refund-list/order-refund-list.co
import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component';
import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component';
import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component';
import {PreOrderComponent} from '../order/pre-order/pre-order.component';
import {DiscountUseConditionListComponent} from '../order/discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from '../order/dicount-package-order-list/dicount-package-order-list.component';
import {OrderListComponent} from '../recharge-order/order-list/order-list.component';
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
import {PreOrderComponent} from './pre-order/pre-order.component';
const routes: Routes = [
{ path: 'order-oil-list', component: OrderOilListComponent },

@ -13,17 +13,26 @@ import { OrderRefundListComponent } from './order-refund-list/order-refund-list.
import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component';
import { StarbucksOrderListComponent } from './starbucks-order/starbucks-order-list/starbucks-order-list.component';
import { MemberChargeOrderListComponent } from './member-charge-order/member-charge-order-list/member-charge-order-list.component';
import {PreOrderComponent} from './pre-order/pre-order.component';
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
import {SeparateModule} from '../../common/separate/separate.module';
import {NzSpaceModule} from 'ng-zorro-antd/space';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
@NgModule({
declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent],
declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, PreOrderComponent,DicountPackageOrderListComponent, MemberChargeOrderListComponent, DiscountUseConditionListComponent],
imports: [
CommonModule,
OrderManageRoutingModule,
NgZorroAntdModule,
SeparateModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
RegionSelectorModule,
AppCommonModule,
NzSpaceModule
]
})
export class OrderManageModule { }

@ -38,8 +38,6 @@
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">创建时间</nz-form-label>
@ -92,6 +90,17 @@
</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 formControlName="payType" nzAllowClear>
<nz-option *ngFor="let item of payTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></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>
@ -112,7 +121,14 @@
</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="gasCarLicensePlate" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1">
<nz-form-item>
@ -200,7 +216,7 @@
(nzPageIndexChange)="requestOrderData($event)"
(nzPageSizeChange)="pageSizeChang($event)"
[nzPageSizeOptions]="[10,20,50,100]"
[nzScroll]="{ x: '3600px'}"
[nzScroll]="{ x: '3700px'}"
>
<thead>
<tr>
@ -208,6 +224,7 @@
<th rowspan="2" nzWidth="120px">客户电话</th>
<th rowspan="2" *ngIf="roleType != 3 && roleType != 10" nzWidth="200px">加油站</th>
<th rowspan="2" *ngIf="roleType != 10" nzWidth="120px">加油员</th>
<th rowspan="2" nzWidth="100px">车牌</th>
<th colspan="9">加油信息</th>
<th colspan="7">支付信息</th>
<th rowspan="2">交易状态</th>
@ -215,6 +232,7 @@
<th rowspan="2">支付时间</th>
<th rowspan="2">退款时间</th>
<th rowspan="2">取消时间</th>
<th rowspan="2">来源</th>
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1">分公司</th>
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5">商户</th>
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5">代理公司</th>
@ -247,6 +265,7 @@
<td>{{data.memPhone}}</td>
<td *ngIf="roleType != 3 && roleType != 10">{{data.storeName}}</td>
<td *ngIf="roleType != 10">{{data.gasStaffName?data.gasStaffName:'未知'}}</td>
<td>{{data.gasCarLicensePlate?data.gasCarLicensePlate:'未知'}}</td>
<td>{{data.gasRefuelPrice}}元</td>
<td>{{data.gasOilLiters}}升</td>
<td>{{data.gasOilNo}}#</td>
@ -268,6 +287,7 @@
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.channelType | orderOilChannelType}}</td>
<td *ngIf="roleType == 0 || roleType == 1">{{data.companyName?data.companyName:'无'}}</td>
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5">{{data.merName?data.merName:'无'}}</td>
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5">{{data.gasOrgName?data.gasOrgName:'无'}}</td>

@ -13,6 +13,7 @@ import {CompanyService} from '../../../../services/company.service';
import {MerchantService} from '../../../../services/merchant.service';
import {OrderOilService} from '../../../../services/order/order-oil.service';
import {OrderManageService} from '../../../../services/order/order-manage.service';
import {ActivatedRoute} from '@angular/router';
@Component({
selector: 'app-order-oil-list',
@ -53,10 +54,15 @@ export class OrderOilListComponent implements OnInit {
companyArray = [];
merArray = [];
oilArray = [];
payTypeArray = [];
orgIdArray = [];
tyAgentArray = [];
tySalesmanArray = [];
cardNo: string;
phone: string;
carLicensePlate: string;
// 退款按钮权限
REFUND_OIL_BTN = false;
@ -71,12 +77,26 @@ export class OrderOilListComponent implements OnInit {
private tyAgentService: TyAgentService,
private tySalesmanService: TySalesmanService,
private organizationService: OrganizationService,
private activatedRoute: ActivatedRoute,
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.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams['cardNo'] != null) {
this.cardNo = queryParams['cardNo'];
}
if (queryParams['phone'] != null) {
this.phone = queryParams['phone'];
}
if (queryParams['carLicensePlate'] != null) {
this.carLicensePlate = queryParams['carLicensePlate'];
}
});
let currentDate = new Date();
currentDate.setHours(0);
currentDate.setMinutes(0);
@ -104,6 +124,7 @@ export class OrderOilListComponent implements OnInit {
salesmanId: [null],
gasStaffName: [null],
gasOilNo: [null],
payType: [null],
storeName: [null],
memPhone: [null],
status: [null],
@ -112,9 +133,13 @@ export class OrderOilListComponent implements OnInit {
refundTimeArray: [null],
companyId: [null],
merId: [null],
gasCarLicensePlate: [null],
});
this.requestOrderData(1);
this.commonsService.getDictionary("ORDER_PAY_TYPE", data => {
this.payTypeArray = data['return_data'];
});
this.commonsService.getDictionary("GAS_OIL_TYPE", data => {
this.oilArray = data['return_data'];
});
@ -150,6 +175,15 @@ export class OrderOilListComponent implements OnInit {
*/
requestOrderData(pageNum: number) {
this.tableLoading = true;
if (this.cardNo != null) {
this.whereObject['memCardNo'] = this.cardNo;
}
if (this.phone != null) {
this.whereObject['memPhone'] = this.phone;
}
if (this.carLicensePlate != null) {
this.whereObject['gasCarLicensePlate'] = this.carLicensePlate;
}
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = this.pageSize;
this.orderOilService.getGasOrderList(this.whereObject, data => {

@ -1,25 +0,0 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DiscountUseConditionListComponent } from './discount-use-condition-list.component';
describe('DiscountUseConditionListComponent', () => {
let component: DiscountUseConditionListComponent;
let fixture: ComponentFixture<DiscountUseConditionListComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ DiscountUseConditionListComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(DiscountUseConditionListComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -1,372 +0,0 @@
<!-- 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" *ngIf="secUser['objectType'] == 2">
<nz-form-item>
<nz-form-label [nzSpan]="6">油站</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择油站" formControlName="storeId" (ngModelChange)="selectGasChange($event)">
<nz-option *ngFor="let item of gasArray" nzLabel="{{item.storeName}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="userSession['secUser']['objectType'] == 1 || userSession['secUser']['objectType'] == 2 || userSession['secUser']['objectType'] == 3 || (userSession['secUser']['objectType'] == 8 && userSession['gasStaff'] != null && userSession['gasStaff']['positionType'] != 2)">
<nz-form-item>
<nz-form-label [nzSpan]="6">加油员</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择加油员" formControlName="staffId">
<nz-option *ngFor="let item of gasStaffArray" nzLabel="{{item.name}}" nzValue="{{item.id}}"></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">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择订单状态" formControlName="oilNo">
<nz-option *ngFor="let item of oilNoArray" nzLabel="{{item.codeName}}" nzValue="{{item.codeValue}}"></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="status">
<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>
</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
formControlName="createTime"
[nzShowTime]="{ nzHideDisabledOptions: true}"
nzFormat="yyyy-MM-dd HH:mm:ss"
></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
formControlName="payTime"
[nzShowTime]="{ nzHideDisabledOptions: true}"
nzFormat="yyyy-MM-dd HH:mm:ss"
></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>总笔数:{{dataCount.refuelNum}} 笔,总加油金额:{{dataCount.refuelPrice}} 元,总升数:{{dataCount.refuelLiters}} 升</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="excelOrder()" ><i nz-icon nzType="import" 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="60px">编号</th>
<th nzWidth="200px">订单号</th>
<th nzWidth="180px">油站名称</th>
<th nzWidth="100px">加油员</th>
<th nzWidth="90px">类型</th>
<th nzWidth="90px">油号</th>
<th nzWidth="90px">油枪号</th>
<th nzWidth="90px">油枪价</th>
<th nzWidth="90px">平台价</th>
<th nzWidth="90px">加油升数</th>
<th nzWidth="90px">加油金额</th>
<th nzWidth="120px">使用优惠券</th>
<th nzWidth="120px">优惠券名称</th>
<th nzWidth="90px">优惠金额</th>
<th nzWidth="90px">应付金额</th>
<th nzWidth="90px">金币抵扣</th>
<th nzWidth="90px">实付金额</th>
<th nzWidth="120px">创建时间</th>
<th nzWidth="120px">支付时间</th>
<th nzRight nzWidth="80px">状态</th>
<th nzWidth="105px" nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.gasName}}</td>
<td>{{data.gasStaffName?data.gasStaffName:'未知'}}</td>
<td>{{data.gasOilType == 1 ? '汽油': '柴油'}}</td>
<td>{{data.gasOilNo + "#"}}</td>
<td>{{data.gasGunNo + "号"}}</td>
<td>{{data.gasPriceGun}}</td>
<td>{{data.gasPricePreferences}}</td>
<td>{{data.gasOilLiters}}</td>
<td>{{data.totalPrice}}</td>
<td>{{data.memDiscountName?'是':'否'}}</td>
<td>{{data.memDiscountName?data.memDiscountName:'否'}}</td>
<td>{{data.deductionPrice}}</td>
<td>{{data.payablePrice}}</td>
<td>{{data.payGold / 100}}</td>
<td>{{data.payRealPrice}}</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>{{data.status | orderCouponStatus}}</td>
<td nzRight class="table-td-operation">
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="BTN_GAS_ORDER_PRINT && (secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == false" (click)="showPrintModal(data.orderId, data)">打印小票</a>
<a style="float: left;width: 100%;margin-bottom: 10px;" *ngIf="BTN_GAS_ORDER_PRINT && (secUser['objectType'] == 3 || secUser['objectType'] == 8) && data.printStatus == true" (click)="showPrintModal(data.orderId, data)">已打印({{data.printNum+'次'}})</a>
<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 (click)="getDetail(data.orderNo)">详情</a></li>
<li nz-menu-item *ngIf="BTN_GAS_ORDER_REFUND && (secUser['objectType'] == 3) && (data.status == 2 || data.status == 3)" ><a (click)="showModal(data.orderId)">退款</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="退款理由" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
<nz-form-item>
<nz-form-label nzRequired>退款理由</nz-form-label>
<nz-form-control>
<textarea [(ngModel)]="refundContent" nz-input rows="2" placeholder="请输入退款理由"></textarea>
</nz-form-control>
</nz-form-item>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="900" (nzOnCancel)="isVisibleDetail= false" (nzOnOk)="isVisibleDetail= false" [nzFooter]="null">
<nz-descriptions nzBordered [nzColumn]="{ xxl: 3, xl: 2, lg: 2, md: 2, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="油站名称">{{data['gasName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="油站地址">{{data['gasAddress']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{data['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="类型">{{data['gasOilType'] == 1 ? '汽油': '柴油'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="油号">{{data['gasOilNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="油枪号">{{data['gasGunNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="油枪价">{{data['gasPriceGun']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠价">{{data['gasPricePreferences']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油升数">{{data['gasOilLiters']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油金额">{{data['totalPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠金额">{{data['deductionPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{data['payRealPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油折扣">{{data['gasDiscount']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油补贴">{{data['gasOilSubsidy']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="每升优惠">{{data['gasLitersPreferences']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="生成时间">{{data['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="状态">{{data['status'] | gasOrderStatus}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款金额">{{data['refundPrice']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款时间">{{data['refundTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="data['status'] == 4" nzTitle="退款原因">{{data['refundContent']}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal>
<nz-modal [(nzVisible)]="printModal" nzTitle="选择打印方式" nzWidth="200" (nzOnCancel)="printModal = false" [nzFooter]="null">
<form nz-form>
<nz-form-item>
<nz-form-control>
<button nz-button nzType="primary" nzBlock (click)="showPrintDiv()">热敏打印机</button>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-control>
<button nz-button nzType="primary" nzBlock (click)="cloudPrint()">云打印机</button>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>
<!--<div id="div_print">
<div style="float: left;margin-bottom: 150px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(客户存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
<div style="float: left;margin-bottom: 50px;">
<div style="line-height: 30px; color:#000;">
<span style="font-size: 13px;float: left;width: 100%;">{{printDataObject.gasName}}</span>
<span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>
</div>
<table style="width: 100%;">
<tbody>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">流水号:<span>{{printDataObject.orderNo}}</span></td>
</tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr>
<td class="print_td">时间:<span>{{printDataObject.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</span></td>
</tr>
<tr>
<td class="print_td">来源:<span>嗨森逛</span></td>
</tr>
<tr>
<td class="print_td">油枪:<span>{{printDataObject.gasGunNo}}</span></td>
</tr>
<tr>
<td class="print_td">油品:<span>{{printDataObject.gasOilNo}}</span></td>
</tr>
<tr>
<td class="print_td">升数:<span>{{printDataObject.gasOilLiters}}升</span></td>
</tr>
<tr>
<td class="print_td">实际加油升数以油站加油机为准!</td>
</tr>
<tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>
<tr><td style="font-size: 30px;color: black">¥{{printDataObject.oilPrice}}元</td></tr>
<tr><td class="print_td">-&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;</td></tr>
<tr><td style="float: left;color: black;margin-left: 35px;">开心又省钱; 来”嗨森逛“</td></tr>
</tbody>
</table>
</div>
&lt;!&ndash; <table border=1 cellspacing=0 cellpadding=1 width="100%" style="border-collapse:collapse" bordercolor="#333333">
<thead>
<tr>
<td width="10%">
<div align=center><b>表格页眉</b></div>
</td>
<td width="25%">
<div align=center><b>品名</b></div>
</td>
<td width="10%">
<div align=center><b>颜色</b></div>
</td>
<td width="10%">
<div align=center><b>规格</b></div>
</td>
<td width="10%">
<div align=center><b>数量</b></div>
</td>
<td width="15%">
<div align=center><b>单价</b></div>
</td>
<td width="20%">
<div align=center><b>金额</b></div>
</td>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;1</td>
<td>名称01</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;2</td>
<td>名称02</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;3</td>
<td>名称03</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
<tr>
<td>&nbsp;4</td>
<td>名称04</td>
<td>浅灰色</td>
<td>185/10</td>
<td>1</td>
<td>248.00</td>
<td>248.00</td>
</tr>
</table>&ndash;&gt;
</div>-->

@ -1,353 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {OrderService} from '../../../services/order.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CompanyService} from '../../../services/company.service';
import {MerchantService} from '../../../services/merchant.service';
import {LocalStorageService} from '../../../services/local-storage.service';
import {CommonsService} from '../../../services/commons.service';
import {WebsocketService} from '../../../services/websocket.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {MerchantStoreService} from '../../../services/merchant-store.service';
import {GasStaffService} from "../../../services/gas-staff.service";
@Component({
selector: 'app-oil-station-order',
templateUrl: './oil-station-order.component.html',
styleUrls: ['./oil-station-order.component.scss']
})
export class OilStationOrderComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
companyData = []; // 列表数据
merchantData = []; // 列表数据
data = {}; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
id: number; // 订单ID
isVisible = false;
isVisibleDetail = false;
refundContent: string;
roleType: number;
secUser: object;
gasArray = [];
printDataObject = {
orderId: null,
printData: null
};
printModal = false;
userSession = {};
gasStaffArray = [];
oilNoArray = [];
BTN_GAS_ORDER_REFUND = false;
BTN_GAS_ORDER_PRINT = false;
dataCount = {
refuelNum: 0,
refuelPrice: 0,
refuelLiters: 0,
};
constructor(
private form: FormBuilder,
private order: OrderService,
private webSocketService: WebsocketService,
private iconService: IconService,
private modal: NzModalService,
private message: NzMessageService,
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
private merchantStoreService: MerchantStoreService,
private gasStaffService: GasStaffService,
private orderService: OrderService,
private store: LocalStorageService, // 数据请求
private common: CommonsService
) {
}
ngOnInit(): void {
this.BTN_GAS_ORDER_REFUND = this.common.isBtnCompetence("BTN_GAS_ORDER_REFUND");
this.BTN_GAS_ORDER_PRINT = this.common.isBtnCompetence("BTN_GAS_ORDER_PRINT");
this.userSession = this.store.get(ADMIN_INFO_OBJECT);
this.secUser = this.store.get(ADMIN_INFO_OBJECT)['secUser'];
if (this.secUser['objectType'] === 2) {
this.merchantStoreService.getStoreListByMerchant({ pageNum: 1, pageSize: 100}, data => {
if (data['return_code'] === '000000') {
this.gasArray = data['return_data']['list'];
}
});
} else if (this.secUser['objectType'] === 3) {
this.getStaffList(null);
} else if (this.secUser['objectType'] === 8) {
this.getStaffList(null);
}
this.init();
// 接收消息
this.webSocketService.messageSubject.subscribe(
data => {
console.log(data);
this.getRequest(true, this.searchForm.value);
},
err => console.log(err)
);
}
public init(): void {
this.searchForm = this.form.group({
storeId: [null],
staffId: [null],
orderNo: [null],
status: [null],
oilNo: [null],
createTime: [null],
payTime: [null],
});
this.getRequest(true, this.searchForm.value);
// 查询油号
this.common.getDictionary("GAS_OIL_TYPE", data => {
if (data['return_code'] == '000000') {
this.oilNoArray = data['return_data'];
}
});
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][1].getTime();
}
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.getGasOrderListByOil(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.countGasOrder();
}
// 统计订单
public countGasOrder() {
this.orderService.countGasOrder(this.searchForm.value, data => {
if (data['return_code'] == '000000') {
this.dataCount = data['return_data'];
}
});
}
// 查询列表
public getStaffList(gasId: number) {
const param = { pageNum: 1 , pageSize: 9999};
if (gasId != null) {
param['merchantStoreId'] = gasId;
}
this.gasStaffService.getStaffList(param, data => {
if (data['return_code'] === '000000') {
this.gasStaffArray = data['return_data']['list'];
}
});
}
selectGasChange(gasId: number) {
if (gasId != null) {
this.getStaffList(gasId);
} else {
this.gasStaffArray = [];
}
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
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(true, this.searchForm.value);
this.isVisible = false;
this.message.success('退款成功');
} else {
this.message.error(data['return_msg']);
}
});
}
});
}
handleCancel(): void {
this.isVisible = false;
}
getDetail(orderNo: string): void {
this.order.getGasOrderDetail(orderNo , data => {
if (data['return_code'] === '000000') {
this.isVisibleDetail = true;
this.data = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
/**
*
*/
excelOrder() {
this.order.exportGasOrder(this.searchForm.value, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
showPrintModal(orderId: number, data: PrintData) {
this.printDataObject.orderId = orderId;
this.printDataObject.printData = data;
this.printModal = true;
}
cloudPrint() {
this.orderService.print(this.printDataObject.orderId, 2, dataBack => {
if (dataBack['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '操作成功',
});
this.getRequest(false, this.searchForm.value);
}
});
}
showPrintDiv() {
const orderId = this.printDataObject.orderId;
const data = this.printDataObject.printData;
data['payTime'] = new Date(data['payTime']).toLocaleString();
this.printDiv(data);
this.orderService.print(orderId, 1, dataBack => {
if (dataBack['return_code'] === '000000') {
this.getRequest(false, this.searchForm.value);
}
});
}
printDiv(data: object) {
const headstr = '<html><head><title>打印小票</title></head><body>';
const footstr = '</body>';
const newstr = '<div id="div_print" style="font-size: 16px;">\n' +
' <div style="float: left;margin-bottom: 50px;">\n' +
' <div style="line-height: 30px; color:#000;">\n' +
' <span style="font-size: 13px;float: left;width: 100%;text-align: center;">'+data['gasName']+(data['printStatus']?'(补打)':'') + '</span>\n' +
' <span style="font-size: 13px;float: left;width: 100%;margin-left: 60px;">(收银员存根)</span>\n' +
' </div>\n' +
' <table style="width: 100%;">\n' +
' <tbody>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">流水号:<span>' + data['orderNo'] + '</span></td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">打印时间:<span>' + new Date().toLocaleString() + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">支付时间:<span>' + data['payTime'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">电话:<span>' + data['merPhone'] + '</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">来源:<span>嗨森逛</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油枪:<span>' + data['gasGunNo'] + '号</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">油品:<span>' + data['gasOilNo'] + '#</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">升数:<span>' + data['gasOilLiters'] + '升</span></td>\n' +
' </tr>\n' +
' <tr>\n' +
' <td style="font-size: xx-small;color: black;">实际加油升数以油站加油机为准!</td>\n' +
' </tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;margin-top: 10px;font-size: 30px;color: black">加油金额</td></tr>\n' +
' <tr><td style="font-size: 30px;color: black">¥' + data['totalPrice'] + '元</td></tr>\n' +
' <tr><td style="font-size: xx-small;color: black;">-------------------------------------------</td></tr>\n' +
' <tr><td style="float: left;font-size: xx-small;color: black;margin-left: 25px;">开心又省钱; 来”嗨森逛“</td></tr>\n' +
' </tbody>\n' +
' </table>\n' +
' </div>\n' +
'</div>';
// const oldstr = document.body.innerHTML;
// document.body.innerHTML = headstr + newstr + footstr;
const newWindow = window.open('', '');
newWindow.document.write(headstr + newstr + footstr);
newWindow.print();
newWindow.close();
// document.body.innerHTML = oldstr;
// location.reload();
return false;
}
}
export class PrintData {
// 油站名称
gasName = '';
// 订单号
orderNo = '';
// 下单时间
createTime = '';
// 油品
gasOilNo = '';
// 加油抢号
gasGunNo = '';
// 加油升数
gasOilLiters = 0;
// 加油金额
oilPrice = 0;
}

@ -1,177 +0,0 @@
<!-- 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>

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

@ -1,186 +0,0 @@
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;
}
}

@ -1,186 +0,0 @@
<!-- 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="memDiscountName"/>-->
<!-- </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="memPhone"/>
</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-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">
<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">-->
<!--&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>

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

@ -1,188 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {OrderService} from '../../../services/order.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {CompanyService} from '../../../services/company.service';
import {MerchantService} from '../../../services/merchant.service';
import {CommonsService} from '../../../services/commons.service';
import {ADMIN_INFO_OBJECT, DATA} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-order-agent',
templateUrl: './order-agent.component.html',
styleUrls: ['./order-agent.component.scss']
})
export class OrderAgentComponent 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 store: LocalStorageService, // 数据请求
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],
memDiscountName: [null],
memPhone: [null],
orderStatus: [null],
payTime: [null],
identificationCode: this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id']
});
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;
whereObject['identificationCode'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id'];
this.order.getOrderListByIdCode(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();
}
whereObject['identificationCode'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent']['id'];
this.order.exportOrderListByIdCode(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 {
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;
}
}

@ -1,175 +0,0 @@
<!-- 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="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.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">-->
<!-- &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.orderId)">申请退款</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>

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

@ -1,187 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {OrderService} from '../../../services/order.service';
import {IconService} from '../../../services/icon.service';
import {CompanyService} from '../../../services/company.service';
import {MerchantService} from '../../../services/merchant.service';
import {CommonsService} from '../../../services/commons.service';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
@Component({
selector: 'app-order-c-list',
templateUrl: './order-c-list.component.html',
styleUrls: ['./order-c-list.component.scss']
})
export class OrderCListComponent 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.getCinemaOrderList(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;
}
}

@ -1,182 +0,0 @@
<!-- 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 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>
</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="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.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>

@ -1,134 +0,0 @@
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 {GasStaffService} from '../../../services/gas-staff.service';
import {CommonsService} from '../../../services/commons.service';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {OrderService} from '../../../services/order.service';
@Component({
selector: 'app-order-coupon-list',
templateUrl: './order-coupon-list.component.html',
styleUrls: ['./order-coupon-list.component.scss']
})
export class OrderCouponListComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
positionTypeArray = [];
gasStaffQrCodeImgUrl: string;
gasStaffQrCodeModal = false;
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private orderService: OrderService,
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],
orderStatus: [null],
createTime: [null],
payTime: [null],
finishTime: [null],
});
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.orderService.getOrderCouponList(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();
}
/**
* Excel
*/
exportExcel(): void {
this.loadingObject.spinning = true;
this.loadingObject.msg = '处理中...';
this.orderService.exportOrderCouponExcel(this.whereObject, data => {
this.loadingObject.spinning = false;
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + data['return_data'];
}
});
}
}

@ -1,124 +0,0 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<nz-form-item>
<nz-form-label [nzSm]="2" [nzXs]="24" >卡券类型</nz-form-label>
<nz-form-control [nzSm]="7" [nzXs]="24" >
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择类型" (ngModelChange)="getAgentCount($event)" [(ngModel)]="type">
<nz-option nzLabel="消核码" [nzValue]="1"></nz-option>
<nz-option nzLabel="兑换码" [nzValue]="2"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-card nzTitle="销售统计">
<div nz-card-grid [ngStyle]="gridStyle">销售总额: ¥{{countData['salesCountPrice']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">剩余总额: ¥{{countData['surplusCountPrice']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">今日流水: ¥{{countData['turnoverPrice']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">库存数量: {{countData['laveStockCount']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">销售数量: {{countData['soldCount']}}</div>
<div nz-card-grid [ngStyle]="gridStyle">今日订单: {{countData['orderCount']}}</div>
</nz-card>
</div>
<div class="inner-content">
<nz-table #basicTable [nzData]="countData['list']">
<thead>
<tr>
<th>卡券名称</th>
<th>卡券金额</th>
<th>库存数量</th>
<th>销售数量</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data">
<td>{{data.couponName}}</td>
<td>¥{{data.salesPrice}}</td>
<td>{{data.stockCount}}</td>
<td>{{data.salesCount}}</td>
<td>
<a (click)="getDetail(data.couponId)">使用情况</a>
</td>
</tr>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="使用情况" nzWidth="1000" (nzOnCancel)="handleCancel()" (nzOnOk)="handleCancel()">
<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">消费码KEY</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="salesCode"/>
</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 formControlName="status">
<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-select>
</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>
<span>共计 {{total}} 条数据</span>
<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="120px">使用门店</th>
<th nzWidth="120px">领取时间</th>
<th nzWidth="120px">消费时间</th>
<th nzWidth="120px">销售截止时间</th>
<th nzWidth="120px">使用截止时间</th>
<th nzWidth="120px">创建时间</th>
<th nzWidth="80px" nzRight="0px">状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.salesCode}}</td>
<td>{{data.storeName == null ? '暂无' : data.storeName}}</td>
<td>{{data.receiveTime == null ? '未领取' : data.receiveTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.consumeTime == null ? '未消费' : data.consumeTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.useEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight="0px">{{data.status | couponCode}}</td>
</tbody>
</nz-table>
</nz-modal>

@ -1,95 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {FormBuilder, FormGroup} from '@angular/forms';
import {AgentService} from '../../../services/agent.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {environment} from '../../../../environments/environment';
import {CouponService} from '../../../services/coupon.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
@Component({
selector: 'app-order-coupon',
templateUrl: './order-coupon.component.html',
styleUrls: ['./order-coupon.component.scss']
})
export class OrderCouponComponent implements OnInit {
gridStyle = {
width: '33.3333%',
textAlign: 'center'
};
searchForm: FormGroup; // 搜索框
codeForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
id;
type = 1;
countData = {};
constructor(
private form: FormBuilder,
private agent: AgentService,
private iconService: IconService,
private message: NzMessageService,
private store: LocalStorageService, // 数据请求
private coupon: CouponService
) {
}
ngOnInit(): void {
this.searchForm = this.form.group({
status: [null],
salesCode: [null],
});
this.getAgentCount(this.type);
}
public getAgentCount(type) {
this.agent.getAgentCount(type , data => {
this.countData = data['return_data'];
});
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['couponId'] = this.id;
whereObject['agentId'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.coupon.getCouponCodeList(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 getDetail(id): void {
this.id = id;
this.getRequest(false , this.searchForm.value);
this.isVisible = true;
}
handleCancel(): void {
this.isVisible = false;
}
// 重置
public resetForm(): void {
this.searchForm.reset();
}
}

@ -1,160 +0,0 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<nz-table
class="table"
#ajaxTable
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , {})"
(nzPageSizeChange)="getRequest(false , {})">
<thead nzSingleSort>
<tr>
<th nzWidth="50px">编号</th>
<th nzWidth="120px">优惠券KEY</th>
<th nzWidth="150px">优惠券名称</th>
<th nzWidth="80px">优惠券类型</th>
<th nzWidth="70px">优惠内容</th>
<th nzWidth="70px">有效天数</th>
<th nzWidth="100px">截止日期</th>
<th nzWidth="100px">创建时间</th>
<th nzWidth="100px">状态</th>
<th nzWidth="80px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data['highDiscount'].discountKey}}</td>
<td>{{data['highDiscount'].discountName}}</td>
<td>{{data['highDiscount'].discountType | discountType}}</td>
<td>
<span *ngIf="data['highDiscount'].discountType === 1">
满{{data['highDiscount'].discountCondition}}抵扣{{data['highDiscount'].discountPrice}}
</span>
<span *ngIf="data['highDiscount'].discountType === 2">
抵扣{{data['highDiscount'].discountPrice}}
</span>
<span *ngIf="data['highDiscount'].discountType === 3">
{{data['highDiscount'].discountPrice}}折
</span>
</td>
<td>{{data['highDiscount'].effectiveDay}}</td>
<td>{{data['highDiscount'].salesEndTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data['highDiscount'].createTime}}</td>
<td>{{data['highDiscount'].status | discountStatus}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="getDetail(data.id)">使用情况</a>
</td>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="使用情况" nzWidth="1000" (nzOnCancel)="handleCancel()" (nzOnOk)="handleCancel()">
<form nz-form [formGroup]="searchForm" (ngSubmit)="getRequestCode(true , searchForm.value)">
<div nz-row>
<div nz-col nzSpan="9">
<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="99"></nz-option>
</nz-select>
</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>
<span>共计 {{totalCode}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getEditStatus()" >修改优惠券状态</button>
</div>
<nz-table
class="table"
#ajaxTableCode
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestDataCode"
[nzLoading]="loadingCode"
[nzTotal]="totalCode"
[(nzPageIndex)]="pageNumCode"
[(nzPageSize)]="pageSizeCode"
(nzPageIndexChange)="getRequestCode(false , searchForm.value)"
(nzPageSizeChange)="getRequestCode(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="50px">编号</th>
<th nzWidth="70px">优惠券名称</th>
<th nzWidth="70px">用户名称</th>
<th nzWidth="70px">使用门店</th>
<th nzWidth="70px">使用时间</th>
<th nzWidth="70px">二维码生成时间</th>
<th nzWidth="50px">状态</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTableCode.data; let i = index">
<td>{{data.id}}</td>
<td>{{data['highDiscount'].discountName}}</td>
<td>
{{data['highUser'] == null ? '暂无': data['highUser'].name}}
</td>
<td>{{data['highCouponCode']?.storeName}}</td>
<td>{{data['highCouponCode']?.consumeTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.status | discountCodeStatus}}</td>
</tbody>
</nz-table>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleS" nzTitle="修改优惠券状态" nzWidth="800" [nzOkLoading]="loadingS" (nzOnCancel)="handleCancelS()" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateFormPost" class="login-form">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>优惠券状态</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请选择优惠券状态!">
<nz-select nzShowSearch nzAllowClear formControlName="status" nzPlaceHolder="请选择优惠券状态">
<nz-option nzLabel="待领取" nzValue="1"></nz-option>
<nz-option nzLabel="已过期" nzValue="4"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>编号区间</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="分配优惠券数量!">
<nz-input-group nzCompact>
<input type="number" nz-input placeholder="开始编号" formControlName="minNumber" style="width:100px; text-align: center;" />
<input
type="text"
disabled
nz-input
placeholder="~"
style="width: 30px; border-left: 0px; pointer-events: none; background-color: rgb(255, 255, 255);"
/>
<input type="number" nz-input placeholder="结束编号" formControlName="maxNumber" style="width: 100px; text-align: center; border-left: 0px;" />
</nz-input-group>
</nz-form-control>
</nz-form-item>
</form>
</nz-modal>

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

@ -1,150 +0,0 @@
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} from 'ng-zorro-antd';
import {AgentService} from '../../../services/agent.service';
import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
@Component({
selector: 'app-order-coupons',
templateUrl: './order-coupons.component.html',
styleUrls: ['./order-coupons.component.scss']
})
export class OrderCouponsComponent implements OnInit {
searchForm: FormGroup; // 搜索框
validateFormPost: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
requestDataCode = []; // 列表数据
totalCode: number; // 页码
pageNumCode = 1; // 页码
pageSizeCode = 10; // 条码
loadingCode = true;
isVisible = false;
isVisibleS = false;
id: number;
loadingS = false;
constructor(
private form: FormBuilder,
private agent: AgentService,
private iconService: IconService,
private message: NzMessageService,
private store: LocalStorageService, // 数据请求
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
status: [null],
});
this.validateFormPost = this.form.group({
status: [null, [Validators.required]],
minNumber: [null, [Validators.required]],
maxNumber: [null, [Validators.required]],
});
this.getRequest(true, {});
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['agentId'] = this.store.get(ADMIN_INFO_OBJECT)['highAgent'].id;
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.agent.getDiscountAgentList(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.getRequestCode(false , this.searchForm.value);
this.isVisible = true;
}
// 查询列表
public getRequestCode(reset: boolean = false, whereObject: object) {
this.loadingCode = true;
if (reset) {
this.pageNumCode = 1;
}
this.searchForm.value['discountAgentId'] = this.id;
whereObject['pageNum'] = this.pageNumCode;
whereObject['pageSize'] = this.pageSizeCode;
this.agent.getDiscountCodeList(whereObject, data => {
this.loadingCode = false;
if (data['return_code'] === '000000') {
this.requestDataCode = data['return_data'].list;
this.totalCode = data['return_data'].total;
} else {
this.message.error(data['return_msg']);
}
});
}
handleCancel(): void {
this.searchForm.reset();
this.isVisible = false;
}
handleCancelS(): void {
this.isVisibleS = false;
}
getEditStatus() {
this.isVisibleS = true;
}
handleOk(): void {
// tslint:disable-next-line:forin
for (const i in this.validateFormPost.controls) {
this.validateFormPost.controls[i].markAsDirty();
this.validateFormPost.controls[i].updateValueAndValidity();
if (this.validateFormPost.controls[i].errors != null) {
this.message.error('必填项不能为空');
return;
}
}
const id = this.message.loading('正在提交中', { nzDuration: 0 }).messageId;
this.loadingS = true;
this.agent.getDiscountStatus(this.validateFormPost.value , data => {
if (data['return_code'] === '000000') {
this.isVisibleS = false;
this.loadingS = false;
this.getRequestCode(false , this.searchForm.value);
this.message.remove(id);
this.message.success('成功');
} else {
this.message.error(data['return_msg']);
}
});
}
}

@ -1,15 +0,0 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-order-detail',
templateUrl: './order-detail.component.html',
styleUrls: ['./order-detail.component.scss']
})
export class OrderDetailComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -1,243 +0,0 @@
<!-- 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" *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-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="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-control [nzSpan]="16">
<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-control [nzSpan]="16">
<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-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-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="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]="'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">
<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-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">
<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="80px">编号</th>
<th nzWidth="100px">充值类型</th>
<th nzWidth="120px">运营商</th>
<th nzWidth="180px">充值内容</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="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.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.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.rechargeStatus | rechargeStatus}}</td>
<td nzRight>{{data.payStatus | payStatus}}</td>
<td nzRight class="table-td-operation">
<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" (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['orderNo']}}</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['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>
</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,5 +0,0 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -1,208 +0,0 @@
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, 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 {CompanyService} from '../../../services/company.service';
@Component({
selector: 'app-order-h-list',
templateUrl: './order-h-list.component.html',
styleUrls: ['./order-h-list.component.scss']
})
export class OrderHListComponent implements OnInit {
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, // 数据请求
) {
}
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']);
}
});
}
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);
}
// 查询列表
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']);
}
});
}
// 重置
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();
}
if (whereObject['createTime'] != null && whereObject['createTime'].length !== 0) {
whereObject['createTimeS'] = whereObject['createTime'][0].getTime();
whereObject['createTimeE'] = whereObject['createTime'][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']);
}
});
}
}

@ -1,179 +0,0 @@
<!-- 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="120px">客户名称</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="110px">支付模式</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">实际单价</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.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.goodsActualPrice}}</td>
<td>{{data.saleCount}}</td>
<td>{{data.totalPrice}}</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">-->
<!-- &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.orderId)">申请退款</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>

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

@ -1,186 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {OrderService} from '../../../services/order.service';
import {IconService} from '../../../services/icon.service';
import {CompanyService} from '../../../services/company.service';
import {MerchantService} from '../../../services/merchant.service';
import {CommonsService} from '../../../services/commons.service';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
@Component({
selector: 'app-order-k-list',
templateUrl: './order-k-list.component.html',
styleUrls: ['./order-k-list.component.scss']
})
export class OrderKListComponent 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.getKfcOrderList(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;
}
}

@ -1,204 +0,0 @@
<!-- 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" *ngIf="roleType === 1">
<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" *ngIf="roleType === 5 || roleType === 1">
<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="memDiscountName"/>
</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="memPhone"/>
</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-option nzLabel="工会卡" nzValue="4"></nz-option>
<nz-option nzLabel="银联" nzValue="5"></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="120px" 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.orderId)">订单详情</a>
<!-- <a *ngIf="data.orderStatusId == 2 && data.goodsTypeId == 3" (click)="showModal(data.id)">退款</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>
<nz-modal [(nzVisible)]="isVisibleDetail" nzTitle="订单详情" nzWidth="1200" (nzOnCancel)="isVisibleDetail = false" (nzOnOk)="isVisibleDetail = false">
<nz-descriptions nzTitle="支付订单详情" nzBordered [nzColumn]="{ xxl: 4, xl: 3, lg: 3, md: 3, sm: 2, xs: 1 }">
<nz-descriptions-item nzTitle="商品名称">{{orderDetail['highChildOrderList'][0]['goodsName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付类型">{{orderDetail['payType'] | paytype}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付金额">{{orderDetail['payPrice']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户名称">{{orderDetail['memName']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户电话">{{orderDetail['memPhone']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单号">{{orderDetail['orderNo']}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="创建时间">{{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付时间">{{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="订单状态">{{orderDetail['orderStatus'] | orderCouponStatus}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="收货地址">{{postData['address']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="收货人">{{postData['user']}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="orderDetail['remarks'] != null" nzTitle="联系电话">{{postData['phone']}}</nz-descriptions-item>
</nz-descriptions>
</nz-modal>

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

@ -1,210 +0,0 @@
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';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-order-list',
templateUrl: './order-list.component.html',
styleUrls: ['./order-list.component.scss']
})
export class OrderListComponent 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;
isVisibleDetail = false;
roleType: number;
orderDetail: any = {
highChildOrderList: [{
goodsName: ''
}]
};
postData: any = {
address: '',
};
constructor(
private form: FormBuilder,
private order: OrderService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private company: CompanyService,
private merchant: MerchantService,
private store: LocalStorageService, // 数据请求
private common: CommonsService
) {
}
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 (this.roleType === 5) {
this.getMerchantListByCompany(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']);
} else {
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],
memDiscountName: [null],
memPhone: [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.getGoodsOrderList(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.isVisibleDetail = true;
this.order.getOrderById(id , data => {
if (data['return_code'] === '000000') {
console.log(data);
this.orderDetail = data['return_data'];
if (this.orderDetail['remarks'] != null) {
this.postData = JSON.parse(this.orderDetail['remarks']);
console.log(this.postData['address']);
}
} else {
this.message.error(data['return_msg']);
}
});
}
// 下载模板
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 {
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;
}
}

@ -1,43 +0,0 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
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';
import {OrderCListComponent} from './order-c-list/order-c-list.component';
import {OrderKListComponent} from './order-k-list/order-k-list.component';
import {OrderHListComponent} from './order-h-list/order-h-list.component';
import {OrderAgentComponent} from './order-agent/order-agent.component';
import {PreOrderComponent} from './pre-order/pre-order.component';
import {PackageRecordListComponent} from './package-record-list/package-record-list.component';
import {DiscountUseConditionListComponent} from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from './dicount-package-order-list/dicount-package-order-list.component';
import {OilStationOrderComponent} from './oil-station-order/oil-station-order.component';
import {OrderCouponListComponent} from './order-coupon-list/order-coupon-list.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 },
{ path: 'order-coupon-list', component: OrderCouponListComponent },
{ path: 'order-c-list', component: OrderCListComponent },
{ path: 'order-k-list', component: OrderKListComponent },
{ path: 'order-h-list', component: OrderHListComponent },
{ path: 'order-agent', component: OrderAgentComponent },
{ path: 'pre-order', component: PreOrderComponent },
{ path: 'package-record-list', component: PackageRecordListComponent },
{ path: 'discount-use-condition-list', component: DiscountUseConditionListComponent },
{ path: 'discount-package-order-list', component: DicountPackageOrderListComponent},
{ path: 'oil_station_order', component: OilStationOrderComponent},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class OrderRoutingModule { }

@ -1,43 +0,0 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { OrderRoutingModule } from './order-routing.module';
import { OrderListComponent } from './order-list/order-list.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
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 { 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';
import { OrderKListComponent } from './order-k-list/order-k-list.component';
import {OrderCListComponent} from './order-c-list/order-c-list.component';
import { OrderHListComponent } from './order-h-list/order-h-list.component';
import { OrderAgentComponent } from './order-agent/order-agent.component';
import { PreOrderComponent } from './pre-order/pre-order.component';
import { PackageRecordListComponent } from './package-record-list/package-record-list.component';
import { DiscountUseConditionListComponent } from './discount-use-condition-list/discount-use-condition-list.component';
import {DicountPackageOrderListComponent} from "./dicount-package-order-list/dicount-package-order-list.component";
import {NzSpaceModule} from "ng-zorro-antd/space";
import { OilStationOrderComponent } from './oil-station-order/oil-station-order.component';
import { OrderCouponListComponent } from './order-coupon-list/order-coupon-list.component';
@NgModule({
declarations: [OrderListComponent, OrderDetailComponent, OrderCouponsComponent, OrderCouponComponent , OrderTListComponent, OrderKListComponent , OrderCListComponent, OrderHListComponent, OrderAgentComponent, PreOrderComponent, PackageRecordListComponent, DiscountUseConditionListComponent, DicountPackageOrderListComponent, OilStationOrderComponent, OrderCouponListComponent],
imports: [
CommonModule,
OrderRoutingModule,
NgZorroAntdModule,
SeparateModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
RegionSelectorModule,
AppCommonModule,
NzSpaceModule
]
})
export class OrderModule { }

@ -1,103 +0,0 @@
<!-- 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">
<input nz-input formControlName="title"/>
</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="salesType" 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-control [nzSpan]="16">
<nz-select formControlName="usingAttribution" nzAllowClear nzPlaceHolder="选择类型">
<nz-option *ngFor="let item of usingAttribution" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></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="phone"/>
</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="recordNo"/>
</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>
<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="150px">优惠券包标题</th>
<th nzWidth="70px">销售类型</th>
<th nzWidth="70px">销售价格</th>
<th nzWidth="250px">记录订单号</th>
<th nzWidth="100px">创建时间</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.discountPackageTitle}}</td>
<td>{{data.salesType === 1 ? '售卖' : '赠送'}}</td>
<td>{{data.price === null ? '暂无': data.price}}</td>
<td>{{data.recordNo}}</td>
<td>{{data.createdTime | date: 'yyyy-MM-dd HH:mm'}}</td>
</tbody>
</nz-table>
</div>

@ -1,80 +0,0 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '@angular/forms';
import {CompanyService} from '../../../services/company.service';
import {ActivateService} from '../../../services/activate.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 {DiscountPackageService} from '../../../services/discount-package.service';
@Component({
selector: 'app-package-record-list',
templateUrl: './package-record-list.component.html',
styleUrls: ['./package-record-list.component.scss']
})
export class PackageRecordListComponent implements OnInit {
searchForm: FormGroup; // 搜索框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
usingAttribution = []; // 列表数据
constructor(
private form: FormBuilder,
private company: CompanyService,
private activate: ActivateService,
private iconService: IconService,
private message: NzMessageService,
private router: Router,
private discountPackage: DiscountPackageService,
private commonsService: CommonsService,
) {
}
ngOnInit(): void {
this.init();
this.commonsService.getDictionary('USING_ATTRIBUTION ', data => {
this.usingAttribution = data['return_data'];
});
}
public init(): void {
this.searchForm = this.form.group({
discountPackageTitle: [null],
salesType: [null],
usingAttribution: [null],
phone: [null],
recordNo: [null],
});
this.getRequest(true, this.searchForm.value);
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
this.loading = false;
if (reset) {
this.pageNum = 1;
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.discountPackage.getDiscountPackageRecordList(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();
}
}

@ -67,7 +67,7 @@ import {
ProductTypePipe,
OrderRefundOpuserTypePipe,
OrderChildStatusPipe,
PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe
PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe, OrderOilChannelTypePipe
} from './pipes';
import {MsgTypePipe} from './pipes/msg/msg-type.pipe';
@ -139,6 +139,7 @@ const PIPES = [
IntegralProductPipe,
ProductTypePipe,
MsgTypePipe,
OrderOilChannelTypePipe,
];

@ -57,11 +57,6 @@ const routes: Routes = [
loadChildren: () => import('./admin/audit/audit.module').then(m => m.AuditModule),
canActivate: [InitGuardService]
},
{
path: 'order',
loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule),
canActivate: [InitGuardService]
},
{
path: 'order-manage',
loadChildren: () => import('./admin/order-manage/order-manage.module').then(m => m.OrderManageModule),

@ -58,3 +58,4 @@ export * from './integral/integral-product.pipe';
export * from './index/product-config.pipe';
export * from './apiMerchant/callback-status.pipe';
export * from './order/pay-coupon-status.pipe';
export * from './order/order-oil-channel-type.pipe';

@ -0,0 +1,23 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'orderOilChannelType'
})
export class OrderOilChannelTypePipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 1:
return '自建站';
case 2:
return '团油';
case 3:
return '重庆壳牌';
case 4:
return '金猪加油';
case 5:
return '四川壳牌';
}
}
}

@ -20,7 +20,9 @@ export class OrderPayTypePipe implements PipeTransform {
case 6:
return '银联分期';
case 7:
return '嗨森逛油卡';
return '个人油卡';
case 8:
return '车队油卡';
}
}

@ -9,8 +9,8 @@ export const environment = {
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'https://hsgcs.dctpay.com/order/',
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.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