parent
6e195e91af
commit
36bce39937
@ -0,0 +1,14 @@ |
|||||||
|
import { NgModule } from '@angular/core'; |
||||||
|
import { Routes, RouterModule } from '@angular/router'; |
||||||
|
import {OrderOilListComponent} from './order-oil/order-oil-list/order-oil-list.component'; |
||||||
|
|
||||||
|
|
||||||
|
const routes: Routes = [ |
||||||
|
{ path: 'order-oil-list', component: OrderOilListComponent} |
||||||
|
]; |
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
imports: [RouterModule.forChild(routes)], |
||||||
|
exports: [RouterModule] |
||||||
|
}) |
||||||
|
export class OrderManageRoutingModule { } |
@ -0,0 +1,24 @@ |
|||||||
|
import { NgModule } from '@angular/core'; |
||||||
|
import { CommonModule } from '@angular/common'; |
||||||
|
|
||||||
|
import { OrderManageRoutingModule } from './order-manage-routing.module'; |
||||||
|
import { OrderOilListComponent } from './order-oil/order-oil-list/order-oil-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'; |
||||||
|
|
||||||
|
|
||||||
|
@NgModule({ |
||||||
|
declarations: [OrderOilListComponent], |
||||||
|
imports: [ |
||||||
|
CommonModule, |
||||||
|
OrderManageRoutingModule, |
||||||
|
NgZorroAntdModule, |
||||||
|
ReactiveFormsModule, |
||||||
|
FormsModule, |
||||||
|
BreadcrumbModule, |
||||||
|
AppCommonModule, |
||||||
|
] |
||||||
|
}) |
||||||
|
export class OrderManageModule { } |
@ -0,0 +1,446 @@ |
|||||||
|
<!-- start 面包屑 --> |
||||||
|
<app-breadcrumb></app-breadcrumb> |
||||||
|
<!-- end 面包屑 --> |
||||||
|
<!--条件搜索--> |
||||||
|
|
||||||
|
<nz-spin [nzSpinning]="loadingObject.status" [nzTip]="loadingObject.title"> |
||||||
|
|
||||||
|
<div class="inner-content"> |
||||||
|
<form nz-form [formGroup]="searchForm" (ngSubmit)="search(searchForm.value)"> |
||||||
|
<div nz-row> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType != 3 && roleType != 10"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">加油站</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="storeName" /> |
||||||
|
</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="orderNo" /> |
||||||
|
</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="memPhone" /> |
||||||
|
</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 |
||||||
|
[nzShowTime]="{ nzHideDisabledOptions: true }" |
||||||
|
formControlName="payTimeArray" |
||||||
|
nzFormat="yyyy-MM-dd HH:mm:ss" |
||||||
|
></nz-range-picker> |
||||||
|
</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 formControlName="status" nzAllowClear> |
||||||
|
<nz-option *ngFor="let item of orderStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
|
||||||
|
<div nz-col nzSpan="8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">油号</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="gasOilNo" nzAllowClear> |
||||||
|
<nz-option *ngFor="let item of oilArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-row *ngIf="isCollapse"> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType != 10"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">加油员</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<input nz-input formControlName="gasStaffName" /> |
||||||
|
</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 |
||||||
|
[nzShowTime]="{ nzHideDisabledOptions: true }" |
||||||
|
formControlName="createTimeArray" |
||||||
|
nzFormat="yyyy-MM-dd HH:mm:ss" |
||||||
|
></nz-range-picker> |
||||||
|
</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 |
||||||
|
[nzShowTime]="{ nzHideDisabledOptions: true }" |
||||||
|
formControlName="refundTimeArray" |
||||||
|
nzFormat="yyyy-MM-dd HH:mm:ss" |
||||||
|
></nz-range-picker> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">分公司</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="companyId" nzAllowClear (ngModelChange)="requestMerList($event)"> |
||||||
|
<nz-option *ngFor="let item of companyArray" nzValue="{{item['id']}}" nzLabel="{{item['name']}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1 || roleType == 5"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">商户</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="merId" nzAllowClear> |
||||||
|
<nz-option *ngFor="let item of merArray" nzValue="{{item['id']}}" nzLabel="{{item['merchantName']}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1 || roleType == 5"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">代理公司</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="gasOrgId" nzAllowClear (ngModelChange)="requestAgent($event)"> |
||||||
|
<nz-option *ngFor="let item of orgIdArray" nzValue="{{item['id']}}" nzLabel="{{item['name']}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1 || roleType == 5"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">代理商</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="gasAgentId" nzAllowClear (ngModelChange)="requestSalesman($event)"> |
||||||
|
<nz-option *ngFor="let item of tyAgentArray" nzValue="{{item['id']}}" nzLabel="{{item['agentName']}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-col nzSpan="8" *ngIf="roleType == 0 || roleType == 1 || roleType == 5 || roleType == 8"> |
||||||
|
<nz-form-item> |
||||||
|
<nz-form-label [nzSpan]="8">业务员</nz-form-label> |
||||||
|
<nz-form-control [nzSpan]="14"> |
||||||
|
<nz-select formControlName="gasSalesmanId" nzAllowClear> |
||||||
|
<nz-option *ngFor="let item of tySalesmanArray" nzValue="{{item['id']}}" nzLabel="{{item['salesmanName']}}"></nz-option> |
||||||
|
</nz-select> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
<div nz-row> |
||||||
|
<div nz-col nzSpan="24" class="search-button"> |
||||||
|
<button nz-button nzType="primary"><i nz-icon nzType="search" nzTheme="outline"></i>搜索</button> |
||||||
|
<button nz-button nzType="default" (click)="resetSearchForm()"><i nz-icon nzType="reload" nzTheme="outline"></i>重置</button> |
||||||
|
<a class="collapse" (click)="toggleCollapse()">更多条件<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i></a> |
||||||
|
</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)="excelOrder()"><i nz-icon nzType="plus" nzTheme="outline"></i>导出订单</button> |
||||||
|
</div> |
||||||
|
|
||||||
|
<!--数组表格 --> |
||||||
|
<nz-table #basicTable |
||||||
|
nzShowPagination |
||||||
|
nzShowSizeChanger |
||||||
|
nzBordered |
||||||
|
[nzData]="dataObject.list" |
||||||
|
[nzTotal]="dataObject.total" |
||||||
|
[nzFrontPagination]="false" |
||||||
|
[nzLoading]="tableLoading" |
||||||
|
[nzPageIndex]="whereObject.pageNum" |
||||||
|
(nzPageIndexChange)="requestOrderData($event)" |
||||||
|
(nzPageSizeChange)="pageSizeChang($event)" |
||||||
|
[nzPageSizeOptions]="[10,20,50,100]" |
||||||
|
[nzScroll]="{ x: '3400px'}" |
||||||
|
> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th rowspan="2" nzWidth="200px">交易订单号</th> |
||||||
|
<th rowspan="2" *ngIf="roleType != 3 && roleType != 10" nzWidth="200px">加油站</th> |
||||||
|
<th rowspan="2" *ngIf="roleType != 10" nzWidth="120px">加油员</th> |
||||||
|
<th rowspan="2" nzWidth="120px">客户手机号</th> |
||||||
|
<th colspan="9">加油信息</th> |
||||||
|
<th colspan="5">支付信息</th> |
||||||
|
<th rowspan="2">交易状态</th> |
||||||
|
<th rowspan="2">创建时间</th> |
||||||
|
<th rowspan="2">支付时间</th> |
||||||
|
<th rowspan="2">退款时间</th> |
||||||
|
<th rowspan="2">取消时间</th> |
||||||
|
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1">分公司</th> |
||||||
|
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5">商户</th> |
||||||
|
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5">代理公司</th> |
||||||
|
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5">代理商</th> |
||||||
|
<th rowspan="2" *ngIf="roleType == 0 || roleType == 1 || roleType == 5 || roleType == 8">业务员</th> |
||||||
|
<th rowspan="2" nzWidth="110px" nzRight="0px">操作</th> |
||||||
|
</tr> |
||||||
|
<tr> |
||||||
|
<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> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr *ngFor="let data of basicTable.data;let i = index"> |
||||||
|
<td>{{data.orderNo}}</td> |
||||||
|
<td *ngIf="roleType != 3 && roleType != 10">{{data.storeName}}</td> |
||||||
|
<td *ngIf="roleType != 10">{{data.gasStaffName?data.gasStaffName:'未知'}}</td> |
||||||
|
<td>{{data.memPhone}}</td> |
||||||
|
<td>{{data.gasRefuelPrice}}元</td> |
||||||
|
<td>{{data.gasOilLiters}}升</td> |
||||||
|
<td>{{data.gasOilNo}}#</td> |
||||||
|
<td>{{data.gasGunNo}}号枪</td> |
||||||
|
<td>{{data.gasDiscount != 1?(data.gasDiscount*100) + '折':'无'}}</td> |
||||||
|
<td>{{data.gasOilSubsidy}}元</td> |
||||||
|
<td>{{data.gasPricePlatform}}元</td> |
||||||
|
<td>{{data.gasPriceGun}}元</td> |
||||||
|
<td>{{data.gasPriceOfficial}}元</td> |
||||||
|
<td>{{data.payType | orderPayType}}</td> |
||||||
|
<td>{{data.deductionPrice}}元</td> |
||||||
|
<td>{{data.payablePrice}}元</td> |
||||||
|
<td>{{data.payGold / 100}}元</td> |
||||||
|
<td>{{data.payPrice!=null?data.payPrice+'元':'未支付'}}</td> |
||||||
|
<td>{{data.status | orderOilStatus}}</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>{{data.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td> |
||||||
|
<td *ngIf="roleType == 0 || roleType == 1">{{data.companyName?data.companyName:'无'}}</td> |
||||||
|
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5">{{data.merName?data.merName:'无'}}</td> |
||||||
|
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5">{{data.gasOrgName?data.gasOrgName:'无'}}</td> |
||||||
|
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5">{{data.gasAgentName?data.gasAgentName:'无'}}</td> |
||||||
|
<td *ngIf="roleType == 0 || roleType == 1 || roleType == 5 || roleType == 8">{{data.gasSalesmanName?data.gasSalesmanName:'无'}}</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 (click)="showOrderDetail(data.orderNo)" nz-menu-item>交易详情</li> |
||||||
|
<li *ngIf="data.status == 2" (click)="showRefund(data.orderNo)" nz-menu-item>交易退款</li> |
||||||
|
<li nz-menu-item>退款记录</li> |
||||||
|
</ul> |
||||||
|
</nz-dropdown-menu> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
</div> |
||||||
|
</nz-spin> |
||||||
|
|
||||||
|
|
||||||
|
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="closeOrderDetail()" [nzFooter]="null" |
||||||
|
nzWidth="1000px" [nzBodyStyle]=" { padding: '5px 5px 30px 5px'}"> |
||||||
|
<nz-spin [nzSpinning]="orderDetailModalLoading"> |
||||||
|
<nz-tabset [nzTabPosition]="'top'" [nzType]="'card'" class="order-oil-tab"> |
||||||
|
<nz-tab nzTitle="交易信息"> |
||||||
|
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'"> |
||||||
|
<nz-descriptions-item nzTitle="交易订单号">{{orderDetailObject.tradeOrder.orderNo}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="第三方交易号">{{orderDetailObject.tradeOrder.paySerialNo!=null?orderDetailObject.tradeOrder.paySerialNo:'无'}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="客户手机号">{{orderDetailObject.tradeOrder.memPhone}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="交易状态">{{orderDetailObject.tradeOrder.orderStatus | orderStatus}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="支付方式">{{orderDetailObject.tradeOrder.payType | orderPayType}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="支付卡号" *ngIf="orderDetailObject.tradeOrder.payType == 4 || orderDetailObject.tradeOrder.payType == 7"> |
||||||
|
{{orderDetailObject.tradeOrder.memCardNo}} |
||||||
|
</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="优惠券">{{orderDetailObject.tradeOrder.memDiscountName?orderDetailObject.tradeOrder.memDiscountName:'无'}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="返利">{{orderDetailObject.tradeOrder.whetherRebate?'是':'否'}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="备注">{{orderDetailObject.tradeOrder.remarks}}</nz-descriptions-item> |
||||||
|
</nz-descriptions> |
||||||
|
|
||||||
|
<nz-divider nzText="支付信息"></nz-divider> |
||||||
|
<nz-descriptions nzBordered [nzColumn]="3" [nzSize]="'middle'"> |
||||||
|
<nz-descriptions-item nzTitle="交易总额">{{orderDetailObject.tradeOrder.totalPrice}} 元</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="优惠金额">{{orderDetailObject.tradeOrder.deductionPrice}} 元</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="应付金额">{{orderDetailObject.tradeOrder.payablePrice}} 元</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzSpan="2" nzTitle="积分抵扣">{{orderDetailObject.tradeOrder.payGold / 100}} 元 </nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="实付金额"> |
||||||
|
{{orderDetailObject.tradeOrder.payRealPrice!=null?orderDetailObject.tradeOrder.payRealPrice+' 元':'未支付'}} |
||||||
|
</nz-descriptions-item> |
||||||
|
</nz-descriptions> |
||||||
|
|
||||||
|
</nz-tab> |
||||||
|
<nz-tab nzTitle="交易时间"> |
||||||
|
<nz-card> |
||||||
|
<nz-timeline> |
||||||
|
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.createTime != null"> |
||||||
|
<p>创建时间:{{orderDetailObject.tradeOrder.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p> |
||||||
|
<p>备注:{{orderDetailObject.tradeOrder.remarks?orderDetailObject.tradeOrder.remarks:'无'}}</p> |
||||||
|
</nz-timeline-item> |
||||||
|
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.cancelTime != null"> |
||||||
|
<p>取消时间:{{orderDetailObject.tradeOrder.cancelTime | date : 'yyyy-MM-dd HH:mm:ss'}}</p> |
||||||
|
<p>备注:{{orderDetailObject.tradeOrder.cancelRemarks?orderDetailObject.tradeOrder.cancelRemarks:'无'}}</p> |
||||||
|
</nz-timeline-item> |
||||||
|
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.payTime != null">支付时间:{{orderDetailObject.tradeOrder.payTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item> |
||||||
|
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.finishTime != null">完成时间:{{orderDetailObject.tradeOrder.finishTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item> |
||||||
|
<nz-timeline-item *ngIf="orderDetailObject.tradeOrder.refundTime != null">退款时间:{{orderDetailObject.tradeOrder.refundTime | date : 'yyyy-MM-dd HH:mm:ss'}}</nz-timeline-item> |
||||||
|
</nz-timeline> |
||||||
|
</nz-card> |
||||||
|
</nz-tab> |
||||||
|
<nz-tab nzTitle="产品信息"> |
||||||
|
<nz-table #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th nzWidth="60px">产品类型</th> |
||||||
|
<th nzWidth="150px">产品名称</th> |
||||||
|
<th nzWidth="80px">产品规格</th> |
||||||
|
<th nzWidth="20px">数量</th> |
||||||
|
<th nzWidth="20px">单价</th> |
||||||
|
<th nzWidth="20px">总价</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr *ngFor="let data of childOrder.data"> |
||||||
|
<td>{{ data.goodsType | orderChildGoodsType}}</td> |
||||||
|
<td> |
||||||
|
{{ data.goodsName }} |
||||||
|
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag> |
||||||
|
</td> |
||||||
|
<td>{{ data.goodsSpecName }}</td> |
||||||
|
<td>{{ data.saleCount }}</td> |
||||||
|
<td>{{ data.goodsActualPrice }} 元</td> |
||||||
|
<td>{{ data.totalActualPrice }} 元</td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
</nz-tab> |
||||||
|
<nz-tab nzTitle="加油详情"> |
||||||
|
<nz-descriptions nzBordered [nzColumn]="2" [nzSize]="'middle'"> |
||||||
|
<nz-descriptions-item nzSpan="2" nzTitle="加油站">{{orderDetailObject.gasOrder.storeName}}</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzTitle="加油班组">{{orderDetailObject.gasOrder.gasClassGroupName?orderDetailObject.gasOrder.gasClassGroupName:'无'}}</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.gasOilLiters}}升</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 nzSpan="1" nzTitle="平台优惠"> |
||||||
|
<span nz-typography>平台折扣:{{orderDetailObject.gasOrder.gasDiscount != 1?(orderDetailObject.gasOrder.gasDiscount * 100)+'折':'无'}}</span><br> |
||||||
|
<span nz-typography>平台补贴:{{orderDetailObject.gasOrder.gasOilSubsidy}} 元</span><br> |
||||||
|
<span nz-typography>每升优惠:{{orderDetailObject.gasOrder.gasLitersPreferences}}元</span><br> |
||||||
|
</nz-descriptions-item> |
||||||
|
<nz-descriptions-item nzSpan="1" nzTitle="油价"> |
||||||
|
<nz-badge nzStatus="processing" nzText="平台价:{{orderDetailObject.gasOrder.gasPricePlatform}}"></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-descriptions-item> |
||||||
|
<nz-descriptions-item *ngIf="roleType == 0 || roleType == 1 || roleType == 5" nzTitle="代理公司"> |
||||||
|
{{orderDetailObject.gasOrder.gasOrgName?orderDetailObject.gasOrder.gasOrgName:'无'}} |
||||||
|
</nz-descriptions-item> |
||||||
|
<nz-descriptions-item *ngIf="roleType == 0 || roleType == 1 || roleType == 5" nzTitle="代理商"> |
||||||
|
{{orderDetailObject.gasOrder.gasAgentName?orderDetailObject.gasOrder.gasAgentName:'无'}} |
||||||
|
</nz-descriptions-item> |
||||||
|
<nz-descriptions-item *ngIf="roleType == 0 || roleType == 1 || roleType == 5 || roleType == 8" nzTitle="业务员"> |
||||||
|
{{orderDetailObject.gasOrder.gasSalesmanName?orderDetailObject.gasOrder.gasSalesmanName:'无'}} |
||||||
|
</nz-descriptions-item> |
||||||
|
</nz-descriptions> |
||||||
|
</nz-tab> |
||||||
|
</nz-tabset> |
||||||
|
</nz-spin> |
||||||
|
</nz-modal> |
||||||
|
|
||||||
|
<nz-modal [(nzVisible)]="refundModal" nzTitle="交易退款" (nzOnCancel)="closeRefund()" [nzFooter]="null" nzWidth="800px"> |
||||||
|
<nz-spin [nzSpinning]="loadingObject.status" [nzTip]="loadingObject.title"> |
||||||
|
<form nz-form [formGroup]="refundForm"> |
||||||
|
<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>退款备注</nz-form-label> |
||||||
|
<nz-form-control> |
||||||
|
<textarea rows="4" nz-input formControlName="remarks" maxlength="100"></textarea> |
||||||
|
</nz-form-control> |
||||||
|
</nz-form-item> |
||||||
|
<div style="text-align: center;"> |
||||||
|
<button nz-button [nzType]="'primary'" (click)="submitRefundConfirm()">提交退款</button> |
||||||
|
</div> |
||||||
|
</form> |
||||||
|
</nz-spin> |
||||||
|
</nz-modal> |
||||||
|
|
||||||
|
<!-- |
||||||
|
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="退款记录" (nzOnCancel)="closeOrderDetail()" [nzFooter]="null" |
||||||
|
nzWidth="1000px" [nzBodyStyle]=" { padding: '5px 5px 30px 5px'}"> |
||||||
|
<nz-table #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true"> |
||||||
|
<thead> |
||||||
|
<tr> |
||||||
|
<th nzWidth="60px">产品类型</th> |
||||||
|
<th nzWidth="150px">产品名称</th> |
||||||
|
<th nzWidth="80px">产品规格</th> |
||||||
|
<th nzWidth="20px">数量</th> |
||||||
|
<th nzWidth="20px">单价</th> |
||||||
|
<th nzWidth="20px">总价</th> |
||||||
|
</tr> |
||||||
|
</thead> |
||||||
|
<tbody> |
||||||
|
<tr *ngFor="let data of childOrder.data"> |
||||||
|
<td>{{ data.goodsType | orderChildGoodsType}}</td> |
||||||
|
<td> |
||||||
|
{{ data.goodsName }} |
||||||
|
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag> |
||||||
|
</td> |
||||||
|
<td>{{ data.goodsSpecName }}</td> |
||||||
|
<td>{{ data.saleCount }}</td> |
||||||
|
<td>{{ data.goodsActualPrice }} 元</td> |
||||||
|
<td>{{ data.totalActualPrice }} 元</td> |
||||||
|
</tr> |
||||||
|
</tbody> |
||||||
|
</nz-table> |
||||||
|
</nz-modal> |
||||||
|
--> |
@ -0,0 +1,9 @@ |
|||||||
|
.collapse { |
||||||
|
margin-left: 15px; |
||||||
|
} |
||||||
|
::ng-deep .order-oil-tab .ant-descriptions-item-label { |
||||||
|
width: 150px; |
||||||
|
} |
||||||
|
::ng-deep .order-oil-tab .ant-descriptions-item-content { |
||||||
|
width: 200px; |
||||||
|
} |
@ -0,0 +1,380 @@ |
|||||||
|
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 {TyAgentOilStationService} from '../../../../services/ty-agent-oil-station.service'; |
||||||
|
import {TyAgentService} from '../../../../services/ty-agent.service'; |
||||||
|
import {TySalesmanService} from '../../../../services/ty-salesman.service'; |
||||||
|
import {OrganizationService} from '../../../../services/organization.service'; |
||||||
|
import {ADMIN_INFO_OBJECT} from '../../../../services/local-storage.namespace'; |
||||||
|
import {OrderManageService} from '../../../../services/order-manage.service'; |
||||||
|
import {CommonsService} from '../../../../services/commons.service'; |
||||||
|
import {CompanyService} from '../../../../services/company.service'; |
||||||
|
import {MerchantService} from '../../../../services/merchant.service'; |
||||||
|
|
||||||
|
@Component({ |
||||||
|
selector: 'app-order-oil-list', |
||||||
|
templateUrl: './order-oil-list.component.html', |
||||||
|
styleUrls: ['./order-oil-list.component.scss'] |
||||||
|
}) |
||||||
|
export class OrderOilListComponent implements OnInit { |
||||||
|
FILE_URL = environment.imageUrl; |
||||||
|
roleType; |
||||||
|
adminFlag; |
||||||
|
|
||||||
|
loadingObject = { |
||||||
|
title: "加载中...", |
||||||
|
status: false, |
||||||
|
}; |
||||||
|
dataObject: any = {}; |
||||||
|
tableLoading = true; |
||||||
|
searchForm: FormGroup; |
||||||
|
pageNum = 1; |
||||||
|
pageSize = 10; |
||||||
|
whereObject: any = {}; |
||||||
|
isCollapse = false; |
||||||
|
|
||||||
|
refundModal = false; |
||||||
|
refundForm: FormGroup; |
||||||
|
|
||||||
|
orderDetailModal = false; |
||||||
|
orderDetailModalLoading = false; |
||||||
|
orderDetailObject: any = { |
||||||
|
tradeOrder: {}, |
||||||
|
gasOrder: {}, |
||||||
|
}; |
||||||
|
|
||||||
|
orderStatusArray = []; |
||||||
|
companyArray = []; |
||||||
|
merArray = []; |
||||||
|
oilArray = []; |
||||||
|
orgIdArray = []; |
||||||
|
tyAgentArray = []; |
||||||
|
tySalesmanArray = []; |
||||||
|
|
||||||
|
constructor(private modal: NzModalService, |
||||||
|
private message: NzMessageService, |
||||||
|
private commonsService: CommonsService, |
||||||
|
private companyService: CompanyService, |
||||||
|
private merchantService: MerchantService, |
||||||
|
private store: LocalStorageService, |
||||||
|
private orderManageService: OrderManageService, |
||||||
|
private tyAgentService: TyAgentService, |
||||||
|
private tySalesmanService: TySalesmanService, |
||||||
|
private organizationService: OrganizationService, |
||||||
|
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.refundForm = this.form.group({ |
||||||
|
orderNo: [{ value: null, disabled: true}, [Validators.required]], |
||||||
|
remarks: [null], |
||||||
|
}); |
||||||
|
|
||||||
|
this.searchForm = this.form.group({ |
||||||
|
orderNo: [null], |
||||||
|
gasOrgId: [null], |
||||||
|
gasAgentId: [null], |
||||||
|
gasSalesmanId: [null], |
||||||
|
salesmanName: [null], |
||||||
|
salesmanId: [null], |
||||||
|
gasStaffName: [null], |
||||||
|
gasOilNo: [null], |
||||||
|
storeName: [null], |
||||||
|
memPhone: [null], |
||||||
|
status: [null], |
||||||
|
createTimeArray: [null], |
||||||
|
payTimeArray: [null], |
||||||
|
refundTimeArray: [null], |
||||||
|
companyId: [null], |
||||||
|
merId: [null], |
||||||
|
}); |
||||||
|
this.requestOrderData(1); |
||||||
|
|
||||||
|
this.commonsService.getDictionary("GAS_OIL_TYPE", data => { |
||||||
|
this.oilArray = data['return_data']; |
||||||
|
}); |
||||||
|
this.commonsService.getDictionary("ORDER_OIL_STATUS", data => { |
||||||
|
this.orderStatusArray = data['return_data']; |
||||||
|
}); |
||||||
|
|
||||||
|
if (this.roleType === 0 || this.roleType === 1) { |
||||||
|
this.companyService.selectCompanyList({ pageNum: 1,pageSize: 999 }, data => { |
||||||
|
this.companyArray = data['return_data']['list']; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
if (this.roleType === 5) { |
||||||
|
this.requestMerList(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']) |
||||||
|
} |
||||||
|
|
||||||
|
if (this.roleType === 5 && this.adminFlag === 1) { |
||||||
|
this.requestOrgId(this.store.get(ADMIN_INFO_OBJECT)['bsCompany']['id']); |
||||||
|
} |
||||||
|
|
||||||
|
if (this.roleType === 5 && this.adminFlag === 0) { |
||||||
|
this.requestAgent(this.store.get(ADMIN_INFO_OBJECT)['secUser'].organizationId); |
||||||
|
} |
||||||
|
|
||||||
|
if (this.roleType === 8) { |
||||||
|
this.requestSalesman(this.store.get(ADMIN_INFO_OBJECT)['highTyAgent'].id); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 请求订单数据 |
||||||
|
*/ |
||||||
|
requestOrderData(pageNum: number) { |
||||||
|
this.tableLoading = true; |
||||||
|
this.whereObject['pageNum'] = pageNum; |
||||||
|
this.whereObject['pageSize'] = this.pageSize; |
||||||
|
this.orderManageService.getGasOrderList(this.whereObject, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.dataObject = data['return_data']; |
||||||
|
} else { |
||||||
|
this.modal.error(data['return_msg']); |
||||||
|
} |
||||||
|
this.tableLoading = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 请求数据 |
||||||
|
*/ |
||||||
|
requestMerList(companyId: number) { |
||||||
|
if (companyId != null) { |
||||||
|
this.searchForm.controls['merId'].setValue(null); |
||||||
|
this.merchantService.getMerchantListByCompany(companyId, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.merArray = data['return_data']; |
||||||
|
} else { |
||||||
|
this.modal.error(data['return_msg']); |
||||||
|
} |
||||||
|
this.tableLoading = false; |
||||||
|
}); |
||||||
|
|
||||||
|
this.requestOrgId(companyId); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 请求数据 |
||||||
|
*/ |
||||||
|
requestOrgId(companyId: number) { |
||||||
|
this.organizationService.getOrganizationList(companyId, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.orgIdArray = data['return_data']; |
||||||
|
} else { |
||||||
|
this.modal.error(data['return_msg']); |
||||||
|
} |
||||||
|
this.tableLoading = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 请求数据 |
||||||
|
*/ |
||||||
|
requestAgent(orgId: number) { |
||||||
|
if (orgId != null) { |
||||||
|
this.searchForm.controls['gasAgentId'].setValue(null); |
||||||
|
this.searchForm.controls['gasSalesmanId'].setValue(null); |
||||||
|
|
||||||
|
this.tyAgentService.getAgentList({ orgId: orgId, pageNum: 1, pageSize: 9999}, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.tyAgentArray = data['return_data']['list']; |
||||||
|
} else { |
||||||
|
this.modal.error(data['return_msg']); |
||||||
|
} |
||||||
|
this.tableLoading = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 请求数据 |
||||||
|
*/ |
||||||
|
requestSalesman(tyAgentId: number) { |
||||||
|
if (tyAgentId != null) { |
||||||
|
this.searchForm.controls['gasSalesmanId'].setValue(null); |
||||||
|
|
||||||
|
this.tySalesmanService.getSalesmanList({ tyAgentId: tyAgentId, pageNum: 1, pageSize: 9999}, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.tySalesmanArray = data['return_data']['list']; |
||||||
|
} else { |
||||||
|
this.modal.error(data['return_msg']); |
||||||
|
} |
||||||
|
this.tableLoading = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 搜索 |
||||||
|
* @param whereObject 条件 |
||||||
|
*/ |
||||||
|
search(whereObject: object) { |
||||||
|
if (whereObject['createTimeArray'] != null) { |
||||||
|
whereObject['createTimeS'] = new Date(whereObject['createTimeArray'][0]).getTime(); |
||||||
|
whereObject['createTimeE'] = new Date(whereObject['createTimeArray'][1]).getTime(); |
||||||
|
} else { |
||||||
|
whereObject['createTimeS'] = null; |
||||||
|
whereObject['createTimeE'] = null; |
||||||
|
} |
||||||
|
|
||||||
|
if (whereObject['payTimeArray'] != null) { |
||||||
|
whereObject['payTimeS'] = new Date(whereObject['payTimeArray'][0]).getTime(); |
||||||
|
whereObject['payTimeE'] = new Date(whereObject['payTimeArray'][1]).getTime(); |
||||||
|
} else { |
||||||
|
whereObject['payTimeS'] = null; |
||||||
|
whereObject['payTimeE'] = null; |
||||||
|
} |
||||||
|
|
||||||
|
if (whereObject['refundTimeArray'] != null) { |
||||||
|
whereObject['refundTimeS'] = new Date(whereObject['refundTimeArray'][0]).getTime(); |
||||||
|
whereObject['refundTimeE'] = new Date(whereObject['refundTimeArray'][1]).getTime(); |
||||||
|
} else { |
||||||
|
whereObject['refundTimeS'] = null; |
||||||
|
whereObject['refundTimeE'] = null; |
||||||
|
} |
||||||
|
this.whereObject = whereObject; |
||||||
|
this.requestOrderData(1); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 分页 |
||||||
|
* @param pageSize |
||||||
|
*/ |
||||||
|
pageSizeChang(pageSize: number) { |
||||||
|
this.pageSize = pageSize; |
||||||
|
this.requestOrderData(1) |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 重置 |
||||||
|
*/ |
||||||
|
resetSearchForm(): void { |
||||||
|
this.searchForm.reset(); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 搜索条件折叠 |
||||||
|
*/ |
||||||
|
toggleCollapse(): void { |
||||||
|
this.isCollapse = !this.isCollapse; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出订单 |
||||||
|
*/ |
||||||
|
excelOrder() { |
||||||
|
this.loadingObject.status = true; |
||||||
|
this.loadingObject.title = '数据导出中...'; |
||||||
|
|
||||||
|
this.orderManageService.exportGasOrderList(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'] |
||||||
|
}); |
||||||
|
} |
||||||
|
this.loadingObject.status = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 打开订单详情 |
||||||
|
*/ |
||||||
|
showOrderDetail(orderNo: string) { |
||||||
|
this.orderDetailModal = true; |
||||||
|
this.orderDetailModalLoading = true; |
||||||
|
|
||||||
|
this.orderManageService.getGasOrderDetail(orderNo, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.orderDetailObject = data['return_data']; |
||||||
|
} else { |
||||||
|
this.modal.error({ |
||||||
|
nzTitle: '提示', |
||||||
|
nzContent: data['return_msg'] |
||||||
|
}); |
||||||
|
} |
||||||
|
this.orderDetailModalLoading = false; |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 关闭订单详情 |
||||||
|
*/ |
||||||
|
closeOrderDetail() { |
||||||
|
this.orderDetailModal = false; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 打开退款模态框 |
||||||
|
* @param orderNo |
||||||
|
*/ |
||||||
|
showRefund(orderNo: string) { |
||||||
|
this.refundForm.patchValue({ orderNo: orderNo}) |
||||||
|
this.refundModal = true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 提交退款确认框 |
||||||
|
*/ |
||||||
|
submitRefundConfirm() { |
||||||
|
for (const i in this.refundForm.controls) { |
||||||
|
this.refundForm.controls[i].markAsDirty(); |
||||||
|
this.refundForm.controls[i].updateValueAndValidity(); |
||||||
|
} |
||||||
|
if (this.refundForm.status == null || this.refundForm.status !== 'VALID') { |
||||||
|
this.modal.warning({ |
||||||
|
nzTitle: '提示', |
||||||
|
nzContent: '请填写所有必填项', |
||||||
|
}); |
||||||
|
return; |
||||||
|
} |
||||||
|
this.modal.confirm({ |
||||||
|
nzTitle: '提示', |
||||||
|
nzContent: '确定对交易订号('+this.refundForm.controls.orderNo.value+')进行退款吗?', |
||||||
|
nzOnOk: () => this.submitRefund() |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 提交退款 |
||||||
|
* @param orderNo |
||||||
|
*/ |
||||||
|
submitRefund() { |
||||||
|
this.loadingObject.status = true; |
||||||
|
this.loadingObject.title = '处理中...'; |
||||||
|
this.orderManageService.refundOrder(this.refundForm.controls.orderNo.value,this.refundForm.controls.remarks.value, data => { |
||||||
|
if (data['return_code'] === '000000') { |
||||||
|
this.modal.success({ |
||||||
|
nzTitle: '提示', |
||||||
|
nzContent: '操作成功', |
||||||
|
}); |
||||||
|
this.requestOrderData(this.whereObject.pageNum); |
||||||
|
this.closeRefund(); |
||||||
|
} else { |
||||||
|
this.modal.error({ |
||||||
|
nzTitle: '提示', |
||||||
|
nzContent: data['return_msg'], |
||||||
|
}); |
||||||
|
} |
||||||
|
this.loadingObject.status = false; |
||||||
|
}); |
||||||
|
this.refundModal = true; |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 关闭退款模态框 |
||||||
|
* @param orderNo |
||||||
|
*/ |
||||||
|
closeRefund() { |
||||||
|
this.refundModal = false; |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ |
||||||
|
name: 'orderChildGoodsType' |
||||||
|
}) |
||||||
|
export class OrderChildGoodsTypePipe implements PipeTransform { |
||||||
|
|
||||||
|
transform(value: number): string { |
||||||
|
switch (value) { |
||||||
|
case 1: |
||||||
|
return '卡券'; |
||||||
|
case 2: |
||||||
|
return '积分充值'; |
||||||
|
case 3: |
||||||
|
return '加油订单'; |
||||||
|
case 4: |
||||||
|
return 'KFC'; |
||||||
|
case 5: |
||||||
|
return '电影票'; |
||||||
|
case 6: |
||||||
|
return '话费充值'; |
||||||
|
case 7: |
||||||
|
return '优惠卷包'; |
||||||
|
case 8: |
||||||
|
return '汇联通充值'; |
||||||
|
case 9: |
||||||
|
return '星巴克'; |
||||||
|
case 10: |
||||||
|
return '第三方充值'; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,25 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ |
||||||
|
name: 'orderOilStatus' |
||||||
|
}) |
||||||
|
export class OrderOilStatusPipe 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 '退款失败'; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,27 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ |
||||||
|
name: 'orderPayType' |
||||||
|
}) |
||||||
|
export class OrderPayTypePipe 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 '嗨森逛油卡'; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,23 @@ |
|||||||
|
import { Pipe, PipeTransform } from '@angular/core'; |
||||||
|
|
||||||
|
@Pipe({ |
||||||
|
name: 'orderStatus' |
||||||
|
}) |
||||||
|
export class OrderStatusPipe implements PipeTransform { |
||||||
|
|
||||||
|
transform(value: number): string { |
||||||
|
switch (value) { |
||||||
|
case 1: |
||||||
|
return '待支付'; |
||||||
|
case 2: |
||||||
|
return '已支付'; |
||||||
|
case 3: |
||||||
|
return '已完成'; |
||||||
|
case 4: |
||||||
|
return '已退款'; |
||||||
|
case 5: |
||||||
|
return '已取消'; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,68 @@ |
|||||||
|
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 OrderManageService { |
||||||
|
|
||||||
|
constructor( |
||||||
|
private http: HttpClient, |
||||||
|
private common: CommonsService |
||||||
|
) { |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 交易订单退款 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public refundOrder(orderNo: string, remarks: string, callBack) { |
||||||
|
this.http.post(environment.orderUrl + 'refundOrder', { orderNo: orderNo, remarks: remarks}).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
/** |
||||||
|
* 查询加油订单 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public getGasOrderList(param: object, callBack) { |
||||||
|
this.http.get(environment.orderUrl + 'bweb/getGasOrderList?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 查询油站订单详情 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public getGasOrderDetail(orderNo: string, callBack) { |
||||||
|
this.http.get(environment.orderUrl + 'bweb/getGasOrderDetail?orderNo=' + orderNo).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
/** |
||||||
|
* 导出加油订单 |
||||||
|
* |
||||||
|
* @param paramsObject 对象 |
||||||
|
* @param callBack 回调 |
||||||
|
*/ |
||||||
|
public exportGasOrderList(param: object, callBack) { |
||||||
|
this.http.get(environment.orderUrl + 'bweb/exportGasOrder?' + this.common.getWhereCondition(param)).subscribe(data => { |
||||||
|
callBack(data); |
||||||
|
}); |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
} |
Loading…
Reference in new issue