提交商品添加

2.0-dev
袁野 1 year ago
parent 6157d97f04
commit 6ea5256ef6
  1. 22
      src/app/admin/goods/list/list.component.html
  2. 21
      src/app/admin/goods/list/list.component.ts
  3. 148
      src/app/admin/order-manage/goods-child-order/goods-child-order.component.html
  4. 38
      src/app/admin/order-manage/goods-child-order/goods-child-order.component.ts
  5. 43
      src/app/admin/order-manage/goods-order/goods-order.component.html
  6. 12
      src/app/admin/order-manage/goods-order/goods-order.component.ts
  7. 4
      src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.html
  8. 41
      src/app/admin/order-manage/mobile-recharge-order-list/mobile-recharge-order-list.component.ts
  9. 15
      src/app/services/goods/goods.service.ts
  10. 1
      src/app/services/order/order-third-party.service.ts
  11. 8
      src/environments/environment.ts

@ -14,7 +14,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col nzSpan="8">
<div nz-col nzSpan="8" *ngIf="'BTN_CONFIG_AWARD' | button">
<nz-form-item>
<nz-form-label [nzSpan]="6">商品标签</nz-form-label>
<nz-form-control [nzSpan]="16">
@ -71,7 +71,7 @@
<tr>
<th nzWidth="80px">编号</th>
<th nzWidth="120px">商品名称</th>
<th nzWidth="120px">商品标签</th>
<th *ngIf="'BTN_CONFIG_AWARD' | button" nzWidth="120px">商品标签</th>
<th nzWidth="80px">商品类型</th>
<th nzWidth="130px">列表图片</th>
<th nzWidth="120px">创建时间</th>
@ -83,7 +83,7 @@
<tr *ngFor="let data of ajaxTable.data; let i = index">
<td>{{i + 1}}</td>
<td>{{data.name}}</td>
<td>{{data.goodsLabel }}</td>
<td *ngIf="'BTN_CONFIG_AWARD' | button">{{data.goodsLabel }}</td>
<td>{{data.goodsTypeName }}</td>
<td>
<app-preview-image [previewImage] = data.listImg ></app-preview-image>
@ -91,17 +91,17 @@
<td>{{data.createTime | date: 'yyyy-MM-dd'}}</td>
<td nzRight="">{{data.status | goodsStatus}}</td>
<td nzRight class="table-td-operation">
<a *ngIf="data.status != 1" (click)="getEdit(data.id)">编辑</a>
<nz-divider nzType="vertical"></nz-divider>
<a *ngIf="data.status == 2" (click)="getEdit(data.id)">编辑</a>
<nz-divider *ngIf="data.status == 2" nzType="vertical"></nz-divider>
<a nz-dropdown [nzDropdownMenu]="menu">更多操作</a>
<nz-dropdown-menu #menu="nzDropdownMenu">
<ul nz-menu nzSelectable>
<li nz-menu-item> <a (click)="getSku(data.id)">查看规格</a></li>
<li class="li-a" nz-menu-item><a (click)="configSku(data.id)">配置规格</a></li>
<li *ngIf="'BTN_CONFIG_AWARD' | button" nz-menu-item> <a (click)="getPresent(data.id)">赠送列表</a></li>
<li *ngIf="'BTN_CONFIG_AWARD' | button" class="li-a" nz-menu-item><a (click)="configPresent(data.id)">配置赠送规则</a></li>
<li class="li-a" nz-menu-item><a (click)='goodsUpDown(data.id , data.status)'>{{data.status === 2 ? '申请上线': '禁用'}}</a></li>
<li class="li-a" *ngIf="data.status != 1" nz-menu-item><a (click)="deleteGoods(data.id)">删除</a></li>
<li *ngIf="data.status == 2" class="li-a" nz-menu-item><a (click)="configSku(data.id)">配置规格</a></li>
<li *ngIf="'BTN_CONFIG_AWARD' | button " nz-menu-item> <a (click)="getPresent(data.id)">赠送列表</a></li>
<li *ngIf="('BTN_CONFIG_AWARD' | button) && data.status == 2" class="li-a" nz-menu-item><a (click)="configPresent(data.id)">配置赠送规则</a></li>
<li *ngIf="data.status != 3" class="li-a" nz-menu-item><a (click)='goodsUpDown(data.id , data.status)'>{{data.status === 2 ? '申请上线': '禁用'}}</a></li>
<li class="li-a" *ngIf="data.status == 2" nz-menu-item><a (click)="deleteGoods(data.id)">删除</a></li>
</ul>
</nz-dropdown-menu>
</td>
@ -134,7 +134,7 @@
</nz-tree-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-item *ngIf="'BTN_CONFIG_AWARD' | button">
<nz-form-label [nzSpan]="6" >商品标签</nz-form-label>
<nz-form-control [nzSpan]="16">
<input nz-input formControlName="goodsLabel" />

@ -217,6 +217,7 @@ export class ListComponent implements OnInit {
// 编辑产品
public getEdit(id?: number): void {
this.isVisibleEdit = true;
this.resetForm();
this.goodsId = id;
if (id != null) {
this.editFlag = true;
@ -289,6 +290,15 @@ export class ListComponent implements OnInit {
}
}
// 清空上传表单
private resetForm() {
this.editFlag = false;
this.validateForm.reset();
this.listImg = [];
this.bannerImg = [];
this.detailImg = [];
}
// 图片查看
handlePreview = async (file: NzUploadFile) => {
@ -381,7 +391,16 @@ export class ListComponent implements OnInit {
// 展示配置规则
public configPresent(id: number): void {
this.goodsId = id;
this.listOfControl[0].goodsId = id;
this.listOfControl = [{
isEdit: true,
agentId: null,
goodsId: id,
num: null,
sourceId: null,
agentName: null,
sourceName: null,
type: null,
}];
this.isVisiblePresent = true;
}

@ -29,7 +29,11 @@
<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-option nzValue="1" nzLabel="待支付"></nz-option>
<nz-option nzValue="2" nzLabel="已支付"></nz-option>
<nz-option nzValue="3" nzLabel="已完成"></nz-option>
<nz-option nzValue="4" nzLabel="已退款"></nz-option>
<nz-option nzValue="5" nzLabel="已取消"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
@ -62,7 +66,7 @@
<div class="inner-content">
<span>共计 {{total?total:0}} 条数据</span>
<div class="operating-button">
<button nz-button nzType="primary" class="right-btn" (click)="excelOrder(searchForm.value)" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>
<!-- <button nz-button nzType="primary" class="right-btn" (click)="excelOrder(searchForm.value)" ><i nz-icon nzType="export" nzTheme="outline"></i>导出Excel</button>-->
</div>
<!--数组表格 -->
@ -83,34 +87,44 @@
<thead>
<tr>
<th nzWidth="200px">交易单号</th>
<th nzWidth="200px">子订单号</th>
<th nzWidth="200px">物流单号</th>
<th nzWidth="130px">客户电话</th>
<th nzWidth="200px">订单名称</th>
<th nzWidth="100px">订单金额</th>
<th nzWidth="100px">支付金额</th>
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="200px">商品名称</th>
<th nzWidth="100px">商品规格</th>
<th nzWidth="100px">商品金额</th>
<th nzWidth="100px">售卖金额</th>
<th nzWidth="100px">商品数量</th>
<th nzWidth="120px">支付总金额</th>
<th nzWidth="180px">创建时间</th>
<th nzWidth="180px" nzRight="0px">物流状态</th>
<th nzWidth="110px" nzRight="0px">操作</th>
<th nzWidth="180px" nzRight>收货信息</th>
<th nzWidth="100px" nzRight>订单状态</th>
<th nzWidth="100px" nzRight>物流状态</th>
<th nzWidth="140px" nzRight>操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index" [ngClass]="{'fontColor': data.logisticsStatus === '1' }">
<tr *ngFor="let data of basicTable.data;let i = index" [ngClass]="{'fontColor': data.logisticsStatus === null && data.childOrderStatus === 2 }">
<td>{{data.orderNo}}</td>
<td>{{data.childOrderNo}}</td>
<td>{{data.logisticsNo === null ? '暂无物流信息' : data.logisticsNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.title}}</td>
<td>¥{{data.totalPrice}}</td>
<td>¥{{data.payPrice}}</td>
<td>{{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}}</td>
<td>{{data.orderStatus | orderStatus}}</td>
<td>{{data.goodsName}}</td>
<td>{{data.goodsSpecName}}</td>
<td>¥{{data.goodsPrice}}</td>
<td>¥{{data.goodsActualPrice}}</td>
<td>{{data.saleCount}}</td>
<td>¥{{data.totalActualPrice}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" >{{data.logisticsStatus | logisticsStatus}}</td>
<td nzRight="0px" class="table-td-operation">
<td nzRight>{{data.deliveryAddressMsg }}</td>
<td nzRight>{{data.childOrderStatus | orderChildStatus}}</td>
<td nzRight >{{data.logisticsStatus == null ? '未发货' : data.logisticsStatus}}</td>
<td nzRight 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 nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
<li nz-menu-item (click)="updateLogisticsNo(data.orderNo)"><a>录入物流编码</a></li>
<li *ngIf="data.logisticsNo != null" nz-menu-item (click)="showOrderDetail(data.id)"><a>查看物流</a></li>
<li nz-menu-item *ngIf="data.logisticsStatus === null && data.childOrderStatus === 2" (click)="updateLogisticsNo(data.id)"><a>录入物流编码</a></li>
</ul>
</nz-dropdown-menu>
</td>
@ -120,96 +134,18 @@
</div>
</nz-spin>
<nz-modal [(nzVisible)]="orderDetailModal" nzTitle="交易详情" (nzOnCancel)="orderDetailModal = false" [nzFooter]="null"
<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="100px">产品图片</th>
<th nzWidth="120px">产品名称</th>
<th nzWidth="30px">商品原价</th>
<th nzWidth="30px">支付价格</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>
<app-preview-image [previewImage] = data.goodsImg ></app-preview-image>
</td>
<td>
{{ data.goodsName }}
<nz-tag *ngIf="data.giveawayType == 1" [nzColor]="'magenta'">赠品</nz-tag>
</td>
<td>{{ data.goodsPrice }} 元</td>
<td>{{ data.goodsActualPrice }} 元</td>
<td>{{ data.saleCount }}</td>
<td>{{ data.totalActualPrice }} 元</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="物流信息" *ngIf="orderDetailObject.goodsOrder.logisticsNo != null">
<nz-timeline [nzReverse]="true">
<nz-timeline-item *ngFor="let item of logisticsTraceDetails;let i = index" [nzColor]="i===logisticsTraceDetails.length -1?'green':'gray'">
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item['desc']}}</p>
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
</nz-timeline-item>
</nz-timeline>
<nz-timeline [nzReverse]="true" *ngIf="logisticsTraceDetails !== null">
<nz-timeline-item *ngFor="let item of logisticsTraceDetails;let i = index" [nzColor]="i===logisticsTraceDetails.length -1?'green':'gray'">
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item['desc']}}</p>
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
</nz-timeline-item>
</nz-timeline>
<nz-result *ngIf="logisticsTraceDetails === null" nzStatus="404" nzTitle="404" nzSubTitle="很抱歉暂无物流信息.">
</nz-tab>
</nz-tabset>
</nz-result>
</nz-spin>
</nz-modal>

@ -58,7 +58,7 @@ export class GoodsChildOrderComponent implements OnInit {
};
// 请求地址参数
FILE_URL = environment.imageUrl;
orderNo;
orderId: number;
logisticsNo;
logisticsTraceDetails;
constructor(
@ -112,7 +112,6 @@ export class GoodsChildOrderComponent implements OnInit {
this.goods.getOrderChildList(whereObject, data => {
this.loading = false;
if (data['return_code'] === '000000') {
console.log(data);
this.requestData = data['return_data'].list;
this.total = data['return_data'].total;
} else {
@ -122,50 +121,31 @@ export class GoodsChildOrderComponent implements OnInit {
}
// 展示订单详情
public showOrderDetail(orderNo: string) {
public showOrderDetail(orderId: number ) {
this.orderDetailModal = true;
this.orderDetailModalLoading = true;
this.goods.getGoodsOrderDetail(orderNo, data => {
if (data['return_code'] === '000000') {
console.log(data);
this.orderDetailObject = data['return_data'];
this.logisticsTraceDetails = data['return_data']['logisticsTraceDetails'];
console.log(this.logisticsTraceDetails);
} else {
this.message.error(data['return_msg']);
}
this.goods.getLogisticsMsg(orderId, data => {
this.logisticsTraceDetails = data['return_data'];
this.orderDetailModalLoading = false;
});
}
// 导出数据
public excelOrder(whereObject) {
this.loadingObject.status = true;
this.loadingObject.title = '数据导出中...';
this.thirdPartyOrder.exportThirdPartyOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.message.error(data['return_msg']);
}
this.loadingObject.status = false;
});
}
// 更新运费单号
public updateLogisticsNo(order: string): void {
this.orderNo = order;
public updateLogisticsNo(orderId: number): void {
this.orderId = orderId;
this.isVisible = true;
}
public handleOk(): void {
this.goods.updateLogisticsNo({
orderNo: this.orderNo ,
this.goods.editLogisticsNo({
orderId: this.orderId ,
logisticsNo: this.logisticsNo
} , data => {
if (data['return_code'] === '000000') {
this.isVisible = false;
this.getRequest(false, this.searchForm.value);
this.notification.success('成功' , '更新成功');
} else {
this.notification.error( '失败' , '更新成功');

@ -159,12 +159,12 @@
<th nzWidth="100px">支付方式</th>
<th nzWidth="100px">订单状态</th>
<th nzWidth="180px">创建时间</th>
<th nzWidth="180px" nzRight="0px">物流状态</th>
<!-- <th nzWidth="180px" nzRight="0px">物流状态</th>-->
<th nzWidth="110px" nzRight="0px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of basicTable.data;let i = index" [ngClass]="{'fontColor': data.logisticsStatus === '1' }">
<tr *ngFor="let data of basicTable.data;let i = index" >
<td>{{data.orderNo}}</td>
<td>{{data.memPhone}}</td>
<td>{{data.title}}</td>
@ -173,13 +173,13 @@
<td>{{data.orderStatus == 1 || data.orderStatus == 5 ? '未支付' : data.payType | orderPayType}}</td>
<td>{{data.orderStatus | orderStatus}}</td>
<td>{{data.createTime | date : 'yyyy-MM-dd HH:mm:ss'}}</td>
<td nzRight="0px" >{{data.logisticsStatus | logisticsStatus}}</td>
<!-- <td nzRight="0px" >{{data.logisticsStatus | logisticsStatus}}</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 nz-menu-item (click)="showOrderDetail(data.orderNo)"><a>详情</a></li>
<li nz-menu-item (click)="updateLogisticsNo(data.orderNo)"><a>录入物流编码</a></li>
<!-- <li nz-menu-item (click)="updateLogisticsNo(data.orderNo)"><a>录入物流编码</a></li>-->
</ul>
</nz-dropdown-menu>
</td>
@ -242,18 +242,17 @@
<nz-table nzBordered #childOrder [nzData]="orderDetailObject.tradeOrder.highChildOrderList" [nzHideOnSinglePage]="true">
<thead>
<tr>
<th nzWidth="80px">产品类型</th>
<th nzWidth="100px">产品图片</th>
<th nzWidth="120px">产品名称</th>
<th nzWidth="30px">商品原价</th>
<th nzWidth="30px">支付价格</th>
<th nzWidth="20px">数量</th>
<th nzWidth="20px">支付总价</th>
<th nzWidth="110px">操作</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let data of childOrder.data">
<td>{{ data.goodsType | orderChildGoodsType}}</td>
<td>
<app-preview-image [previewImage] = data.goodsImg ></app-preview-image>
</td>
@ -265,19 +264,22 @@
<td>{{ data.goodsActualPrice }} 元</td>
<td>{{ data.saleCount }}</td>
<td>{{ data.totalActualPrice }} 元</td>
<td>
<a (click)="showOrderDetailChild(data.id)">查看物流信息</a>
</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
<nz-tab nzTitle="物流信息" *ngIf="orderDetailObject.goodsOrder.logisticsNo != null">
<nz-timeline [nzReverse]="true">
<nz-timeline-item *ngFor="let item of logisticsTraceDetails;let i = index" [nzColor]="i===logisticsTraceDetails.length -1?'green':'gray'">
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item['desc']}}</p>
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
</nz-timeline-item>
</nz-timeline>
<!-- <nz-tab nzTitle="物流信息" *ngIf="orderDetailObject.goodsOrder.logisticsNo != null">-->
<!-- <nz-timeline [nzReverse]="true">-->
<!-- <nz-timeline-item *ngFor="let item of logisticsTraceDetails;let i = index" [nzColor]="i===logisticsTraceDetails.length -1?'green':'gray'">-->
<!-- <p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item['desc']}}</p>-->
<!-- <p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}</p>-->
<!-- </nz-timeline-item>-->
<!-- </nz-timeline>-->
</nz-tab>
<!-- </nz-tab>-->
</nz-tabset>
</nz-spin>
</nz-modal>
@ -294,3 +296,16 @@
</div>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="orderDetailModalChild" nzTitle="物流详情" (nzOnCancel)="orderDetailModalChild = false" [nzFooter]="null"
nzWidth="1000px" [nzBodyStyle]=" { padding: '20px 20px 30px 20px'}">
<nz-spin [nzSpinning]="orderDetailModalLoading">
<nz-timeline [nzReverse]="true" *ngIf="logisticsTraceDetails !== null">
<nz-timeline-item *ngFor="let item of logisticsTraceDetails;let i = index" [nzColor]="i===logisticsTraceDetails.length -1?'green':'gray'">
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item['desc']}}</p>
<p [ngClass]="{'fontColorBlue': i===logisticsTraceDetails.length -1 }">{{item.time | date : 'yyyy-MM-dd HH:mm:ss'}}</p>
</nz-timeline-item>
</nz-timeline>
<nz-result *ngIf="logisticsTraceDetails === null" nzStatus="404" nzTitle="404" nzSubTitle="很抱歉暂无物流信息."></nz-result>
</nz-spin>
</nz-modal>

@ -62,6 +62,7 @@ export class GoodsOrderComponent implements OnInit {
// 订单详情相关参数
// 详情模态框
orderDetailModal = false;
orderDetailModalChild = false;
// 详情模态框数据等待
orderDetailModalLoading = false;
// 订单详情数据
@ -171,6 +172,17 @@ export class GoodsOrderComponent implements OnInit {
}
public showOrderDetailChild(orderId: number ) {
this.orderDetailModalChild = true;
this.orderDetailModalLoading = true;
this.goods.getLogisticsMsg(orderId, data => {
this.logisticsTraceDetails = data['return_data'];
this.orderDetailModalLoading = false;
});
}
// 导出数据
public excelOrder(whereObject) {
this.loadingObject.status = true;

@ -300,3 +300,7 @@
<button *ngIf="orderDetailObject.tradeOrder.exceptionStatus === true" nz-button nzType="primary" (click)="orderNormal(orderDetailObject.tradeOrder.orderNo)">异常转正常</button>
</div>
</nz-modal>
<nz-modal [(nzVisible)]="isVisible" nzTitle="文件版本({{this.searchForm.value['serialNumber']}})正在导出" (nzOnCancel)="isVisible = false" [nzFooter]="null">
<nz-progress [nzPercent]="percent" ></nz-progress>
</nz-modal>

@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core';
import {Component, OnInit, TemplateRef} from '@angular/core';
import {environment} from '../../../../environments/environment';
import {CompanyService} from '../../../services/company.service';
import {LocalStorageService} from '../../../services/local-storage.service';
@ -62,6 +62,7 @@ export class MobileRechargeOrderListComponent implements OnInit {
orderDetailModal = false;
// 详情模态框数据等待
orderDetailModalLoading = false;
isVisible = false;
// 订单详情数据
orderDetailObject: any = {
tradeOrder: {},
@ -74,6 +75,8 @@ export class MobileRechargeOrderListComponent implements OnInit {
};
// 请求地址参数
FILE_URL = environment.imageUrl;
percent = 0;
processRateInterval;
constructor(
private form: FormBuilder,
private store: LocalStorageService,
@ -165,12 +168,18 @@ export class MobileRechargeOrderListComponent implements OnInit {
// 导出数据
public excelOrder(whereObject) {
this.loadingObject.status = true;
this.loadingObject.title = '数据导出中...';
this.percent = 0;
whereObject['serialNumber'] = new Date().getTime();
this.processRate(whereObject['serialNumber']);
this.isVisible = true;
this.orderMobileRechargeService.exportMobilePartyOrderList(whereObject, data => {
if (data['return_code'] === '000000') {
window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
// this.message.success('导出成功!');
// window.location.href = this.FILE_URL + 'temporary/' + data['return_data'];
} else {
this.isVisible = false;
this.message.error(data['return_msg']);
}
this.loadingObject.status = false;
@ -218,5 +227,29 @@ export class MobileRechargeOrderListComponent implements OnInit {
});
}
// 获取导出百分比
processRate(key: string) {
this.processRateInterval = setInterval(() => this.commonsService.getRedisValueByType(key, data => {
this.percent = data['return_data'];
if (this.percent === 100) {
clearTimeout(this.processRateInterval);
this.loadingObject.status = true;
this.loadingObject.title = '下载中...';
const interval = setInterval(() => this.commonsService.getRedisValueByType(key + 'download', download => {
if (download['return_data'] != null) {
this.message.success('下载成功!');
this.loadingObject.status = false;
window.location.href = this.FILE_URL + 'temporary/' + download['return_data'];
this.isVisible = false;
clearTimeout(interval);
}
}), 100);
}
}), 300);
}
}

@ -313,9 +313,24 @@ export class GoodsService {
});
}
public editLogisticsNo(param: object, callBack) {
this.http.get(environment.orderUrl + 'goodsOrder/editLogisticsNo?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});
}
public getGoodsOrderDetail(orderNo: string, callBack) {
this.http.get(environment.orderUrl + 'goodsOrder/getGoodsOrderDetail?orderNo=' + orderNo).subscribe(data => {
callBack(data);
});
}
public getLogisticsMsg(orderId: number , callBack) {
this.http.get(environment.baseUrl + 'goods/getLogisticsMsg?orderId=' + orderId).subscribe(data => {
callBack(data);
});
}
}

@ -48,6 +48,7 @@ export class OrderThirdPartyService {
* @Param param: object, callBack
*/
public exportThirdPartyOrderList(param: object, callBack) {
console.log(param);
this.http.get(environment.orderUrl + 'thirdParty/exportThirdPartyOrderList?' + this.common.getWhereCondition(param)).subscribe(data => {
callBack(data);
});

@ -4,10 +4,10 @@
export const environment = {
production: false,
baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'https://hsgcs.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'https://hsgcs.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
// baseUrl: 'http://localhost:9302/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'http://localhost:9304/order/', // 测试环境服务器地址(请求数据地址)
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=',
inviteUrl: 'https://hsgcs.dctpay.com/wx/?action=ic&id=',

Loading…
Cancel
Save