diff --git a/src/app/admin/company-amount/company-amount-record/company-amount-record.component.html b/src/app/admin/company-amount/company-amount-record/company-amount-record.component.html index 8345660..92e6c2c 100644 --- a/src/app/admin/company-amount/company-amount-record/company-amount-record.component.html +++ b/src/app/admin/company-amount/company-amount-record/company-amount-record.component.html @@ -89,13 +89,13 @@ 部门 - 类型 + 类型 交易金额 - 变更前金额 - 变更后金额 + 变更前金额 + 变更后金额 来源类型 - 来源内容 - 操作人 + 来源内容 + 操作人 记录时间 diff --git a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html index 45850fc..dd88428 100644 --- a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html +++ b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.html @@ -185,6 +185,7 @@
  • 启用
  • 变更记录
  • 油卡账单
  • +
  • 消费订单
  • diff --git a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.ts b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.ts index 5f5f5a9..4d2fa90 100644 --- a/src/app/admin/oil-card/oil-card-list/oil-card-list.component.ts +++ b/src/app/admin/oil-card/oil-card-list/oil-card-list.component.ts @@ -34,6 +34,7 @@ export class OilCardListComponent implements OnInit { editContactModal = false; editContactForm: FormGroup; + editContactData = {}; rechargeModal = false; rechargeForm: FormGroup; @@ -213,6 +214,7 @@ export class OilCardListComponent implements OnInit { */ showEditContactModal(data: object) { this.editContactForm.patchValue(data); + this.editContactData = data; this.editContactModal = true; } @@ -228,10 +230,10 @@ export class OilCardListComponent implements OnInit { * 提交编辑联系人 */ submitEditContact() { - if (this.editContactForm.value['bindStatus'] === 1) { + if (this.editContactData['contactPhone'] != null && this.editContactData['contactPhone'] !== this.editContactForm.value.contactPhone) { this.modal.confirm({ nzTitle: '警告', - nzContent: '油卡更换联系人后,油卡会自动与用户解绑!', + nzContent: '油卡更换联系电话后,油卡会自动与用户解绑!', nzOkText: '是', nzCancelText: '否', nzOkType: 'danger', 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 new file mode 100644 index 0000000..31953f2 --- /dev/null +++ b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.html @@ -0,0 +1,148 @@ + + + + + + +
    +
    +
    +
    + + 部门 + + + + + + +
    + +
    + + 油卡卡号 + + + + +
    + +
    + + 加油站 + + + + +
    + +
    + + 订单状态 + + + + + + + + + + +
    + +
    + + 支付时间 + + + + +
    + +
    + +
    +
    + + +
    +
    +
    +
    + +
    + 共计 {{dataObject.total?dataObject.total:0}} 条数据 +
    + +
    + + + + + + 序号 + 所属部门 + 用户手机号 + 油卡卡号 + 平台订单号 + 团油订单号 + 加油金额 + 优惠金额 + 实付金额 + 加油站 + 油号 + 油枪号 + 团油油枪价 + 平台油枪价格 + 订单状态 + 创建时间 + 支付时间 + 退款时间 + + + + + + {{i+1}} + {{data.orgName}} + {{data.merPhone}} + {{data.memCardNo}} + {{data.orderNo}} + {{data.gasOrderNo}} + ¥{{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/oil-card/oil-card-order/oil-card-order.component.scss b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/admin/oil-card/oil-card-order/oil-card-order.component.spec.ts b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.spec.ts new file mode 100644 index 0000000..85c88bc --- /dev/null +++ b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { OilCardOrderComponent } from './oil-card-order.component'; + +describe('OilCardOrderComponent', () => { + let component: OilCardOrderComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ OilCardOrderComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(OilCardOrderComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/admin/oil-card/oil-card-order/oil-card-order.component.ts b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.ts new file mode 100644 index 0000000..3283393 --- /dev/null +++ b/src/app/admin/oil-card/oil-card-order/oil-card-order.component.ts @@ -0,0 +1,131 @@ +import { Component, OnInit } from '@angular/core'; +import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms'; +import {NzMessageService, NzModalService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd'; +import {LocalStorageService} from '../../../services/local-storage.service'; +import {OilCardService} from '../../../services/oil-card.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@9.0.7@@angular/router'; +import {ADMIN_INFO_OBJECT} from '../../../services/local-storage.namespace'; +import {environment} from "../../../../environments/environment"; + +@Component({ + selector: 'app-oil-card-order', + templateUrl: './oil-card-order.component.html', + styleUrls: ['./oil-card-order.component.scss'] +}) +export class OilCardOrderComponent implements OnInit { + FILE_URL = environment.imageUrl; + roleType; + adminFlag; + loadingObject = { + spinning: false, + msg: '加载中' + }; + + dataObject: any = {}; + tableLoading = true; + searchForm: FormGroup; + pageNum: number; + whereObject: any = {}; + + cardNo: string; + orgArray = []; + + constructor(private modal: NzModalService, + private message: NzMessageService, + private store: LocalStorageService, + private oilCardService: OilCardService, + 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], + status: [null], + payTime: [null], + payTimeS: [null], + payTimeE: [null], + }); + this.activatedRoute.queryParams.subscribe(queryParams => { + if (queryParams['cardNo'] != null) { + this.cardNo = queryParams['cardNo']; + } + }); + + 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; + } + 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/oil-card/oil-card-record-list/oil-card-record-list.component.html b/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.html index 457bd45..6ce7fce 100644 --- a/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.html +++ b/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.html @@ -32,6 +32,15 @@ +
    + + 来源流水号 + + + + +
    +
    创建时间 @@ -79,7 +88,8 @@ 交易前金额 交易后金额 来源类型 - 来源内容 + 来源流水号 + 来源内容 操作人 创建时间 @@ -94,6 +104,7 @@ ¥{{data.beforeAmount}} ¥{{data.afterAmount}} {{data.sourceType | oilCardRecordSourceType}} + {{data.sourceOrderNo}} {{data.sourceContent}} {{data.opUserName}} {{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}} diff --git a/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.ts b/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.ts index 9bd8bee..ffde5d6 100644 --- a/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.ts +++ b/src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.ts @@ -47,6 +47,7 @@ export class OilCardRecordListComponent implements OnInit { this.searchForm = this.form.group({ type: [null], sourceType: [null], + sourceOrderNo: [null], createTime: [null], createTimeS: [null], createTimeE: [null], diff --git a/src/app/admin/oil-card/oil-card-routing.module.ts b/src/app/admin/oil-card/oil-card-routing.module.ts index 92d8ba8..882af56 100644 --- a/src/app/admin/oil-card/oil-card-routing.module.ts +++ b/src/app/admin/oil-card/oil-card-routing.module.ts @@ -3,11 +3,13 @@ import { Routes, RouterModule } from '@angular/router'; import {OilCardListComponent} from './oil-card-list/oil-card-list.component'; import {OilCardRecordListComponent} from './oil-card-record-list/oil-card-record-list.component'; import {OilCardOpRecordListComponent} from './oil-card-op-record-list/oil-card-op-record-list.component'; +import {OilCardOrderComponent} from "./oil-card-order/oil-card-order.component"; const routes: Routes = [ { path: 'list', component: OilCardListComponent}, { path: 'record-list', component: OilCardRecordListComponent}, { path: 'record-op-list', component: OilCardOpRecordListComponent}, + { path: 'order', component: OilCardOrderComponent}, ]; @NgModule({ diff --git a/src/app/admin/oil-card/oil-card.module.ts b/src/app/admin/oil-card/oil-card.module.ts index b9b7618..1779229 100644 --- a/src/app/admin/oil-card/oil-card.module.ts +++ b/src/app/admin/oil-card/oil-card.module.ts @@ -10,10 +10,11 @@ import {AppCommonModule} from '../../app-common.module'; import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts'; import { OilCardRecordListComponent } from './oil-card-record-list/oil-card-record-list.component'; import { OilCardOpRecordListComponent } from './oil-card-op-record-list/oil-card-op-record-list.component'; +import { OilCardOrderComponent } from './oil-card-order/oil-card-order.component'; @NgModule({ - declarations: [OilCardListComponent, OilCardRecordListComponent, OilCardOpRecordListComponent], + declarations: [OilCardListComponent, OilCardRecordListComponent, OilCardOpRecordListComponent, OilCardOrderComponent], imports: [ CommonModule, OilCardRoutingModule, diff --git a/src/app/services/oil-card.service.ts b/src/app/services/oil-card.service.ts index f0e45dd..ff80a0c 100644 --- a/src/app/services/oil-card.service.ts +++ b/src/app/services/oil-card.service.ts @@ -120,4 +120,29 @@ export class OilCardService { callBack(data); }); } + + /** + * 油卡订单列表 + * + * @param param 参数对象 + * @param callBack 回调 + */ + public getCardOrderList(param: object, callBack) { + this.http.get(environment.baseUrl + 'oilCard/getCardOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + + /** + * 导出油卡订单 + * + * @param param 参数对象 + * @param callBack 回调 + */ + public exportCardOrder(param: object, callBack) { + this.http.get(environment.baseUrl + 'oilCard/exportCardOrder?' + this.common.getWhereCondition(param)).subscribe(data => { + callBack(data); + }); + } + } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index a2d6d6f..21ad46f 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,10 +4,10 @@ export const environment = { production: false, - baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) - imageUrl: 'http://localhost:9302/filesystem/', - // baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) - // imageUrl: 'https://hsgcs.dctpay.com/filesystem/', + // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) + // imageUrl: 'http://localhost:9302/filesystem/', + baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) + imageUrl: 'https://hsgcs.dctpay.com/filesystem/', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', };