Merge branch 'dev_yy' into 2.0-dev

* dev_yy:
  提交代理商订单页面
  提交代理商订单页面
  1
  提交抽奖内容
  提交代码
  1

# Conflicts:
#	src/app/admin/index/index.module.ts
#	src/app/app-common.module.ts
#	src/app/pipes/index.ts
#	src/app/services/index.service.ts
#	src/environments/environment.ts
pull/1/head
袁野 2 years ago
commit 5b56b8dcca
  1. 4
      src/app/admin/activate/activate-edit/activate-edit.component.html
  2. 46
      src/app/admin/api-merchants/list/list.component.html
  3. 125
      src/app/admin/api-merchants/list/list.component.ts
  4. 19
      src/app/admin/api-order/api-order-routing.module.ts
  5. 40
      src/app/admin/api-order/api-order.module.ts
  6. 127
      src/app/admin/api-order/kfc-order/kfc-order.component.html
  7. 5
      src/app/admin/api-order/kfc-order/kfc-order.component.scss
  8. 25
      src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
  9. 91
      src/app/admin/api-order/kfc-order/kfc-order.component.ts
  10. 159
      src/app/admin/api-order/phone-order/phone-order.component.html
  11. 5
      src/app/admin/api-order/phone-order/phone-order.component.scss
  12. 96
      src/app/admin/api-order/phone-order/phone-order.component.ts
  13. 127
      src/app/admin/api-order/starbucks-order/list/list.component.html
  14. 5
      src/app/admin/api-order/starbucks-order/list/list.component.scss
  15. 92
      src/app/admin/api-order/starbucks-order/list/list.component.ts
  16. 127
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
  17. 5
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
  18. 93
      src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
  19. 1
      src/app/admin/api-product/list/list.component.html
  20. 313
      src/app/admin/cms/cms-content/cms-content.component.html
  21. 27
      src/app/admin/cms/cms-content/cms-content.component.less
  22. 639
      src/app/admin/cms/cms-content/cms-content.component.ts
  23. 3
      src/app/admin/company-amount/company-amount-record/company-amount-record.component.html
  24. 2
      src/app/admin/company-amount/company-amount-routing.module.ts
  25. 2
      src/app/admin/config-manage/third-product/third-product.component.html
  26. 10
      src/app/admin/coupon/coupon-edit/coupon-edit.component.html
  27. 1
      src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
  28. 4
      src/app/admin/discount/discount-edit/discount-edit.component.html
  29. 118
      src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html
  30. 3
      src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.scss
  31. 25
      src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.spec.ts
  32. 252
      src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.ts
  33. 241
      src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html
  34. 3
      src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.scss
  35. 25
      src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.spec.ts
  36. 467
      src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.ts
  37. 167
      src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.html
  38. 0
      src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.scss
  39. 25
      src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.spec.ts
  40. 147
      src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.ts
  41. 145
      src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.html
  42. 3
      src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.scss
  43. 25
      src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.spec.ts
  44. 100
      src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.ts
  45. 22
      src/app/admin/fleet-oil-card/fleet-oil-card-routing.module.ts
  46. 123
      src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html
  47. 3
      src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.scss
  48. 25
      src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.spec.ts
  49. 251
      src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.ts
  50. 29
      src/app/admin/fleet-oil-card/fleet-oil-card.module.ts
  51. 1
      src/app/admin/gas-oil-price/oil-price-task-edit/oil-price-task-edit.component.ts
  52. 39
      src/app/admin/index/api-merchant/api-merchant.component.html
  53. 25
      src/app/admin/index/api-merchant/api-merchant.component.scss
  54. 34
      src/app/admin/index/api-merchant/api-merchant.component.ts
  55. 3
      src/app/admin/index/index.module.ts
  56. 12
      src/app/admin/index/index/index.component.html
  57. 15
      src/app/admin/index/order-statistics/order-statistics.component.html
  58. 0
      src/app/admin/index/order-statistics/order-statistics.component.scss
  59. 48
      src/app/admin/index/order-statistics/order-statistics.component.ts
  60. 1
      src/app/admin/merchant-store/store-edit/store-edit.component.html
  61. 8
      src/app/admin/oil-card/oil-card-order/oil-card-order.component.html
  62. 27
      src/app/admin/order/order-list/order-list.component.html
  63. 30
      src/app/admin/order/order-list/order-list.component.ts
  64. 2
      src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
  65. 5
      src/app/admin/recharge-order/order-list/order-list.component.ts
  66. 34
      src/app/app-common.module.ts
  67. 10
      src/app/app-routing.module.ts
  68. 21
      src/app/pipes/apiMerchant/callback-status.pipe.ts
  69. 4
      src/app/pipes/company-amount/company-amount-record-source-type.pipe.ts
  70. 3
      src/app/pipes/index.ts
  71. 23
      src/app/pipes/index/product-config.pipe.ts
  72. 11
      src/app/pipes/msg/msg-type.pipe.ts
  73. 26
      src/app/pipes/order/pay-coupon-status.pipe.ts
  74. 71
      src/app/services/api-merchants.service.ts
  75. 39
      src/app/services/fleet-oil-card-car.service.ts
  76. 39
      src/app/services/fleet-oil-card-user.service.ts
  77. 148
      src/app/services/fleet-oil-card.service.ts
  78. 12
      src/app/services/recharge.service.ts
  79. 2
      src/environments/environment.ts
  80. 9
      src/styles.scss

@ -69,7 +69,7 @@
</form>
<div style="margin-top: 60px;" *ngIf="current === 1">
<span>共计 {{11}} 条数据</span>
<span>共计 {{listOfData.length}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div>
@ -120,7 +120,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>奖励数量</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入奖励数量">
<input nz-input type="number" formControlName="num" placeholder="请输入奖励名称" />
<input nz-input type="number" formControlName="num" placeholder="请输入奖励数量" />
</nz-form-control>
</nz-form-item>
<nz-form-item>

@ -66,6 +66,7 @@
<nz-table
class="table"
#ajaxTable
nzBordered
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
@ -78,16 +79,16 @@
(nzPageSizeChange)="getRequest(false , searchForm.value)">
<thead nzSingleSort>
<tr>
<th nzWidth="60px">编号</th>
<th nzWidth="90px">商户名称</th>
<th nzWidth="80px">编号</th>
<th nzWidth="120px">商户名称</th>
<th nzWidth="80px">联系人</th>
<th nzWidth="80px">电话</th>
<th nzWidth="90px">商户号</th>
<th nzWidth="160px">商户KEY</th>
<th nzWidth="80px">操作人员</th>
<th nzWidth="130px">电话</th>
<th nzWidth="140px">商户号</th>
<th nzWidth="200px">商户KEY</th>
<th nzWidth="100px">操作人员</th>
<th nzWidth="120px">创建时间</th>
<th nzRight nzWidth="100px">帐户余额</th>
<th nzRight nzWidth="60px">状态</th>
<th nzRight nzWidth="90px">状态</th>
<th nzRight nzWidth="200px">操作</th>
</tr>
</thead>
@ -100,7 +101,7 @@
<td>{{data.mchId }}</td>
<td>{{data.apiKey }}</td>
<td>{{data.operatorName }}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd'}}</td>
<td nzRight="">¥{{data.amounts}}</td>
<td nzRight="">{{data.status== 100? '正常':'禁用'}}</td>
<td nzRight class="table-td-operation">
@ -109,8 +110,10 @@
<a nz-dropdown [nzDropdownMenu]="menu">更多操作</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li class="li-a" nz-menu-item><a (click)="configProduct(data.id)">配置产品</a></li>
<li class="li-a" nz-menu-item><a (click)="configProduct(data.id)">配置话费产品</a></li>
<li class="li-a" nz-menu-item><a (click)="showConfigProduct(data.id)">产品详情</a></li>
<li class="li-a" nz-menu-item><a (click)="configIp(data.mchId)">配置IP地址</a></li>
<li class="li-a" nz-menu-item><a (click)="configApiProduct(data.mchId)">配置可用接口</a></li>
<li class="li-a" nz-menu-item><a (click)="getMerchRechargeData(data.id)">金额记录</a></li>
<li class="li-a" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 101 ? '上线': '禁用'}}</a></li>
</ul>
@ -137,7 +140,7 @@
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>商户电话</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入商户电话!">
<input nz-input formControlName="phone" />
<input nz-input formControlName="phone" disabled/>
</nz-form-control>
</nz-form-item>
</form>
@ -178,7 +181,7 @@
</nz-modal>
<nz-modal [(nzVisible)]="visible" nzTitle="商户充值记录" (nzOnCancel)="visible = false" nzWidth="1000px" [nzFooter]="null">
<nz-table #errorStudentTable [nzScroll]="{ x: '1200px' }" [nzData]="merchRechargeData">
<nz-table #errorStudentTable nzBordered [nzScroll]="{ x: '1200px' }" [nzData]="merchRechargeData">
<thead>
<tr>
<th nzWidth="100px">类型</th>
@ -244,7 +247,7 @@
<nz-modal [(nzVisible)]="visibleConfigProduct" nzTitle="商户产品" (nzOnCancel)="visibleConfigProduct = false" nzWidth="1000px" [nzFooter]="null">
<nz-table #productConfigTable [nzScroll]="{ x: '1200px' }" [nzData]="productConfigArray">
<nz-table #productConfigTable nzBordered [nzScroll]="{ x: '1200px' }" [nzData]="productConfigArray">
<thead>
<tr>
<th nzWidth="60px">编号</th>
@ -293,3 +296,22 @@
</nz-form-control>
</nz-form-item>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleIpAddress" nzTitle="编辑产品折扣" (nzOnCancel)="isVisibleIpAddress = false" (nzOnOk)="handleOkConfigIp()">
<nz-spin [nzSpinning]="isSpinning" nzTip="提交中...">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>IP地址</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入IP地址!">
<input nz-input [(ngModel)]="ipAddress" />
</nz-form-control>
</nz-form-item>
</nz-spin>
</nz-modal>
<nz-modal [(nzVisible)]="isVisibleConfig" nzTitle="编辑产品折扣" (nzOnCancel)="isVisibleConfig = false" (nzOnOk)="handleOkConfigProduct()">
<nz-spin [nzSpinning]="isSpinning" nzTip="配置中...">
<nz-checkbox-group [(ngModel)]="checkOptions"></nz-checkbox-group>
</nz-spin>
</nz-modal>

@ -8,7 +8,8 @@ import {ApiProductService} from '../../../services/api-product.service';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {HttpClient} from '@angular/common/http';
import { map, filter, scan , take } from 'rxjs/operators';
@Component({
selector: 'app-list',
@ -36,9 +37,9 @@ export class ListComponent implements OnInit {
id: number;
edit = false;
payPrice;
isVisibleGoods = false;
isVisibleIpAddress = false;
realPrice = 0;
mchId: string;
rechargeModal = false;
rechargeForm: FormGroup;
configValidateForm: FormGroup;
@ -55,6 +56,10 @@ export class ListComponent implements OnInit {
productArray = [];
productConfigArray = [];
discount;
ipAddress: string;
isSpinning = false;
isVisibleConfig = false;
checkOptions = [];
formatterPercent = (value: number): string => `${value == null ? 0 : value} %`;
parserPercent = (value: string): string => value.replace(' %', '');
@ -65,6 +70,7 @@ export class ListComponent implements OnInit {
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
private http: HttpClient,
private router: Router,
private common: CommonsService
) {
@ -85,6 +91,14 @@ export class ListComponent implements OnInit {
this.common.getDictionary('RECHARGE_PLATFORM ', data => {
this.platformArray = data['return_data'];
});
// 获取可用接口数据
this.common.getDictionary('API_PRODUCT_CONFIG ', data => {
for (const i of data['return_data']) {
this.checkOptions.push({
label: i['codeName'], value: i['codeValue']
});
}
});
}
public init(): void {
@ -99,32 +113,41 @@ export class ListComponent implements OnInit {
phone: [null],
status: [null],
});
this.validateForm = this.form.group({
merchantName: [null, [Validators.required]],
userName: [null, [Validators.required]],
phone: [null, [Validators.required]],
});
this.initApiMerchantsPostFrom(false);
this.configValidateForm = this.form.group({
productIds: [null, [Validators.required]],
discount: [null, [Validators.required]],
});
this.getRequest(true, this.searchForm.value);
this.apiMerchants.getListApiMerchantByAll(data => {
this.apiProduct.getAvailableApiProductByList(data => {
if (data['return_code'] === '000000') {
this.merchantArray = data['return_data'];
this.productArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
this.apiProduct.getAvailableApiProductByList(data => {
}
// 出现可用商户列表
public getListApiMerchantByAll(): void {
this.apiMerchants.getListApiMerchantByAll(data => {
if (data['return_code'] === '000000') {
this.productArray = data['return_data'];
this.merchantArray = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
});
}
// 初始化商户提交报表
public initApiMerchantsPostFrom(edit: boolean): void {
this.validateForm = this.form.group({
merchantName: [null, [Validators.required]],
userName: [null, [Validators.required]],
phone: [{ value: null , disabled: edit}, [Validators.required]],
});
}
// 查询列表
@ -156,11 +179,13 @@ export class ListComponent implements OnInit {
if (id != null) {
this.id = id;
this.edit = true;
this.initApiMerchantsPostFrom(true);
this.apiMerchants.findById(id, data => {
this.validateForm.patchValue(data['return_data']);
this.isVisible = true;
});
} else {
this.initApiMerchantsPostFrom(false);
this.validateForm.reset();
this.isVisible = true;
this.edit = false;
@ -284,6 +309,7 @@ export class ListComponent implements OnInit {
*
*/
showRechargeModal() {
this.getListApiMerchantByAll();
this.rechargeModal = true;
}
@ -468,4 +494,79 @@ export class ListComponent implements OnInit {
this.configValidateForm.reset();
}
// 打开配置ip地址
public configIp(mchId: string): void {
this.mchId = mchId;
this.apiMerchants.findByMchId( mchId , data => {
if (data['return_code'] === '000000') {
this.ipAddress = data['return_data']['ipAddress'];
}
});
this.isVisibleIpAddress = true;
}
// 提交配置
public handleOkConfigIp(): void {
this.isSpinning = true;
this.apiMerchants.editApiIpAddress({
mchId: this.mchId,
ipAddress: this.ipAddress
} , data => {
if (data['return_code'] === '000000') {
this.isSpinning = false;
this.message.success('配置成功');
this.isVisibleIpAddress = false;
} else {
this.message.error(data['return_msg']);
}
});
}
// 打开配置产品弹框
public configApiProduct(mchId: string): void {
this.mchId = mchId;
this.apiMerchants.getSecConfigList(mchId , data => {
console.log(data);
const returnData = data['return_data'];
if (data['return_data'].length > 0) {
for (const i of this.checkOptions) {
if (returnData.filter(item => item['codeType'] === i['value']).length > 0) {
i['checked'] = true;
} else {
i['checked'] = false;
}
}
}
this.isVisibleConfig = true;
});
}
// 配置产品
public handleOkConfigProduct(): void {
const data = [];
for (const i of this.checkOptions) {
if (i['checked']) {
data.push(i['value']);
}
}
console.log(data);
const postData = {
mchId: this.mchId,
configProduct: data.join(',')
};
this.isSpinning = true;
this.apiMerchants.configMerchant(postData , res => {
if (res['return_code'] === '000000') {
this.isSpinning = false;
this.message.success('配置成功');
this.isVisibleConfig = false;
} else {
this.message.error(res['return_msg']);
}
});
}
}

@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {PhoneOrderComponent} from './phone-order/phone-order.component';
import {VipTopUpOrderComponent} from './vip-top-up-order/vip-top-up-order.component';
import {KfcOrderComponent} from './kfc-order/kfc-order.component';
import {ListComponent} from './starbucks-order/list/list.component';
const routes: Routes = [
{ path: 'phone-order', component: PhoneOrderComponent },
{ path: 'vip-top-up-order', component: VipTopUpOrderComponent },
{ path: 'kfc-order', component: KfcOrderComponent },
{ path: 'starbuck-order', component: ListComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class ApiOrderRoutingModule { }

@ -0,0 +1,40 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PhoneOrderComponent } from './phone-order/phone-order.component';
import {SystemRoutingModule} from '../system/system-routing.module';
import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms';
import {NgxNeditorModule} from '_@notadd_ngx-neditor@1.0.2@@notadd/ngx-neditor';
import {RichtextModule} from '../../common/richtext/richtext.module';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {RegionSelectorModule} from '../../common/region-selector/region-selector.module';
import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts';
import {IndexRoutingModule} from '../index/index-routing.module';
import {AppCommonModule} from '../../app-common.module';
import {NzSpaceModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd/space';
import {ApiOrderRoutingModule} from './api-order-routing.module';
import { ListComponent } from './starbucks-order/list/list.component';
import { KfcOrderComponent } from './kfc-order/kfc-order.component';
import { VipTopUpOrderComponent } from './vip-top-up-order/vip-top-up-order.component';
@NgModule({
declarations: [PhoneOrderComponent, ListComponent, KfcOrderComponent, VipTopUpOrderComponent],
imports: [
CommonModule,
ApiOrderRoutingModule,
NgZorroAntdModule,
FormsModule,
ReactiveFormsModule,
NgxNeditorModule,
RichtextModule,
BreadcrumbModule,
RegionSelectorModule,
NgxEchartsModule,
IndexRoutingModule,
AppCommonModule,
NzSpaceModule
]
})
export class ApiOrderModule { }

@ -0,0 +1,127 @@
<!-- 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 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">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</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="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-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-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></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 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>
<nz-table
class="table"
#ajaxTable
nzBordered
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="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" 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.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</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 nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

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

@ -0,0 +1,91 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {ApiMerchantsService} from '../../../services/api-merchants.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
@Component({
selector: 'app-kfc-order',
templateUrl: './kfc-order.component.html',
styleUrls: ['./kfc-order.component.scss']
})
export class KfcOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [2], // 产品类型
sourceOrderNo: [null], // 第三方订单号
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [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();
}
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.apiMerchant.getApiThirdOrderByList(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();
}
}

@ -0,0 +1,159 @@
<!-- 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 placeholder="请输入充值号码..." [formControlName]="'rechargeNumber'"/>
</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">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</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]="'operators'"/>
</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="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></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 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>
<nz-table
class="table"
#ajaxTable
nzBordered
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="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="100px">运营商</th>
<th nzWidth="140px">充值号码</th>
<th nzWidth="110px">充值金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="100px" nzRight>支付方式</th>
<th nzWidth="90px" nzRight>充值状态</th>
<th nzWidth="100px" 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.sourceOrderNo}}</td>
<td>{{data.operators}}</td>
<td>{{data.rechargeNumber}}</td>
<td>¥{{data.rechargePrice}}</td>
<td>¥{{data.payPrice}}</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.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.rechargeStatus | rechargeStatus}}</td>
<td nzRight>{{data.payStatus | payStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,96 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
@Component({
selector: 'app-phone-order',
templateUrl: './phone-order.component.html',
styleUrls: ['./phone-order.component.scss']
})
export class PhoneOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
rechargeNumber: [null], // 充值号码
orderNo: [null], // 订单号
sourceOrderNo: [null], // 第三方订单号
operators: [null], // 运营商
payStatus: [null], // 支付状态
rechargeStatus: [null], // 充值状态
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [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();
}
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.getApiRechargePhoneByList(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();
}
}

@ -0,0 +1,127 @@
<!-- 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 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">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</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="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-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-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></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 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>
<nz-table
class="table"
#ajaxTable
nzBordered
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="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" 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.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</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 nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,92 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../../services/recharge.service';
import {DiscountService} from '../../../../services/discount.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../../services/coupon.service';
import {IconService} from '../../../../services/icon.service';
import {ApiMerchantsService} from '../../../../services/api-merchants.service';
@Component({
selector: 'app-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.scss']
})
export class ListComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [1], // 产品类型
sourceOrderNo: [null], // 第三方订单号
rechargeStatus: [null], // 充值状态
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [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();
}
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.apiMerchant.getApiThirdOrderByList(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();
}
}

@ -0,0 +1,127 @@
<!-- 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 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">
<input nz-input placeholder="请输入第三方订单号..." [formControlName]="'sourceOrderNo'"/>
</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="orderStatus" nzPlaceHolder="请选择订单状态">
<nz-option nzLabel="待支付" nzValue="1"></nz-option>
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="已取消" nzValue="5"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-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-select nzShowSearch nzAllowClear formControlName="callbackStatus" nzPlaceHolder="请选择回调状态">
<nz-option nzLabel="未回调" nzValue="100"></nz-option>
<nz-option nzLabel="已回调" nzValue="101"></nz-option>
<nz-option nzLabel="回调未响应" nzValue="102"></nz-option>
<nz-option nzLabel="预备回调" nzValue="103"></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 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>
<nz-table
class="table"
#ajaxTable
nzBordered
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="160px">平台订单号</th>
<th nzWidth="160px">第三方订单号</th>
<th nzWidth="110px">订单金额</th>
<th nzWidth="110px">下单金额</th>
<th nzWidth="140px">生成时间</th>
<th nzWidth="140px">支付时间</th>
<th nzWidth="90px" nzRight>订单状态</th>
<th nzWidth="100px" 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.sourceOrderNo}}</td>
<td>¥{{data.orderPrice}}</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 nzRight>{{data.callbackStatus | callbackStatus}}</td>
<td nzRight>{{data.orderStatus | payCouponStatus}}</td>
</tbody>
</nz-table>
</div>

@ -0,0 +1,5 @@
.table-td-operation {
a {
margin-left: 8px;
}
}

@ -0,0 +1,93 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {RechargeService} from '../../../services/recharge.service';
import {DiscountService} from '../../../services/discount.service';
import {ApiMerchantsService} from '../../../services/api-merchants.service';
import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
@Component({
selector: 'app-vip-top-up-order',
templateUrl: './vip-top-up-order.component.html',
styleUrls: ['./vip-top-up-order.component.scss']
})
export class VipTopUpOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
WEB_SERVE_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
loading = true;
isVisible = false;
constructor(
private form: FormBuilder,
private recharge: RechargeService,
private discount: DiscountService,
private apiMerchant: ApiMerchantsService,
private modal: NzModalService,
private coupon: CouponService,
private iconService: IconService,
private message: NzMessageService,
) {
}
ngOnInit(): void {
this.init();
}
public init(): void {
this.searchForm = this.form.group({
orderStatus: [null], // 订单状态
orderNo: [null], // 订单号
productType: [3], // 产品类型
sourceOrderNo: [null], // 第三方订单号
rechargeStatus: [null], // 充值状态
callbackStatus: [null], // 回调状态
payTime: [null], // 支付时间
createTime: [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();
}
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.apiMerchant.getApiThirdOrderByList(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();
}
}

@ -75,6 +75,7 @@
class="table"
#ajaxTable
nzShowSizeChanger
nzBordered
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"

@ -8,206 +8,221 @@
</nz-breadcrumb-item>
</nz-breadcrumb>
<!--条件搜索-->
<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">
<div class="inner-content" nz-row>
<!--条件搜索-->
<div style="margin-bottom: 24px; margin-top: 24px;">
<!--分类-->
<nz-tree-select
nzPlaceHolder="请选择内容分类"
nzPlaceHolder="请选择分类"
style="width: 250px"
[nzNodes]="nodes"
nzShowSearch
formControlName="categoryId"
nzPlaceHolder="请选择内容分类"
[(ngModel)]="searchCategoryId"
>
</nz-tree-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 formControlName="title" name="title" nz-input placeholder="请输入内容标题" nzSize="default">
</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 class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" formControlName="status">
<input class="width_input_chlid" [(ngModel)]="searchTitle" name="searchTitle" nz-input placeholder="请输入内容标题" nzSize="default">
<nz-select class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择状态" [(ngModel)]="searchStatus">
<nz-option nzLabel="请选择状态" nzValue=""></nz-option>
<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>
<button style="margin-left: 10px;" nz-button nzType="primary" (click)="getSearch()" [nzLoading]="isLoadingSearch">搜索</button>
<button nz-button (click)="resetSearch()">重置</button>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="6">展示平台</nz-form-label>
<nz-form-control [nzSpan]="16">
<nz-select class="width_input_chlid" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platform">
<nz-option nzLabel="请选择展示平台" nzValue=""></nz-option>
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></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>
</div>
<div class="inner-content" nz-row>
<nz-layout>
<nz-sider style="background: #ffffff;"><div class="gaopin-data-toalt" style="width: 300px;">共搜索到 {{total}} 条数据</div></nz-sider>
<nz-content style="text-align: right;background: #ffffff;">
<button *ngIf="BTN_cmscontent_add == 1" class="funcBnt" nz-button nzType="primary" (click)="getAdd()">添加</button>
</nz-content>
</nz-layout>
<div class="inner-content">
<span>共计 {{total}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="getAdd()" ><i nz-icon nzType="plus" nzTheme="outline"></i>添加</button>
</div>
<!--数组表格 -->
<nz-table
class="table"
style="margin-top: 30px;width: 100%;"
#ajaxTable
nzShowSizeChanger
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
[nzTotal]="total"
[(nzPageIndex)]="pageNum"
[(nzPageIndex)]="pageIndex"
[(nzPageSize)]="pageSize"
[nzScroll]="{ x: '1200px' }"
(nzPageIndexChange)="getRequest(false , searchForm.value)"
(nzPageSizeChange)="getRequest(false , searchForm.value)">
(nzPageIndexChange)="getRequest()"
(nzPageSizeChange)="getRequest(true)"
[nzScroll]="{ x: '1150px'}">
<thead nzSingleSort>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="100px">分类名称</th>
<th nzWidth="100px">内容标题</th>
<th nzWidth="80px">展示平台</th>
<th nzWidth="80px">状态</th>
<th nzWidth="240px">分类名称</th>
<th nzWidth="240px">内容标题</th>
<th nzWidth="300px">简要描述</th>
<th nzWidth="120px">访问总量</th>
<th nzWidth="120px">是否推荐</th>
<th nzWidth="120px">状态</th>
<th nzWidth="120px">创建时间</th>
<th nzRight="0px" nzAlign="left" nzWidth="100px">操作</th>
<th nzRight="0px" nzAlign="left" nzWidth="300px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i+1}}</td>
<td>{{data.tag}}</td>
<tr *ngFor="let data of ajaxTable.data; let i = index;">
<td>{{i+ 1}}</td>
<td>{{data.categoryName}}</td>
<td>{{data.title}}</td>
<td>{{data.platform | showType}}</td>
<td>{{data.description}}</td>
<td>{{data.visitCount}}</td>
<td>
<span style="color: #1890ff;" *ngIf="data.recommend"></span>
<span style="color: darkgray;" *ngIf="!data.recommend"></span>
</td>
<td>
{{data.status == 1 ? '编辑中': '已发布'}}
<span *ngIf="data.status == 1">编辑中</span>
<span *ngIf="data.status == 2">已发布</span>
</td>
<td>{{data.createTime | date:'yyyy-MM-dd' }}</td>
<td nzRight="0px" style="font-size: 16px;">
<a><span nz-tooltip nzTitle="详情" (click)='getContentView(data.id)'><i nz-icon nzType="unordered-list" nzTheme="outline"></i></span></a>
<span *ngIf="BTN_cmscontent_edit">
<nz-divider nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="编辑" (click)='getEdit(data.id)'><i nz-icon nzType="edit" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_up_down == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 2"><span nz-tooltip nzTitle="下线" (click)='showDown(data.id)'><i nz-icon nzType="down-square" nzTheme="outline"></i></span></a>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="发布" (click)='addPush(data.id, data.categoryId)'><i nz-icon nzType="up-square" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_delete == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="删除" (click)='showDeleteConfirmDelete(data.id)'><i nz-icon nzType="delete" nzTheme="outline"></i></span></a>
</span>
<span *ngIf="BTN_cmscontent_patch == 1">
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1"><span nz-tooltip nzTitle="附件" (click)='findPatchByContent(data.id)'><i nz-icon nzType="file" nzTheme="outline"></i></span></a>
</span>
</td>
<td>{{data.createTime | date:'yyyy-MM-dd hh:mm:ss' }}</td>
<td nzRight 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 *ngIf="data.status == 1 && 'BTN_cmscontent_edit' | button" nz-menu-item><a (click)="getEdit(data)">编辑</a></li>
<li *ngIf="'BTN_cmscontent_up_down' | button" nz-menu-item><a (click)='getForbiddenUser(data.id , data.status)'>{{data.status === 2 ? '下架': '上架'}}</a></li>
<li *ngIf="data.status == 1 && 'BTN_cmscontent_delete' | button" nz-menu-item><a (click)='showDeleteConfirmDelete(data.id)'>删除</a></li>
</ul>
</nz-dropdown-menu>
</tr>
</tbody>
</nz-table>
<nz-layout *ngIf="showPatch == 1" style="margin-bottom: 10px;">
<nz-content style="text-align: right;background: #ffffff;">
<button class="funcBnt" nz-button nzType="primary" (click)="addPatch()">添加附件</button>
</nz-content>
</nz-layout>
<nz-table style="width: 100%" [nzShowPagination]="false" #basicTable [nzData]="patchList" *ngIf="showPatch == 1">
<thead>
<tr>
<th>附件名称</th>
<th>附件类型</th>
<th>附件描述</th>
<th>排序</th>
<th>添加时间</th>
<th>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of patchList">
<td>{{ data.patchName }}</td>
<td *ngIf="data.patchType == 1">图片</td>
<td *ngIf="data.patchType == 2">音频</td>
<td *ngIf="data.patchType == 3">视频</td>
<td *ngIf="data.patchType == 4">文档</td>
<td *ngIf="data.patchType == 5">其他</td>
<td>{{data.patchDesc}}</td>
<td>{{data.sort}}</td>
<td>{{data.addTime | date:'yyyy-MM-dd'}}</td>
<td>
<a><span nz-tooltip nzTitle="删除附件" (click)='showDeletePatch(data.id)'><i nz-icon nzType="delete" nzTheme="outline"></i></span></a>
</td>
</tr>
</tbody>
</nz-table>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="编辑内容" nzWidth="700" (nzOnCancel)="isVisible = false" (nzOnOk)="handleOk()">
<form nz-form [formGroup]="validateForm" class="login-form">
<!--添加附件弹出层-->
<nz-modal [(nzVisible)]="isVisible" nzTitle="添加附件" (nzOnCancel)="handleCancel()" (nzOnOk)="handlePatchOk(annexForm.value)" [nzOkLoading]="isOkLoading">
<form nz-form [formGroup]="annexForm" style="margin-left: 5%;">
<!--附件名称-->
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>分类</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="内容分类">
<nz-tree-select
style="width: 250px"
[nzNodes]="nodes"
nzShowSearch
nzPlaceHolder="请选择内容分类"
formControlName="categoryId"
>
</nz-tree-select>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchName" nzRequired>
<span>附件名称<i nz-icon nz-tooltip nzTitle="附件名称" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="patchName" placeholder="请输入附件名称..." />
<!--<nz-form-explain *ngIf="annexForm.get('patchName')?.dirty && annexForm.get('patchName')?.errors">请输入附件名称!</nz-form-explain>-->
</nz-form-control>
</nz-form-item>
<!--附件描述-->
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>内容标题</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入内容标题">
<input nz-input formControlName="title" placeholder="请输入内容标题!" />
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchDesc">
<span>附件描述<i nz-icon nz-tooltip nzTitle="附件描述" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input formControlName="patchDesc" placeholder="请输入附件描述..." />
<!--<nz-form-explain *ngIf="annexForm.get('patchDesc')?.dirty && annexForm.get('patchDesc')?.errors">请输入附件描述!</nz-form-explain>-->
</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-select *ngIf="!editFlag" nzMode="multiple" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platformArray">
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
<nz-select *ngIf="editFlag" nzShowSearch nzAllowClear nzPlaceHolder="请选择展示平台" formControlName="platform">
<nz-option nzLabel="微信小程序" [nzValue]="1"></nz-option>
<nz-option nzLabel="H5" [nzValue]="2"></nz-option>
<nz-option nzLabel="银联小程序" [nzValue]="3"></nz-option>
</nz-select>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="sort" nzRequired>
<span>附件排序<i nz-icon nz-tooltip nzTitle="附件排序" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<input nz-input type="number" formControlName="sort" placeholder="请输入附件排序,越小越靠前..." oninput="if(value.length>5) value=value.slice(0,5)"/>
<!--<nz-form-explain *ngIf="annexForm.get('sort')?.dirty && annexForm.get('sort')?.errors">请输入附件排序!</nz-form-explain>-->
</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-number style="width: 240px;" nzPlaceHolder="请输入优先级,越小越靠前..." formControlName="sortId" [nzMin]="1" [nzMax]="100" [nzStep]="1"></nz-input-number>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired>内容描述</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入内容描述">
<input nz-input formControlName="description" placeholder="请输入内容描述!" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" >跳转类型</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转类型">
<nz-select nzShowSearch nzAllowClear nzPlaceHolder="请选择跳转类型" formControlName="jumpType">
<nz-option nzLabel="外链" [nzValue]="1"></nz-option>
<nz-option nzLabel="内链" [nzValue]="2"></nz-option>
<!--附件类型-->
<nz-form-item >
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchType" nzRequired>
<span>附件类型</span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select style="width: 80%;" formControlName="patchType" (ngModelChange)="getChange($event)" nzShowSearch nzAllowClear 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>
<nz-form-item>
<nz-form-label [nzSpan]="6" >跳转路径</nz-form-label>
<nz-form-control [nzSpan]="16" nzErrorTip="请输入跳转路径">
<input nz-input formControlName="jumpUrl" placeholder="请输入跳转链接(轮播图必填)" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6">封面图片</nz-form-label>
<nz-form-control [nzSpan]="16">
<!--附件上传-->
<nz-form-item *ngIf="patchTypeCheck != '0' && patchTypeCheck != null && patchTypeCheck != ''">
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="patchPath" nzRequired>
<span>附件上传<i nz-icon nz-tooltip nzTitle="附件上传" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-upload
nzAction="{{POST_URL}}/fileUpload/uploadfile"
nzListType="picture-card"
[(nzFileList)]="imgFile"
[nzShowButton]="imgFile.length < 1"
[nzPreview]="handlePreview"
nzAction="{{WEB_SERVE_URL}}/fileUpload/fileUpload"
[(nzFileList)]="fileList"
[nzCustomRequest]="customReq"
[nzShowButton]="fileList.length < 1"
>
<i nz-icon nzType="plus"></i>
<div class="ant-upload-text">上传图片</div>
<button nz-button ><i nz-icon nzType="upload"></i><span>点击上传</span></button>
</nz-upload>
<nz-modal [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" (nzOnCancel)="previewVisible = false">
<ng-template #modalContent>
<img [src]="previewImage" [ngStyle]="{ width: '100%' }" />
</ng-template>
</nz-modal>
</nz-form-control>
</nz-form-item>
<button nz-button id="reset" style="display: none;" (click)="emptyForm($event)">清空</button>
</form>
</nz-modal>
<!--发布弹出层-->
<nz-modal [(nzVisible)]="isPublish" nzTitle="发布内容" (nzOnCancel)="handleCancelPush()" (nzOnOk)="handlePushOk(pushForm.value)" [nzOkLoading]="isPushOkLoading">
<form nz-form [formGroup]="pushForm" style="margin-left: 5%;">
<!--附件名称-->
<nz-form-item>
<nz-form-label [nzSm]="6" [nzXs]="24" nzFor="moduleId">
<span>发布模板<i nz-icon nz-tooltip nzTitle="发布模板" type="question-circle" nzTheme="outline"></i></span>
</nz-form-label>
<nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select formControlName="moduleId" nzShowSearch nzAllowClear nzPlaceHolder="选择发布模板,也可不选择" [(ngModel)]="moduleId">
<nz-option *ngFor="let data of selectModule" nzLabel="{{data.moduleName}}" nzValue="{{data.id}}"></nz-option>
</nz-select>
<!--<input nz-input formControlName="moduleId" placeholder="请输入附件名称..." />-->
</nz-form-control>
</nz-form-item>
<button nz-button id="resetPush" style="display: none;" (click)="emptyPushForm($event)">清空</button>
</form>
</nz-modal>

@ -0,0 +1,27 @@
.width_input {
width: 200px;
}
.width_input_chlid {
width: 200px;
margin-left: 10px;
}
[nz-form] {
max-width: 600px;
}
button {
margin-left: 8px;
}
:host ::ng-deep .upload-list-inline .ant-upload-list-item {
float: left;
width: 200px;
margin-right: 8px;
}
.search-result-list {
margin-top: 16px;
border: 1px dashed #e9e9e9;
border-radius: 6px;
background-color: #fafafa;
min-height: 200px;
text-align: center;
padding-top: 80px;
}

@ -1,22 +1,12 @@
import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {HttpClient} from '@angular/common/http';
import {NzMessageService, NzModalService, NzUploadFile} from 'ng-zorro-antd';
import {HttpClient, HttpEvent, HttpEventType, HttpRequest, HttpResponse} from '@angular/common/http';
import {NzMessageService, NzModalService, UploadXHRArgs} from 'ng-zorro-antd';
import {Router} from '@angular/router';
import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {environment} from '../../../../environments/environment';
import {CmsService} from '../../../services/cms.service';
import {CommonsService} from '../../../services/commons.service';
function getBase64(file: File): Promise<string | ArrayBuffer | null> {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error);
});
}
@Component({
selector: 'app-cms-content',
@ -24,93 +14,247 @@ function getBase64(file: File): Promise<string | ArrayBuffer | null> {
styleUrls: ['./cms-content.component.less']
})
export class CmsContentComponent implements OnInit {
WEB_SERVE_URL = environment.imageUrl;
POST_URL = environment.baseUrl;
searchForm: FormGroup; // 搜索框
validateForm: FormGroup; // 添加框
requestData = []; // 列表数据
nodes = []; // 类型树
total: number; // 页码
pageNum = 1; // 页码
pageSize = 10; // 条码
// 搜索按钮等待特效
isLoadingSearch = false;
// 搜索内容标题
searchTitle = '';
// 状态搜索
searchStatus = '';
// 分类搜索
searchCategoryId = '';
// 公司id
searchCompanyId = '';
// 查询数组
requestData = [];
// 查询数组等待特效
loading = true;
editFlag = false;
// 请求页码
pageIndex = 1;
// 请求条数
pageSize = 10;
// 查询总条数
total = 0;
/** 分类树数据 **/
nodes = [];
WEB_SERVE_URL;
// 选中的内容id
contentSelect = '';
// 是否显示附件列表
showPatch = 0;
// 根据内容查询附件列表
patchList = [];
// 添加附件相关
// 提交等待
isOkLoading = false;
// 附件类型
patchTypeCheck = '0';
// 附件返回地址
patchPath = '';
// 允许上传的文件类型
annexForm: FormGroup;
/** 定义附件表单 **/
isVisible = false;
imgFile = [];
previewImage: string | undefined = '';
previewVisible = false;
id: number;
/** 是否弹出添加 **/
fileList = [];
// 上传的后缀名
suffix = '';
// 允许上传的文件类型
imageSuffix = [
'jpg',
'jpeg',
'png',
'jif',
'dwg',
'dxf',
'jp2',
'jpe',
'svf',
'tif',
'tiff',
];
audioSuffix = [
'3gpp',
'ac3',
'mp2',
'mp3',
'asf',
'cda',
'wav',
'wma',
'mid',
'ra',
'rma',
'mod',
];
videoSuffix = [
'3gpp',
'mp2',
'mp4',
'mpeg',
'mpg',
'avi',
'rmvb',
'flv',
'3pg',
'rm',
'mov',
'wmv',
'mkv',
'f4v',
'm4v',
];
applicationSuffix = [
'asf',
'doc',
'dot',
'dtd',
'htm',
'html',
'css',
'csv',
'js',
'json',
'mpp',
'ogg',
'pdf',
'pot',
'pps',
'ppt',
'rtf',
'txt',
'wdb',
'wps',
'xhtml',
'xlc',
'xlm',
'xls',
'xlt',
'xlw',
'xml',
'zip',
'docx',
'xlsx',
'pptx',
'sql'
];
isPublish = false;
isPushOkLoading = false;
moduleId = '';
pushId = '';
pushForm: FormGroup;
// 可选择的模板列表
selectModule = [];
/** 按钮数据权限 **/
BTN_cmscontent_add = 0;
BTN_cmscontent_edit = 0;
BTN_cmscontent_delete = 0;
BTN_cmscontent_patch = 0;
BTN_cmscontent_up_down = 0;
constructor(
private fb: FormBuilder,
private http: HttpClient, // http请求
private message: NzMessageService, // 信息提示
private router: Router,
private common: CommonsService,
private cms: CmsService,
private modalService: NzModalService, // 对话框
private store: LocalStorageService, // 请求缓存
) {
this.WEB_SERVE_URL = environment.baseUrl;
this.searchCompanyId = this.store.get(ADMIN_INFO_OBJECT)['secUser']['companyId'];
}
ngOnInit() {
this.searchForm = this.fb.group({
title: [null],
categoryId: [null],
platform: [null],
status: [null],
/** 循环查询 按钮权限 **/
for (let i = 0; i < this.store.get(ADMIN_INFO_OBJECT)['buttonList'].length; i++) {
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_add') {
this.BTN_cmscontent_add = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_edit') {
this.BTN_cmscontent_edit = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_delete') {
this.BTN_cmscontent_delete = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_patch') {
this.BTN_cmscontent_patch = 1;
}
if (this.store.get(ADMIN_INFO_OBJECT)['buttonList'][i].permissionCode === 'BTN_cmscontent_up_down') {
this.BTN_cmscontent_up_down = 1;
}
}
this.annexForm = this.fb.group({
patchName: [null, [Validators.required]],
patchDesc: [null],
patchType: [null, [Validators.required]],
sort: [null, [Validators.required]],
});
this.validateForm = this.fb.group({
categoryId: [null, [Validators.required]],
title: [null, [Validators.required]],
platform: [null],
platformArray: [null],
sortId: [null, [Validators.required]],
description: [null, [Validators.required]],
jumpType: [null],
jumpUrl: [null],
this.pushForm = this.fb.group({
moduleId: [null]
});
const roleType = 1;
// 获取登录人 角色类型,查询分类树
console.log(this.store.get(ADMIN_INFO_OBJECT));
let roleType = 1;
/* if (0 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
roleType = 1;
} else if (1 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
if (this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['isService'] == true) {
roleType = 3;
} else {
roleType = 2;
}
} else if (2 == this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['companyType']) {
roleType = 3;
}*/
this.findCategoryTree(roleType);
this.getRequest(true, this.searchForm.value);
this.getRequest();
}
// 重置搜索
resetSearch() {
// 搜索内容标题
this.searchTitle = '';
// 状态搜索
this.searchStatus = '';
// 分类搜索
this.searchCategoryId = '';
}
// 查询列表
public getRequest(reset: boolean = false, whereObject: object) {
// 请求列表
getRequest(reset: boolean = false) {
this.showPatch = 0;
this.loading = false;
if (reset) {
this.pageNum = 1;
this.pageIndex = 1;
}
if (this.searchStatus == null) {
this.searchStatus = '';
}
if (this.searchCategoryId == null) {
this.searchCategoryId = '';
}
whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize;
this.cms.getListContent(whereObject, data => {
this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListContent?pageNum=' + this.pageIndex + '&pageSize=' + this.pageSize + '&title=' + this.searchTitle + '&category=' + this.searchCategoryId + '&status=' + this.searchStatus + '&companyId=' + this.searchCompanyId).subscribe(data => {
console.log(data);
this.loading = false;
if (data['return_code'] === '000000') {
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
this.isLoadingSearch = false;
} else {
this.message.error(data['return_msg']);
this.message.create('error', data['return_msg']);
}
});
}
// 重置
public resetForm(): void {
this.searchForm.reset();
// 搜索
getSearch() {
this.getRequest();
}
// 查询分类树
findCategoryTree(roleType) {
this.cms.getOwnCategoryTree(roleType , data => {
this.http.get(this.WEB_SERVE_URL + '/cmsCategory/getOwnCategoryTree?roleType=' + roleType).subscribe(data => {
if (data['return_code'] === '000000') {
this.nodes = data['return_data'];
if (this.nodes.length !== 0) {
@ -129,6 +273,7 @@ export class CmsContentComponent implements OnInit {
for (const i in data) {
if (data[i].nodes == null) {
const item = {
/** 重新赋值 **/
isLeaf: true,
title: data[i].text,
key: data[i].id,
@ -137,6 +282,7 @@ export class CmsContentComponent implements OnInit {
data[i] = item;
} else {
const item = {
/** 重新赋值 **/
isLeaf: false,
title: data[i].text,
key: data[i].id,
@ -147,119 +293,340 @@ export class CmsContentComponent implements OnInit {
}
}
this.nodes = data;
console.log(this.nodes);
}
// 新增
// 跳转添加
getAdd() {
this.isVisible = true;
this.editFlag = false;
this.router.navigate(['/admin/cms/cmscontentadd'], {
queryParams: {
editFlag: 0
}
});
}
// 编辑
getEdit(data: object) {
console.log(data);
if (data['imgData'] != null && data['imgData'] !== '') {
const logo = String(data['imgData']);
const logoArray = [];
logoArray.push(
{
uid: 1,
name: logo,
status: 'done',
url: environment.imageUrl + logo
// 跳转修改
getEdit(id) {
this.router.navigate(['/admin/cms/cmscontentedit'], {
queryParams: {
id: id
}
});
this.imgFile = logoArray;
}
this.id = data['id'];
this.validateForm.patchValue(data);
this.editFlag = true;
this.isVisible = true;
// 跳转详情
getContentView(id) {
this.router.navigate(['/admin/cms/cmscontentview'], {
queryParams: {
id: id
}
});
}
// 对话框删除
showDeleteConfirmDelete(id): void {
this.modalService.confirm({
nzTitle: '是否确定删除',
nzOkText: '是',
nzOnOk: () => this.deleteContent(id),
nzCancelText: '否',
});
}
// 提交内容
handleOk() {
// tslint:disable-next-line:forin
for (const i in this.validateForm.controls) {
this.validateForm.controls[i].markAsDirty();
this.validateForm.controls[i].updateValueAndValidity();
if (this.validateForm.controls[i].errors != null) {
this.message.error('必填项不能为空');
// 删除内容
deleteContent(id) {
if (id === undefined) {
return;
}
if (id === null) {
return;
}
if (id === '') {
return;
}
if (this.imgFile.length !== 0) {
if (this.imgFile[0]['response'] != null) {
this.validateForm.value.imgData = this.imgFile[0]['response']['return_data'][0];
this.http.get(this.WEB_SERVE_URL + '/cmsContent/delContent?id=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.message.create('success', `删除成功!`);
this.getRequest();
} else {
this.validateForm.value.imgData = this.imgFile[0].name;
this.message.create('warning', data['return_msg']);
}
});
}
if (this.editFlag) {
this.validateForm.value.id = this.id;
this.cms.updateCmsContent(this.validateForm.value , data => {
// 查询附件列表
findPatchByContent(id) {
this.contentSelect = id;
this.http.get(this.WEB_SERVE_URL + '/cmsContent/getListPatches?pageNum=1&pageSize=100&contentId=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.getRequest(false, this.searchForm.value);
this.message.success('修改成功');
this.showPatch = 1;
this.patchList = data['return_data'].list;
console.log(this.patchList);
} else {
this.message.create('error', '修改失败');
this.message.create('warning', data['return_msg']);
}
});
} else {
this.cms.insertCmsContent(this.validateForm.value , data => {
}
// 弹出添加附件
addPatch() {
this.isVisible = true;
}
// 删除附件确认
showDeletePatch(id) {
this.modalService.confirm({
nzTitle: '是否确定删除',
nzOkText: '是',
nzOnOk: () => this.deletePatch(id),
nzCancelText: '否',
});
}
// 删除附件
deletePatch(id) {
if (id === undefined || id === null || id === '') {
return;
}
this.http.get(this.WEB_SERVE_URL + '/cmsPatch/delPatch?id=' + id).subscribe(data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.getRequest(false, this.searchForm.value);
this.message.success('新增成功');
this.message.create('success', `删除成功!`);
this.findPatchByContent(this.contentSelect);
} else {
this.message.create('error', '修改失败');
this.message.create('warning', data['return_msg']);
}
});
}
// 取消按钮
handleCancel(): void {
this.isVisible = false;
this.patchPath = '';
this.fileList = [];
/** 隐藏弹框 **/
}
// 图片查看
handlePreview = async (file: NzUploadFile) => {
if (!file.url && !file.preview) {
// tslint:disable-next-line:no-non-null-assertion
file.preview = await getBase64(file.originFileObj!);
// 附件类型选择
getChange(event) {
if (event != null) {
this.patchTypeCheck = event;
console.log(event);
}
this.previewImage = file.url || file.preview;
this.previewVisible = true;
}
showDeleteConfirmDelete(id: number): void {
this.common.showConfirm('是否确定删除!' , dataR => {
if (dataR) {
this.cms.deleteById(id, data => {
// 附件上传设置
customReq = (item: UploadXHRArgs) => {
this.patchPath = ''; // 置空路径
const formData = new FormData();
formData.append('requestFile', item.file as any);
formData.append('uploadType', 'cmsPatch');
console.log(item);
const req = new HttpRequest('POST', item.action!, formData, {
reportProgress: true,
});
console.log(req);
return this.http.request(req).subscribe(
(event: HttpEvent<any>) => {
console.log(event);
if (event.type === HttpEventType.UploadProgress) {
if (event.total! > 0) {
(event as any).percent = (event.loaded / event.total!) * 100;
}
item.onProgress!(event, item.file!);
} else if (event instanceof HttpResponse) {
item.onSuccess!(event.body, item.file!, event);
if (event.body.return_code === '000000') {
this.patchPath = event.body.return_data[item.file.name];
this.suffix = this.patchPath.split('.')[this.patchPath.split('.').length - 1];
}
}
},
err => {
item.onError!(err, item.file!);
}
);
}
/** 清空 **/
emptyForm(e: MouseEvent): void {
e.preventDefault();
this.annexForm.reset();
for (const key in this.annexForm.controls) {
this.annexForm.controls[key].markAsPristine();
this.annexForm.controls[key].updateValueAndValidity();
}
}
// 附件弹窗确定添加按钮
handlePatchOk(value: any): void {
// 校验类型选择与必填
if (value.patchName == null || value.patchName == '') {
this.message.create('error', `请填写附件名称!`);
return;
}
if (value.sort == null || value.sort == '') {
this.message.create('error', `请填写附件排序,越小越靠前!`);
return;
}
if (value.patchType == '1') {
if (this.imageSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传图片类型的附件!`);
return;
}
} else if (value.patchType == '2') {
if (this.audioSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传音频类型的附件!`);
return;
}
} else if (value.patchType == '3') {
if (this.videoSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传视频类型的附件!`);
return;
}
} else if (value.patchType == '4') {
if (this.applicationSuffix.indexOf(this.suffix) == -1) {
this.message.create('error', `请上传文档类型的附件!`);
return;
}
} else if (value.patchType == '5') {
} else {
this.message.create('error', `请选择附件类型!`);
return;
}
if (this.patchPath == null || this.patchPath == '') {
this.message.create('error', `请上传附件!`);
return;
}
// 定义附件数据
const params = {
'contentId': this.contentSelect,
'patchName': value.patchName,
'patchDesc': value.patchDesc,
'patchType': value.patchType,
'patchPath': this.patchPath,
'source': 1,
'sort': value.sort,
'suffixName': this.suffix,
'addTime': new Date()
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsPatch/addPatch', params).subscribe(data => {
if (data['return_code'] === '000000') {
this.getRequest(true, this.searchForm.value);
this.message.success(data['return_data']);
this.isVisible = false;
this.isOkLoading = false;
this.fileList = [];
this.patchTypeCheck = '0';
this.findPatchByContent(this.contentSelect);
this.message.create('success', `新增成功!`);
} else {
this.message.error(data['return_msg']);
this.message.create('warning', data['return_msg']);
}
}, error => {
this.message.create('error', `未知错误!`);
});
}
});
// 弹出发布附件
addPush(id, categoryId) {
this.findModuleByCategory(categoryId);
this.pushId = id;
// document.getElementById('resetPush').click();
this.isPublish = true;
}
// 取消发布
handleCancelPush(): void {
this.isPublish = false;
this.moduleId = '';
this.pushId = '';
/** 隐藏弹框 **/
}
// 附件弹窗确定添加按钮
handlePushOk(value: any): void {
console.log('发布');
console.log(this.pushId);
console.log(this.moduleId);
console.log(value.moduleId);
if (this.pushId == null || this.pushId == '') {
this.message.create('error', '请重新选择发布的内容!');
return;
}
if (this.moduleId == null || this.moduleId == undefined) {
this.moduleId = '';
}
public getForbiddenUser(id, status: any): void {
const message = (status === 2 ? '是否下架当前内容' : '是否上架当前内容');
const s = status === 2 ? 1 : 2;
this.common.showConfirm(message, data => {
if (data) {
this.cms.updateContentStatus(id, s , dataUser => {
if (dataUser['return_code'] === '000000') {
this.message.success(dataUser['return_data']);
// 定义附件数据
const params = {
'id': this.pushId,
'status': 2,
'moduleId': this.moduleId
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => {
if (data['return_code'] === '000000') {
this.isPublish = false;
this.isPushOkLoading = false;
this.moduleId = '';
this.pushId = '';
this.getRequest();
this.message.create('success', `发布成功!`);
} else {
this.message.error(dataUser['return_msg']);
this.message.create('warning', data['return_msg']);
}
this.getRequest(false , this.searchForm.value);
}, error => {
this.message.create('error', `未知错误!`);
});
}
/** 清空模板 **/
emptyPushForm(e: MouseEvent): void {
e.preventDefault();
this.pushForm.reset();
for (const key in this.pushForm.controls) {
this.pushForm.controls[key].markAsPristine();
this.pushForm.controls[key].updateValueAndValidity();
}
}
// 根据内容分类查询可使用的模板列表
findModuleByCategory(categoryId) {
this.http.get(this.WEB_SERVE_URL + '/cmsCategoryModule/getModuleByCategoryId?categoryId=' + categoryId).subscribe(data => {
if (data['return_code'] === '000000') {
this.selectModule = data['return_data'];
console.log(this.selectModule);
} else {
this.message.create('error', data['return_msg']);
}
});
}
showDown(id): void {
this.modalService.confirm({
nzTitle: '是否确定下线',
nzOkText: '是',
nzOnOk: () => this.DownContent(id),
nzCancelText: '否',
});
}
// 下线
DownContent(id) {
// 定义附件数据
const params = {
'id': id,
'status': 1
};
/** 确定等待 **/
this.http.post(this.WEB_SERVE_URL + '/cmsContent/updateStatusOfContent', params).subscribe(data => {
if (data['return_code'] === '000000') {
this.getRequest();
this.message.create('success', `下线成功!`);
} else {
this.message.create('warning', data['return_msg']);
}
}, error => {
this.message.create('error', `未知错误!`);
});
}
}

@ -35,7 +35,8 @@
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="sourceType">
<nz-option nzLabel="金额充值" nzValue="1"></nz-option>
<nz-option nzLabel="油卡充值" nzValue="2"></nz-option>
<nz-option nzLabel="个人油卡充值" nzValue="2"></nz-option>
<nz-option nzLabel="车队油卡充值" nzValue="4"></nz-option>
<nz-option nzLabel="回收余额" nzValue="3"></nz-option>
</nz-select>
</nz-form-control>

@ -4,10 +4,12 @@ import {CompanyAmountRecordComponent} from './company-amount-record/company-amou
import {OilCardListComponent} from '../oil-card/oil-card-list/oil-card-list.component';
import {OilCardOrderComponent} from '../oil-card/oil-card-order/oil-card-order.component';
import {PayPwdComponent} from './pay-pwd/pay-pwd.component';
import {FleetOilCardListComponent} from '../fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component';
const routes: Routes = [
{ path: 'list', component: CompanyAmountRecordComponent },
{ path: 'oil-card', component: OilCardListComponent },
{ path: 'fleet-oil-card', component: FleetOilCardListComponent },
{ path: 'oil-card-order', component: OilCardOrderComponent },
{ path: 'pay-pwd-config', component: PayPwdComponent },
];

@ -77,7 +77,7 @@
<td>{{i + 1}}</td>
<!-- <td>{{data.productType == 1 ? '星巴克' : '肯德基'}}</td>-->
<td>{{data.productName}}</td>
<td>{{data.productType | productType : data.productId}}</td>
<!-- <td>{{data.productType | productType : data.productId}}</td>-->
<td>{{data.discount == null ? '暂未配置' : data.discount + "%"}}</td>
<td>{{data.integralDiscount == null ? '0' : data.integralDiscount + "%"}}</td>
<td>{{data.productPayTypeString.substring(0 , data.productPayTypeString.length - 1)}}</td>

@ -162,10 +162,18 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'wherePost'" nzRequired>是否邮递实物</nz-form-label>
<nz-form-control nzErrorTip="请选择!">
<nz-switch [formControlName]="'wherePost'" ></nz-switch>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'isPresent'" nzRequired>是否预约产品</nz-form-label>
<nz-form-label [nzFor]="'reserveStatus'" nzRequired>是否预约产品</nz-form-label>
<nz-form-control nzErrorTip="请选择是否预约产品!">
<nz-switch [formControlName]="'reserveStatus'" ></nz-switch>
</nz-form-control>

@ -87,6 +87,7 @@ export class CouponEditComponent implements OnInit {
isPresent: [false],
reserveStatus: [false],
buyPoints: [false],
wherePost: [false],
payType: [null, [Validators.required]],
displayArea: [null],
couponSource: [null],

@ -45,8 +45,8 @@
<div nz-col [nzSpan]="8">
<nz-form-item>
<nz-form-label [nzFor]="'usingRange'" >优惠券使用归属</nz-form-label>
<nz-form-control nzErrorTip="请选择优惠券使用范围!">
<nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用范围">
<nz-form-control nzErrorTip="请选择优惠券使用归属!">
<nz-select formControlName="usingRange" nzAllowClear nzPlaceHolder="请选择优惠券使用归属">
<nz-option *ngFor="let item of usingRange" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>

@ -0,0 +1,118 @@
<!-- 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="contactName" />
</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="contactPhone" />
</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)="downloadTemplate()"><i nz-icon nzType="vertical-align-bottom" nzTheme="outline"></i>下载导入模板</button>
<nz-upload
[nzAccept]="'.xls,.xlsx'"
nzAction="{{WEB_SERVE_URL}}fleetOilCardCar/importData?cardNo={{fleetCardNo}}"
[nzHeaders]="{ authorization: 'authorization-text' }"
(nzChange)="handleChange($event)"
[nzShowUploadList]="false"
>
<button nz-button nzType="primary" class="right-btn"><i nz-icon nzType="import" nzTheme="outline"></i>导入车辆</button>
</nz-upload>
</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="110px">车辆车牌</th>
<th nzWidth="110px">车主姓名</th>
<th nzWidth="110px">车主电话</th>
<th nzWidth="120px">创建时间</th>
<th nzWidth="110px">创建人</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.carLicensePlate}}</td>
<td>{{data.contactName}}</td>
<td>{{data.contactPhone}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.opUserName}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="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>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="importErrorDataModal" nzTitle="导入失败数据" (nzOnCancel)="closeImportErrorDataModal()" nzWidth="900px" [nzFooter]="null">
<nz-table #errorStudentTable [nzData]="errorDataArray">
<thead>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="150px">客户姓名</th>
<th nzWidth="150px">客户电话</th>
<th nzWidth="300px">失败原因</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of errorStudentTable.data;let i = index">
<td>{{ i + 1}}</td>
<td>{{data.contactName}}</td>
<td>{{data.contactPhone}}</td>
<td>{{data.errMsg}}</td>
</tr>
</tbody>
</nz-table>
</nz-modal>

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

@ -0,0 +1,252 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {FleetOilCardUserService} from '../../../services/fleet-oil-card-user.service';
import {OrganizationService} from '../../../services/organization.service';
import {CompanyAccountService} from '../../../services/company-account.service';
import {ActivatedRoute, Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {FleetOilCardCarService} from '../../../services/fleet-oil-card-car.service';
@Component({
selector: 'app-fleet-oil-card-car',
templateUrl: './fleet-oil-card-car.component.html',
styleUrls: ['./fleet-oil-card-car.component.scss']
})
export class FleetOilCardCarComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
fleetCardNo: string;
rechargeModal = false;
rechargeForm: FormGroup;
rechargeBtnLoading = false;
orgArray = [];
accountObject = {
amounts: 0
};
importErrorDataModal = false;
errorDataArray = [];
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private fleetOilCardCarService: FleetOilCardCarService,
private organizationService: OrganizationService,
private companyAccountService: CompanyAccountService,
private activatedRoute: ActivatedRoute,
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.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.cardNo != null) {
this.fleetCardNo = queryParams.cardNo;
}
});
this.searchForm = this.form.group({
contactName: [null],
contactPhone: [null],
});
this.rechargeForm = this.form.group({
cardNo: [{ value: null, disabled: true }, [Validators.required]],
price: [100, [Validators.required]],
twoPwd: [null, [Validators.required]],
});
if (this.roleType === 5 && this.adminFlag === 1) {
this.organizationService.getOrganizationList(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id'], data => {
this.orgArray = data['return_data'];
});
}
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['fleetOilCardNo'] = this.fleetCardNo;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.fleetOilCardCarService.getCarList(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) {
this.whereObject = whereObject;
if (this.searchForm.value.createTime != null) {
this.searchForm.value.createTimeS = new Date(this.searchForm.value.createTime[0]).getTime();
this.searchForm.value.createTimeE = new Date(this.searchForm.value.createTime[1]).getTime();
} else {
this.searchForm.value.createTimeS = null;
this.searchForm.value.createTimeE = null;
}
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
*
*/
showDelConfirm(id: number): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否删除该数据?',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.delData(id)
});
}
delData(id: number) {
this.fleetOilCardCarService.delete({ id: id }, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
/**
*
*/
showDisabledConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否禁用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.disabledData(cardNo)
});
}
/**
*
*/
disabledData(cardNo: string) {
/* this.fleetOilCardService.disabled({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});*/
}
/**
*
*/
showEnableConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否启用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.enableData(cardNo)
});
}
/**
*
*/
enableData(cardNo: string) {
/* this.fleetOilCardService.enable({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});*/
}
handleChange(info: NzUploadChangeParam): void {
if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') {
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.requestData(1);
this.message.success('导入成功');
} else {
this.modal.warning({
nzTitle: '提示',
nzOkText: '查看失败数据',
nzContent: '只有部分数据导入成功',
nzOnOk: () => this.showImportErrorDataModal(info.file.response.return_data)
});
}
} else {
this.message.error(info.file.response.return_msg);
}
} else if (info.file.status === 'error') {
this.message.error('上传错误');
}
}
// 打开模态框
showImportErrorDataModal(data: []) {
this.errorDataArray = data['errorData'];
this.importErrorDataModal = true;
}
closeImportErrorDataModal() {
this.importErrorDataModal = false;
}
downloadTemplate() {
window.location.href = this.FILE_URL + "template/导入车辆模板.xlsx";
}
}

@ -0,0 +1,241 @@
<!-- 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" *ngIf="roleType == 5 && adminFlag == 1">
<nz-form-item>
<nz-form-label [nzSpan]="8">所属部门</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="orgId">
<nz-option *ngFor="let item of orgArray" 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]="8">油卡卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="cardNo" />
</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="contactName" />
</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="contactPhone" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">油卡状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzAllowClear formControlName="status">
<nz-option nzValue="1" nzLabel="正常"></nz-option>
<nz-option nzValue="2" 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
formControlName="createTime"
[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">
<div *ngIf="roleType == 5 && adminFlag == 0" style="width: 100%;text-align: center;">
<nz-row [nzGutter]="16">
<nz-col [nzSpan]="24">
<nz-statistic [nzValue]="'' + accountObject['amounts']" [nzTitle]="'账户余额'"></nz-statistic>
</nz-col>
</nz-row>
</div>
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="showGenerateCardModal()" ><i nz-icon nzType="plus" nzTheme="outline"></i>生成油卡</button>
<!-- <button nz-button nzType="primary" class="right-btn" (click)="excelCard()" ><i nz-icon nzType="import" nzTheme="outline"></i>导出油卡</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="120px" *ngIf="roleType == 5 && adminFlag == 1">所属部门</th>
<th nzWidth="160px">卡号</th>
<th nzWidth="110px">余额</th>
<th nzWidth="110px">消费金额</th>
<th nzWidth="100px">联系人</th>
<th nzWidth="120px">联系电话</th>
<th nzWidth="100px">油卡状态</th>
<!-- <th nzWidth="80px">操作人</th>-->
<th nzWidth="160px">生成时间</th>
<th nzWidth="160px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i+1}}</td>
<td *ngIf="roleType == 5 && adminFlag == 1">{{data.orgName}}</td>
<td>{{data.cardNo}}</td>
<td>¥{{data.amount}}</td>
<td>¥{{data.amountConsume}}</td>
<td>{{data.contactName?data.contactName:'未设置'}}</td>
<td>{{data.contactPhone?data.contactPhone:'未设置'}}</td>
<td>{{data.status | oilCardStatus}}</td>
<!-- <td>{{data.opUserName}}</td>-->
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" class="table-td-operation">
<a (click)="showRechargeModal(data.cardNo)"> 充值 </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 [routerLink]="['/admin/fleet-oil-card/user-list']" [queryParams]="{ cardNo: data.cardNo}"><a>客户列表</a></li>
<li nz-menu-item [routerLink]="['/admin/fleet-oil-card/car-list']" [queryParams]="{ cardNo: data.cardNo}"><a>车辆列表</a></li>
<li nz-menu-item *ngIf="!data.contactPhone" (click)="showEditContactModal(data)"><a >设置联系人</a></li>
<li nz-menu-item *ngIf="data.contactPhone" (click)="showEditContactModal(data)"><a >更换联系人</a></li>
<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 (click)="showRecycleAmountModal(data)"><a>回收余额</a></li>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="generateCardModal" nzTitle="生成油卡" (nzOnCancel)="closeGenerateCardModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="generateCardForm">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >生成数量</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 100%" formControlName="generateNum" [nzMin]="1" [nzMax]="1000" [nzStep]="1"></nz-input-number>
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button nzType="primary" style="width: 150px;" (click)="submitGenerateCard()">确定</button>
</div>
</form>
</nz-modal>
<nz-modal [(nzVisible)]="editContactModal" nzTitle="设置联系人" (nzOnCancel)="closeEditContactModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="editContactForm">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >联系人</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="contactName" placeholder="请输入联系姓名" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >联系电话</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="contactPhone" placeholder="请输入联系电话" />
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button nzType="primary" style="width: 150px;" (click)="submitEditContactData()">确定</button>
</div>
</form>
</nz-modal>
<nz-modal [(nzVisible)]="rechargeModal" nzTitle="充值" (nzOnCancel)="closeRechargeModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="rechargeForm">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="cardNo" disabled />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >充值金额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 100%" formControlName="price" [nzMin]="0.01" [nzMax]="9999999" [nzStep]="1" [nzPrecision]="2"></nz-input-number>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >支付密码</nz-form-label>
<nz-form-control [nzSpan]="14">
<input type="password" formControlName="twoPwd" nz-input placeholder="请输入支付密码" />
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button nzType="primary" style="width: 150px;" [nzLoading]="rechargeBtnLoading" (click)="submitRecharge()">确定</button>
</div>
</form>
</nz-modal>
<nz-modal [(nzVisible)]="recycleAmountModal" nzTitle="油卡余额回收" (nzOnCancel)="closeRecycleAmountModal()" nzWidth="500px" [nzFooter]="null">
<form nz-form [formGroup]="recycleAmountForm">
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="cardNo" disabled />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >回收余额</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-input-number style="width: 100%" formControlName="amount"></nz-input-number>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label [nzSpan]="6" nzRequired >支付密码</nz-form-label>
<nz-form-control [nzSpan]="14">
<input type="password" formControlName="twoPwd" nz-input placeholder="请输入支付密码" />
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button nzType="primary" style="width: 150px;" [nzLoading]="recycleAmountBtnLoading" (click)="submitRecycleAmount()">确定</button>
</div>
</form>
</nz-modal>

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

@ -0,0 +1,467 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {OrganizationService} from '../../../services/organization.service';
import {CompanyAccountService} from '../../../services/company-account.service';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {ValidatorsService} from '../../../services/validators.service';
import {FleetOilCardService} from '../../../services/fleet-oil-card.service';
@Component({
selector: 'app-fleet-oil-card-list',
templateUrl: './fleet-oil-card-list.component.html',
styleUrls: ['./fleet-oil-card-list.component.scss']
})
export class FleetOilCardListComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
generateCardModal = false;
generateCardForm: FormGroup;
editContactModal = false;
editContactForm: FormGroup;
editContactData = {};
rechargeModal = false;
rechargeForm: FormGroup;
rechargeBtnLoading = false;
recycleAmountModal = false;
recycleAmountForm: FormGroup;
recycleAmountBtnLoading = false;
orgArray = [];
accountObject = {
amounts: 0
};
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private fleetOilCardService: FleetOilCardService,
private organizationService: OrganizationService,
private companyAccountService: CompanyAccountService,
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({
orgId: [null],
cardNo: [null],
contactName: [null],
contactPhone: [null],
createTime: [null],
createTimeS: [null],
createTimeE: [null],
bindTime: [null],
bindTimeS: [null],
bindTimeE: [null],
isConfigContact: [null],
status: [null],
bindStatus: [null],
});
this.editContactForm = this.form.group({
cardNo: [null, [Validators.required]],
contactName: [null, [Validators.required]],
contactPhone: [null, [Validators.required, ValidatorsService.mobile]],
});
this.generateCardForm = this.form.group({
generateNum: [1, [Validators.required]],
});
this.rechargeForm = this.form.group({
cardNo: [{ value: null, disabled: true }, [Validators.required]],
price: [100, [Validators.required]],
twoPwd: [null, [Validators.required]],
});
this.recycleAmountForm = this.form.group({
cardNo: [{ value: null, disabled: true }, [Validators.required]],
amount: [{ value: null, disabled: true }, [Validators.required]],
twoPwd: [null, [Validators.required]],
});
if (this.roleType === 5 && this.adminFlag === 1) {
this.organizationService.getOrganizationList(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id'], data => {
this.orgArray = data['return_data'];
});
}
if (this.roleType === 5 && this.adminFlag === 0) {
this.getAccount();
}
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.fleetOilCardService.getCardList(this.whereObject, data => {
if (data['return_code'] === '000000') {
this.dataObject = data['return_data'];
} else {
this.modal.error(data['return_msg']);
}
this.tableLoading = false;
});
}
/**
*
*/
getAccount() {
this.companyAccountService.getAccount(data => {
this.accountObject = data['return_data'];
});
}
/**
*
* @param whereObject
*/
search(whereObject: object) {
this.whereObject = whereObject;
if (this.searchForm.value.createTime != null) {
this.searchForm.value.createTimeS = new Date(this.searchForm.value.createTime[0]).getTime();
this.searchForm.value.createTimeE = new Date(this.searchForm.value.createTime[1]).getTime();
} else {
this.searchForm.value.createTimeS = null;
this.searchForm.value.createTimeE = null;
}
if (this.searchForm.value.bindTime != null) {
this.searchForm.value.bindTimeS = new Date(this.searchForm.value.bindTime[0]).getTime();
this.searchForm.value.bindTimeE = new Date(this.searchForm.value.bindTime[1]).getTime();
} else {
this.searchForm.value.bindTimeS = null;
this.searchForm.value.bindTimeE = null;
}
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
*
*/
showGenerateCardModal() {
this.generateCardModal = true;
}
/**
*
*/
closeGenerateCardModal() {
this.generateCardModal = false;
}
/**
*
*/
submitGenerateCard() {
for (const i in this.generateCardForm.controls) {
this.generateCardForm.controls[i].markAsDirty();
this.generateCardForm.controls[i].updateValueAndValidity();
}
if (this.generateCardForm.status == null || this.generateCardForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.loadingObject.spinning = true;
this.loadingObject.msg = '生成油卡中...';
this.closeGenerateCardModal();
this.fleetOilCardService.generateCard(this.generateCardForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '生成成功',
});
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
this.loadingObject.spinning = false;
});
}
/**
*
*/
showEditContactModal(data: object) {
this.editContactForm.patchValue(data);
this.editContactData = data;
this.editContactModal = true;
}
/**
*
*/
closeEditContactModal() {
this.editContactForm.reset();
this.editContactModal = false;
}
/**
*
*/
submitEditContactData() {
for (const i in this.editContactForm.controls) {
this.editContactForm.controls[i].markAsDirty();
this.editContactForm.controls[i].updateValueAndValidity();
}
if (this.editContactForm.status == null || this.editContactForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.fleetOilCardService.setContact(this.editContactForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '设置成功',
});
this.closeEditContactModal();
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
});
}
/**
*
*/
showDisabledConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否禁用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.disabledData(cardNo)
});
}
/**
*
*/
disabledData(cardNo: string) {
this.fleetOilCardService.disabled({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
/**
*
*/
showEnableConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否启用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.enableData(cardNo)
});
}
/**
*
*/
enableData(cardNo: string) {
this.fleetOilCardService.enable({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
/**
*
*/
showRechargeModal(cardNo: string) {
this.rechargeForm.patchValue({cardNo: cardNo});
this.rechargeModal = true;
}
/**
*
*/
closeRechargeModal() {
this.rechargeModal = false;
}
/**
*
*/
submitRecharge() {
for (const i in this.rechargeForm.controls) {
this.rechargeForm.controls[i].markAsDirty();
this.rechargeForm.controls[i].updateValueAndValidity();
}
if (this.rechargeForm.status == null || this.rechargeForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.rechargeBtnLoading = true;
this.rechargeForm.value['cardNo'] = this.rechargeForm.controls['cardNo']['value'];
this.fleetOilCardService.recharge(this.rechargeForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '充值成功',
});
this.closeRechargeModal();
this.getAccount();
this.requestData(this.whereObject['pageNum']);
} else if (data['return_code'] === '102136') {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
this.router.navigateByUrl('admin/company-amount/pay-pwd-config');
this.closeRechargeModal();
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
this.rechargeBtnLoading = false;
});
}
/**
*
*/
showRecycleAmountModal(cardData: object) {
this.recycleAmountForm.patchValue(cardData);
this.recycleAmountModal = true;
}
/**
*
*/
closeRecycleAmountModal() {
this.recycleAmountModal = false;
}
/**
*
*/
submitRecycleAmount() {
for (const i in this.recycleAmountForm.controls) {
this.recycleAmountForm.controls[i].markAsDirty();
this.recycleAmountForm.controls[i].updateValueAndValidity();
}
if (this.recycleAmountForm.status == null || this.recycleAmountForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.recycleAmountBtnLoading = true;
this.recycleAmountForm.value['cardNo'] = this.recycleAmountForm.controls['cardNo']['value'];
this.fleetOilCardService.recycleAmount(this.recycleAmountForm.value, data => {
if (data['return_code'] === '000000') {
this.modal.success({
nzTitle: '提示',
nzContent: '回收成功',
});
this.closeRecycleAmountModal();
this.getAccount();
this.requestData(this.whereObject['pageNum']);
} else if (data['return_code'] === '102136') {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
this.router.navigateByUrl('admin/company-amount/pay-pwd-config');
this.closeRecycleAmountModal();
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg'],
});
}
this.recycleAmountBtnLoading = false;
});
}
/**
*
*/
excelCard() {
this.fleetOilCardService.exportCard(this.whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
}

@ -0,0 +1,167 @@
<!-- 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" *ngIf="roleType == 5 && adminFlag == 1">
<nz-form-item>
<nz-form-label [nzSpan]="8">部门</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="orgId">
<nz-option *ngFor="let item of orgArray" nzLabel="{{item.name}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="this.cardNo == null">
<nz-form-item>
<nz-form-label [nzSpan]="8">油卡卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="cardNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="this.phone == null">
<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" *ngIf="this.carLicensePlate == null">
<nz-form-item>
<nz-form-label [nzSpan]="8">车牌</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="carLicensePlate" />
</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="goodsName" />
</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 nzShowSearch nzAllowClear formControlName="status">
<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="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]="8">支付时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<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>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="excelCardOrder()"><i nz-icon nzType="import" nzTheme="outline"></i>导出交易</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 *ngIf="roleType == 5 && adminFlag == 1" nzWidth="150px">所属部门</th>
<th nzWidth="120px">客户电话</th>
<th nzWidth="100px">车牌</th>
<th nzWidth="160px">油卡卡号</th>
<th nzWidth="200px">交易单号</th>
<th nzWidth="100px">加油金额</th>
<th nzWidth="100px">优惠金额</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="200px">加油站</th>
<th nzWidth="70px">油号</th>
<th nzWidth="80px">油枪号</th>
<th nzWidth="110px">油站枪价</th>
<th nzWidth="120px">平台枪价</th>
<th nzWidth="100px">交易状态</th>
<th nzWidth="160px">创建时间</th>
<th nzWidth="160px">支付时间</th>
<th nzWidth="160px">退款时间</th>
<!-- <th nzWidth="160px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i+1}}</td>
<td *ngIf="roleType == 5 && adminFlag == 1">{{data.orgName}}</td>
<td>{{data.merPhone}}</td>
<td>{{data.carLicensePlate!=null?data.carLicensePlate:'未知'}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderNo}}</td>
<!-- <td>{{data.gasOrderNo}}</td>-->
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.deductionPrice}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.gasOilNo}}</td>
<td>{{data.gasGunNo}}</td>
<td>{{data.gasPriceGun}}</td>
<td>{{data.platformPriceGun}}</td>
<td>{{data.statusName}}</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.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<!-- <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a></a></li>
</ul>
</nz-dropdown-menu>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>

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

@ -0,0 +1,147 @@
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 {OrganizationService} from '../../../services/organization.service';
import {NavigationComponent} from '../../navigation/navigation.component';
import {CompanyAccountService} from '../../../services/company-account.service';
import {ActivatedRoute} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {FleetOilCardService} from '../../../services/fleet-oil-card.service';
@Component({
selector: 'app-fleet-oil-card-order',
templateUrl: './fleet-oil-card-order.component.html',
styleUrls: ['./fleet-oil-card-order.component.scss']
})
export class FleetOilCardOrderComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
cardNo: string;
phone: string;
carLicensePlate: string;
orgArray = [];
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private oilCardService: FleetOilCardService,
private organizationService: OrganizationService,
private navigationComponent: NavigationComponent,
private companyAccountService: CompanyAccountService,
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.searchForm = this.form.group({
orgId: [null],
cardNo: [null],
goodsName: [null],
memPhone: [null],
carLicensePlate: [null],
status: [null],
payTime: [null],
payTimeS: [null],
payTimeE: [null],
});
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'];
}
});
if (this.roleType === 5 && this.adminFlag === 1) {
this.organizationService.getOrganizationList(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id'], data => {
this.orgArray = data['return_data'];
});
}
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
if (this.cardNo != null) {
this.whereObject['cardNo'] = this.cardNo;
}
if (this.phone != null) {
this.whereObject['phone'] = this.phone;
}
if (this.carLicensePlate != null) {
this.whereObject['carLicensePlate'] = this.carLicensePlate;
}
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.oilCardService.getCardOrderList(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) {
this.whereObject = whereObject;
if (this.searchForm.value.payTime != null) {
this.searchForm.value.payTimeS = new Date(this.searchForm.value.payTime[0]).getTime();
this.searchForm.value.payTimeE = new Date(this.searchForm.value.payTime[1]).getTime();
} else {
this.searchForm.value.payTimeS = null;
this.searchForm.value.payTimeE = null;
}
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
*
*/
excelCardOrder() {
this.oilCardService.exportCardOrder(this.whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
}

@ -0,0 +1,145 @@
<!-- 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">
<nz-select nzAllowClear formControlName="type">
<nz-option nzValue="1" nzLabel="进账"></nz-option>
<nz-option nzValue="2" 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="sourceType">
<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 nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">来源流水号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="sourceOrderNo" />
</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="opUserType">
<nz-option nzValue="1" nzLabel="管理员"></nz-option>
<nz-option nzValue="2" 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
formControlName="createTime"
[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>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-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="160px">油卡卡号</th>
<th nzWidth="100px">账单类型</th>
<th nzWidth="100px">交易金额</th>
<th nzWidth="120px">交易前金额</th>
<th nzWidth="120px">交易后金额</th>
<th nzWidth="100px">来源类型</th>
<th nzWidth="200px">来源流水号</th>
<th nzWidth="400px">来源内容</th>
<th nzWidth="120px">操作人类型</th>
<th nzWidth="120px">操作人名称</th>
<th nzWidth="120px">操作人电话</th>
<th nzWidth="160px">创建时间</th>
<!-- <th nzWidth="160px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i+1}}</td>
<td>{{data.fleetOilCardNo}}</td>
<td>{{data.type | oilCardRecordType}}</td>
<td>¥{{data.transactionAmount}}</td>
<td>¥{{data.beforeAmount}}</td>
<td>¥{{data.afterAmount}}</td>
<td>{{data.sourceType | oilCardRecordSourceType}}</td>
<td>{{data.sourceOrderNo}}</td>
<td>{{data.sourceContent}}</td>
<td>
<span *ngIf="data.opUserType == 0">未知</span>
<span *ngIf="data.opUserType == 1">管理员</span>
<span *ngIf="data.opUserType == 2">客户</span>
</td>
<td>{{data.opUserName}}</td>
<td>{{data.opUserPhone}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<!-- <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a></a></li>
</ul>
</nz-dropdown-menu>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>

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

@ -0,0 +1,100 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {FleetOilCardService} from '../../../services/fleet-oil-card.service';
import {ActivatedRoute, Router} from '@angular/router';
@Component({
selector: 'app-fleet-oil-card-record',
templateUrl: './fleet-oil-card-record.component.html',
styleUrls: ['./fleet-oil-card-record.component.scss']
})
export class FleetOilCardRecordComponent implements OnInit {
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
fleetOilCardNo: string;
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private fleetOilCardService: FleetOilCardService,
private activatedRoute: ActivatedRoute,
private router: Router,
private form: FormBuilder) {
}
ngOnInit(): void {
this.searchForm = this.form.group({
fleetOilCardNo: [null],
type: [null],
sourceOrderNo: [null],
sourceType: [null],
opUserPhone: [null],
opUserType: [null],
});
this.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.cardNo != null) {
this.fleetOilCardNo = queryParams.cardNo;
this.requestData(1);
}
});
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['fleetOilCardNo'] = this.fleetOilCardNo;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.fleetOilCardService.getRecordList(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) {
this.whereObject = whereObject;
if (this.searchForm.value.createTime != null) {
this.searchForm.value.createTimeS = new Date(this.searchForm.value.createTime[0]).getTime();
this.searchForm.value.createTimeE = new Date(this.searchForm.value.createTime[1]).getTime();
} else {
this.searchForm.value.createTimeS = null;
this.searchForm.value.createTimeE = null;
}
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
}

@ -0,0 +1,22 @@
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import {FleetOilCardListComponent} from './fleet-oil-card-list/fleet-oil-card-list.component';
import {FleetOilCardUserListComponent} from './fleet-oil-card-user-list/fleet-oil-card-user-list.component';
import {FleetOilCardCarComponent} from './fleet-oil-card-car/fleet-oil-card-car.component';
import {FleetOilCardRecordComponent} from './fleet-oil-card-record/fleet-oil-card-record.component';
import {FleetOilCardOrderComponent} from './fleet-oil-card-order/fleet-oil-card-order.component';
const routes: Routes = [
{ path: 'list', component: FleetOilCardListComponent },
{ path: 'user-list', component: FleetOilCardUserListComponent },
{ path: 'car-list', component: FleetOilCardCarComponent },
{ path: 'record-list', component: FleetOilCardRecordComponent },
{ path: 'order-list', component: FleetOilCardOrderComponent },
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class FleetOilCardRoutingModule { }

@ -0,0 +1,123 @@
<!-- 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="contactName" />
</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="contactPhone" />
</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)="downloadTemplate()"><i nz-icon nzType="vertical-align-bottom" nzTheme="outline"></i>下载导入模板</button>
<nz-upload
[nzAccept]="'.xls,.xlsx'"
nzAction="{{WEB_SERVE_URL}}fleetOilCardUser/importData?cardNo={{fleetCardNo}}"
[nzHeaders]="{ authorization: 'authorization-text' }"
(nzChange)="handleChange($event)"
[nzShowUploadList]="false"
>
<button nz-button nzType="primary" class="right-btn"><i nz-icon nzType="import" nzTheme="outline"></i>导入客户</button>
</nz-upload>
</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="110px">客户姓名</th>
<th nzWidth="110px">客户电话</th>
<th nzWidth="110px">消费总额</th>
<th nzWidth="120px">最近消费</th>
<th nzWidth="120px">创建时间</th>
<th nzWidth="110px">创建人</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.contactName}}</td>
<td>{{data.contactPhone}}</td>
<td>¥{{data.amountConsume}}</td>
<td>
<span *ngIf="data.latelyConsumeTime == null">未消费</span>
<span *ngIf="data.latelyConsumeTime != null">{{data.latelyConsumeTime | date : 'yyyy-MM-dd HH:mm:ss'}}</span>
</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.opUserName}}</td>
<td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item (click)="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>
</ul>
</nz-dropdown-menu>
</td>
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>
<nz-modal [(nzVisible)]="importErrorDataModal" nzTitle="导入失败数据" (nzOnCancel)="closeImportErrorDataModal()" nzWidth="900px" [nzFooter]="null">
<nz-table #errorStudentTable [nzData]="errorDataArray">
<thead>
<tr>
<th nzWidth="80px">序号</th>
<th nzWidth="150px">客户姓名</th>
<th nzWidth="150px">客户电话</th>
<th nzWidth="300px">失败原因</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of errorStudentTable.data;let i = index">
<td>{{ i + 1}}</td>
<td>{{data.contactName}}</td>
<td>{{data.contactPhone}}</td>
<td>{{data.errMsg}}</td>
</tr>
</tbody>
</nz-table>
</nz-modal>

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

@ -0,0 +1,251 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd';
import {LocalStorageService} from '../../../services/local-storage.service';
import {OrganizationService} from '../../../services/organization.service';
import {CompanyAccountService} from '../../../services/company-account.service';
import {ActivatedRoute, Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {FleetOilCardUserService} from '../../../services/fleet-oil-card-user.service';
@Component({
selector: 'app-fleet-oil-card-user-list',
templateUrl: './fleet-oil-card-user-list.component.html',
styleUrls: ['./fleet-oil-card-user-list.component.scss']
})
export class FleetOilCardUserListComponent implements OnInit {
WEB_SERVE_URL = environment.baseUrl;
FILE_URL = environment.imageUrl;
roleType;
adminFlag;
loadingObject = {
spinning: false,
msg: '加载中'
};
dataObject: any = {};
tableLoading = true;
searchForm: FormGroup;
pageNum: number;
whereObject: any = {};
fleetCardNo: string;
rechargeModal = false;
rechargeForm: FormGroup;
rechargeBtnLoading = false;
orgArray = [];
accountObject = {
amounts: 0
};
importErrorDataModal = false;
errorDataArray = [];
constructor(private modal: NzModalService,
private message: NzMessageService,
private store: LocalStorageService,
private fleetOilCardUserService: FleetOilCardUserService,
private organizationService: OrganizationService,
private companyAccountService: CompanyAccountService,
private activatedRoute: ActivatedRoute,
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.activatedRoute.queryParams.subscribe(queryParams => {
if (queryParams.cardNo != null) {
this.fleetCardNo = queryParams.cardNo;
}
});
this.searchForm = this.form.group({
contactName: [null],
contactPhone: [null],
});
this.rechargeForm = this.form.group({
cardNo: [{ value: null, disabled: true }, [Validators.required]],
price: [100, [Validators.required]],
twoPwd: [null, [Validators.required]],
});
if (this.roleType === 5 && this.adminFlag === 1) {
this.organizationService.getOrganizationList(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id'], data => {
this.orgArray = data['return_data'];
});
}
this.requestData(1);
}
/**
*
*/
requestData(pageNum) {
this.tableLoading = true;
this.whereObject['fleetOilCardNo'] = this.fleetCardNo;
this.whereObject['pageNum'] = pageNum;
this.whereObject['pageSize'] = 10;
this.fleetOilCardUserService.getUserList(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) {
this.whereObject = whereObject;
if (this.searchForm.value.createTime != null) {
this.searchForm.value.createTimeS = new Date(this.searchForm.value.createTime[0]).getTime();
this.searchForm.value.createTimeE = new Date(this.searchForm.value.createTime[1]).getTime();
} else {
this.searchForm.value.createTimeS = null;
this.searchForm.value.createTimeE = null;
}
this.requestData(1);
}
/**
*
*/
resetForm(): void {
this.searchForm.reset();
}
/**
*
*/
showDelConfirm(id: number): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否删除该用户?删除后用户无法使用车队油卡!',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.delData(id)
});
}
delData(id: number) {
this.fleetOilCardUserService.delete({ id: id }, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});
}
/**
*
*/
showDisabledConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否禁用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.disabledData(cardNo)
});
}
/**
*
*/
disabledData(cardNo: string) {
/* this.fleetOilCardService.disabled({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});*/
}
/**
*
*/
showEnableConfirm(cardNo: string): void {
this.modal.confirm({
nzTitle: '警告',
nzContent: '是否启用油卡',
nzOkText: '是',
nzCancelText: '否',
nzOkType: 'danger',
nzOnOk: () => this.enableData(cardNo)
});
}
/**
*
*/
enableData(cardNo: string) {
/* this.fleetOilCardService.enable({ cardNo: cardNo}, data => {
if (data['return_code'] === '000000') {
this.requestData(this.whereObject['pageNum']);
} else {
this.modal.error({
nzTitle: '提示',
nzContent: data['return_msg']
});
}
});*/
}
handleChange(info: NzUploadChangeParam): void {
if (info.file.status === 'done') {
if (info.file.response.return_code === '000000') {
if (info.file.response.return_data == null || info.file.response.return_data.errorTotal === 0) {
this.requestData(1);
this.message.success('导入成功');
} else {
this.modal.warning({
nzTitle: '提示',
nzOkText: '查看失败数据',
nzContent: '只有部分数据导入成功',
nzOnOk: () => this.showImportErrorDataModal(info.file.response.return_data)
});
}
} else {
this.message.error(info.file.response.return_msg);
}
} else if (info.file.status === 'error') {
this.message.error('上传错误');
}
}
// 打开模态框
showImportErrorDataModal(data: []) {
this.errorDataArray = data['errorData'];
this.importErrorDataModal = true;
}
closeImportErrorDataModal() {
this.importErrorDataModal = false;
}
downloadTemplate() {
window.location.href = this.FILE_URL + "template/导入客户模板.xlsx";
}
}

@ -0,0 +1,29 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FleetOilCardRoutingModule } from './fleet-oil-card-routing.module';
import { FleetOilCardListComponent } from './fleet-oil-card-list/fleet-oil-card-list.component';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {AppCommonModule} from '../../app-common.module';
import {NgxEchartsModule} from 'ngx-echarts';
import { FleetOilCardUserListComponent } from './fleet-oil-card-user-list/fleet-oil-card-user-list.component';
import { FleetOilCardCarComponent } from './fleet-oil-card-car/fleet-oil-card-car.component';
import { FleetOilCardRecordComponent } from './fleet-oil-card-record/fleet-oil-card-record.component';
import { FleetOilCardOrderComponent } from './fleet-oil-card-order/fleet-oil-card-order.component';
@NgModule({
declarations: [FleetOilCardListComponent, FleetOilCardUserListComponent, FleetOilCardCarComponent, FleetOilCardRecordComponent, FleetOilCardOrderComponent],
imports: [
CommonModule,
FleetOilCardRoutingModule,
NgZorroAntdModule,
ReactiveFormsModule,
FormsModule,
BreadcrumbModule,
AppCommonModule,
NgxEchartsModule,
]
})
export class FleetOilCardModule { }

@ -7,7 +7,6 @@ import {OilPriceTaskService} from '../../../services/oil-price/oil-price-task.se
import {LocalStorageService} from "../../../services/local-storage.service";
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {OilPriceOfficialService} from '../../../services/oil-price/oil-price-official.service';
import {data} from 'jquery';
@Component({
selector: 'app-oil-price-task-edit',

@ -0,0 +1,39 @@
<div class="content">
<div class="top-title">
<h3>账户信息</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="(apiMerchants['amounts'] | number)" [nzTitle]="'账户余额'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="apiMerchants['phone']" [nzTitle]="'用户名'"></nz-statistic>
</div>
<div nz-col nzSpan="8">
<nz-statistic [nzValue]="apiMerchants['merchantName']" [nzTitle]="'商户名称'"></nz-statistic>
</div>
</div>
</div>
<div class="content">
<div class="top-title">
<h3>接口信息</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="24">
<p>商户号(mchId):{{apiMerchants['mchId']}}</p>
<p>密钥(apiKey):{{apiMerchants['apiKey']}}</p>
<p>IP白名单:{{apiMerchants['ext1']}}</p>
</div>
</div>
</div>
<div class="content">
<div class="top-title">
<h3>已开通产品</h3>
</div>
<div nz-row class="content-data">
<div nz-col nzSpan="6" *ngFor="let item of productConfig; let i = index">
<div class="product cp ml mt">{{item['codeType'] | productConfig}}</div>
</div>
</div>
</div>

@ -0,0 +1,25 @@
.content {
background: #fff;
margin-bottom: 20px;
margin-top: 20px;
}
.top-title {
padding: 16px;
border-bottom: 1px solid #e8e8e8
}
.content-data {
padding: 24px;
.title {
color: rgba(0, 0, 0, 0.45);
font-size: 14px;
}
}
.product {
text-align: center;
font-size: 18px;
padding: 20px;
border: 1px solid #e8e8e8;
}
.product:hover {
box-shadow: #e8e8e8 0 0 4px 2px;
}

@ -0,0 +1,34 @@
import { Component, OnInit } from '@angular/core';
import {LocalStorageService} from '../../../services/local-storage.service';
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {CommonsService} from "../../../services/commons.service";
import {ApiMerchantsService} from "../../../services/api-merchants.service";
@Component({
selector: 'app-api-merchant',
templateUrl: './api-merchant.component.html',
styleUrls: ['./api-merchant.component.scss']
})
export class ApiMerchantComponent implements OnInit {
// API商户信息
apiMerchants;
productConfig;
constructor(
private store: LocalStorageService, // 数据缓存
private apiMerchantService: ApiMerchantsService,
private common: CommonsService
) { }
ngOnInit(): void {
this.apiMerchants = this.store.get(ADMIN_INFO_OBJECT)['apiMerchants'];
this.apiMerchantService.getSecConfigList(this.apiMerchants['mchId'] , data => {
if (data['return_code'] === '000000') {
this.productConfig = data['return_data'];
}
});
}
}

@ -15,11 +15,12 @@ import {AppCommonModule} from '../../app-common.module';
import { TestComponent } from './test/test.component';
import {NzSpaceModule} from 'ng-zorro-antd/space';
import { OrderStatisticsComponent } from './order-statistics/order-statistics.component';
import { ApiMerchantComponent } from './api-merchant/api-merchant.component';
@NgModule({
declarations: [IndexComponent, TestComponent, OrderStatisticsComponent],
declarations: [IndexComponent, TestComponent, ApiMerchantComponent , OrderStatisticsComponent],
imports: [
CommonModule,
SystemRoutingModule,

@ -1,9 +1,9 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
首页
</nz-breadcrumb-item>
</nz-breadcrumb>
<!--<nz-breadcrumb>-->
<!-- <nz-breadcrumb-item>-->
<!-- 首页-->
<!-- </nz-breadcrumb-item>-->
<!--</nz-breadcrumb>-->
<!-- end 面包屑 -->
<!--条件搜索-->
@ -166,6 +166,8 @@
</div>
</div>
<!--API商户角色-->
<app-api-merchant *ngIf="roleType == 21"></app-api-merchant>
<!--运营角色-->

@ -0,0 +1,15 @@
<!-- start 面包屑 -->
<nz-breadcrumb>
<nz-breadcrumb-item>
订单统计汇总
</nz-breadcrumb-item>
</nz-breadcrumb>
<!-- end 面包屑 -->
<div class="inner-content">
<div class="orderStatisticsByYMDData">
<div echarts [options]="orderStatisticsByYMDData"></div>
</div>
</div>

@ -0,0 +1,48 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-order-statistics',
templateUrl: './order-statistics.component.html',
styleUrls: ['./order-statistics.component.scss']
})
export class OrderStatisticsComponent implements OnInit {
// 根据年月日查询总交易金额
orderStatisticsByYMDData: any;
constructor() { }
ngOnInit(): void {
this.orderStatisticsByYMD(3);
}
public orderStatisticsByYMD(dateType: number): void {
this.orderStatisticsByYMDData = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
yAxis: {
type: 'value'
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130],
label: {
show: true,
color: 'black',
position: 'top'
},
type: 'bar',
showBackground: true,
color: '#1890ff',
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}
}
]
};
}
}

@ -52,7 +52,6 @@
<nz-form-control nzErrorTip="请选择门店类型!">
<nz-select formControlName="type" nzAllowClear nzPlaceHolder="请选择门店类型">
<nz-option nzValue="1" nzLabel="加油站"></nz-option>
<nz-option nzValue="1" nzLabel="加油站"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>

@ -97,15 +97,15 @@
<th *ngIf="roleType == 5 && adminFlag == 1" nzWidth="120px">用户手机号</th>
<th nzWidth="160px">油卡卡号</th>
<th nzWidth="200px">平台订单号</th>
<th nzWidth="230px">团油订单号</th>
<!-- <th nzWidth="230px">团油订单号</th>-->
<th nzWidth="100px">加油金额</th>
<th nzWidth="100px">优惠金额</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="200px">加油站</th>
<th nzWidth="70px">油号</th>
<th nzWidth="80px">油枪号</th>
<th nzWidth="110px">团油油枪价</th>
<th nzWidth="120px">平台枪价</th>
<th nzWidth="110px">油站枪价</th>
<th nzWidth="120px">平台枪价</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="160px">创建时间</th>
<th nzWidth="160px">支付时间</th>
@ -120,7 +120,7 @@
<td *ngIf="roleType == 5 && adminFlag == 1">{{data.merPhone}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.gasOrderNo}}</td>
<!-- <td>{{data.gasOrderNo}}</td>-->
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.deductionPrice}}</td>
<td>¥{{data.payRealPrice}}</td>

@ -147,7 +147,7 @@
<th nzWidth="140px">支付时间</th>
<th nzWidth="140px">取消时间</th>
<th nzRight nzWidth="100px">状态</th>
<!-- <th nzWidth="80px" nzRight>操作</th>-->
<th nzWidth="120px" nzRight>操作</th>
</tr>
</thead>
<tbody>
@ -167,10 +167,10 @@
<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>-->
<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>
@ -185,3 +185,20 @@
</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>

@ -8,8 +8,8 @@ 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";
import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace';
import {LocalStorageService} from '../../../services/local-storage.service';
@Component({
selector: 'app-order-list',
@ -31,7 +31,16 @@ export class OrderListComponent implements OnInit {
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,
@ -130,11 +139,20 @@ export class OrderListComponent implements OnInit {
// 查看详情
public getDetail(id: number): void {
this.router.navigate(['/admin/order/order-detail'], {
queryParams: {
merchantId: id
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']);
}
}).then(r => console.log(r));
} else {
this.message.error(data['return_msg']);
}
});
}
// 下载模板

@ -23,8 +23,6 @@ export class PromotionOrderListComponent implements OnInit {
pageSize = 10; // 条码
loading = true;
constructor(
private form: FormBuilder,
private distribution: DistributionService,

@ -5,14 +5,11 @@ import {DiscountService} from '../../../services/discount.service';
import {CouponService} from '../../../services/coupon.service';
import {IconService} from '../../../services/icon.service';
import {CommonsService} from '../../../services/commons.service';
import {RechargeService} from '../../../services/recharge.service';
import {NzMessageService, NzModalService, NzNotificationService, NzUploadChangeParam} from 'ng-zorro-antd';
import {NzMessageService, NzModalService, NzUploadChangeParam} from 'ng-zorro-antd';
import {FormBuilder, FormGroup, Validators} from '@angular/forms';
import {Router} from '@angular/router';
import {ADMIN_INFO_OBJECT} from "../../../services/local-storage.namespace";
import {CompanyService} from "../../../services/company.service";
import {MerchantService} from "../../../services/merchant.service";
import {LocalStorageService} from "../../../services/local-storage.service";
@Component({

@ -47,7 +47,6 @@ import {
RechargePlatformPipe,
PriceStatusPipe,
GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
SourceTypePipe,
GasClassGroupTaskStatusPipe,
@ -61,9 +60,16 @@ import {
PlatformPipe,
OilTypePipe,
OilPriceTaskStatusPipe,
OilPriceTaskExecutionTypePipe, OilPriceTaskPriceTypePipe, IntegralTypePipe, IntegralProductPipe, ProductTypePipe, OrderRefundOpuserTypePipe, OrderChildStatusPipe
OilPriceTaskExecutionTypePipe,
OilPriceTaskPriceTypePipe,
IntegralTypePipe,
IntegralProductPipe,
ProductTypePipe,
OrderRefundOpuserTypePipe,
OrderChildStatusPipe,
PayStatusPipe, CallbackStatusPipe, ProductConfigPipe, PayCouponStatusPipe
} from './pipes';
import {MsgTypePipe} from "./pipes/msg/msg-type.pipe";
import {MsgTypePipe} from './pipes/msg/msg-type.pipe';
@ -110,7 +116,6 @@ const PIPES = [
OilPriceTaskStatusPipe,
OilPriceTaskExecutionTypePipe,
OilPriceTaskPriceTypePipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
SourceTypePipe,
GasClassGroupTaskStatusPipe,
@ -123,6 +128,17 @@ const PIPES = [
OrderRefundStatusPipe,
OrderRefundOpuserTypePipe,
OrderChildStatusPipe,
IntegralTypePipe,
IntegralProductPipe,
MsgTypePipe,
ProductConfigPipe,
CallbackStatusPipe,
PayStatusPipe,
PayCouponStatusPipe,
IntegralTypePipe,
IntegralProductPipe,
ProductTypePipe,
MsgTypePipe,
];
@ -136,19 +152,11 @@ const PIPES = [
],
declarations: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
ProductTypePipe,
MsgTypePipe,
],
exports: [
...PIPES,
IntegralTypePipe,
IntegralProductPipe,
ProductTypePipe,
MsgTypePipe,
],
})

@ -122,6 +122,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/oil-card/oil-card.module').then(m => m.OilCardModule),
canActivate: [InitGuardService]
},
{
path: 'fleet-oil-card',
loadChildren: () => import('./admin/fleet-oil-card/fleet-oil-card.module').then(m => m.FleetOilCardModule),
canActivate: [InitGuardService]
},
{
path: 'gz-sinopec',
loadChildren: () => import('./admin/gz-sinopec/gz-sinopec.module').then(m => m.GzSinopecModule),
@ -162,6 +167,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/promotion/promotion.module').then(m => m.PromotionModule),
canActivate: [InitGuardService]
},
{
path: 'api-order',
loadChildren: () => import('./admin/api-order/api-order.module').then(m => m.ApiOrderModule),
canActivate: [InitGuardService]
},
],
},
];

@ -0,0 +1,21 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'callbackStatus'
})
export class CallbackStatusPipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 100:
return '未回调';
case 101:
return '已回调';
case 102:
return '回调未响应';
case 103:
return '预备回调';
}
}
}

@ -10,9 +10,11 @@ export class CompanyAmountRecordSourceTypePipe implements PipeTransform {
case 1:
return '金额充值';
case 2:
return '油卡充值';
return '个人油卡充值';
case 3:
return '回收余额';
case 4:
return '车队油卡充值';
}
}

@ -55,3 +55,6 @@ export * from './gas-oil-price/oil-price-task-execution-type.pipe';
export * from './gas-oil-price/oil-price-task-price-type.pipe';
export * from './integral/integral-type.pipe';
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';

@ -0,0 +1,23 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'productConfig'
})
export class ProductConfigPipe implements PipeTransform {
transform(value: string): string {
switch (value) {
case 'CQ_SHELL':
return '重庆壳牌接口';
case 'KFC_CONFIG':
return '肯德基接口';
case 'MEMBER_RECHARGE_CONFIG':
return '会员充值接口';
case 'PHONE_CONFIG':
return '话费接口';
case 'STARBUCKS_CONFIG':
return '星巴克接口';
}
}
}

@ -15,16 +15,5 @@ export class MsgTypePipe implements PipeTransform {
return this.array[product][type - 1];
}
// transform(object: string , objectName: string): string {
//
// console.log(object);
//
// const o = JSON.parse(object);
// if (typeof o == 'object') {
// return o[objectName];
// }
// return null;
// }
}

@ -0,0 +1,26 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'payCouponStatus'
})
export class PayCouponStatusPipe implements PipeTransform {
transform(value: number): string {
switch (value) {
case 1:
return '待支付';
case 2:
return '已支付';
case 3:
return '已完成';
case 4:
return '已退款';
case 5:
return '已取消';
case 6:
return '退款中';
case 7:
return '拒绝退款';
}
}
}

@ -1,7 +1,9 @@
import { Injectable } from '@angular/core';
import {CommonsService} from './commons.service';
import {environment} from "../../environments/environment";
import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http';
import {take} from "rxjs/operators";
@Injectable({
providedIn: 'root'
@ -122,7 +124,7 @@ export class ApiMerchantsService {
* @methodName configApiProduct
* @Description // 提交配置产品
* @Date 18:00 2022/6/8
* @Param
* @Param configApiProduct
*/
public configApiProduct(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiProduct/configApiProduct', params).subscribe(data => {
@ -167,4 +169,69 @@ export class ApiMerchantsService {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName editApiIpAddress
* @Description //编辑ip地址
* @Date 09:25 2022/12/7
* @Param params: object, callBack
*/
public editApiIpAddress(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiIpAddress/editApiIpAddress', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName findByMchId
* @Description // 根据商户号查询详情
* @Date 11:18 2022/12/7
* @Param mchId: number, callBack
*/
public findByMchId(mchId: string, callBack) {
this.http.get(environment.baseUrl + 'apiIpAddress/findByMchId?mchId=' + mchId).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getSecConfigList
* @Description // 查询配置内容
* @Date 16:43 2022/12/7
* @Param mchId: string, callBack
*/
public getSecConfigList(mchId: string, callBack) {
this.http.get(environment.baseUrl + 'apiIpAddress/getSecConfigList?mchId=' + mchId).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName configMerchant
* @Description // 配置商户可用接口
* @Date 16:44 2022/12/7
* @Param params: object, callBack
*/
public configMerchant(params: object, callBack) {
this.http.post(environment.baseUrl + 'apiIpAddress/configMerchant', params).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getApiThirdOrderByList
* @Description // 查询API第三方订单列表
* @Date 09:59 2023/1/5
* @Param params: object, callBack
*/
public getApiThirdOrderByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'apiMerchants/getApiThirdOrderByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,39 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class FleetOilCardCarService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param param
* @param callBack
*/
public delete(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCardCar/delete', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public getCarList(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCardCar/getCarList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,39 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class FleetOilCardUserService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param param
* @param callBack
*/
public delete(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCardUser/delete', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public getUserList(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCardUser/getUserList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,148 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
@Injectable({
providedIn: 'root'
})
export class FleetOilCardService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
*
*
* @param param
* @param callBack
*/
public generateCard(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/generateCard', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public recharge(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/recharge', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public recycleAmount(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/recycleAmount', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public getCardList(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCard/getCardList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public getRecordList(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCard/getRecordList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public getCardOrderList(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCard/getCardOrderList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public exportCardOrder(param: object, callBack) {
this.http.get(environment.baseUrl + 'fleetOilCard/exportCardOrder' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public setContact(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/setContact', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public disabled(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/disabled', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public enable(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/enable', param).subscribe(data => {
callBack(data);
});
}
/**
*
*
* @param param
* @param callBack
*/
public exportCard(param: object, callBack) {
this.http.post(environment.baseUrl + 'fleetOilCard/exportCard', param).subscribe(data => {
callBack(data);
});
}
}

@ -101,6 +101,18 @@ export class RechargeService {
});
}
/**
* API充值话费订单
*
* @param paramsObject
* @param callBack
*/
public getApiRechargePhoneByList(paramsObject: object, callBack) {
this.http.get(environment.baseUrl + 'apiMerchants/getApiRechargePhoneByList?' + this.common.getWhereCondition(paramsObject)).subscribe(data => {
callBack(data);
});
}
/**
* id查询详情

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

@ -13,12 +13,21 @@
.fr {
float: right;
}
.ml {
margin-left: 20px;
}
.box-shadow:hover {
box-shadow: #e8e8e8 0 0 4px 2px;
}
.cp {
cursor: pointer;
}
.br {
border-right: solid 1px #e8e8ed;
}
.mt {
margin-top: 8px;
}
.inner-content {
padding: 24px;
background: #fff;

Loading…
Cancel
Save