- 编号 |
- 商户名称 |
+ 编号 |
+ 商户名称 |
联系人 |
- 电话 |
- 商户号 |
- 商户KEY |
- 操作人员 |
+ 电话 |
+ 商户号 |
+ 商户KEY |
+ 操作人员 |
创建时间 |
帐户余额 |
- 状态 |
+ 状态 |
操作 |
@@ -100,7 +101,7 @@
{{data.mchId }} |
{{data.apiKey }} |
{{data.operatorName }} |
- {{data.createTime | date: 'yyyy-MM-dd HH:mm'}} |
+ {{data.createTime | date: 'yyyy-MM-dd'}} |
¥{{data.amounts}} |
{{data.status== 100? '正常':'禁用'}} |
@@ -109,8 +110,10 @@
更多操作
@@ -137,7 +140,7 @@
商户电话
-
+
@@ -178,7 +181,7 @@
-
+
类型 |
@@ -244,7 +247,7 @@
-
+
编号 |
@@ -293,3 +296,22 @@
+
+
+
+
+ IP地址
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/admin/api-merchants/list/list.component.ts b/src/app/admin/api-merchants/list/list.component.ts
index c484ffb..d758b2b 100644
--- a/src/app/admin/api-merchants/list/list.component.ts
+++ b/src/app/admin/api-merchants/list/list.component.ts
@@ -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']);
+ }
+ });
+ }
+
}
diff --git a/src/app/admin/api-order/api-order-routing.module.ts b/src/app/admin/api-order/api-order-routing.module.ts
new file mode 100644
index 0000000..379f183
--- /dev/null
+++ b/src/app/admin/api-order/api-order-routing.module.ts
@@ -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 { }
diff --git a/src/app/admin/api-order/api-order.module.ts b/src/app/admin/api-order/api-order.module.ts
new file mode 100644
index 0000000..176403a
--- /dev/null
+++ b/src/app/admin/api-order/api-order.module.ts
@@ -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 { }
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.html b/src/app/admin/api-order/kfc-order/kfc-order.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.scss b/src/app/admin/api-order/kfc-order/kfc-order.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts b/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
new file mode 100644
index 0000000..0c474b2
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ KfcOrderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(KfcOrderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/api-order/kfc-order/kfc-order.component.ts b/src/app/admin/api-order/kfc-order/kfc-order.component.ts
new file mode 100644
index 0000000..4866982
--- /dev/null
+++ b/src/app/admin/api-order/kfc-order/kfc-order.component.ts
@@ -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();
+ }
+
+}
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.html b/src/app/admin/api-order/phone-order/phone-order.component.html
new file mode 100644
index 0000000..0637e86
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.html
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 运营商 |
+ 充值号码 |
+ 充值金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 支付方式 |
+ 充值状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ {{data.operators}} |
+ {{data.rechargeNumber}} |
+ ¥{{data.rechargePrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTimed | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.rechargeStatus | rechargeStatus}} |
+ {{data.payStatus | payStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.scss b/src/app/admin/api-order/phone-order/phone-order.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/phone-order/phone-order.component.ts b/src/app/admin/api-order/phone-order/phone-order.component.ts
new file mode 100644
index 0000000..88249e3
--- /dev/null
+++ b/src/app/admin/api-order/phone-order/phone-order.component.ts
@@ -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();
+ }
+
+
+
+
+}
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.html b/src/app/admin/api-order/starbucks-order/list/list.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.scss b/src/app/admin/api-order/starbucks-order/list/list.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/starbucks-order/list/list.component.ts b/src/app/admin/api-order/starbucks-order/list/list.component.ts
new file mode 100644
index 0000000..a6e363c
--- /dev/null
+++ b/src/app/admin/api-order/starbucks-order/list/list.component.ts
@@ -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();
+ }
+
+}
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
new file mode 100644
index 0000000..beee660
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.html
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+ 共计 {{total}} 条数据
+
+
+
+ 编号 |
+ 平台订单号 |
+ 第三方订单号 |
+ 订单金额 |
+ 下单金额 |
+ 生成时间 |
+ 支付时间 |
+ 订单状态 |
+ 支付状态 |
+
+
+
+
+ {{i + 1}} |
+ {{data.orderNo}} |
+ {{data.sourceOrderNo}} |
+ ¥{{data.orderPrice}} |
+ ¥{{data.payPrice}} |
+ {{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.callbackStatus | callbackStatus}} |
+ {{data.orderStatus | payCouponStatus}} |
+
+
+
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
new file mode 100644
index 0000000..b68da73
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.scss
@@ -0,0 +1,5 @@
+.table-td-operation {
+ a {
+ margin-left: 8px;
+ }
+}
diff --git a/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
new file mode 100644
index 0000000..50fbdad
--- /dev/null
+++ b/src/app/admin/api-order/vip-top-up-order/vip-top-up-order.component.ts
@@ -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();
+ }
+
+
+}
diff --git a/src/app/admin/api-product/list/list.component.html b/src/app/admin/api-product/list/list.component.html
index 7baf522..1664d23 100644
--- a/src/app/admin/api-product/list/list.component.html
+++ b/src/app/admin/api-product/list/list.component.html
@@ -75,6 +75,7 @@
class="table"
#ajaxTable
nzShowSizeChanger
+ nzBordered
[nzFrontPagination]="false"
[nzData]="requestData"
[nzLoading]="loading"
diff --git a/src/app/admin/cms/cms-content/cms-content.component.html b/src/app/admin/cms/cms-content/cms-content.component.html
index 3cecfd1..21aed05 100644
--- a/src/app/admin/cms/cms-content/cms-content.component.html
+++ b/src/app/admin/cms/cms-content/cms-content.component.html
@@ -1,213 +1,228 @@
-
- 内容管理
-
-
- 内容发布
-
+
+ 内容管理
+
+
+ 内容发布
+
-
-
-
+
+
+
+ 共搜索到 {{total}} 条数据
+
+
+
+
-
- 共计 {{total}} 条数据
-
-
-
+
-
+ (nzPageIndexChange)="getRequest()"
+ (nzPageSizeChange)="getRequest(true)"
+ [nzScroll]="{ x: '1150px'}">
+
序号 |
- 分类名称 |
- 内容标题 |
- 展示平台 |
- 状态 |
+ 分类名称 |
+ 内容标题 |
+ 简要描述 |
+ 访问总量 |
+ 是否推荐 |
+ 状态 |
创建时间 |
- 操作 |
+ 操作 |
-
- {{i+1}} |
- {{data.tag}} |
+
+ {{i+ 1}} |
+ {{data.categoryName}} |
{{data.title}} |
- {{data.platform | showType}} |
+ {{data.description}} |
+ {{data.visitCount}} |
- {{data.status == 1 ? '编辑中': '已发布'}}
+ 是
+ 否
|
- {{data.createTime | date:'yyyy-MM-dd hh:mm:ss' }} |
-
- 更多操作
-
-
-
+ |
+ 编辑中
+ 已发布
+ |
+ {{data.createTime | date:'yyyy-MM-dd' }} |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ 附件名称 |
+ 附件类型 |
+ 附件描述 |
+ 排序 |
+ 添加时间 |
+ 操作 |
+
+
+
+
+ {{ data.patchName }} |
+ 图片 |
+ 音频 |
+ 视频 |
+ 文档 |
+ 其他 |
+ {{data.patchDesc}} |
+ {{data.sort}} |
+ {{data.addTime | date:'yyyy-MM-dd'}} |
+
+
|
+
-
-
-
-
+
+
+ 是否邮递实物
+
+
+
+
+
- 是否预约产品
+ 是否预约产品
diff --git a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
index 89ca8f4..42612e2 100644
--- a/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
+++ b/src/app/admin/coupon/coupon-edit/coupon-edit.component.ts
@@ -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],
diff --git a/src/app/admin/discount/discount-edit/discount-edit.component.html b/src/app/admin/discount/discount-edit/discount-edit.component.html
index 46dd779..6fec6ac 100644
--- a/src/app/admin/discount/discount-edit/discount-edit.component.html
+++ b/src/app/admin/discount/discount-edit/discount-edit.component.html
@@ -45,8 +45,8 @@
优惠券使用归属
-
-
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html
new file mode 100644
index 0000000..e14fb10
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.html
@@ -0,0 +1,118 @@
+
+
+
+
+
+
+
+
+
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+
+
+
+
+
+ 序号 |
+ 车辆车牌 |
+ 车主姓名 |
+ 车主电话 |
+ 创建时间 |
+ 创建人 |
+ 操作 |
+
+
+
+
+ {{i+1}} |
+ {{data.carLicensePlate}} |
+ {{data.contactName}} |
+ {{data.contactPhone}} |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.opUserName}} |
+
+ 操作列表
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ 序号 |
+ 客户姓名 |
+ 客户电话 |
+ 失败原因 |
+
+
+
+
+ {{ i + 1}} |
+ {{data.contactName}} |
+ {{data.contactPhone}} |
+ {{data.errMsg}} |
+
+
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.scss b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.scss
new file mode 100644
index 0000000..690993b
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.scss
@@ -0,0 +1,3 @@
+.table-td-operation a {
+ padding: 0px 5px;
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.spec.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.spec.ts
new file mode 100644
index 0000000..0ec7d41
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FleetOilCardCarComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FleetOilCardCarComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.ts
new file mode 100644
index 0000000..55d8bf6
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-car/fleet-oil-card-car.component.ts
@@ -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";
+ }
+
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html
new file mode 100644
index 0000000..cce223b
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.html
@@ -0,0 +1,241 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+
+
+ 序号 |
+ 所属部门 |
+ 卡号 |
+ 余额 |
+ 消费金额 |
+ 联系人 |
+ 联系电话 |
+ 油卡状态 |
+
+ 生成时间 |
+ 操作 |
+
+
+
+
+ {{i+1}} |
+ {{data.orgName}} |
+ {{data.cardNo}} |
+ ¥{{data.amount}} |
+ ¥{{data.amountConsume}} |
+ {{data.contactName?data.contactName:'未设置'}} |
+ {{data.contactPhone?data.contactPhone:'未设置'}} |
+ {{data.status | oilCardStatus}} |
+
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+
+ 充值
+ 更多操作
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.scss b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.scss
new file mode 100644
index 0000000..690993b
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.scss
@@ -0,0 +1,3 @@
+.table-td-operation a {
+ padding: 0px 5px;
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.spec.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.spec.ts
new file mode 100644
index 0000000..7f281f1
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FleetOilCardListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FleetOilCardListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.ts
new file mode 100644
index 0000000..ef6a98d
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-list/fleet-oil-card-list.component.ts
@@ -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']
+ });
+ }
+ });
+ }
+
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.html
new file mode 100644
index 0000000..2734158
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.html
@@ -0,0 +1,167 @@
+
+
+
+
+
+
+
+
+
+
+
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+
+ 序号 |
+ 所属部门 |
+ 客户电话 |
+ 车牌 |
+ 油卡卡号 |
+ 交易单号 |
+ 加油金额 |
+ 优惠金额 |
+ 实付金额 |
+ 加油站 |
+ 油号 |
+ 油枪号 |
+ 油站枪价 |
+ 平台枪价 |
+ 交易状态 |
+ 创建时间 |
+ 支付时间 |
+ 退款时间 |
+
+
+
+
+
+ {{i+1}} |
+ {{data.orgName}} |
+ {{data.merPhone}} |
+ {{data.carLicensePlate!=null?data.carLicensePlate:'未知'}} |
+ {{data.memCardNo}} |
+ {{data.orderNo}} |
+
+ ¥{{data.totalPrice}} |
+ ¥{{data.deductionPrice}} |
+ ¥{{data.payRealPrice}} |
+ {{data.goodsName}} |
+ {{data.gasOilNo}} |
+ {{data.gasGunNo}} |
+ {{data.gasPriceGun}} |
+ {{data.platformPriceGun}} |
+ {{data.statusName}} |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+
+
+
+
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.scss b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.spec.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.spec.ts
new file mode 100644
index 0000000..2881cec
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FleetOilCardOrderComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FleetOilCardOrderComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.ts
new file mode 100644
index 0000000..7dacace
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-order/fleet-oil-card-order.component.ts
@@ -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']
+ });
+ }
+ });
+ }
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.html
new file mode 100644
index 0000000..1417aec
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.html
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+
+
+
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+ 序号 |
+ 油卡卡号 |
+ 账单类型 |
+ 交易金额 |
+ 交易前金额 |
+ 交易后金额 |
+ 来源类型 |
+ 来源流水号 |
+ 来源内容 |
+ 操作人类型 |
+ 操作人名称 |
+ 操作人电话 |
+ 创建时间 |
+
+
+
+
+
+ {{i+1}} |
+ {{data.fleetOilCardNo}} |
+ {{data.type | oilCardRecordType}} |
+ ¥{{data.transactionAmount}} |
+ ¥{{data.beforeAmount}} |
+ ¥{{data.afterAmount}} |
+ {{data.sourceType | oilCardRecordSourceType}} |
+ {{data.sourceOrderNo}} |
+ {{data.sourceContent}} |
+
+ 未知
+ 管理员
+ 客户
+ |
+ {{data.opUserName}} |
+ {{data.opUserPhone}} |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+
+
+
+
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.scss b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.scss
new file mode 100644
index 0000000..690993b
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.scss
@@ -0,0 +1,3 @@
+.table-td-operation a {
+ padding: 0px 5px;
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.spec.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.spec.ts
new file mode 100644
index 0000000..961d719
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FleetOilCardRecordComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FleetOilCardRecordComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.ts
new file mode 100644
index 0000000..afc44c4
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-record/fleet-oil-card-record.component.ts
@@ -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();
+ }
+
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-routing.module.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-routing.module.ts
new file mode 100644
index 0000000..09c831f
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-routing.module.ts
@@ -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 { }
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html
new file mode 100644
index 0000000..f3eb7c0
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.html
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+
+ 共计 {{dataObject.total?dataObject.total:0}} 条数据
+
+
+
+
+
+
+
+
+
+
+
+
+ 序号 |
+ 客户姓名 |
+ 客户电话 |
+ 消费总额 |
+ 最近消费 |
+ 创建时间 |
+ 创建人 |
+ 操作 |
+
+
+
+
+ {{i+1}} |
+ {{data.contactName}} |
+ {{data.contactPhone}} |
+ ¥{{data.amountConsume}} |
+
+ 未消费
+ {{data.latelyConsumeTime | date : 'yyyy-MM-dd HH:mm:ss'}}
+ |
+ {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} |
+ {{data.opUserName}} |
+
+ 操作列表
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+ 序号 |
+ 客户姓名 |
+ 客户电话 |
+ 失败原因 |
+
+
+
+
+ {{ i + 1}} |
+ {{data.contactName}} |
+ {{data.contactPhone}} |
+ {{data.errMsg}} |
+
+
+
+
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.scss b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.scss
new file mode 100644
index 0000000..690993b
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.scss
@@ -0,0 +1,3 @@
+.table-td-operation a {
+ padding: 0px 5px;
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.spec.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.spec.ts
new file mode 100644
index 0000000..dc56ada
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.spec.ts
@@ -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;
+
+ beforeEach(async(() => {
+ TestBed.configureTestingModule({
+ declarations: [ FleetOilCardUserListComponent ]
+ })
+ .compileComponents();
+ }));
+
+ beforeEach(() => {
+ fixture = TestBed.createComponent(FleetOilCardUserListComponent);
+ component = fixture.componentInstance;
+ fixture.detectChanges();
+ });
+
+ it('should create', () => {
+ expect(component).toBeTruthy();
+ });
+});
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.ts b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.ts
new file mode 100644
index 0000000..d1a42c0
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card-user-list/fleet-oil-card-user-list.component.ts
@@ -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";
+ }
+
+}
diff --git a/src/app/admin/fleet-oil-card/fleet-oil-card.module.ts b/src/app/admin/fleet-oil-card/fleet-oil-card.module.ts
new file mode 100644
index 0000000..e173d53
--- /dev/null
+++ b/src/app/admin/fleet-oil-card/fleet-oil-card.module.ts
@@ -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 { }
diff --git a/src/app/admin/gas-oil-price/oil-price-task-edit/oil-price-task-edit.component.ts b/src/app/admin/gas-oil-price/oil-price-task-edit/oil-price-task-edit.component.ts
index 9befb57..092465d 100644
--- a/src/app/admin/gas-oil-price/oil-price-task-edit/oil-price-task-edit.component.ts
+++ b/src/app/admin/gas-oil-price/oil-price-task-edit/oil-price-task-edit.component.ts
@@ -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',
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.html b/src/app/admin/index/api-merchant/api-merchant.component.html
new file mode 100644
index 0000000..13b1859
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.html
@@ -0,0 +1,39 @@
+
+
+
+
+ 接口信息
+
+
+
+ 商户号(mchId):{{apiMerchants['mchId']}}
+ 密钥(apiKey):{{apiMerchants['apiKey']}}
+ IP白名单:{{apiMerchants['ext1']}}
+
+
+
+
+
+ 已开通产品
+
+
+
+ {{item['codeType'] | productConfig}}
+
+
+
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.scss b/src/app/admin/index/api-merchant/api-merchant.component.scss
new file mode 100644
index 0000000..2b3e6a6
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.scss
@@ -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;
+}
diff --git a/src/app/admin/index/api-merchant/api-merchant.component.ts b/src/app/admin/index/api-merchant/api-merchant.component.ts
new file mode 100644
index 0000000..bcdc9bc
--- /dev/null
+++ b/src/app/admin/index/api-merchant/api-merchant.component.ts
@@ -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'];
+ }
+ });
+ }
+
+}
diff --git a/src/app/admin/index/index.module.ts b/src/app/admin/index/index.module.ts
index 8f89def..2145e88 100644
--- a/src/app/admin/index/index.module.ts
+++ b/src/app/admin/index/index.module.ts
@@ -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,
diff --git a/src/app/admin/index/index/index.component.html b/src/app/admin/index/index/index.component.html
index e0f1fa8..a18c7f9 100644
--- a/src/app/admin/index/index/index.component.html
+++ b/src/app/admin/index/index/index.component.html
@@ -1,9 +1,9 @@
-
-
- 首页
-
-
+
+
+
+
+
@@ -166,6 +166,8 @@
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.html b/src/app/admin/index/order-statistics/order-statistics.component.html
new file mode 100644
index 0000000..2d36490
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.html
@@ -0,0 +1,15 @@
+
+
+
+ 订单统计汇总
+
+
+
+
+
+
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.scss b/src/app/admin/index/order-statistics/order-statistics.component.scss
new file mode 100644
index 0000000..e69de29
diff --git a/src/app/admin/index/order-statistics/order-statistics.component.ts b/src/app/admin/index/order-statistics/order-statistics.component.ts
new file mode 100644
index 0000000..f8ed86d
--- /dev/null
+++ b/src/app/admin/index/order-statistics/order-statistics.component.ts
@@ -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)'
+ }
+ }
+ ]
+ };
+ }
+
+}
diff --git a/src/app/admin/merchant-store/store-edit/store-edit.component.html b/src/app/admin/merchant-store/store-edit/store-edit.component.html
index ca9b096..a12b00e 100644
--- a/src/app/admin/merchant-store/store-edit/store-edit.component.html
+++ b/src/app/admin/merchant-store/store-edit/store-edit.component.html
@@ -52,7 +52,6 @@
-
diff --git a/src/app/admin/oil-card/oil-card-order/oil-card-order.component.html b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.html
index 31953f2..fb8e1c3 100644
--- a/src/app/admin/oil-card/oil-card-order/oil-card-order.component.html
+++ b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.html
@@ -97,15 +97,15 @@
用户手机号 |
油卡卡号 |
平台订单号 |
- 团油订单号 |
+
加油金额 |
优惠金额 |
实付金额 |
加油站 |
油号 |
油枪号 |
- 团油油枪价 |
- 平台油枪价格 |
+ 油站枪价 |
+ 平台枪价 |
订单状态 |
创建时间 |
支付时间 |
@@ -120,7 +120,7 @@
{{data.merPhone}} |
{{data.memCardNo}} |
{{data.orderNo}} |
- {{data.gasOrderNo}} |
+
¥{{data.totalPrice}} |
¥{{data.deductionPrice}} |
¥{{data.payRealPrice}} |
diff --git a/src/app/admin/order/order-list/order-list.component.html b/src/app/admin/order/order-list/order-list.component.html
index dbdee41..dd79c40 100644
--- a/src/app/admin/order/order-list/order-list.component.html
+++ b/src/app/admin/order/order-list/order-list.component.html
@@ -147,7 +147,7 @@
支付时间 |
取消时间 |
状态 |
-
+ 操作 |
@@ -167,10 +167,10 @@
{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.cancelTime | date: 'yyyy-MM-dd HH:mm:ss'}} |
{{data.orderStatus}} |
-
-
-
-
+
+ 订单详情
+
+ |
@@ -185,3 +185,20 @@
+
+
+ {{orderDetail['highChildOrderList'][0]['goodsName']}}
+ {{orderDetail['payType'] | paytype}}
+ {{orderDetail['payPrice']}}
+ {{orderDetail['memName']}}
+ {{orderDetail['memPhone']}}
+ {{orderDetail['orderNo']}}
+ {{orderDetail['createTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['payTime'] | date: 'yyyy-MM-dd HH:mm:ss'}}
+ {{orderDetail['orderStatus'] | orderCouponStatus}}
+ {{postData['address']}}
+ {{postData['user']}}
+ {{postData['phone']}}
+
+
+
diff --git a/src/app/admin/order/order-list/order-list.component.ts b/src/app/admin/order/order-list/order-list.component.ts
index 95f3280..95756da 100644
--- a/src/app/admin/order/order-list/order-list.component.ts
+++ b/src/app/admin/order/order-list/order-list.component.ts
@@ -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
- }
- }).then(r => console.log(r));
+ this.isVisibleDetail = true;
+ this.order.getOrderById(id , data => {
+ if (data['return_code'] === '000000') {
+ console.log(data);
+ this.orderDetail = data['return_data'];
+ if (this.orderDetail['remarks'] != null) {
+ this.postData = JSON.parse(this.orderDetail['remarks']);
+ console.log(this.postData['address']);
+
+ }
+ } else {
+ this.message.error(data['return_msg']);
+ }
+ });
}
// 下载模板
diff --git a/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts b/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
index efe8b85..712d03d 100644
--- a/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
+++ b/src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
@@ -23,8 +23,6 @@ export class PromotionOrderListComponent implements OnInit {
pageSize = 10; // 条码
loading = true;
-
-
constructor(
private form: FormBuilder,
private distribution: DistributionService,
diff --git a/src/app/admin/recharge-order/order-list/order-list.component.ts b/src/app/admin/recharge-order/order-list/order-list.component.ts
index c0dbef2..5d098b5 100644
--- a/src/app/admin/recharge-order/order-list/order-list.component.ts
+++ b/src/app/admin/recharge-order/order-list/order-list.component.ts
@@ -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({
diff --git a/src/app/app-common.module.ts b/src/app/app-common.module.ts
index 1636912..4c35740 100644
--- a/src/app/app-common.module.ts
+++ b/src/app/app-common.module.ts
@@ -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,
+
],
})
diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts
index c1fc476..838100b 100644
--- a/src/app/app-routing.module.ts
+++ b/src/app/app-routing.module.ts
@@ -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]
+ },
],
},
];
diff --git a/src/app/pipes/apiMerchant/callback-status.pipe.ts b/src/app/pipes/apiMerchant/callback-status.pipe.ts
new file mode 100644
index 0000000..9374a35
--- /dev/null
+++ b/src/app/pipes/apiMerchant/callback-status.pipe.ts
@@ -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 '预备回调';
+ }
+ }
+
+}
diff --git a/src/app/pipes/company-amount/company-amount-record-source-type.pipe.ts b/src/app/pipes/company-amount/company-amount-record-source-type.pipe.ts
index d95af63..be219fd 100644
--- a/src/app/pipes/company-amount/company-amount-record-source-type.pipe.ts
+++ b/src/app/pipes/company-amount/company-amount-record-source-type.pipe.ts
@@ -10,9 +10,11 @@ export class CompanyAmountRecordSourceTypePipe implements PipeTransform {
case 1:
return '金额充值';
case 2:
- return '油卡充值';
+ return '个人油卡充值';
case 3:
return '回收余额';
+ case 4:
+ return '车队油卡充值';
}
}
diff --git a/src/app/pipes/index.ts b/src/app/pipes/index.ts
index ac0d595..c07a89f 100644
--- a/src/app/pipes/index.ts
+++ b/src/app/pipes/index.ts
@@ -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';
diff --git a/src/app/pipes/index/product-config.pipe.ts b/src/app/pipes/index/product-config.pipe.ts
new file mode 100644
index 0000000..51d4f7a
--- /dev/null
+++ b/src/app/pipes/index/product-config.pipe.ts
@@ -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 '星巴克接口';
+ }
+ }
+
+}
diff --git a/src/app/pipes/msg/msg-type.pipe.ts b/src/app/pipes/msg/msg-type.pipe.ts
index 60156f9..a1e7b92 100644
--- a/src/app/pipes/msg/msg-type.pipe.ts
+++ b/src/app/pipes/msg/msg-type.pipe.ts
@@ -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;
- // }
-
}
diff --git a/src/app/pipes/order/pay-coupon-status.pipe.ts b/src/app/pipes/order/pay-coupon-status.pipe.ts
new file mode 100644
index 0000000..31a3a5c
--- /dev/null
+++ b/src/app/pipes/order/pay-coupon-status.pipe.ts
@@ -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 '拒绝退款';
+ }
+ }
+}
diff --git a/src/app/services/api-merchants.service.ts b/src/app/services/api-merchants.service.ts
index 90058db..2cf456e 100644
--- a/src/app/services/api-merchants.service.ts
+++ b/src/app/services/api-merchants.service.ts
@@ -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);
+ });
+ }
}
diff --git a/src/app/services/fleet-oil-card-car.service.ts b/src/app/services/fleet-oil-card-car.service.ts
new file mode 100644
index 0000000..6db2272
--- /dev/null
+++ b/src/app/services/fleet-oil-card-car.service.ts
@@ -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);
+ });
+ }
+}
diff --git a/src/app/services/fleet-oil-card-user.service.ts b/src/app/services/fleet-oil-card-user.service.ts
new file mode 100644
index 0000000..100f452
--- /dev/null
+++ b/src/app/services/fleet-oil-card-user.service.ts
@@ -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);
+ });
+ }
+}
diff --git a/src/app/services/fleet-oil-card.service.ts b/src/app/services/fleet-oil-card.service.ts
new file mode 100644
index 0000000..df4551b
--- /dev/null
+++ b/src/app/services/fleet-oil-card.service.ts
@@ -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);
+ });
+ }
+
+}
diff --git a/src/app/services/recharge.service.ts b/src/app/services/recharge.service.ts
index b93adca..fd7cf05 100644
--- a/src/app/services/recharge.service.ts
+++ b/src/app/services/recharge.service.ts
@@ -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查询详情
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 3f59405..5bf5f9a 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -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=',
diff --git a/src/styles.scss b/src/styles.scss
index 08e907c..90784fb 100644
--- a/src/styles.scss
+++ b/src/styles.scss
@@ -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;
|