袁野 5 months ago
parent 48e44cf44f
commit 278b89d6c6
  1. 2
      src/app/pages/goods/goods-brand/goods-brand.component.ts
  2. 9
      src/app/pages/goods/goods-list/goods-list.component.html
  3. 28
      src/app/pages/goods/goods-list/goods-list.component.ts
  4. 4
      src/app/pages/merchant/mer-list/mer-list.component.ts
  5. 12
      src/app/pages/trade/goods-list/goods-list.component.html
  6. 13
      src/app/pages/trade/goods-list/goods-list.component.ts
  7. 11
      src/app/services/goods/goods.service.ts
  8. 16
      src/environments/environment.ts
  9. BIN
      src/favicon.ico

@ -203,4 +203,6 @@ export class GoodsBrandComponent {
}); });
} }
} }

@ -74,6 +74,7 @@
[nzData]="tableData.list" > [nzData]="tableData.list" >
<thead> <thead>
<tr> <tr>
<th nzWidth="80px">商户</th>
<th nzWidth="80px">商品名称</th> <th nzWidth="80px">商品名称</th>
<th nzWidth="100px">商品图片</th> <th nzWidth="100px">商品图片</th>
<th nzWidth="100px">商品类型</th> <th nzWidth="100px">商品类型</th>
@ -87,6 +88,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.merName}}</td>
<td>{{data.title}}</td> <td>{{data.title}}</td>
<td> <td>
<img nz-image width="60px" height="60px" nzSrc="{{imageUrl + data.listImg }}" [nzFallback]="fallbackImg" alt="" /> <img nz-image width="60px" height="60px" nzSrc="{{imageUrl + data.listImg }}" [nzFallback]="fallbackImg" alt="" />
@ -148,7 +150,7 @@
<nz-form-control [nzSm]="14" [nzXs]="24"> <nz-form-control [nzSm]="14" [nzXs]="24">
<nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type"> <nz-select nzSize="large" nzShowSearch nzAllowClear nzPlaceHolder="请选择" formControlName="type">
<nz-option nzLabel="实物商品" nzValue="1"></nz-option> <nz-option nzLabel="实物商品" nzValue="1"></nz-option>
<nz-option nzLabel="虚拟商品商品" nzValue="2"></nz-option> <nz-option nzLabel="虚拟商品" nzValue="2"></nz-option>
</nz-select> </nz-select>
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
@ -181,6 +183,7 @@
[(nzFileList)]="listImg" [(nzFileList)]="listImg"
[nzShowButton]="listImg.length < 1" [nzShowButton]="listImg.length < 1"
[nzPreview]="handlePreview" [nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
nzAccept="image/*" nzAccept="image/*"
> >
<div> <div>
@ -209,6 +212,7 @@
[(nzFileList)]="bannerImg" [(nzFileList)]="bannerImg"
[nzShowButton]="bannerImg.length < 20" [nzShowButton]="bannerImg.length < 20"
[nzPreview]="handlePreview" [nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
nzAccept="image/*" nzAccept="image/*"
> >
<div> <div>
@ -237,6 +241,7 @@
[(nzFileList)]="detailImg" [(nzFileList)]="detailImg"
[nzShowButton]="detailImg.length < 20" [nzShowButton]="detailImg.length < 20"
[nzPreview]="handlePreview" [nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
nzAccept="image/*" nzAccept="image/*"
> >
<div> <div>
@ -439,6 +444,7 @@
[(nzFileList)]="showImg" [(nzFileList)]="showImg"
[nzShowButton]="showImg.length < 1" [nzShowButton]="showImg.length < 1"
[nzPreview]="handlePreview" [nzPreview]="handlePreview"
[nzBeforeUpload]="beforeUpload"
nzAccept="image/*" nzAccept="image/*"
> >
<div> <div>
@ -450,6 +456,7 @@
[nzVisible]="previewVisible" [nzVisible]="previewVisible"
[nzContent]="modalContent" [nzContent]="modalContent"
[nzFooter]="null" [nzFooter]="null"
(nzOnCancel)="previewVisible = false" (nzOnCancel)="previewVisible = false"
> >
<ng-template #modalContent> <ng-template #modalContent>

@ -36,6 +36,7 @@ import {
import {NzSpaceItemDirective} from "ng-zorro-antd/space"; import {NzSpaceItemDirective} from "ng-zorro-antd/space";
import {NzDatePickerComponent} from "ng-zorro-antd/date-picker"; import {NzDatePickerComponent} from "ng-zorro-antd/date-picker";
import {NzTypographyComponent} from "ng-zorro-antd/typography"; import {NzTypographyComponent} from "ng-zorro-antd/typography";
import {Observable, Observer} from "rxjs";
const getBase64 = (file: File): Promise<string | ArrayBuffer | null> => const getBase64 = (file: File): Promise<string | ArrayBuffer | null> =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
@ -135,6 +136,8 @@ export class GoodsListComponent {
goodsMsg?: GoodsMsgData; goodsMsg?: GoodsMsgData;
protected readonly fallbackImg = fallbackImg; protected readonly fallbackImg = fallbackImg;
constructor(private fb: NonNullableFormBuilder, constructor(private fb: NonNullableFormBuilder,
@ -145,6 +148,7 @@ export class GoodsListComponent {
this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE'); this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE');
// 初始化搜索框 // 初始化搜索框
this.searchForm = this.fb.group({ this.searchForm = this.fb.group({
title: [''], title: [''],
@ -172,7 +176,7 @@ export class GoodsListComponent {
originalPrice: ['' , [Validators.required]], originalPrice: ['' , [Validators.required]],
stock: ['' , [Validators.required]], stock: ['' , [Validators.required]],
validDay: ['' , [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: [''], type: [''],
source: [''], source: [''],
id: [null], id: [null],
@ -389,7 +393,8 @@ export class GoodsListComponent {
this.showImg = this.commonService.stitchImg(item.showImg); this.showImg = this.commonService.stitchImg(item.showImg);
} }
} else{ } else{
this.editSpecsForm.reset() this.showImg = [];
this.editSpecsForm.reset();
} }
this.editSpecs = true; this.editSpecs = true;
} }
@ -465,6 +470,25 @@ export class GoodsListComponent {
}); });
} }
// 图片上传操作
beforeUpload = (file: NzUploadFile, _fileList: NzUploadFile[]): Observable<boolean> =>
new Observable((observer: Observer<boolean>) => {
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();
});
} }

@ -365,8 +365,10 @@ export class MerListComponent {
} }
// 唤醒编辑表单 // 唤醒编辑表单
showEdit(item?: GoodsTypeData) { showEdit(item?:any) {
if (item != null) { if (item != null) {
item.payPlatform = String(item.payPlatform);
this.editPayForm.patchValue(item); this.editPayForm.patchValue(item);
} else { } else {

@ -107,6 +107,7 @@
<th nzWidth="100px">商品图片</th> <th nzWidth="100px">商品图片</th>
<th nzWidth="100px">商品分类</th> <th nzWidth="100px">商品分类</th>
<th nzWidth="100px">商品品牌</th> <th nzWidth="100px">商品品牌</th>
<th nzWidth="100px">用户手机号</th>
<th nzWidth="100px">订单号</th> <th nzWidth="100px">订单号</th>
<th nzWidth="100px">子订单号</th> <th nzWidth="100px">子订单号</th>
<th nzWidth="100px">物流单号</th> <th nzWidth="100px">物流单号</th>
@ -124,6 +125,7 @@
</td> </td>
<td>{{data.goodsTypeName}}</td> <td>{{data.goodsTypeName}}</td>
<td>{{data.goodsBrandName}}</td> <td>{{data.goodsBrandName}}</td>
<td>{{data.userPhone}}</td>
<td>{{data.orderNo}}</td> <td>{{data.orderNo}}</td>
<td>{{data.childOrderNo}}</td> <td>{{data.childOrderNo}}</td>
<td>{{data.logisticsNo}}</td> <td>{{data.logisticsNo}}</td>
@ -206,6 +208,16 @@
<nz-descriptions-item *ngIf="orderGoodsData?.updateTime != null" nzTitle="更新时间">{{ orderGoodsData?.updateTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item> <nz-descriptions-item *ngIf="orderGoodsData?.updateTime != null" nzTitle="更新时间">{{ orderGoodsData?.updateTime | date: 'yyyy-MM-dd HH:mm' }}</nz-descriptions-item>
</nz-descriptions> </nz-descriptions>
</nz-tab> </nz-tab>
<nz-tab nzTitle="收货信息">
<nz-descriptions nzTitle="收获信息" nzBordered>
<nz-descriptions-item nzTitle="收货人">{{deliveryAddress?.consignee}}</nz-descriptions-item>
<nz-descriptions-item nzTitle="收货电话">{{ deliveryAddress?.phone }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="区域名称">{{ deliveryAddress?.regionName }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="收货地址" [nzSpan]="3">{{ deliveryAddress?.address }}</nz-descriptions-item>
<nz-descriptions-item nzTitle="发货信息" [nzSpan]="3">{{deliveryAddress?.consignee}} -{{ deliveryAddress?.phone }} -{{ deliveryAddress?.address }}</nz-descriptions-item>
</nz-descriptions>
</nz-tab>
</nz-tabset> </nz-tabset>
</ng-container> </ng-container>

@ -120,6 +120,7 @@ export class GoodsListComponent {
logisticsNo: any; logisticsNo: any;
logisticsTraceDetails: any; logisticsTraceDetails: any;
goodsOrderId: any; goodsOrderId: any;
deliveryAddress: any;
// 时间类型选择 // 时间类型选择
dateTypeSelect = DateSelectType; dateTypeSelect = DateSelectType;
// 更多查询条件 // 更多查询条件
@ -238,8 +239,8 @@ export class GoodsListComponent {
} }
showDetail(data: OrderGoodsData): void { showDetail(data: OrderGoodsData): void {
console.log(data);
this.orderGoodsData = data; this.orderGoodsData = data;
this.findDeliveryAddressById(data.deliveryAddressId);
this.orderDetailModal = true; 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']);
}
});
}
} }

@ -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);
});
}
} }

@ -4,14 +4,14 @@
export const environment = { export const environment = {
production: false, production: false,
// baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址) baseUrl: 'https://phg.dctpay.com/brest/', // 测试环境服务器地址(请求数据地址)
// orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址) orderUrl: 'https://phg.dctpay.com/order/', // 测试环境服务器地址(请求数据地址)
// userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址) userUrl: 'https://phg.dctpay.com/user/', // 测试环境服务器地址(请求数据地址)
// imageUrl: 'https://phg.obs.cn-southwest-2.myhuaweicloud.com/', imageUrl: 'https://phg.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/', // 测试环境服务器地址(请求数据地址)
userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址) // userUrl: 'http://localhost:9704/user/', // 测试环境服务器地址(请求数据地址)
imageUrl: 'https://phgcs.dctpay.com/filesystem/', // imageUrl: 'https://phgcs.dctpay.com/filesystem/',
}; };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 255 KiB

Loading…
Cancel
Save