提交代码

master
胡锐 4 months ago
parent 94c249c062
commit 7a960cf389
  1. 5
      src/app/pages/trade/order-oil-list/order-oil-list.component.html
  2. 27
      src/app/pages/trade/order-oil-list/order-oil-list.component.ts
  3. 14
      src/app/services/trade/order-oil.service.ts

@ -229,6 +229,7 @@
<ul nz-menu nzSelectable>
<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 && 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>
</ul>
</nz-dropdown-menu>
@ -250,10 +251,10 @@
<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 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.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.gasRefuelPrice}}元</nz-descriptions-item>
<nz-descriptions-item nzTitle="加油升数">{{orderDetailObject.gasOrder.gasOilLiters}}升</nz-descriptions-item>

@ -146,6 +146,7 @@ export class OrderOilListComponent {
refundForm: FormGroup;
GAS_REFUND_BTN = new ButtonPipe().isButton("GAS_REFUND");
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,
private orderOilService : OrderOilService,
private agentService : AgentService,
@ -286,6 +287,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

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