Compare commits

...

13 Commits

  1. 83
      src/app/pages/merchant/mer-list/mer-list.component.html
  2. 29
      src/app/pages/merchant/mer-list/mer-list.component.less
  3. 47
      src/app/pages/merchant/mer-list/mer-list.component.ts
  4. 126
      src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.html
  5. 12
      src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.less
  6. 266
      src/app/pages/trade/gas-order-receipt/gas-order-receipt.component.ts
  7. 47
      src/app/pages/trade/order-oil-list/order-oil-list.component.html
  8. 36
      src/app/pages/trade/order-oil-list/order-oil-list.component.ts
  9. 2
      src/app/pages/trade/trade.routes.ts
  10. 1
      src/app/pipes/common/date-minutes-diff.pipe.ts
  11. 12
      src/app/services/common/common.service.ts
  12. 4
      src/app/services/merchant/mer.service.ts
  13. 60
      src/app/services/trade-receipt/gas-order-receipt.service.ts
  14. 14
      src/app/services/trade/order-oil.service.ts

@ -2,81 +2,108 @@
<div nz-row [nzGutter]="24"> <div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6"> <div nz-col [nzSpan]="6">
<nz-form-item> <nz-form-item>
<nz-form-label>商户号</nz-form-label> <nz-form-label>所在省级</nz-form-label>
<nz-form-control> <nz-form-control>
<input nzSize="large" nz-input formControlName="merNo" placeholder="请输入" /> <nz-select formControlName="provinceCode" nzAllowClear [nzPlaceHolder]="'请选择'" nzShowSearch>
<nz-option *ngFor="let item of regionData" nzValue="{{item.regionId}}" nzLabel="{{item.regionName}}"></nz-option>
</nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="6"> <div nz-col [nzSpan]="6">
<nz-form-item> <nz-form-item>
<nz-form-label>商户名称</nz-form-label> <nz-form-label>来源渠道</nz-form-label>
<nz-form-control> <nz-form-control>
<input nzSize="large" nz-input formControlName="merName" placeholder="请输入" /> <nz-select formControlName="sourceType" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merSourceTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="6"> <div nz-col [nzSpan]="6">
<nz-form-item> <nz-form-item>
<nz-form-label>创建人</nz-form-label> <nz-form-label>油站编号</nz-form-label>
<nz-form-control> <nz-form-control>
<input nzSize="large" nz-input formControlName="opUserName" placeholder="请输入" /> <input nz-input formControlName="merNo" placeholder="请输入" />
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<!-- <div nz-col [nzSpan]="6"> <div nz-col [nzSpan]="6">
<nz-form-item> <nz-form-item>
<nz-form-label>商户状态</nz-form-label> <nz-form-label>油站名称</nz-form-label>
<nz-form-control> <nz-form-control>
<nz-select nzSize="large" formControlName="status" nzAllowClear [nzPlaceHolder]="'请选择'"> <input nz-input formControlName="merName" placeholder="请输入" />
<nz-option *ngFor="let item of merStatus" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option> </nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>油站状态</nz-form-label>
<nz-form-control>
<nz-select formControlName="status" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merchantStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div>--> </div>
<div nz-col [nzSpan]="6" class="search-area"> <div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>来源渠道</nz-form-label>
<nz-form-control>
<nz-select formControlName="sourceType" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of merSourceTypeArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button> <button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button>
<button nz-button (click)="searchFormReset()">重置</button> <button nz-button (click)="searchFormReset()">重置</button>
<a class="collapse" (click)="isCollapse = !isCollapse">
更多查询条件
<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i>
</a>
</div> </div>
</div> </div>
</form> </form>
<nz-table #basicTable <nz-table #basicTable
[nzScroll]="{ x: '1100px' }" [nzScroll]="{ x: '1200px' }"
[nzBordered]="true" [nzBordered]="true"
[nzFrontPagination]="false" [nzFrontPagination]="false"
[nzShowQuickJumper]="true" [nzShowQuickJumper]="true"
[nzShowTotal]="totalTemplate" [nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum" [(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="queryData()" (nzPageIndexChange)="queryData()"
nzShowSizeChanger
(nzPageSizeChange)="this.tablePageSize = $event;queryData()"
[nzPageSizeOptions]="[ 10, 20, 30, 50, 100 ]"
[nzTotal]="tableData.total" [nzTotal]="tableData.total"
[nzData]="tableData.list" > [nzData]="tableData.list" >
<thead> <thead>
<tr> <tr>
<th nzWidth="30px">商户号</th> <th nzWidth="80px">列表展示</th>
<th nzWidth="50px">商户名称</th> <th nzWidth="120px">来源渠道</th>
<th nzWidth="30px">负责人</th> <th nzWidth="100px">连锁名称</th>
<th nzWidth="30px">联系电话</th> <th nzWidth="110px">油站编号</th>
<th nzWidth="30px">创建人</th> <th nzWidth="230px">油站名称</th>
<th nzWidth="30px">创建时间</th> <th nzWidth="180px">油站地区</th>
<th nzWidth="30px">更新时间</th> <th nzWidth="80px">油站状态</th>
<th nzRight nzWidth="50px">操作</th> <th nzRight nzWidth="110px">操作</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td><nz-switch [(ngModel)]="data.listShow" (ngModelChange)="listShowChange($event)"></nz-switch></td>
<td>{{data.sourceType | dictionary: "MER_SOURCE_TYPE"}}</td>
<td>{{data.chainBrandName?data.chainBrandName:'无'}}</td>
<td>{{data.merNo}}</td> <td>{{data.merNo}}</td>
<td>{{data.merName}}</td> <td>{{data.merName}}</td>
<td>{{data.directorName}}</td> <td>{{data.provinceName+"/"+data.cityName+"/"+data.areaName}}</td>
<td>{{data.directorTel}}</td> <td>{{data.status | dictionary: "MERCHANT_STATUS"}}</td>
<td>{{data.opUserName}}</td>
<td>{{data.createTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td>{{data.updateTime | date: 'yyyy-MM-dd HH:mm'}}</td>
<td nzRight> <td nzRight>
<a (click)="showMerDetail(data.merNo)">详情</a> <a (click)="showMerDetail(data.merNo)">详情</a>
<nz-divider nzType="vertical"></nz-divider> <nz-divider nzType="vertical"></nz-divider>
<a (click)="showUpdateMer(data.merNo)">修改资料</a>
<nz-divider nzType="vertical"></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu"> <a nz-dropdown [nzDropdownMenu]="menu">
更多 更多
<span nz-icon nzType="down"></span> <span nz-icon nzType="down"></span>

@ -1,9 +1,30 @@
button {
margin-left: 8px;
}
.search-area { .search-area {
margin-top: 30px; margin-bottom: 10px;
}
.search-area button {
margin-right: 8px;
} }
.submit-btn { .submit-btn {
width: 150px; width: 150px;
} }
.collapse {
margin-left: 10px;
}
.csp-statistic {
font-feature-settings: "tnum";
border: 1px solid #d9d9d9;
border-radius: 4px;
}
.csp-statistic-title {
padding: 0 16px;
height: 64px;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
background-color: #fafafa;
}
.csp-text-primary{
font-size: 20px;
color: #1890ff;
}

@ -29,7 +29,12 @@ import {NzAvatarModule} from "ng-zorro-antd/avatar";
import {MerService} from "../../../services/merchant/mer.service"; import {MerService} from "../../../services/merchant/mer.service";
import {RoleService} from "../../../services/role/role.service"; import {RoleService} from "../../../services/role/role.service";
import {NzImageModule} from "ng-zorro-antd/image"; import {NzImageModule} from "ng-zorro-antd/image";
import {NzSwitchComponent} from "ng-zorro-antd/switch";
import {DateSelectType} from "../../../utils/dateUtils.service";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
import {CommonService} from "../../../services/common/common.service";
import { NzToolTipModule } from 'ng-zorro-antd/tooltip';
@Component({ @Component({
selector: 'app-mer-list', selector: 'app-mer-list',
standalone: true, standalone: true,
@ -70,7 +75,14 @@ import {NzImageModule} from "ng-zorro-antd/image";
NzDescriptionsModule, NzDescriptionsModule,
NzUploadComponent, NzUploadComponent,
NzAvatarModule, NzAvatarModule,
NzImageModule NzImageModule,
NzSwitchComponent,
NzDatePickerComponent,
NzRadioButtonDirective,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
NzToolTipModule
], ],
templateUrl: './mer-list.component.html', templateUrl: './mer-list.component.html',
styleUrl: './mer-list.component.less' styleUrl: './mer-list.component.less'
@ -80,6 +92,8 @@ export class MerListComponent {
IMAGE_URL = environment.imageUrl; IMAGE_URL = environment.imageUrl;
// 表单页数 // 表单页数
tablePageNum = 1; tablePageNum = 1;
// 每页数量
tablePageSize = 10;
// 表单数据 // 表单数据
tableData: any = { tableData: any = {
total: 0, total: 0,
@ -87,7 +101,14 @@ export class MerListComponent {
}; };
// 搜索表单 // 搜索表单
searchForm: FormGroup; searchForm: FormGroup;
// 更多搜索条件
isCollapse = false;
// 油站状态
merchantStatusArray = new DictionaryPipe().getDictionaryList('MERCHANT_STATUS');
// 油站来源
merSourceTypeArray = new DictionaryPipe().getDictionaryList('MER_SOURCE_TYPE');
// 地区数据
regionData: any = []
roleData: any = [] roleData: any = []
merDetailVisible = false; merDetailVisible = false;
merDetailObject: any = {}; merDetailObject: any = {};
@ -102,12 +123,14 @@ export class MerListComponent {
private merService: MerService, private merService: MerService,
private roleService: RoleService, private roleService: RoleService,
private message: NzMessageService, private message: NzMessageService,
private commonService: CommonService,
private modal: NzModalService) { private modal: NzModalService) {
// 初始化搜索框 // 初始化搜索框
this.searchForm = this.fb.group({ this.searchForm = this.fb.group({
sourceType: [''],
provinceCode: [''],
merNo: [''], merNo: [''],
merName: [''], merName: [''],
opUserName: [''],
status: [''], status: [''],
}); });
@ -127,6 +150,10 @@ export class MerListComponent {
this.roleService.queryAllRole((data: any) => { this.roleService.queryAllRole((data: any) => {
this.roleData = data['return_data']; this.roleData = data['return_data'];
}); });
// 获取地区
this.commonService.getRegion("", (data: any) => {
this.regionData = data['return_data'];
});
this.queryData(); this.queryData();
} }
@ -136,9 +163,9 @@ export class MerListComponent {
*/ */
queryData() { queryData() {
this.searchForm.value.pageNum = this.tablePageNum; this.searchForm.value.pageNum = this.tablePageNum;
this.searchForm.value.pageSize = 10; this.searchForm.value.pageSize = this.tablePageSize;
this.searchForm.value.time = new Date().getTime(); this.searchForm.value.time = new Date().getTime();
this.merService.queryList(this.searchForm.value, (data: any) => { this.merService.queryMerList(this.searchForm.value, (data: any) => {
if (data['return_code'] == '000000') { if (data['return_code'] == '000000') {
this.tableData = data['return_data']; this.tableData = data['return_data'];
} }
@ -183,6 +210,13 @@ export class MerListComponent {
this.merDetailVisible = false; this.merDetailVisible = false;
} }
/**
*
*/
listShowChange(data: boolean) {
console.log(data);
}
/** /**
* *
* @param merData * @param merData
@ -315,4 +349,5 @@ export class MerListComponent {
}); });
}; };
protected readonly DateSelectType = DateSelectType;
} }

@ -0,0 +1,126 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="24">
<nz-form-item>
<nz-form-label>申请时间</nz-form-label>
<nz-form-control>
<nz-range-picker formControlName="createTimeArray" nzShowTime [nzAllowClear]="false" [nzFormat]="'yyyy/MM/dd HH:mm:ss'"></nz-range-picker>
<nz-radio-group nzButtonStyle="solid" formControlName="createTimeSelect" (ngModelChange)="createTimeInit()">
<label nz-radio-button *ngFor="let item of dateTypeSelect" nzValue="{{item.value}}">{{item.name}}</label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>开票状态</nz-form-label>
<nz-form-control>
<nz-select formControlName="status" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option *ngFor="let item of statusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>交易单号</nz-form-label>
<nz-form-control>
<input nz-input formControlName="orderNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>联系电话</nz-form-label>
<nz-form-control>
<input nz-input formControlName="contactsPhone" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>加油站</nz-form-label>
<nz-form-control>
<input nz-input formControlName="merName" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button>
<button nz-button (click)="searchFormReset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="export()">导出加油明细</button>
</div>
</div>
</form>
<nz-table #basicTable
[nzScroll]="{ x: '2000px'}"
[nzBordered]="true"
[nzFrontPagination]="false"
[nzShowQuickJumper]="true"
[nzShowTotal]="totalTemplate"
[(nzPageIndex)]="tablePageNum"
(nzPageIndexChange)="queryData()"
[nzTotal]="tableData.total"
[nzData]="tableData.list" >
<thead>
<tr>
<th>交易单号</th>
<th>加油站</th>
<th>油号</th>
<th>开票公司</th>
<th>开票税号</th>
<th>开票金额</th>
<th>联系电话</th>
<th>邮箱</th>
<th>申请时间</th>
<th>开票状态</th>
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index" [style]="{ color: data.color}">
<td>{{data.orderNo}}</td>
<td>{{data.merName}}</td>
<td>{{data.oilNo}}</td>
<td>{{data.companyName}}</td>
<td>{{data.taxNo}}</td>
<td>{{data.amount}}</td>
<td>{{data.contactsPhone}}</td>
<td>{{data.email}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{data.status | dictionary: 'GAS_ORDER_RECEIPT_STATUS_MANAGE'}}</td>
<td nzRight="0px" class="table-td-operation">
<a *ngIf="data.status == 1" (click)="showSuccess(data.applyNo, data.orderNo)">成功</a>
<nz-divider *ngIf="data.status == 1" nzType="vertical"></nz-divider>
<a *ngIf="data.status == 1" (click)="showFail(data.applyNo, data.orderNo)">失败</a>
<span *ngIf="data.status != 1" nz-typography></span>
</tr>
</tbody>
<ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template>
</nz-table>
<nz-modal [(nzVisible)]="failModel" nzTitle="开票失败备注" (nzOnCancel)="failModel = false" [nzFooter]="null" nzWidth="800px">
<ng-container *nzModalContent>
<nz-spin [nzSpinning]="loadingObject.status" [nzTip]="loadingObject.title">
<form nz-form [formGroup]="failForm">
<nz-form-item>
<nz-form-label>交易单号</nz-form-label>
<nz-form-control>
<input nz-input formControlName="orderNo" />
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label nzRequired>备注</nz-form-label>
<nz-form-control>
<textarea rows="4" nz-input formControlName="remark" maxlength="50"></textarea>
</nz-form-control>
</nz-form-item>
<div style="text-align: center;">
<button nz-button [nzType]="'primary'" (click)="submitRefundConfirm()">提交</button>
</div>
</form>
</nz-spin>
</ng-container>
</nz-modal>

@ -0,0 +1,12 @@
.search-area {
margin-bottom: 10px;
}
.search-area button {
margin-right: 8px;
}
.submit-btn {
width: 150px;
}
.collapse {
margin-left: 10px;
}

@ -0,0 +1,266 @@
import { Component } from '@angular/core';
import {FormGroup, NonNullableFormBuilder, ReactiveFormsModule, Validators} from "@angular/forms";
import {DateSelectType, DateUtils} from "../../../utils/dateUtils.service";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {NzMessageService} from "ng-zorro-antd/message";
import {NzModalComponent, NzModalModule, NzModalService} from "ng-zorro-antd/modal";
import {GasOrderReceiptService} from "../../../services/trade-receipt/gas-order-receipt.service";
import {DatePipe, NgForOf, NgIf} from "@angular/common";
import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe";
import {NzButtonComponent} from "ng-zorro-antd/button";
import {
NzCellFixedDirective,
NzTableCellDirective,
NzTableComponent,
NzTbodyComponent, NzTheadComponent,
NzThMeasureDirective, NzTrDirective
} from "ng-zorro-antd/table";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzDatePickerComponent, NzRangePickerComponent} from "ng-zorro-antd/date-picker";
import {NzDescriptionsComponent, NzDescriptionsItemComponent} from "ng-zorro-antd/descriptions";
import {NzFormControlComponent, NzFormDirective, NzFormItemComponent, NzFormLabelComponent} from "ng-zorro-antd/form";
import {NzInputDirective} from "ng-zorro-antd/input";
import {NzOptionComponent, NzSelectComponent} from "ng-zorro-antd/select";
import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "ng-zorro-antd/radio";
import {NzTabComponent, NzTabSetComponent} from "ng-zorro-antd/tabs";
import {NzDropDownDirective, NzDropdownMenuComponent, NzDropDownModule} from "ng-zorro-antd/dropdown";
import {NzIconModule} from "ng-zorro-antd/icon";
import {NzCardModule} from "ng-zorro-antd/card";
import {NzSpinComponent} from "ng-zorro-antd/spin";
import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeline";
import {NzBadgeComponent} from "ng-zorro-antd/badge";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe";
import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzTypographyComponent} from "ng-zorro-antd/typography";
import {environment} from "../../../../environments/environment";
@Component({
selector: 'app-gas-order-receipt',
standalone: true,
imports: [
DatePipe,
DictionaryPipe,
NgForOf,
NgIf,
NzButtonComponent,
NzCellFixedDirective,
NzColDirective,
NzDatePickerComponent,
NzDescriptionsComponent,
NzDescriptionsItemComponent,
NzFormControlComponent,
NzFormDirective,
NzFormItemComponent,
NzFormLabelComponent,
NzInputDirective,
NzModalComponent,
NzOptionComponent,
NzRadioButtonDirective,
NzRadioComponent,
NzRadioGroupComponent,
NzRangePickerComponent,
NzRowDirective,
NzSelectComponent,
NzTabComponent,
NzTabSetComponent,
NzTableCellDirective,
NzTableComponent,
NzTbodyComponent,
NzThMeasureDirective,
NzTheadComponent,
NzTrDirective,
ReactiveFormsModule,
NzModalModule,
NzDropdownMenuComponent,
NzDropDownDirective,
NzDropDownModule,
NzIconModule,
NzCardModule,
NzSpinComponent,
NzTimelineItemComponent,
NzTimelineComponent,
NzBadgeComponent,
NzTooltipDirective,
DateMinutesDiffPipe,
NzDividerComponent,
NzTypographyComponent
],
templateUrl: './gas-order-receipt.component.html',
styleUrl: './gas-order-receipt.component.less'
})
export class GasOrderReceiptComponent {
imageUrl = environment.imageUrl;
loadingObject = {
title: "加载中...",
status: false,
};
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any = {
total: 0,
list: [],
};
// 搜索表单
searchForm: FormGroup;
// 状态数据
statusArray = new DictionaryPipe().getDictionaryList('GAS_ORDER_RECEIPT_STATUS_MANAGE');
// 时间类型选择
dateTypeSelect = DateSelectType;
// 失败模态框
failForm: FormGroup;
failModel = false;
constructor(private fb: NonNullableFormBuilder,
private gasOrderReceiptService : GasOrderReceiptService,
private storage: BrowserStorageService,
private message: NzMessageService,
private modal: NzModalService) {
// 初始化搜索框
this.failForm = this.fb.group({
applyNo: [{ value: null, disabled: true} ,[Validators.required]],
orderNo: [{ value: null, disabled: true} ,[Validators.required]],
remark: ['',[Validators.required]],
});
// 初始化搜索框
this.searchForm = this.fb.group({
orderNo: [''],
contactsPhone: [''],
merName: [''],
status: [''],
createTimeArray: [[]],
createTimeSelect: ['1'],
createTimeS: [''],
createTimeE: [''],
});
// 初始化创建时间
this.createTimeInit();
// 查询数据
this.queryData();
}
/**
*
*/
queryData() {
if (this.searchForm.controls['createTimeArray'].value != null
&& this.searchForm.controls['createTimeArray'].value.length > 0) {
this.searchForm.controls['createTimeS'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[0]).getTime());
this.searchForm.controls['createTimeE'].setValue(new Date(this.searchForm.controls['createTimeArray'].value[1]).getTime());
} else {
this.searchForm.controls['createTimeS'].setValue(null);
this.searchForm.controls['createTimeE'].setValue(null);
}
this.searchForm.value.pageNum = this.tablePageNum;
this.searchForm.value.pageSize = 10;
this.searchForm.value.time = new Date().getTime();
// 查询列表
this.gasOrderReceiptService.queryList(this.searchForm.value, (data: any) => {
if (data['return_code'] == '000000') {
this.tableData = data['return_data'];
}
});
}
/**
*
*/
searchFormSubmit(): void {
this.tablePageNum = 1;
this.queryData();
}
/**
*
*/
searchFormReset(): void {
this.searchForm.reset();
}
/**
*
*/
createTimeInit() {
let createTimeSelect = this.searchForm.controls['createTimeSelect'].value;
if (createTimeSelect != null) {
let timeObj = DateUtils.getDate(new Date(), Number(createTimeSelect));
this.searchForm.controls['createTimeArray'].setValue([timeObj.timeS, timeObj.timeE]);
}
}
/**
*
* @param orderNo
*/
showSuccess(applyNo: string, orderNo: string) {
this.modal.confirm({
nzTitle: '提示',
nzContent: '交易单号:' + orderNo + ',是否已开票成功?',
nzOnOk: () => this.success(applyNo)
});
}
success(applyNo: string) {
this.gasOrderReceiptService.success({applyNo: applyNo}, (data: any) => {
if (data['return_code'] == '000000') {
this.message.success("操作成功");
this.queryData();
} else {
this.message.create('error', data['return_msg']);
}
});
}
showFail(applyNo: string, orderNo: string) {
this.failForm.patchValue({ applyNo: applyNo, orderNo: orderNo});
this.failModel = true;
}
submitRefundConfirm() {
for (const i in this.failForm.controls) {
this.failForm.controls[i].markAsDirty();
this.failForm.controls[i].updateValueAndValidity();
}
if (this.failForm.status == null || this.failForm.status !== 'VALID') {
this.modal.warning({
nzTitle: '提示',
nzContent: '请填写所有必填项',
});
return;
}
this.modal.confirm({
nzTitle: '提示',
nzContent: '确定对交易订号('+this.failForm.controls['orderNo'].value+')进行退款吗?',
nzOnOk: () => this.submitFail()
});
}
submitFail() {
const param = {
applyNo: this.failForm.controls['applyNo'].value,
orderNo: this.failForm.controls['orderNo'].value,
remark: this.failForm.controls['remark'].value,
};
this.gasOrderReceiptService.fail(param, (data: any) => {
if (data['return_code'] == '000000') {
this.message.success("操作成功");
this.queryData();
this.failModel = false;
} else {
this.message.create('error', data['return_msg']);
}
});
}
/**
*
*/
export() {
this.gasOrderReceiptService.export(this.searchForm.value, (data:any) => {
window.location.href = this.imageUrl + 'temporary/' + data['return_data'];
});
}
}

@ -119,6 +119,17 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>异常状态</nz-form-label>
<nz-form-control>
<nz-select formControlName="abnormal" nzAllowClear [nzPlaceHolder]="'请选择'">
<nz-option nzValue="0" nzLabel="正常"></nz-option>
<nz-option nzValue="1" nzLabel="异常"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area"> <div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button> <button nz-button [nzType]="'primary'" (click)="searchFormSubmit()">查询</button>
<button nz-button (click)="searchFormReset()">重置</button> <button nz-button (click)="searchFormReset()">重置</button>
@ -144,7 +155,7 @@
</div> </div>
</div> </div>
<nz-table #basicTable <nz-table #basicTable
[nzScroll]="{ x: '5000px'}" [nzScroll]="{ x: '5300px'}"
[nzBordered]="true" [nzBordered]="true"
[nzFrontPagination]="false" [nzFrontPagination]="false"
[nzShowQuickJumper]="true" [nzShowQuickJumper]="true"
@ -163,8 +174,8 @@
<th *ngIf="accountType == 1 || accountType == 2 || accountType == 3" rowspan="2" nzWidth="120px">客户电话</th> <th *ngIf="accountType == 1 || accountType == 2 || accountType == 3" rowspan="2" nzWidth="120px">客户电话</th>
<th *ngIf="accountType == 1 || accountType == 4 || accountType == 5" rowspan="2" nzWidth="200px">加油站</th> <th *ngIf="accountType == 1 || accountType == 4 || accountType == 5" rowspan="2" nzWidth="200px">加油站</th>
<th *ngIf="accountType == 1 || accountType == 2" rowspan="2" nzWidth="120px">加油员</th> <th *ngIf="accountType == 1 || accountType == 2" rowspan="2" nzWidth="120px">加油员</th>
<th colspan="8">加油信息</th> <th colspan="9">加油信息</th>
<th colspan="8">支付信息</th> <th colspan="10">结算信息</th>
<th rowspan="2">交易状态</th> <th rowspan="2">交易状态</th>
<th rowspan="2">创建时间</th> <th rowspan="2">创建时间</th>
<th rowspan="2">支付时间</th> <th rowspan="2">支付时间</th>
@ -179,14 +190,17 @@
<th>油枪号</th> <th>油枪号</th>
<th>平台折扣</th> <th>平台折扣</th>
<th>平台价</th> <th>平台价</th>
<th>优惠价</th>
<th>油站价</th> <th>油站价</th>
<th>国标价</th> <th>国标价</th>
<th>总优惠</th> <th>总优惠</th>
<th>优惠券优惠</th> <th>优惠券优惠</th>
<th>加油优惠</th> <th>加油优惠</th>
<th>服务费</th>
<th>应付金额</th> <th>应付金额</th>
<th>积分抵扣</th> <th>积分抵扣</th>
<th>实付金额</th> <th>油站结算</th>
<th>用户实付</th>
<th>支付方式</th> <th>支付方式</th>
<th>支付单号</th> <th>支付单号</th>
</tr> </tr>
@ -206,15 +220,18 @@
<td>{{data.gasOilLiters}}升</td> <td>{{data.gasOilLiters}}升</td>
<td>{{data.gasOilNo}}#</td> <td>{{data.gasOilNo}}#</td>
<td>{{data.gasGunNo}}号枪</td> <td>{{data.gasGunNo}}号枪</td>
<td>{{data.gasDiscount != 1?(data.gasDiscount*100) + '折':'无'}}</td> <td>{{data.gasDiscount != 1?(data.gasDiscount*100).toFixed(2) + '折':'无'}}</td>
<td>{{data.gasPricePlatform}}元</td> <td>{{data.gasPricePlatform}}元</td>
<td>{{data.gasPriceVip}}元</td>
<td>{{data.gasPriceGun}}元</td> <td>{{data.gasPriceGun}}元</td>
<td>{{data.gasPriceOfficial}}元</td> <td>{{data.gasPriceOfficial}}元</td>
<td>{{data.totalDeductionPrice}}元</td> <td>{{data.totalDeductionPrice}}元</td>
<td>{{data.deductionCouponPrice}}元</td> <td>{{data.deductionCouponPrice}}元</td>
<td>{{data.deductionOilPrice}}元</td> <td>{{data.deductionOilPrice}}元</td>
<td>{{data.gasServiceFeePrice}}元</td>
<td>{{data.payablePrice}}元</td> <td>{{data.payablePrice}}元</td>
<td>{{data.payIntegral / 100}}元</td> <td>{{data.payIntegral / 100}}元</td>
<td>{{data.gasSettlePrice!=null?data.gasSettlePrice+'元':'未支付'}}</td>
<td>{{data.actualPayPrice!=null?data.actualPayPrice+'元':'未支付'}}</td> <td>{{data.actualPayPrice!=null?data.actualPayPrice+'元':'未支付'}}</td>
<td>{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td> <td>{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td>
<td>{{data.paySerialNo}}</td> <td>{{data.paySerialNo}}</td>
@ -228,7 +245,8 @@
<nz-dropdown-menu #menu="nzDropdownMenu"> <nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable> <ul nz-menu nzSelectable>
<li nz-menu-item (click)="showOrderDetail(data.orderNo)">交易详情</li> <li nz-menu-item (click)="showOrderDetail(data.orderNo)">交易详情</li>
<li *ngIf="data.status == 2 && GAS_REFUND_BTN && (accountType == 2 || accountType == 3)?(data.payTime | dateMinutesDiff: data.payTime) <= 30:true" (click)="showRefund(data.orderNo, data.orderChildNo)" nz-menu-item>交易退款</li> <li *ngIf="data.status == 2 && GAS_REFUND_BTN && (accountType == 2 || accountType == 3?(data.payTime | dateMinutesDiff: data.payTime) <=30:true)" (click)="showRefund(data.orderNo, data.orderChildNo)" nz-menu-item>交易退款</li>
<li *ngIf="data.status == 2 && data.channelType != 1 && data.abnormal == true && GAS_ORDER_REPAIR_BTN" (click)="showRepairOrder(data.orderNo)" nz-menu-item>交易补单</li>
<li *ngIf="data.channelType == 1 && data.status == 2 && GAS_ORDER_PRINT_BTN" (click)="showOrderPrint(data.orderNo);" nz-menu-item>打印小票</li> <li *ngIf="data.channelType == 1 && data.status == 2 && GAS_ORDER_PRINT_BTN" (click)="showOrderPrint(data.orderNo);" nz-menu-item>打印小票</li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
@ -250,29 +268,32 @@
<nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道">{{orderDetailObject.gasOrder.channelType | dictionary: 'MER_SOURCE_TYPE'}}</nz-descriptions-item> <nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道">{{orderDetailObject.gasOrder.channelType | dictionary: 'MER_SOURCE_TYPE'}}</nz-descriptions-item>
<nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道单号">{{orderDetailObject.gasOrder.channelOrderNo?orderDetailObject.gasOrder.channelOrderNo:'无'}}</nz-descriptions-item> <nz-descriptions-item *ngIf="accountType == 1 || accountType == 4 || accountType == 5" nzTitle="渠道单号">{{orderDetailObject.gasOrder.channelOrderNo?orderDetailObject.gasOrder.channelOrderNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item> <nz-descriptions-item nzTitle="加油单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus| dictionary: 'GAS_ORDER_STATUS' }}</nz-descriptions-item> <nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.gasOrder.status | dictionary: 'GAS_ORDER_STATUS' }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | dictionary: 'ORDER_PAY_TYPE'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | dictionary: 'ORDER_PAY_TYPE'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="支付单号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="支付单号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="客户手机号" *ngIf="accountType == 1 || accountType == 2 || accountType == 3">{{orderDetailObject.tradeOrder.memPhone}}</nz-descriptions-item> <nz-descriptions-item nzTitle="客户手机号" *ngIf="accountType == 1 || accountType == 2 || accountType == 3">{{orderDetailObject.tradeOrder.userPhone}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油员">{{orderDetailObject.gasOrder.gasStaffName!=null?orderDetailObject.gasOrder.gasStaffName:'未知'}}</nz-descriptions-item> <nz-descriptions-item nzTitle="加油员">{{orderDetailObject.gasOrder.gasStaffName!=null?orderDetailObject.gasOrder.gasStaffName:'未知'}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油金额">{{orderDetailObject.gasOrder.gasRefuelPrice}}元</nz-descriptions-item> <nz-descriptions-item nzTitle="加油金额">{{orderDetailObject.gasOrder.gasRefuelPrice}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油升数">{{orderDetailObject.gasOrder.gasOilLiters}}升</nz-descriptions-item> <nz-descriptions-item nzTitle="加油升数">{{orderDetailObject.gasOrder.gasOilLiters}}升</nz-descriptions-item>
<nz-descriptions-item nzTitle="油品">{{orderDetailObject.gasOrder.gasOilNo}} # </nz-descriptions-item> <nz-descriptions-item nzTitle="油品">{{orderDetailObject.gasOrder.gasOilNo}} # </nz-descriptions-item>
<nz-descriptions-item nzTitle="油枪">{{orderDetailObject.gasOrder.gasGunNo}} 号枪</nz-descriptions-item> <nz-descriptions-item nzTitle="油枪">{{orderDetailObject.gasOrder.gasGunNo}} 号枪</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="平台优惠"> <nz-descriptions-item nzSpan="1" nzTitle="平台优惠">
<span nz-typography>平台折扣:{{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100)+'折':'无'}}</span><br>
<span nz-typography>总优惠:{{orderDetailObject.gasOrder.totalDeductionPrice}}元</span><br> <span nz-typography>总优惠:{{orderDetailObject.gasOrder.totalDeductionPrice}}元</span><br>
<span nz-typography>优惠券优惠:{{orderDetailObject.gasOrder.deductionCouponPrice}}元</span><br> <span nz-typography>优惠券优惠:{{orderDetailObject.gasOrder.deductionCouponPrice}}元</span><br>
<span nz-typography>加油优惠:{{orderDetailObject.gasOrder.deductionOilPrice}}元</span><br> <span nz-typography>加油优惠:{{orderDetailObject.gasOrder.deductionOilPrice}}元</span><br>
<span nz-typography>积分抵扣:{{orderDetailObject.gasOrder.payIntegral / 100}}元</span><br>
</nz-descriptions-item> </nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="油价"> <nz-descriptions-item nzSpan="1" nzTitle="油价">
<nz-badge nzStatus="processing" nzText="平台价:{{orderDetailObject.gasOrder.gasPricePlatform}}"></nz-badge><br> <nz-badge nzStatus="processing" nzText="平台价:{{orderDetailObject.gasOrder.gasPricePlatform}} ({{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100).toFixed(2)+'折':'无折扣'}})"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="优惠价:{{orderDetailObject.gasOrder.gasPriceVip}}"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="油站价:{{orderDetailObject.gasOrder.gasPriceGun}}"></nz-badge><br> <nz-badge nzStatus="processing" nzText="油站价:{{orderDetailObject.gasOrder.gasPriceGun}}"></nz-badge><br>
<nz-badge nzStatus="processing" nzText="国标价:{{orderDetailObject.gasOrder.gasPriceOfficial}}"></nz-badge> <nz-badge nzStatus="processing" nzText="国标价:{{orderDetailObject.gasOrder.gasPriceOfficial}}"></nz-badge>
</nz-descriptions-item> </nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="应付">{{orderDetailObject.gasOrder.payablePrice}}</nz-descriptions-item> <nz-descriptions-item nzSpan="1" nzTitle="服务费">{{orderDetailObject.gasOrder.gasServiceFeePrice}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="实付">{{orderDetailObject.gasOrder.actualPayPrice}}</nz-descriptions-item> <nz-descriptions-item nzSpan="1" nzTitle="积分抵扣">{{orderDetailObject.gasOrder.payIntegral / 100}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="订单应付">{{orderDetailObject.gasOrder.payablePrice}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="用户实付">{{orderDetailObject.gasOrder.actualPayPrice?orderDetailObject.gasOrder.actualPayPrice:0}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="油站结算">{{orderDetailObject.gasOrder.gasSettlePrice?orderDetailObject.gasOrder.gasSettlePrice:0}}元</nz-descriptions-item>
<nz-descriptions-item nzSpan="1" nzTitle="代理结算" *ngIf="accountType == 1 || accountType == 4 || accountType == 5">{{orderDetailObject.gasOrder.gasAgentSettlePrice?orderDetailObject.gasOrder.gasAgentSettlePrice:0}}元</nz-descriptions-item>
<nz-descriptions-item *ngIf="accountType == 1" nzTitle="代理商"> <nz-descriptions-item *ngIf="accountType == 1" nzTitle="代理商">
{{orderDetailObject.gasOrder.agentName?orderDetailObject.gasOrder.agentName:'无'}} {{orderDetailObject.gasOrder.agentName?orderDetailObject.gasOrder.agentName:'无'}}
</nz-descriptions-item> </nz-descriptions-item>

@ -39,6 +39,7 @@ import {ButtonPipe} from "../../../pipes/common/button.pipe";
import {NzTooltipDirective} from "ng-zorro-antd/tooltip"; import {NzTooltipDirective} from "ng-zorro-antd/tooltip";
import {symlinkSync} from "fs"; import {symlinkSync} from "fs";
import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe"; import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe";
import {NzDividerModule} from "ng-zorro-antd/divider";
@Component({ @Component({
selector: 'app-order-oil-list', selector: 'app-order-oil-list',
@ -87,7 +88,8 @@ import {DateMinutesDiffPipe} from "../../../pipes/common/date-minutes-diff.pipe"
NzTimelineComponent, NzTimelineComponent,
NzBadgeComponent, NzBadgeComponent,
NzTooltipDirective, NzTooltipDirective,
DateMinutesDiffPipe DateMinutesDiffPipe,
NzDividerModule
], ],
templateUrl: './order-oil-list.component.html', templateUrl: './order-oil-list.component.html',
styleUrl: './order-oil-list.component.less' styleUrl: './order-oil-list.component.less'
@ -146,7 +148,7 @@ export class OrderOilListComponent {
refundForm: FormGroup; refundForm: FormGroup;
GAS_REFUND_BTN = new ButtonPipe().isButton("GAS_REFUND"); GAS_REFUND_BTN = new ButtonPipe().isButton("GAS_REFUND");
GAS_ORDER_PRINT_BTN = new ButtonPipe().isButton("GAS_ORDER_PRINT_BTN"); GAS_ORDER_PRINT_BTN = new ButtonPipe().isButton("GAS_ORDER_PRINT_BTN");
GAS_ORDER_REPAIR_BTN = new ButtonPipe().isButton("GAS_ORDER_REPAIR_BTN");
constructor(private fb: NonNullableFormBuilder, constructor(private fb: NonNullableFormBuilder,
private orderOilService : OrderOilService, private orderOilService : OrderOilService,
private agentService : AgentService, private agentService : AgentService,
@ -156,6 +158,7 @@ export class OrderOilListComponent {
private message: NzMessageService, private message: NzMessageService,
private modal: NzModalService) { private modal: NzModalService) {
this.accountType = this.storage.get(DATA)['account']['objectType']; this.accountType = this.storage.get(DATA)['account']['objectType'];
console.log(this.GAS_REFUND_BTN);
// 退款提示模态框 // 退款提示模态框
this.refundForm = this.fb.group({ this.refundForm = this.fb.group({
@ -177,6 +180,7 @@ export class OrderOilListComponent {
gasStaffName: [''], gasStaffName: [''],
agentId: [''], agentId: [''],
agentStaffId: [''], agentStaffId: [''],
abnormal: [''],
status: ['2'], status: ['2'],
createTimeArray: [[]], createTimeArray: [[]],
createTimeSelect: ['1'], createTimeSelect: ['1'],
@ -286,6 +290,32 @@ export class OrderOilListComponent {
}); });
} }
/**
*
* @param orderNo
*/
showRepairOrder(orderNo: string) {
this.modal.confirm({
nzTitle: '补单提示',
nzContent: '交易单号:' + orderNo + ',是否重新推送订单到渠道?',
nzOnOk: () => this.submitRepairOrder(orderNo)
});
}
/**
*
*/
submitRepairOrder(orderNo: string) {
this.orderOilService.repairOrder(orderNo, (data: any) => {
if (data['return_code'] == '000000') {
this.message.success("操作成功");
this.queryData();
} else {
this.message.create('error', data['return_msg']);
}
});
}
/** /**
* *
* @param orderNo * @param orderNo
@ -398,6 +428,4 @@ export class OrderOilListComponent {
} }
}) })
} }
protected readonly Date = Date;
} }

@ -1,8 +1,10 @@
import { Routes } from '@angular/router'; import { Routes } from '@angular/router';
import {OrderRefundComponent} from "./order-refund/order-refund.component"; import {OrderRefundComponent} from "./order-refund/order-refund.component";
import {OrderOilListComponent} from "./order-oil-list/order-oil-list.component"; import {OrderOilListComponent} from "./order-oil-list/order-oil-list.component";
import {GasOrderReceiptComponent} from "./gas-order-receipt/gas-order-receipt.component";
export const TRADE_ROUTES: Routes = [ export const TRADE_ROUTES: Routes = [
{ path: 'order-refund', component: OrderRefundComponent }, { path: 'order-refund', component: OrderRefundComponent },
{ path: 'order-oil', component: OrderOilListComponent }, { path: 'order-oil', component: OrderOilListComponent },
{ path: 'gas-order', component: GasOrderReceiptComponent },
]; ];

@ -11,6 +11,7 @@ export class DateMinutesDiffPipe implements PipeTransform {
transform(newTime: number | Date, olbTime: number | Date): number { transform(newTime: number | Date, olbTime: number | Date): number {
console.log('123');
var diffTimeStamp = new Date().getTime() - new Date(olbTime).getTime(); var diffTimeStamp = new Date().getTime() - new Date(olbTime).getTime();
return parseInt(String(diffTimeStamp / (1000 * 60))); return parseInt(String(diffTimeStamp / (1000 * 60)));
} }

@ -28,6 +28,18 @@ export class CommonService {
}); });
} }
/**
*
*
* @param regionId id
* @param callBack
*/
public getRegion(regionId: string, callBack:any) {
this.http.get(environment.baseUrl + 'common/getRegion?regionId=' + regionId).subscribe(data => {
callBack(data);
});
}
/** /**
* *
* *

@ -62,9 +62,9 @@ export class MerService {
* @param params * @param params
* @param callBack * @param callBack
*/ */
public queryList(params: any, callBack:any) { public queryMerList(params: any, callBack:any) {
params.time = new Date().getTime(); params.time = new Date().getTime();
this.http.get(environment.baseUrl + 'mer/queryList?' + ObjectData.objectByString(params)).subscribe(data => { this.http.get(environment.baseUrl + 'merchant/queryMerList?' + ObjectData.objectByString(params)).subscribe(data => {
callBack(data); callBack(data);
}); });
} }

@ -0,0 +1,60 @@
import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {environment} from "../../../environments/environment";
import {ObjectData} from "../../utils/objectData.service";
@Injectable({
providedIn: 'root'
})
export class GasOrderReceiptService {
constructor(private http: HttpClient) { }
/**
*
* @param param
* @param callBack
*/
public queryList(param: any, callBack:any) {
param.tm = new Date().getTime();
this.http.get(environment.baseUrl + 'gasOrderReceipt/queryReceiptList?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public export(param: any, callBack:any) {
param.tm = new Date().getTime();
this.http.get(environment.baseUrl + 'gasOrderReceipt/export?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public success(param: any, callBack:any) {
param.tm = new Date().getTime();
this.http.post(environment.baseUrl + 'gasOrderReceipt/success', param).subscribe(data => {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public fail(param: any, callBack:any) {
param.tm = new Date().getTime();
this.http.post(environment.baseUrl + 'gasOrderReceipt/fail', param).subscribe(data => {
callBack(data);
});
}
}

@ -61,6 +61,20 @@ export class OrderOilService {
}); });
} }
/**
*
* @param orderNo
* @param callBack
*/
public repairOrder(orderNo: string, callBack:any) {
const param = {
orderNo: orderNo,
tm: new Date().getTime()
}
this.http.post(environment.baseUrl + 'gasOrder/repairOrder?', param).subscribe(data => {
callBack(data);
});
}
/** /**
* *

Loading…
Cancel
Save