提交代码

pull/1/head
胡锐 3 years ago
parent 387a765008
commit 0acfbc7a94
  1. 10
      src/app/admin/company-amount/company-amount-record/company-amount-record.component.html
  2. 1
      src/app/admin/oil-card/oil-card-list/oil-card-list.component.html
  3. 6
      src/app/admin/oil-card/oil-card-list/oil-card-list.component.ts
  4. 148
      src/app/admin/oil-card/oil-card-order/oil-card-order.component.html
  5. 0
      src/app/admin/oil-card/oil-card-order/oil-card-order.component.scss
  6. 25
      src/app/admin/oil-card/oil-card-order/oil-card-order.component.spec.ts
  7. 131
      src/app/admin/oil-card/oil-card-order/oil-card-order.component.ts
  8. 13
      src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.html
  9. 1
      src/app/admin/oil-card/oil-card-record-list/oil-card-record-list.component.ts
  10. 2
      src/app/admin/oil-card/oil-card-routing.module.ts
  11. 3
      src/app/admin/oil-card/oil-card.module.ts
  12. 25
      src/app/services/oil-card.service.ts
  13. 8
      src/environments/environment.ts

@ -89,13 +89,13 @@
<thead> <thead>
<tr> <tr>
<th nzWidth="80px" *ngIf="roleType == 5 && adminFlag == 1">部门</th> <th nzWidth="80px" *ngIf="roleType == 5 && adminFlag == 1">部门</th>
<th nzWidth="50px">类型</th> <th nzWidth="70px">类型</th>
<th nzWidth="80px">交易金额</th> <th nzWidth="80px">交易金额</th>
<th nzWidth="80px">变更前金额</th> <th nzWidth="100px">变更前金额</th>
<th nzWidth="80px">变更后金额</th> <th nzWidth="100px">变更后金额</th>
<th nzWidth="80px">来源类型</th> <th nzWidth="80px">来源类型</th>
<th nzWidth="250px">来源内容</th> <th nzWidth="300px">来源内容</th>
<th nzWidth="100px">操作人</th> <th nzWidth="130px">操作人</th>
<th nzWidth="150px">记录时间</th> <th nzWidth="150px">记录时间</th>
<!-- <th nzWidth="100px" nzRight="0px">操作</th>--> <!-- <th nzWidth="100px" nzRight="0px">操作</th>-->
</tr> </tr>

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

@ -34,6 +34,7 @@ export class OilCardListComponent implements OnInit {
editContactModal = false; editContactModal = false;
editContactForm: FormGroup; editContactForm: FormGroup;
editContactData = {};
rechargeModal = false; rechargeModal = false;
rechargeForm: FormGroup; rechargeForm: FormGroup;
@ -213,6 +214,7 @@ export class OilCardListComponent implements OnInit {
*/ */
showEditContactModal(data: object) { showEditContactModal(data: object) {
this.editContactForm.patchValue(data); this.editContactForm.patchValue(data);
this.editContactData = data;
this.editContactModal = true; this.editContactModal = true;
} }
@ -228,10 +230,10 @@ export class OilCardListComponent implements OnInit {
* *
*/ */
submitEditContact() { submitEditContact() {
if (this.editContactForm.value['bindStatus'] === 1) { if (this.editContactData['contactPhone'] != null && this.editContactData['contactPhone'] !== this.editContactForm.value.contactPhone) {
this.modal.confirm({ this.modal.confirm({
nzTitle: '警告', nzTitle: '警告',
nzContent: '油卡更换联系后,油卡会自动与用户解绑!', nzContent: '油卡更换联系电话后,油卡会自动与用户解绑!',
nzOkText: '是', nzOkText: '是',
nzCancelText: '否', nzCancelText: '否',
nzOkType: 'danger', nzOkType: 'danger',

@ -0,0 +1,148 @@
<!-- start 面包屑 -->
<app-breadcrumb></app-breadcrumb>
<!-- end 面包屑 -->
<!--条件搜索-->
<nz-spin [nzSpinning]="loadingObject.spinning" nzTip="{{loadingObject.msg}}">
<div class="inner-content">
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)">
<div nz-row>
<div nz-col nzSpan="8" *ngIf="roleType == 5 && adminFlag == 1">
<nz-form-item>
<nz-form-label [nzSpan]="8">部门</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="orgId">
<nz-option *ngFor="let item of orgArray" nzLabel="{{item.name}}" nzValue="{{item.id}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8" *ngIf="this.cardNo == null">
<nz-form-item>
<nz-form-label [nzSpan]="8">油卡卡号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="cardNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">加油站</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="goodsName" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">订单状态</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-select nzShowSearch nzAllowClear formControlName="status">
<nz-option nzLabel="已支付" nzValue="2"></nz-option>
<nz-option nzLabel="已完成" nzValue="3"></nz-option>
<nz-option nzLabel="已退款" nzValue="4"></nz-option>
<nz-option nzLabel="退款中" nzValue="6"></nz-option>
<nz-option nzLabel="退款失败" nzValue="7"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">支付时间</nz-form-label>
<nz-form-control [nzSpan]="14">
<nz-range-picker
formControlName="payTime"
[nzShowTime]="{ nzHideDisabledOptions: true}"
nzFormat="yyyy-MM-dd HH:mm:ss"
></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
</div>
<div nz-row>
<div nz-col nzSpan="24" class="search-button">
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button>
<button nz-button nzType="default" (click)="resetForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button>
</div>
</div>
</form>
</div>
<div class="inner-content">
<span>共计 {{dataObject.total?dataObject.total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="excelCardOrder()"><i nz-icon nzType="import" nzTheme="outline"></i>导出订单</button>
</div>
<!--数组表格 -->
<nz-table #basicTable
[nzData]="dataObject.list"
[nzTotal]="dataObject.total"
[nzFrontPagination]="false"
[nzLoading]="tableLoading"
[nzPageIndex]="whereObject.pageNum"
(nzPageIndexChange)="requestData($event)"
[nzScroll]="{ x: '1100px'}">
<thead>
<tr>
<th nzWidth="60px">序号</th>
<th *ngIf="roleType == 5 && adminFlag == 1" nzWidth="150px">所属部门</th>
<th *ngIf="roleType == 5 && adminFlag == 1" nzWidth="120px">用户手机号</th>
<th nzWidth="160px">油卡卡号</th>
<th nzWidth="200px">平台订单号</th>
<th nzWidth="230px">团油订单号</th>
<th nzWidth="100px">加油金额</th>
<th nzWidth="100px">优惠金额</th>
<th nzWidth="100px">实付金额</th>
<th nzWidth="200px">加油站</th>
<th nzWidth="70px">油号</th>
<th nzWidth="80px">油枪号</th>
<th nzWidth="110px">团油油枪价</th>
<th nzWidth="120px">平台油枪价格</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="160px">创建时间</th>
<th nzWidth="160px">支付时间</th>
<th nzWidth="160px">退款时间</th>
<!-- <th nzWidth="160px" nzRight="0px">操作</th>-->
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index">
<td>{{i+1}}</td>
<td *ngIf="roleType == 5 && adminFlag == 1">{{data.orgName}}</td>
<td *ngIf="roleType == 5 && adminFlag == 1">{{data.merPhone}}</td>
<td>{{data.memCardNo}}</td>
<td>{{data.orderNo}}</td>
<td>{{data.gasOrderNo}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.deductionPrice}}</td>
<td>¥{{data.payRealPrice}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.gasOilNo}}</td>
<td>{{data.gasGunNo}}</td>
<td>{{data.gasPriceGun}}</td>
<td>{{data.platformPriceGun}}</td>
<td>{{data.statusName}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<!-- <td nzRight="0px" class="table-td-operation">
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item><a></a></li>
</ul>
</nz-dropdown-menu>
</td>-->
</tr>
</tbody>
</nz-table>
</div>
</nz-spin>

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

@ -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']
});
}
});
}
}

@ -32,6 +32,15 @@
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col nzSpan="8">
<nz-form-item>
<nz-form-label [nzSpan]="8">来源流水号</nz-form-label>
<nz-form-control [nzSpan]="14">
<input nz-input formControlName="sourceOrderNo" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8"> <div nz-col nzSpan="8">
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="8">创建时间</nz-form-label> <nz-form-label [nzSpan]="8">创建时间</nz-form-label>
@ -79,7 +88,8 @@
<th nzWidth="120px">交易前金额</th> <th nzWidth="120px">交易前金额</th>
<th nzWidth="120px">交易后金额</th> <th nzWidth="120px">交易后金额</th>
<th nzWidth="100px">来源类型</th> <th nzWidth="100px">来源类型</th>
<th nzWidth="200px">来源内容</th> <th nzWidth="200px">来源流水号</th>
<th nzWidth="400px">来源内容</th>
<th nzWidth="80px">操作人</th> <th nzWidth="80px">操作人</th>
<th nzWidth="160px">创建时间</th> <th nzWidth="160px">创建时间</th>
<!-- <th nzWidth="160px" nzRight="0px">操作</th>--> <!-- <th nzWidth="160px" nzRight="0px">操作</th>-->
@ -94,6 +104,7 @@
<td>¥{{data.beforeAmount}}</td> <td>¥{{data.beforeAmount}}</td>
<td>¥{{data.afterAmount}}</td> <td>¥{{data.afterAmount}}</td>
<td>{{data.sourceType | oilCardRecordSourceType}}</td> <td>{{data.sourceType | oilCardRecordSourceType}}</td>
<td>{{data.sourceOrderNo}}</td>
<td>{{data.sourceContent}}</td> <td>{{data.sourceContent}}</td>
<td>{{data.opUserName}}</td> <td>{{data.opUserName}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>

@ -47,6 +47,7 @@ export class OilCardRecordListComponent implements OnInit {
this.searchForm = this.form.group({ this.searchForm = this.form.group({
type: [null], type: [null],
sourceType: [null], sourceType: [null],
sourceOrderNo: [null],
createTime: [null], createTime: [null],
createTimeS: [null], createTimeS: [null],
createTimeE: [null], createTimeE: [null],

@ -3,11 +3,13 @@ import { Routes, RouterModule } from '@angular/router';
import {OilCardListComponent} from './oil-card-list/oil-card-list.component'; import {OilCardListComponent} from './oil-card-list/oil-card-list.component';
import {OilCardRecordListComponent} from './oil-card-record-list/oil-card-record-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 {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 = [ const routes: Routes = [
{ path: 'list', component: OilCardListComponent}, { path: 'list', component: OilCardListComponent},
{ path: 'record-list', component: OilCardRecordListComponent}, { path: 'record-list', component: OilCardRecordListComponent},
{ path: 'record-op-list', component: OilCardOpRecordListComponent}, { path: 'record-op-list', component: OilCardOpRecordListComponent},
{ path: 'order', component: OilCardOrderComponent},
]; ];
@NgModule({ @NgModule({

@ -10,10 +10,11 @@ import {AppCommonModule} from '../../app-common.module';
import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts'; import {NgxEchartsModule} from '_ngx-echarts@4.2.2@ngx-echarts';
import { OilCardRecordListComponent } from './oil-card-record-list/oil-card-record-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 { OilCardOpRecordListComponent } from './oil-card-op-record-list/oil-card-op-record-list.component';
import { OilCardOrderComponent } from './oil-card-order/oil-card-order.component';
@NgModule({ @NgModule({
declarations: [OilCardListComponent, OilCardRecordListComponent, OilCardOpRecordListComponent], declarations: [OilCardListComponent, OilCardRecordListComponent, OilCardOpRecordListComponent, OilCardOrderComponent],
imports: [ imports: [
CommonModule, CommonModule,
OilCardRoutingModule, OilCardRoutingModule,

@ -120,4 +120,29 @@ export class OilCardService {
callBack(data); 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);
});
}
} }

@ -4,10 +4,10 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/', // imageUrl: 'http://localhost:9302/filesystem/',
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/', imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=', key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=', inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',
}; };

Loading…
Cancel
Save