完成虚拟订单导出

master
胡锐 3 months ago
parent ebaaf09262
commit 47372847bb
  1. 40
      src/app/pages/trade/comp-order/comp-order.component.html
  2. 10
      src/app/pages/trade/comp-order/comp-order.component.ts
  3. 8
      src/environments/environment.ts

@ -112,7 +112,8 @@
<th rowspan="2" nzWidth="120px">商品key</th> <th rowspan="2" nzWidth="120px">商品key</th>
<th rowspan="2" nzWidth="180px">商品名称</th> <th rowspan="2" nzWidth="180px">商品名称</th>
<th rowspan="2" nzWidth="150px">商品规格</th> <th rowspan="2" nzWidth="150px">商品规格</th>
<th rowspan="2" nzWidth="100px">商品价格</th> <th rowspan="2" nzWidth="100px">商品原价</th>
<th rowspan="2" nzWidth="100px">商品售价</th>
<th rowspan="2" nzWidth="100px">购买数量</th> <th rowspan="2" nzWidth="100px">购买数量</th>
<th colspan="9">交易信息</th> <th colspan="9">交易信息</th>
<th rowspan="2">卡密订单</th> <th rowspan="2">卡密订单</th>
@ -135,23 +136,24 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data;index as i"> <tr *ngFor="let data of basicTable.data;index as i">
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.orderNo}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.orderNo}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.childOrderNo}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.childOrderNo}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.userPhone}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.userPhone}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsKey}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsKey}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsName}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsName}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsSpecsName}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsSpecsName}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsPrice}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsOriginalPrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsCount}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsSalePrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.totalPrice}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.goodsCount}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.couponDiscountPrice}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.totalPrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.integralDiscountPrice}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.couponDiscountPrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.payRealPrice}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.integralDiscountPrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.payChannel | dictionary: 'ORDER_PAY_CHANNEL'}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.payRealPrice}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.payChannel | dictionary: 'ORDER_PAY_CHANNEL'}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.tradeStatus | dictionary: 'ORDER_CHILD_STATUS'}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.payType | dictionary: 'ORDER_PAY_TYPE'}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.tradeStatus | dictionary: 'ORDER_CHILD_STATUS'}}</td>
<td *ngIf="basicTable.data[i-1]?.orderNo != data['orderNo']" rowSpan="{{data.rowSpan}}">{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td> <td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td *ngIf="basicTable.data[i-1]?.childOrderNo != data['childOrderNo']" rowSpan="{{data.rowSpan}}">{{data.payTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzEllipsis nz-tooltip nzTooltipTitle="{{data.channelOrderNo}}">{{data.channelOrderNo}}</td> <td nzEllipsis nz-tooltip nzTooltipTitle="{{data.channelOrderNo}}">{{data.channelOrderNo}}</td>
<td nzEllipsis nz-tooltip nzTooltipTitle="{{data.couNo}}">{{data.couNo}}</td> <td nzEllipsis nz-tooltip nzTooltipTitle="{{data.couNo}}">{{data.couNo}}</td>
<td>{{data.expireTime | date: 'yyyy-MM-dd HH:mm'}}</td> <td>{{data.expireTime | date: 'yyyy-MM-dd HH:mm'}}</td>
@ -225,7 +227,7 @@
<td>{{ data.goodsKey }}</td> <td>{{ data.goodsKey }}</td>
<td>{{ data.goodsName }}</td> <td>{{ data.goodsName }}</td>
<td>{{ data.goodsSpecsName }}</td> <td>{{ data.goodsSpecsName }}</td>
<td>{{ data.goodsPrice }}</td> <td>{{ data.goodsOriginalPrice }}</td>
<td nzEllipsis nz-tooltip nzTooltipTitle="{{data.channelOrderNo}}">{{ data.channelOrderNo }}</td> <td nzEllipsis nz-tooltip nzTooltipTitle="{{data.channelOrderNo}}">{{ data.channelOrderNo }}</td>
<td nzEllipsis nz-tooltip nzTooltipTitle="{{data.couNo}}">{{ data.couNo }}</td> <td nzEllipsis nz-tooltip nzTooltipTitle="{{data.couNo}}">{{ data.couNo }}</td>
<td>{{ data.couStatus | dictionary: 'ORDER_COUPON_NO_STATUS'}}</td> <td>{{ data.couStatus | dictionary: 'ORDER_COUPON_NO_STATUS'}}</td>

@ -33,6 +33,7 @@ import {NzTreeComponent} from "ng-zorro-antd/tree";
import {NzDescriptionsModule} from "ng-zorro-antd/descriptions"; import {NzDescriptionsModule} from "ng-zorro-antd/descriptions";
import {NzTabComponent, NzTabSetComponent, NzTabsModule} from "ng-zorro-antd/tabs"; import {NzTabComponent, NzTabSetComponent, NzTabsModule} from "ng-zorro-antd/tabs";
import {environment} from "../../../../environments/environment"; import {environment} from "../../../../environments/environment";
import {CommunicationService} from "../../../services/common/communication.service";
@Component({ @Component({
selector: 'app-comp-order', selector: 'app-comp-order',
@ -119,6 +120,7 @@ export class CompOrderComponent {
}; };
constructor(private fb: NonNullableFormBuilder, constructor(private fb: NonNullableFormBuilder,
private orderService : OrderCouponService, private orderService : OrderCouponService,
private communicationService: CommunicationService,
private message: NzMessageService, private message: NzMessageService,
private modal: NzModalService) { private modal: NzModalService) {
// 初始化搜索框 // 初始化搜索框
@ -159,7 +161,7 @@ export class CompOrderComponent {
if (data['return_code'] == '000000') { if (data['return_code'] == '000000') {
this.tableData = data['return_data']; this.tableData = data['return_data'];
for (let data of this.tableData.list) { for (let data of this.tableData.list) {
data['rowSpan'] = this.tableData.list.filter((s: { orderNo: any; }) => s.orderNo == data.orderNo).length; data['rowSpan'] = this.tableData.list.filter((s: { childOrderNo: any; }) => s.childOrderNo == data.childOrderNo).length;
} }
} }
}); });
@ -218,7 +220,11 @@ export class CompOrderComponent {
export() { export() {
this.orderService.export(this.searchForm.value, (data: any) => { this.orderService.export(this.searchForm.value, (data: any) => {
if (data['return_code'] == '000000') { if (data['return_code'] == '000000') {
window.location.href = this.imageUrl + 'temporary/' + data['return_data']; if (data['return_code'] == '000000') {
this.communicationService.sendMessage(data['return_data']);
} else {
this.message.error(data['return_msg']);
}
} }
}); });
} }

@ -4,10 +4,10 @@
export const environment = { export const environment = {
production: false, production: false,
baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://phgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'https://phgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) userUrl: 'https://phgcs.dctpay.com/user/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', imageUrl: 'https://phg-test.obs.cn-southwest-2.myhuaweicloud.com/',
// //
// baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址) // baseUrl: 'http://localhost:9702/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址) // orderUrl: 'http://localhost:9703/order/', // 测试环境服务器地址(请求数据地址)

Loading…
Cancel
Save