+
支付状态
@@ -95,18 +117,17 @@
-
-
- 创建时间
-
-
-
-
+
+
@@ -134,9 +155,9 @@
物流单号 |
创建时间 |
更新时间 |
-
支付类型 |
-
支付状态 |
-
物流状态 |
+
支付类型 |
+
支付状态 |
+
物流状态 |
操作 |
@@ -162,6 +183,8 @@
{{data.status | orderChildStatus}}
+
+
@@ -205,15 +228,15 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/trade/goods-list/goods-list.component.less b/src/app/pages/trade/goods-list/goods-list.component.less
index 4056a86..1190184 100644
--- a/src/app/pages/trade/goods-list/goods-list.component.less
+++ b/src/app/pages/trade/goods-list/goods-list.component.less
@@ -1,6 +1,7 @@
.search-area {
+ margin-top: 20px;
margin-bottom: 10px;
}
.search-area button {
- margin-right: 8px;
+ margin-right: 14px;
}
diff --git a/src/app/pages/trade/goods-list/goods-list.component.ts b/src/app/pages/trade/goods-list/goods-list.component.ts
index bc6d458..18193fc 100644
--- a/src/app/pages/trade/goods-list/goods-list.component.ts
+++ b/src/app/pages/trade/goods-list/goods-list.component.ts
@@ -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;
}
diff --git a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html
index effed5e..20149b8 100644
--- a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html
+++ b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.html
@@ -1,30 +1,60 @@
|
+
@@ -196,15 +214,14 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts
index 6124b27..730395b 100644
--- a/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts
+++ b/src/app/pages/trade/goods-logistics-list/goods-logistics-list.component.ts
@@ -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,9 +161,25 @@ 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) {
diff --git a/src/app/pipes/common/data-utils.pipe.ts b/src/app/pipes/common/data-utils.pipe.ts
new file mode 100644
index 0000000..89fd259
--- /dev/null
+++ b/src/app/pipes/common/data-utils.pipe.ts
@@ -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);
+ }
+
+}
diff --git a/src/app/pipes/file/business-type.pipe.ts b/src/app/pipes/file/business-type.pipe.ts
new file mode 100644
index 0000000..d648af3
--- /dev/null
+++ b/src/app/pipes/file/business-type.pipe.ts
@@ -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 '未知状态'
+ }
+ }
+
+}
diff --git a/src/app/pipes/file/status.pipe.ts b/src/app/pipes/file/status.pipe.ts
new file mode 100644
index 0000000..f94cb5a
--- /dev/null
+++ b/src/app/pipes/file/status.pipe.ts
@@ -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 '未知状态'
+ }
+ }
+
+}
diff --git a/src/app/services/common/communication.service.ts b/src/app/services/common/communication.service.ts
new file mode 100644
index 0000000..78ab2cc
--- /dev/null
+++ b/src/app/services/common/communication.service.ts
@@ -0,0 +1,17 @@
+import { Injectable } from '@angular/core';
+import {Subject} from "rxjs";
+
+@Injectable({
+ providedIn: 'root'
+})
+export class CommunicationService {
+
+ private messageSource = new Subject();
+ currentMessage = this.messageSource.asObservable();
+
+ constructor() { }
+
+ sendMessage(message: string) {
+ this.messageSource.next(message);
+ }
+}
diff --git a/src/app/services/common/icon.service.ts b/src/app/services/common/icon.service.ts
index 5189b6d..c89c04c 100644
--- a/src/app/services/common/icon.service.ts
+++ b/src/app/services/common/icon.service.ts
@@ -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'
});
}
}
diff --git a/src/app/services/file/file.service.ts b/src/app/services/file/file.service.ts
new file mode 100644
index 0000000..64f58b2
--- /dev/null
+++ b/src/app/services/file/file.service.ts
@@ -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);
+ });
+ }
+
+}
diff --git a/src/app/services/trade/order-goods.service.ts b/src/app/services/trade/order-goods.service.ts
index 1eeee14..309b8b6 100644
--- a/src/app/services/trade/order-goods.service.ts
+++ b/src/app/services/trade/order-goods.service.ts
@@ -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);
+ });
+ }
}
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index ec6ab5c..6230f92 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -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/',
};
|