diff --git a/src/app/pages/goods/goods-brand/goods-brand.component.ts b/src/app/pages/goods/goods-brand/goods-brand.component.ts index 47d555e..70bb0eb 100644 --- a/src/app/pages/goods/goods-brand/goods-brand.component.ts +++ b/src/app/pages/goods/goods-brand/goods-brand.component.ts @@ -203,4 +203,6 @@ export class GoodsBrandComponent { }); } + + } diff --git a/src/app/pages/goods/goods-list/goods-list.component.html b/src/app/pages/goods/goods-list/goods-list.component.html index d285820..51b33be 100644 --- a/src/app/pages/goods/goods-list/goods-list.component.html +++ b/src/app/pages/goods/goods-list/goods-list.component.html @@ -74,6 +74,7 @@ [nzData]="tableData.list" > + 商户 商品名称 商品图片 商品类型 @@ -87,6 +88,7 @@ + {{data.merName}} {{data.title}} @@ -148,7 +150,7 @@ - + @@ -181,6 +183,7 @@ [(nzFileList)]="listImg" [nzShowButton]="listImg.length < 1" [nzPreview]="handlePreview" + [nzBeforeUpload]="beforeUpload" nzAccept="image/*" >
@@ -209,6 +212,7 @@ [(nzFileList)]="bannerImg" [nzShowButton]="bannerImg.length < 20" [nzPreview]="handlePreview" + [nzBeforeUpload]="beforeUpload" nzAccept="image/*" >
@@ -237,6 +241,7 @@ [(nzFileList)]="detailImg" [nzShowButton]="detailImg.length < 20" [nzPreview]="handlePreview" + [nzBeforeUpload]="beforeUpload" nzAccept="image/*" >
@@ -439,6 +444,7 @@ [(nzFileList)]="showImg" [nzShowButton]="showImg.length < 1" [nzPreview]="handlePreview" + [nzBeforeUpload]="beforeUpload" nzAccept="image/*" >
@@ -450,6 +456,7 @@ [nzVisible]="previewVisible" [nzContent]="modalContent" [nzFooter]="null" + (nzOnCancel)="previewVisible = false" > diff --git a/src/app/pages/goods/goods-list/goods-list.component.ts b/src/app/pages/goods/goods-list/goods-list.component.ts index c5304c1..2fb352f 100644 --- a/src/app/pages/goods/goods-list/goods-list.component.ts +++ b/src/app/pages/goods/goods-list/goods-list.component.ts @@ -36,6 +36,7 @@ import { import {NzSpaceItemDirective} from "ng-zorro-antd/space"; import {NzDatePickerComponent} from "ng-zorro-antd/date-picker"; import {NzTypographyComponent} from "ng-zorro-antd/typography"; +import {Observable, Observer} from "rxjs"; const getBase64 = (file: File): Promise => new Promise((resolve, reject) => { @@ -135,6 +136,8 @@ export class GoodsListComponent { goodsMsg?: GoodsMsgData; + + protected readonly fallbackImg = fallbackImg; constructor(private fb: NonNullableFormBuilder, @@ -145,6 +148,7 @@ export class GoodsListComponent { this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE'); + // 初始化搜索框 this.searchForm = this.fb.group({ title: [''], @@ -172,7 +176,7 @@ export class GoodsListComponent { originalPrice: ['' , [Validators.required]], stock: ['' , [Validators.required]], validDay: ['' , [Validators.required]], - salesEndTime: ['' , [Validators.required]], + salesEndTime: [new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDay(), 23, 59, 59) , [Validators.required]], type: [''], source: [''], id: [null], @@ -388,8 +392,9 @@ export class GoodsListComponent { if (!this.commonService.whetherStringIsNull(item.showImg)) { this.showImg = this.commonService.stitchImg(item.showImg); } - } else { - this.editSpecsForm.reset() + } else{ + this.showImg = []; + this.editSpecsForm.reset(); } this.editSpecs = true; } @@ -465,6 +470,25 @@ export class GoodsListComponent { }); } + // 图片上传操作 + beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]): Observable => + new Observable((observer: Observer) => { + const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png'; + if (!isJpgOrPng) { + this.msg.error('上传格式错误!'); + observer.complete(); + return; + } + const isLt2M = file.size! / 1024 / 1024 < 5; + if (!isLt2M) { + this.msg.error('图片大小超过5MB!'); + observer.complete(); + return; + } + observer.next(isJpgOrPng && isLt2M); + observer.complete(); + }); + } diff --git a/src/app/pages/merchant/mer-list/mer-list.component.ts b/src/app/pages/merchant/mer-list/mer-list.component.ts index dd055e5..5680b2a 100644 --- a/src/app/pages/merchant/mer-list/mer-list.component.ts +++ b/src/app/pages/merchant/mer-list/mer-list.component.ts @@ -365,8 +365,10 @@ export class MerListComponent { } // 唤醒编辑表单 - showEdit(item?: GoodsTypeData) { + showEdit(item?:any) { if (item != null) { + + item.payPlatform = String(item.payPlatform); this.editPayForm.patchValue(item); } else { diff --git a/src/app/pages/trade/goods-list/goods-list.component.html b/src/app/pages/trade/goods-list/goods-list.component.html index 4797125..04d55c6 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.html +++ b/src/app/pages/trade/goods-list/goods-list.component.html @@ -107,6 +107,7 @@ 商品图片 商品分类 商品品牌 + 用户手机号 订单号 子订单号 物流单号 @@ -124,6 +125,7 @@ {{data.goodsTypeName}} {{data.goodsBrandName}} + {{data.userPhone}} {{data.orderNo}} {{data.childOrderNo}} {{data.logisticsNo}} @@ -206,6 +208,16 @@ {{ orderGoodsData?.updateTime | date: 'yyyy-MM-dd HH:mm' }} + + + {{deliveryAddress?.consignee}} + {{ deliveryAddress?.phone }} + {{ deliveryAddress?.regionName }} + {{ deliveryAddress?.address }} + {{deliveryAddress?.consignee}} -{{ deliveryAddress?.phone }} -{{ deliveryAddress?.address }} + + + 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 229ac47..87e976a 100644 --- a/src/app/pages/trade/goods-list/goods-list.component.ts +++ b/src/app/pages/trade/goods-list/goods-list.component.ts @@ -120,6 +120,7 @@ export class GoodsListComponent { logisticsNo: any; logisticsTraceDetails: any; goodsOrderId: any; + deliveryAddress: any; // 时间类型选择 dateTypeSelect = DateSelectType; // 更多查询条件 @@ -238,8 +239,8 @@ export class GoodsListComponent { } showDetail(data: OrderGoodsData): void { - console.log(data); this.orderGoodsData = data; + this.findDeliveryAddressById(data.deliveryAddressId); this.orderDetailModal = true; } @@ -278,5 +279,15 @@ export class GoodsListComponent { }); } + findDeliveryAddressById(id: number): void { + this.goodsService.findDeliveryAddressById(id, (data: any) => { + if (data['return_code'] == '000000') { + this.deliveryAddress = data['return_data']; + } else { + this.msg.error(data['return_msg']); + } + }); + } + } diff --git a/src/app/services/goods/goods.service.ts b/src/app/services/goods/goods.service.ts index bca9740..419acb1 100644 --- a/src/app/services/goods/goods.service.ts +++ b/src/app/services/goods/goods.service.ts @@ -170,5 +170,16 @@ export class GoodsService { }); } + /** + * 查询收货地址详情 + * @param id + * @param callBack + */ + public findDeliveryAddressById(id: number, callBack:any) { + this.http.get(environment.baseUrl + 'goods/findDeliveryAddressById?id=' + id ).subscribe(data => { + callBack(data); + }); + } + } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 20bafc1..efdd6ff 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -4,14 +4,14 @@ 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://phgcs.dctpay.com/filesystem/', + 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://phgcs.dctpay.com/filesystem/', }; diff --git a/src/favicon.ico b/src/favicon.ico index 353c17c..eefaadb 100644 Binary files a/src/favicon.ico and b/src/favicon.ico differ