提交代码

pull/1/head
胡锐 2 years ago
parent 6e195e91af
commit 36bce39937
  1. 14
      src/app/admin/order-manage/order-manage-routing.module.ts
  2. 24
      src/app/admin/order-manage/order-manage.module.ts
  3. 446
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.html
  4. 9
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.scss
  5. 380
      src/app/admin/order-manage/order-oil/order-oil-list/order-oil-list.component.ts
  6. 6
      src/app/admin/promotion/distribution-integral-list/distribution-integral-list.component.ts
  7. 4
      src/app/admin/promotion/promotion-order-list/promotion-order-list.component.ts
  8. 4
      src/app/admin/promotion/promotion.module.ts
  9. 7
      src/app/app-common.module.ts
  10. 5
      src/app/app-routing.module.ts
  11. 4
      src/app/pipes/index.ts
  12. 32
      src/app/pipes/order/order-child-goods-type.pipe.ts
  13. 25
      src/app/pipes/order/order-oil-status.pipe.ts
  14. 27
      src/app/pipes/order/order-pay-type.pipe.ts
  15. 23
      src/app/pipes/order/order-status.pipe.ts
  16. 2
      src/app/pipes/paytype.pipe.ts
  17. 2
      src/app/services/distribution.service.ts
  18. 68
      src/app/services/order-manage.service.ts
  19. 3
      src/environments/environment.ts

@ -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;
}
}

@ -1,11 +1,9 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {Router} from '_@angular_router@9.0.7@@angular/router';
import {CommonsService} from '../../../services/commons.service';
import {DistributionService} from '../../../services/distribution.service';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'app-distribution-integral-list',

@ -1,9 +1,9 @@
import { Component, OnInit } from '@angular/core';
import {environment} from '../../../../environments/environment';
import {FormBuilder, FormGroup} from '_@angular_forms@9.0.7@@angular/forms';
import {DistributionService} from '../../../services/distribution.service';
import {IconService} from '../../../services/icon.service';
import {NzMessageService} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {FormBuilder, FormGroup} from '@angular/forms';
import {NzMessageService} from 'ng-zorro-antd';
@Component({
selector: 'app-promotion-order-list',

@ -4,10 +4,10 @@ import { CommonModule } from '@angular/common';
import { PromotionRoutingModule } from './promotion-routing.module';
import { DistributionIntegralListComponent } from './distribution-integral-list/distribution-integral-list.component';
import { PromotionOrderListComponent } from './promotion-order-list/promotion-order-list.component';
import {NgZorroAntdModule} from '_ng-zorro-antd@9.3.0@ng-zorro-antd';
import {SeparateModule} from '../../common/separate/separate.module';
import {FormsModule, ReactiveFormsModule} from '_@angular_forms@9.0.7@@angular/forms';
import {BreadcrumbModule} from '../../common/breadcrumb/breadcrumb.module';
import {NgZorroAntdModule} from 'ng-zorro-antd';
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
@NgModule({

@ -48,7 +48,7 @@ import {
GasStaffStatusPipe,
PayStatusPipe,
ChlidRechargeStatusPipe,
SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe
SourceTypePipe, GasClassGroupTaskStatusPipe, GasOrderStatusPipe, OrderStatusPipe, OrderPayTypePipe, OrderChildGoodsTypePipe
} from './pipes';
import {OilCardStatusPipe} from './pipes';
import {OilTypePipe} from './pipes/store/oil-type.pipe';
@ -58,6 +58,7 @@ import {OilPriceTaskPriceTypePipe} from './pipes/gas-oil-price/oil-price-task-pr
import { PlatformPipe } from './pipes/recharge-pipe/platform.pipe';
import { IntegralTypePipe } from './pipes/integral/integral-type.pipe';
import { IntegralProductPipe } from './pipes/integral/integral-product.pipe';
import {OrderOilStatusPipe} from './pipes/order/order-oil-status.pipe';
const PIPES = [
TimesPipe,
@ -108,6 +109,10 @@ const PIPES = [
GasClassGroupTaskStatusPipe,
GasOrderStatusPipe,
PlatformPipe,
OrderOilStatusPipe,
OrderStatusPipe,
OrderPayTypePipe,
OrderChildGoodsTypePipe,
];

@ -62,6 +62,11 @@ const routes: Routes = [
loadChildren: () => import('./admin/order/order.module').then(m => m.OrderModule),
canActivate: [InitGuardService]
},
{
path: 'order-manage',
loadChildren: () => import('./admin/order-manage/order-manage.module').then(m => m.OrderManageModule),
canActivate: [InitGuardService]
},
{
path: 'discount',
loadChildren: () => import('./admin/discount/discount.module').then(m => m.DiscountModule),

@ -41,3 +41,7 @@ export * from './apiMerchant/source-type.pipe';
export * from './gas-class-group-task/gas-class-group-task-status.pipe';
export * from './gas-order/gas-order-status.pipe';
export * from './recharge-pipe/platform.pipe';
export * from './order/order-oil-status.pipe';
export * from './order/order-status.pipe';
export * from './order/order-pay-type.pipe';
export * from './order/order-child-goods-type.pipe';

@ -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 '已取消';
}
}
}

@ -17,6 +17,8 @@ export class PaytypePipe implements PipeTransform {
return '汇联通工会卡';
case 5:
return '银联';
default:
return '未知';
}
}
}

@ -1,7 +1,7 @@
import { Injectable } from '@angular/core';
import {HttpClient} from '_@angular_common@9.0.7@@angular/common/http';
import {CommonsService} from './commons.service';
import {environment} from '../../environments/environment';
import {HttpClient} from '@angular/common/http';
@Injectable({
providedIn: 'root'

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

@ -5,7 +5,8 @@
export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'http://localhost:9302/filesystem/',
orderUrl: 'http://localhost:9304/order/',
imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://hsgcs.dctpay.com/filesystem/',
key: 'https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=',

Loading…
Cancel
Save