* 'order' of http://139.159.177.244:3000/yuanye/high-web:
  提交代码

# Conflicts:
#	src/app/admin/order-manage/order-manage.module.ts
pull/1/head
袁野 2 years ago
parent 14c2ea96c0
commit 191d3d623d
  1. 85
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.html
  2. 3
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.scss
  3. 33
      src/app/admin/order-manage/kfc-order/kfc-order-list/kfc-order-list.component.ts
  4. 6
      src/app/admin/order-manage/order-manage-routing.module.ts
  5. 4
      src/app/admin/order-manage/order-manage.module.ts
  6. 29
      src/app/services/order/order-kfc.service.ts
  7. 42
      src/app/services/order/order-third-party.service.ts
  8. 1
      src/environments/environment.test.ts
  9. 5
      src/environments/environment.ts

@ -30,7 +30,7 @@
<nz-form-item> <nz-form-item>
<nz-form-label [nzSpan]="8">交易状态</nz-form-label> <nz-form-label [nzSpan]="8">交易状态</nz-form-label>
<nz-form-control [nzSpan]="14"> <nz-form-control [nzSpan]="14">
<nz-select formControlName="status" nzAllowClear> <nz-select formControlName="orderStatus" nzAllowClear>
<nz-option *ngFor="let item of orderStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option> <nz-option *ngFor="let item of orderStatusArray" nzValue="{{item.codeValue}}" nzLabel="{{item.codeName}}"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
@ -179,7 +179,7 @@
<a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a> <a nz-dropdown [nzDropdownMenu]="menu"> 操作列表 <i nz-icon nzType="down"></i> </a>
<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)"><a>详情</a></li>--> <li nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
</ul> </ul>
</nz-dropdown-menu> </nz-dropdown-menu>
</td> </td>
@ -188,3 +188,84 @@
</nz-table> </nz-table>
</div> </div>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="orderDetailModal = false" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '20px 20px 30px 20px'}">
<nz-spin [nzSpinning]="orderDetailModalLoading">
<nz-tabset [nzType]="'card'">
<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-tab>
<nz-tab nzTitle="支付信息">
<nz-descriptions nzBordered [nzColumn]="3" [nzSize]="'middle'">
<nz-descriptions-item nzTitle="交易总额" >{{orderDetailObject.tradeOrder.totalPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="总优惠" >{{orderDetailObject.tradeOrder.totalDeductionPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="产品优惠金额" >{{orderDetailObject.tradeOrder.deductionProductPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="优惠券优惠" >{{orderDetailObject.tradeOrder.deductionCouponPrice}} 元</nz-descriptions-item>
<nz-descriptions-item nzTitle="应付金额" >{{orderDetailObject.tradeOrder.payablePrice}} 元</nz-descriptions-item>
<nz-descriptions-item 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 nzBordered #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true">
<thead>
<tr>
<th nzWidth="80px">产品类型</th>
<th nzWidth="150px">门店</th>
<th nzWidth="100px">产品图片</th>
<th nzWidth="150px">产品名称</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.storeName}}</td>
<td><img src="{{data.goodsImg}}" alt=""></td>
<td>
{{ data.goodsName }}
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag>
</td>
<td>{{ data.saleCount }}</td>
<td>{{ data.goodsActualPrice }} 元</td>
<td>{{ data.totalActualPrice }} 元</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
</nz-tabset>
</nz-spin>
</nz-modal>

@ -5,8 +5,8 @@ import {LocalStorageService} from '../../../../services/local-storage.service';
import {CompanyService} from '../../../../services/company.service'; import {CompanyService} from '../../../../services/company.service';
import {CommonsService} from '../../../../services/commons.service'; import {CommonsService} from '../../../../services/commons.service';
import {animate, state, style, transition, trigger} from '@angular/animations'; import {animate, state, style, transition, trigger} from '@angular/animations';
import {OrderKfcService} from '../../../../services/order/order-kfc.service';
import {NzMessageService} from 'ng-zorro-antd'; import {NzMessageService} from 'ng-zorro-antd';
import {OrderThirdPartyService} from '../../../../services/order/order-third-party.service';
@Component({ @Component({
@ -56,11 +56,20 @@ export class KfcOrderListComponent implements OnInit {
requestData = []; requestData = [];
// 列表加载 // 列表加载
loading = true; loading = true;
// 订单详情相关参数
// 详情模态框
orderDetailModal = false;
// 详情模态框数据等待
orderDetailModalLoading = false;
// 订单详情数据
orderDetailObject: any = {
tradeOrder: {},
};
constructor( constructor(
private form: FormBuilder, private form: FormBuilder,
private store: LocalStorageService, private store: LocalStorageService,
private message: NzMessageService, private message: NzMessageService,
private kfcOrder: OrderKfcService, private thirdPartyOrder: OrderThirdPartyService,
private companyService: CompanyService, private companyService: CompanyService,
private commonsService: CommonsService, private commonsService: CommonsService,
) { } ) { }
@ -71,7 +80,7 @@ export class KfcOrderListComponent implements OnInit {
orderNo: [null], orderNo: [null],
memPhone: [null], memPhone: [null],
payTimeArray: [null], payTimeArray: [null],
status: [null], orderStatus: [null],
createTimeArray: [null], createTimeArray: [null],
refundTimeArray: [null], refundTimeArray: [null],
companyId: [null], companyId: [null],
@ -101,7 +110,8 @@ export class KfcOrderListComponent implements OnInit {
} }
whereObject['pageNum'] = this.pageNum; whereObject['pageNum'] = this.pageNum;
whereObject['pageSize'] = this.pageSize; whereObject['pageSize'] = this.pageSize;
this.kfcOrder.getOrderKfcList(whereObject, data => { whereObject['productType'] = 2;
this.thirdPartyOrder.getOrderList(whereObject, data => {
this.loading = false; this.loading = false;
if (data['return_code'] === '000000') { if (data['return_code'] === '000000') {
console.log(data); console.log(data);
@ -113,6 +123,21 @@ export class KfcOrderListComponent implements OnInit {
}); });
} }
// 展示订单详情
public showOrderDetail(orderNo: string) {
this.orderDetailModal = true;
this.orderDetailModalLoading = true;
this.thirdPartyOrder.getOrderDetail(orderNo, data => {
if (data['return_code'] === '000000') {
this.orderDetailObject = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
this.orderDetailModalLoading = false;
});
}
} }

@ -5,6 +5,8 @@ import {OrderCouponListComponent} from './order-coupon/order-coupon-list/order-c
import {OrderIntegralRechargeComponent} from './order-integral-recharge/order-integral-recharge.component'; import {OrderIntegralRechargeComponent} from './order-integral-recharge/order-integral-recharge.component';
import {OrderRefundListComponent} from './order-refund-list/order-refund-list.component'; import {OrderRefundListComponent} from './order-refund-list/order-refund-list.component';
import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component';
import {StarbucksOrderListComponent} from './starbucks-order/starbucks-order-list/starbucks-order-list.component';
import {MemberChargeOrderListComponent} from './member-charge-order/member-charge-order-list/member-charge-order-list.component';
const routes: Routes = [ const routes: Routes = [
@ -12,7 +14,9 @@ const routes: Routes = [
{ path: 'order-coupon-list', component: OrderCouponListComponent }, { path: 'order-coupon-list', component: OrderCouponListComponent },
{ path: 'order-integral-recharge-list', component: OrderIntegralRechargeComponent }, { path: 'order-integral-recharge-list', component: OrderIntegralRechargeComponent },
{ path: 'order-refund-list', component: OrderRefundListComponent }, { path: 'order-refund-list', component: OrderRefundListComponent },
{ path: 'order-kfc-list', component: KfcOrderListComponent} { path: 'order-kfc-list', component: KfcOrderListComponent},
{ path: 'order-starbucks--list', component: StarbucksOrderListComponent},
{ path: 'order-member-charge--list', component: MemberChargeOrderListComponent}
]; ];
@NgModule({ @NgModule({

@ -11,9 +11,11 @@ import { OrderCouponListComponent } from './order-coupon/order-coupon-list/order
import { OrderIntegralRechargeComponent } from './order-integral-recharge/order-integral-recharge.component'; import { OrderIntegralRechargeComponent } from './order-integral-recharge/order-integral-recharge.component';
import { OrderRefundListComponent } from './order-refund-list/order-refund-list.component'; import { OrderRefundListComponent } from './order-refund-list/order-refund-list.component';
import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component'; import {KfcOrderListComponent} from './kfc-order/kfc-order-list/kfc-order-list.component';
import { StarbucksOrderListComponent } from './starbucks-order/starbucks-order-list/starbucks-order-list.component';
import { MemberChargeOrderListComponent } from './member-charge-order/member-charge-order-list/member-charge-order-list.component';
@NgModule({ @NgModule({
declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent], declarations: [OrderOilListComponent, OrderCouponListComponent, OrderIntegralRechargeComponent, OrderRefundListComponent, KfcOrderListComponent, StarbucksOrderListComponent, MemberChargeOrderListComponent],
imports: [ imports: [
CommonModule, CommonModule,
OrderManageRoutingModule, OrderManageRoutingModule,

@ -1,29 +0,0 @@
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 OrderKfcService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* @Author Sum1Dream
* @methodName getOrderKfcList
* @Description // 查询肯德基订单
* @Date 17:20 2022/10/27
* @Param param
*/
public getOrderKfcList(param: object, callBack) {
this.http.get(environment.orderUrl + 'thirdParty/getOrderKfcList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
}

@ -0,0 +1,42 @@
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 OrderThirdPartyService {
constructor(
private http: HttpClient,
private common: CommonsService
) { }
/**
* @Author Sum1Dream
* @methodName getOrderKfcList
* @Description // 查询肯德基订单
* @Date 17:20 2022/10/27
* @Param param
*/
public getOrderList(param: object, callBack) {
this.http.get(environment.orderUrl + 'thirdParty/getOrderList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
/**
* @Author Sum1Dream
* @methodName getOrderDetail
* @Description // 根据订单号查询订单详情
* @Date 14:38 2022/10/28
* @Param
*/
public getOrderDetail(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'thirdParty/getOrderDetail?orderNo=' + orderNo).subscribe(data => {
callBack(data);
});
}
}

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

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

Loading…
Cancel
Save