袁野 3 months ago
parent a413dc9ce4
commit bf3a35390d
  1. 1
      src/app/data/goods/goods.namespace.ts
  2. 57
      src/app/pages/body/index/index.component.html
  3. 3
      src/app/pages/body/index/index.component.less
  4. 116
      src/app/pages/body/index/index.component.ts
  5. 83
      src/app/pages/trade/goods-list/goods-list.component.html
  6. 3
      src/app/pages/trade/goods-list/goods-list.component.less
  7. 49
      src/app/pages/trade/goods-list/goods-list.component.ts
  8. 87
      src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html
  9. 29
      src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts
  10. 16
      src/app/pipes/common/data-utils.pipe.ts
  11. 30
      src/app/pipes/file/business-type.pipe.ts
  12. 22
      src/app/pipes/file/status.pipe.ts
  13. 17
      src/app/services/common/communication.service.ts
  14. 2
      src/app/services/common/icon.service.ts
  15. 41
      src/app/services/file/file.service.ts
  16. 11
      src/app/services/trade/order-goods.service.ts
  17. 18
      src/environments/environment.ts

@ -2,6 +2,7 @@
export const fallbackImg = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMIAAADDCAYAAADQvc6UAAABRWlDQ1BJQ0MgUHJvZmlsZQAAKJFjYGASSSwoyGFhYGDIzSspCnJ3UoiIjFJgf8LAwSDCIMogwMCcmFxc4BgQ4ANUwgCjUcG3awyMIPqyLsis7PPOq3QdDFcvjV3jOD1boQVTPQrgSkktTgbSf4A4LbmgqISBgTEFyFYuLykAsTuAbJEioKOA7DkgdjqEvQHEToKwj4DVhAQ5A9k3gGyB5IxEoBmML4BsnSQk8XQkNtReEOBxcfXxUQg1Mjc0dyHgXNJBSWpFCYh2zi+oLMpMzyhRcASGUqqCZ16yno6CkYGRAQMDKMwhqj/fAIcloxgHQqxAjIHBEugw5sUIsSQpBobtQPdLciLEVJYzMPBHMDBsayhILEqEO4DxG0txmrERhM29nYGBddr//5/DGRjYNRkY/l7////39v///y4Dmn+LgeHANwDrkl1AuO+pmgAAADhlWElmTU0AKgAAAAgAAYdpAAQA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iECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiECRCjUbEPNCRAhZ6NSiAARCjXbUHMCRMjZqBQiQIRCzTbUnAARcjYqhQgQoVCzDTUnQIScjUohAkQo1GxDzQkQIWejUogAEQo121BzAkTI2agUIkCEQs021JwAEXI2KoUIEKFQsw01J0CEnI1KIQJEKNRsQ80JECFno1KIABEKNdtQcwJEyNmoFCJAhELNNtScABFyNiqFCBChULMNNSdAhJyNSiEC/wGgKKC4YMA4TAAAAABJRU5ErkJggg==';
export const logisticsStatus = [
{name: "待发货" , key: "待发货"} ,
{name: "派件中" , key: "DELIVERING"} ,
{name: "运输中" , key: "TRANSPORT"},
{name: "已代签收" , key: "AGENT_SIGN"},

@ -14,6 +14,7 @@
</ul>
</div>
<div class="user" nz-col nzSpan="4">
<div>
<span nz-dropdown [nzDropdownMenu]="menu">{{userInfo['userName']}}</span>
@ -24,7 +25,29 @@
</ul>
</nz-dropdown-menu>
</div>
<div style="font-size: 18px; margin-right: 60px;">
<span *ngIf="downloadType == 2" nz-icon [nzType]="'sync'" [nzSpin]="true" nz-popover [nzPopoverContent]="contentTemplate"></span>
<span *ngIf="downloadType == 1" nz-icon nzType="download" nzTheme="outline" nz-popover [nzPopoverContent]="contentTemplate"></span>
<ng-template #contentTemplate>
<div class="file-downLoad">
<nz-list>
<nz-list-item *ngFor="let item of tableData | dataUtils : 5;">
<span *ngIf="item.status == 1" style="font-size: 20px" nz-icon [nzType]="'check-circle'" [nzTheme]="'twotone'" [nzTwotoneColor]="'#52c41a'"></span>
<span *ngIf="item.status === 2" style="font-size: 20px" nz-icon [nzType]="'sync'" [nzSpin]="true"></span>
<span *ngIf="item.status === 3" style="font-size: 20px" nz-icon nzType="close-circle" nzTheme="twotone" [nzTwotoneColor]="'red'"></span>
<span nz-typography>{{item.title}}</span>
<a><span *ngIf="item.status == 1" style="font-size: 20px" nz-icon [nzIconfont]="'icon-xiazai'"></span></a>
<span *ngIf="item.status == 3" style="font-size: 20px; color: red">失败</span>
</nz-list-item>
<nz-list-empty *ngIf="tableData.length == 0" />
<nz-list-footer *ngIf="tableData.length != 0" style="text-align: center">
<a (click)="getFileRecords()">查看更多记录</a>
</nz-list-footer>
</nz-list>
</div>
</ng-template>
</div>
</div>
</div>
</nz-header>
@ -52,6 +75,40 @@
</li>
</ul>
</div>
<nz-modal [(nzVisible)]="isVisible" nzTitle="导出中心" (nzOnCancel)="isVisible = false" [nzFooter]="null"
[nzWidth]="1200">
<ng-container *nzModalContent>
<nz-table [nzBordered]="true" #basicTable [nzData]="tableData">
<thead>
<tr>
<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>{{ i + 1 }}</td>
<td>{{ data.title }}</td>
<td>{{ data.businessType | businessType }}</td>
<td>{{ data.createTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{ data.downloadTime | date: 'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{ data.status | status}}</td>
<td>
<a *ngIf="data.downloadStatus == 2" (click)="getDownLoad(data.id)">下载</a>
<a *ngIf="data.downloadStatus == 1" (click)="getDownLoad(data.id)">重新下载</a>
</td>
</tr>
</tbody>
</nz-table>
</ng-container>
</nz-modal>
<!-- start 菜单内容 end -->
</nz-sider>
<!-- end 侧边 end -->

@ -67,3 +67,6 @@ nz-content {
}
}
.file-downLoad {
width: 300px;
}

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import {AfterViewInit, Component} from '@angular/core';
import {Router, RouterLink, RouterOutlet} from "@angular/router";
import {
NzContentComponent,
@ -10,7 +10,7 @@ import {
import {NzBreadCrumbComponent, NzBreadCrumbItemComponent} from "ng-zorro-antd/breadcrumb";
import {NzColDirective, NzRowDirective} from "ng-zorro-antd/grid";
import {NzMenuDirective, NzMenuGroupComponent, NzMenuItemComponent, NzSubMenuComponent} from "ng-zorro-antd/menu";
import {NgClass, NgForOf} from "@angular/common";
import {DatePipe, NgClass, NgForOf, NgIf} from "@angular/common";
import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzTabComponent, NzTabSetComponent} from "ng-zorro-antd/tabs";
import {TabComponent} from "../tab/tab.component";
@ -22,6 +22,22 @@ import {Dictionary, dictionaryData} from "../../../data/common/dictionary.namesp
import {CommonService} from "../../../services/common/common.service";
import {LoginService} from "../../../services/login/login.service";
import {NzConfigService} from "ng-zorro-antd/core/config";
import {NzPopoverDirective} from "ng-zorro-antd/popover";
import {NzListItemComponent, NzListItemMetaComponent, NzListModule} from "ng-zorro-antd/list";
import {NzTypographyComponent} from "ng-zorro-antd/typography";
import {IconService} from "../../../services/common/icon.service";
import {FileService} from "../../../services/file/file.service";
import {DataUtilsPipe} from "../../../pipes/common/data-utils.pipe";
import {GoodsListComponent} from "../../trade/goods-list/goods-list.component";
import {Subject} from "rxjs";
import {CommunicationService} from "../../../services/common/communication.service";
import {NzModalComponent, NzModalContentDirective, NzModalModule} from "ng-zorro-antd/modal";
import {NzResultComponent} from "ng-zorro-antd/result";
import {NzSpinComponent} from "ng-zorro-antd/spin";
import {NzTimelineComponent, NzTimelineItemComponent} from "ng-zorro-antd/timeline";
import {NzTableComponent, NzTableModule} from "ng-zorro-antd/table";
import {BusinessTypePipe} from "../../../pipes/file/business-type.pipe";
import {StatusPipe} from "../../../pipes/file/status.pipe";
@Component({
selector: 'app-index',
@ -37,6 +53,7 @@ import {NzConfigService} from "ng-zorro-antd/core/config";
NzRowDirective,
NzColDirective,
NzMenuItemComponent,
NzModalModule,
NzMenuDirective,
RouterLink,
NzSubMenuComponent,
@ -44,12 +61,31 @@ import {NzConfigService} from "ng-zorro-antd/core/config";
NgClass,
NzIconDirective,
NzTabComponent,
NzListModule,
NzTabSetComponent,
TabComponent,
NzSiderComponent,
NzMenuGroupComponent,
NzDropDownDirective,
NzDropdownMenuComponent
NzDropdownMenuComponent,
NgIf,
NzPopoverDirective,
NzListItemComponent,
NzListItemMetaComponent,
NzTypographyComponent,
NzTableModule,
DataUtilsPipe,
GoodsListComponent,
DatePipe,
NzModalComponent,
NzResultComponent,
NzSpinComponent,
NzTimelineComponent,
NzTimelineItemComponent,
NzTableComponent,
NzModalContentDirective,
BusinessTypePipe,
StatusPipe
],
templateUrl: './index.component.html',
styleUrl: './index.component.less',
@ -60,22 +96,39 @@ export class IndexComponent {
'menuName' : '首页',
'selected' : true,
}];
// 表单页数
tablePageNum = 1;
// 表单数据
tableData: any;
userInfo: any;
// 左侧菜单栏数据
leftMenuData: any = [];
// 侧边菜单展示开关
isCollapse = true;
loading = false;
isVisible = false;
// 当前顶级菜单
currentParentMenu: any = {};
downloadType = 1;
interval: any;
constructor(
private commonService: CommonService,
private storage: BrowserStorageService,
private communicationService: CommunicationService,
private nzConfigService: NzConfigService,
private iconService: IconService,
private fileService: FileService,
private message: NzMessageService,
private router: Router, // 路由
private login: LoginService
) {
this.communicationService.currentMessage.subscribe(message => {
this.fileRecords();
this.findFileRecords(message.id);
this.downloadType = 2;
});
this.nzConfigService.set('button', { nzSize: 'large' })
this.nzConfigService.set('treeSelect', { nzSize: 'large' })
// 缓存数据字典
@ -99,6 +152,7 @@ export class IndexComponent {
this.menuData = this.menuData.concat(this.storage.get(DATA)['menuTree']);
this.userInfo = this.storage.get(DATA)['account'];
this.fileRecords();
}
// 选择操作
@ -131,4 +185,58 @@ export class IndexComponent {
}
});
}
// 弹出下载记录
public getFileRecords() {
this.loading = true;
this.isVisible = true;
}
// 查询下载记录
public fileRecords() {
let searchForm = {
time: new Date().getTime()
}
this.fileService.getFileRecordsList(searchForm , (data: any) => {
if (data['return_code'] == '000000') {
this.tableData = data['return_data'];
} else {
this.message.error(data['return_msg']);
}
this.loading = false;
});
}
// 查询详情
public findFileRecords(id: number) {
this.interval = setInterval(() => this.fileService.findFileRecords(id, (data: any) => {
if (data['return_code'] == '000000') {
if (data['return_data'].status == 1) {
clearTimeout(this.interval);
console.log("完成");
this.downloadType = 1;
this.fileRecords();
}
}else {
clearTimeout(this.interval);
this.fileRecords();
this.downloadType = 1;
}
}), 1000);
}
// 下载
public getDownLoad(id: number) {
this.fileService.getDownLoad(id, (data: any) => {
if (data['return_code'] == '000000') {
window.location.href = data['return_data'];
}else {
this.message.error(data['return_msg']);
}
})
}
}

@ -1,18 +1,21 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>商品名称</nz-form-label>
<nz-form-label>物流订单号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="goodsName" placeholder="请输入" />
<input nzSize="large" nz-input formControlName="logisticsNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>物流订单号</nz-form-label>
<nz-form-label>物流状态</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="logisticsNo" placeholder="请输入" />
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="logisticsStatus">
<nz-option *ngFor="let item of logisticsStatus" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
@ -25,6 +28,34 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse" *ngIf="objectType == 1">
<nz-form-item>
<nz-form-label>商户</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="merId">
<nz-option *ngFor="let item of merData" nzLabel="{{item['merName']}}" nzValue="{{item['id']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品名称</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="goodsName" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>子订单号</nz-form-label>
<nz-form-control>
@ -32,7 +63,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>用户手机号</nz-form-label>
<nz-form-control>
@ -41,7 +72,7 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" >
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品分类</nz-form-label>
<nz-form-control>
@ -54,7 +85,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品品牌</nz-form-label>
<nz-form-control>
@ -65,17 +96,8 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>物流状态</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="logisticsStatus">
<nz-option *ngFor="let item of logisticsStatus" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
@ -85,7 +107,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>支付状态</nz-form-label>
<nz-form-control>
@ -96,17 +118,16 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" >
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
<a class="collapse" (click)="isCollapse = !isCollapse">
{{isCollapse ? '收起至简洁查询' : '更多查询条件'}}
<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i>
</a>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="reset()">重置</button>
<button nz-button [nzType]="'primary'" (click)="getExport()">导出交易明细</button>
</div>
</div>
</form>
@ -134,9 +155,9 @@
<th nzWidth="100px">物流单号</th>
<th nzWidth="70px">创建时间</th>
<th nzWidth="70px">更新时间</th>
<th nzRight nzWidth="60px">支付类型</th>
<th nzRight nzWidth="60px">支付状态</th>
<th nzRight nzWidth="60px">物流状态</th>
<th nzRight nzWidth="70px">支付类型</th>
<th nzRight nzWidth="70px">支付状态</th>
<th nzRight nzWidth="70px">物流状态</th>
<th nzRight nzWidth="90px">操作</th>
</tr>
</thead>
@ -162,6 +183,8 @@
{{data.status | orderChildStatus}}
</td>
<td nzRight>
<nz-badge *ngIf="data?.logisticsStatus == null && data.status != 2" nzStatus="error" nzText="{{data.status | orderChildStatus}}"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == null && data.status == 2" nzStatus="error" nzText="待发货"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'DELIVERING'" nzColor="cyan" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'TRANSPORT'" nzColor="lime" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'AGENT_SIGN'" nzStatus="success" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
@ -205,7 +228,8 @@
</nz-image-group>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="物流状态" [nzSpan]="3">
<span *ngIf="orderGoodsData?.logisticsStatusDesc != null">
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == null && orderGoodsData.status != 2" nzStatus="error" nzText="{{orderGoodsData.status | orderChildStatus}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == null && orderGoodsData.status == 2" nzStatus="error" nzText="待发货"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'DELIVERING'" nzColor="cyan" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'TRANSPORT'" nzColor="lime" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'AGENT_SIGN'" nzStatus="success" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
@ -213,7 +237,6 @@
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'ACCEPT'" nzStatus="processing" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'FAILED'" nzStatus="error" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'WAIT_ACCEPT'" nzStatus="default" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
</span>
</nz-descriptions-item>
</nz-descriptions>
</nz-tab>

@ -1,6 +1,7 @@
.search-area {
margin-top: 20px;
margin-bottom: 10px;
}
.search-area button {
margin-right: 8px;
margin-right: 14px;
}

@ -1,4 +1,4 @@
import { Component } from '@angular/core';
import {Component, Output} from '@angular/core';
import {DatePipe, NgClass, NgForOf, NgIf} from "@angular/common";
import {FormGroup, FormsModule, NonNullableFormBuilder, ReactiveFormsModule} from "@angular/forms";
import {NzButtonComponent} from "ng-zorro-antd/button";
@ -41,6 +41,12 @@ import {NzRadioButtonDirective, NzRadioComponent, NzRadioGroupComponent} from "n
import {PayTypePipe} from "../../../pipes/goods/pay-type.pipe";
import {IconService} from "../../../services/common/icon.service";
import {OrderChildStatusPipe} from "../../../pipes/goods/order-child-status.pipe";
import {DATA} from "../../../data/login/localStorage.namespace";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {MerService} from "../../../services/merchant/mer.service";
import EventEmitter from "node:events";
import {Subject} from "rxjs";
import {CommunicationService} from "../../../services/common/communication.service";
@Component({
selector: 'app-goods-list',
@ -124,19 +130,28 @@ export class GoodsListComponent {
logisticsTraceDetails: any;
goodsOrderId: any;
deliveryAddress: any;
// 更多查询条件
isCollapse = false;
merData: any;
objectType: any;
protected readonly fallbackImg = fallbackImg;
protected readonly logisticsStatus = logisticsStatus;
protected readonly orderGoodsChild = orderGoodsChild;
protected readonly orderPayType = orderPayType;
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private storage: BrowserStorageService,
private communicationService: CommunicationService,
private merService: MerService,
private iconService: IconService,
private orderGoodsService: OrderGoodsService,
private goodsService: GoodsService) {
// 初始化搜索框
this.searchForm = this.fb.group({
logisticsNo: [''],
@ -145,6 +160,7 @@ export class GoodsListComponent {
logisticsStatus: [''],
goodsType: [''],
goodsBrand: [''],
merId: [''],
userPhone: [''],
goodsSpecsName: [''],
createTimeArray: [[]],
@ -158,7 +174,22 @@ export class GoodsListComponent {
this.getRequest();
this.getGoodsTypeNode();
this.getGoodsBrandNode();
this.merList();
this.objectType = this.storage.get(DATA)['account']['objectType'];
}
// 查询商户
public merList() {
let params: any = {
pageNum: 1,
pageSize: 1000,
time: new Date().getTime(),
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data']['list'];
}
});
}
// 查询列表
@ -286,6 +317,18 @@ export class GoodsListComponent {
});
}
// 订单导出
public getExport() {
this.searchForm.value.time = new Date().getTime();
this.orderGoodsService.exportGoodsOrder(this.searchForm.value , (data: any) => {
if (data['return_code'] == '000000') {
this.communicationService.sendMessage(data['return_data']);
} else {
this.msg.error(data['return_msg']);
}
this.tableData.loading = false;
});
}
protected readonly orderPayType = orderPayType;
}

@ -1,30 +1,60 @@
<form nz-form [formGroup]="searchForm" class="search_form" [nzLayout]="'vertical'">
<div nz-row [nzGutter]="24">
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>商品名称</nz-form-label>
<nz-form-label>物流订单号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="goodsName" placeholder="请输入" />
<input nzSize="large" nz-input formControlName="logisticsNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>物流订单号</nz-form-label>
<nz-form-label>订单号</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="logisticsNo" placeholder="请输入" />
<input nzSize="large" nz-input formControlName="orderNo" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>订单号</nz-form-label>
<nz-form-label>物流状态</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="orderNo" placeholder="请输入" />
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="logisticsStatus">
<nz-option *ngFor="let item of logisticsStatus" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse" *ngIf="objectType == 1">
<nz-form-item>
<nz-form-label>商户</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="merId">
<nz-option *ngFor="let item of merData" nzLabel="{{item['merName']}}" nzValue="{{item['id']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品名称</nz-form-label>
<nz-form-control>
<input nzSize="large" nz-input formControlName="goodsName" placeholder="请输入" />
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>子订单号</nz-form-label>
<nz-form-control>
@ -32,7 +62,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>用户手机号</nz-form-label>
<nz-form-control>
@ -41,7 +71,7 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6" >
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品分类</nz-form-label>
<nz-form-control>
@ -54,7 +84,7 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>商品品牌</nz-form-label>
<nz-form-control>
@ -65,17 +95,7 @@
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>物流状态</nz-form-label>
<nz-form-control>
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="logisticsStatus">
<nz-option *ngFor="let item of logisticsStatus" nzLabel="{{item['name']}}" nzValue="{{item['key']}}"></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<div nz-col [nzSpan]="6" [hidden]="!isCollapse">
<nz-form-item>
<nz-form-label>支付类型</nz-form-label>
<nz-form-control>
@ -85,18 +105,15 @@
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="6">
<nz-form-item>
<nz-form-label>创建时间</nz-form-label>
<nz-form-control>
<nz-range-picker nzSize="large" formControlName="createTimeArray" [nzFormat]="'yyyy/MM/dd'"></nz-range-picker>
</nz-form-control>
</nz-form-item>
</div>
<div nz-col [nzSpan]="24" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest()">查询</button>
<button nz-button (click)="reset()">重置</button>
<a class="collapse" (click)="isCollapse = !isCollapse">
{{isCollapse ? '收起至简洁查询' : '更多查询条件'}}
<i nz-icon [nzType]="!isCollapse ? 'down' : 'up'"></i>
</a>
</div>
</div>
</form>
@ -122,11 +139,11 @@
<th nzWidth="100px">订单号</th>
<th nzWidth="100px">子订单号</th>
<th nzWidth="100px">物流单号</th>
<th nzWidth="50px">创建时间</th>
<th nzWidth="50px">更新时间</th>
<th nzRight nzWidth="60px">支付类型</th>
<th nzRight nzWidth="60px">支付状态</th>
<th nzRight nzWidth="60px">物流状态</th>
<th nzWidth="60px">创建时间</th>
<th nzWidth="60px">更新时间</th>
<th nzRight nzWidth="70px">支付类型</th>
<th nzRight nzWidth="70px">支付状态</th>
<th nzRight nzWidth="70px">物流状态</th>
<th nzRight nzWidth="80px">操作</th>
</tr>
</thead>
@ -152,6 +169,7 @@
{{data.status | orderChildStatus}}
</td>
<td nzRight>
<nz-badge *ngIf="data?.logisticsStatus == null" nzStatus="error" nzText="未发货"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'DELIVERING'" nzColor="cyan" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'TRANSPORT'" nzColor="lime" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="data?.logisticsStatus == 'AGENT_SIGN'" nzStatus="success" nzText="{{data.logisticsStatusDesc}}"></nz-badge>
@ -196,7 +214,7 @@
</nz-image-group>
</nz-descriptions-item>
<nz-descriptions-item nzTitle="物流状态" [nzSpan]="3">
<span *ngIf="orderGoodsData?.logisticsStatusDesc != null">
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == null" nzStatus="error" nzText="未发货"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'DELIVERING'" nzColor="cyan" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'TRANSPORT'" nzColor="lime" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'AGENT_SIGN'" nzStatus="success" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
@ -204,7 +222,6 @@
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'ACCEPT'" nzStatus="processing" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'FAILED'" nzStatus="error" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
<nz-badge *ngIf="orderGoodsData?.logisticsStatus == 'WAIT_ACCEPT'" nzStatus="default" nzText="{{orderGoodsData.logisticsStatusDesc}}"></nz-badge>
</span>
</nz-descriptions-item>
</nz-descriptions>
</nz-tab>

@ -35,6 +35,9 @@ import {AuditStatusPipe} from "../../../pipes/audit/audit-status.pipe";
import {IconService} from "../../../services/common/icon.service";
import {PayTypePipe} from "../../../pipes/goods/pay-type.pipe";
import {OrderChildStatusPipe} from "../../../pipes/goods/order-child-status.pipe";
import {MerService} from "../../../services/merchant/mer.service";
import {DATA} from "../../../data/login/localStorage.namespace";
import {BrowserStorageService} from "../../../utils/localStorage.service";
@Component({
selector: 'app-goods-logistics-list',
@ -118,19 +121,24 @@ export class GoodsLogisticsListComponent {
logisticsTraceDetails: any;
goodsOrderId: any;
deliveryAddress: any;
// 更多查询条件
isCollapse = false;
merData: any;
objectType: any;
protected readonly fallbackImg = fallbackImg;
protected readonly orderPayType = orderPayType;
protected readonly logisticsStatus = logisticsStatus;
constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService,
private storage: BrowserStorageService,
private merService: MerService,
private iconService: IconService,
private orderGoodsService: OrderGoodsService,
private goodsService: GoodsService) {
// 初始化搜索框
this.searchForm = this.fb.group({
logisticsNo: [''],
@ -138,6 +146,7 @@ export class GoodsLogisticsListComponent {
childOrderNo: [''],
goodsType: [''],
goodsBrand: [''],
merId: [''],
userPhone: [''],
goodsSpecsName: [''],
createTimeArray: [[]],
@ -152,8 +161,24 @@ export class GoodsLogisticsListComponent {
this.getRequest();
this.getGoodsTypeNode();
this.getGoodsBrandNode();
this.merList();
this.objectType = this.storage.get(DATA)['account']['objectType'];
}
// 查询商户
public merList() {
let params: any = {
pageNum: 1,
pageSize: 1000,
time: new Date().getTime(),
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data']['list'];
}
});
}
// 查询列表
public getRequest(reset: boolean = false) {

@ -0,0 +1,16 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'dataUtils',
standalone: true
})
export class DataUtilsPipe implements PipeTransform {
transform(data: any, length: number): any {
if (data.length == 0) {
return [];
}
return data.slice(0 , length);
}
}

@ -0,0 +1,30 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'businessType',
standalone: true
})
export class BusinessTypePipe implements PipeTransform {
transform(value: number): any {
switch (value) {
case 1:
return '实物产品';
case 2:
return '虚拟产品';
case 3:
return '肯德基';
case 4:
return '星巴克';
case 5:
return '支付订单';
case 6:
return '物流上传订单';
case 7:
return '物流下载订单';
default:
return '未知状态'
}
}
}

@ -0,0 +1,22 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'status',
standalone: true
})
export class StatusPipe implements PipeTransform {
transform(value: number): any {
switch (value) {
case 1:
return '成功';
case 2:
return '导出中';
case 3:
return '失败';
default:
return '未知状态'
}
}
}

@ -0,0 +1,17 @@
import { Injectable } from '@angular/core';
import {Subject} from "rxjs";
@Injectable({
providedIn: 'root'
})
export class CommunicationService {
private messageSource = new Subject<any>();
currentMessage = this.messageSource.asObservable();
constructor() { }
sendMessage(message: string) {
this.messageSource.next(message);
}
}

@ -8,7 +8,7 @@ export class IconService {
constructor(private iconService: NzIconService) {
this.iconService.fetchFromIconfont({
scriptUrl: 'https://at.alicdn.com/t/c/font_4647823_zeitf111aa.js'
scriptUrl: 'https://at.alicdn.com/t/c/font_4647823_ys5j7ogeas.js'
});
}
}

@ -0,0 +1,41 @@
import { Injectable } from '@angular/core';
import {HttpClient} from "@angular/common/http";
import {environment} from "../../../environments/environment";
import {ObjectData} from "../../utils/objectData.service";
@Injectable({
providedIn: 'root'
})
export class FileService {
constructor(private http: HttpClient) { }
/**
*
* @param params
* @param callBack
*/
public getFileRecordsList(params: object, callBack:any) {
this.http.get(environment.baseUrl + 'file/getFileRecordsList?' + ObjectData.objectByString(params)).subscribe(data => {
callBack(data);
});
}
/**
*
* @param id
* @param callBack
*/
public findFileRecords(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'file/findFileRecords?id=' + id + "&time=" + new Date().getTime()).subscribe(data => {
callBack(data);
});
}
public getDownLoad(id: number, callBack:any) {
this.http.get(environment.baseUrl + 'file/getDownLoad?id=' + id + "&time=" + new Date().getTime()).subscribe(data => {
callBack(data);
});
}
}

@ -32,4 +32,15 @@ export class OrderGoodsService {
callBack(data);
});
}
/**
*
* @param param
* @param callBack
*/
public exportGoodsOrder(param: object, callBack:any) {
this.http.get(environment.orderUrl + 'orderGoods/exportGoodsOrder?'+ObjectData.objectByString(param)).subscribe(data => {
callBack(data);
});
}
}

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

Loading…
Cancel
Save