袁野 5 months ago
parent 278b89d6c6
commit 7d747a6846
  1. 6
      src/app/pages/audit/audit-list/audit-list.component.ts
  2. 17
      src/app/pages/goods/goods-list/goods-list.component.html
  3. 29
      src/app/pages/goods/goods-list/goods-list.component.ts
  4. 3
      src/app/services/common/common.service.ts

@ -185,12 +185,14 @@ export class AuditListComponent {
this.postAudit.remarks = this.remarks; this.postAudit.remarks = this.remarks;
this.auditService.auditMsg(this.postAudit , (data: any) => { this.auditService.auditMsg(this.postAudit , (data: any) => {
if (data['return_code'] == '000000') { if (data['return_code'] == '000000') {
this.getRequest(true); this.getRequest(false);
this.isVisibleAudit = false;
this.isVisibleDetail = false;
this.msg.success("操作成功") this.msg.success("操作成功")
} else { } else {
this.msg.error(data['return_msg']); this.msg.error(data['return_msg']);
} }
this.isVisibleAudit = false;
}); });
} }

@ -21,6 +21,7 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="6"> <div nz-col [nzSpan]="6">
<nz-form-item> <nz-form-item>
<nz-form-label>商品品牌</nz-form-label> <nz-form-label>商品品牌</nz-form-label>
@ -54,6 +55,16 @@
</nz-form-control> </nz-form-control>
</nz-form-item> </nz-form-item>
</div> </div>
<div nz-col [nzSpan]="6" *ngIf="objectType != 2">
<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" class="search-area"> <div nz-col [nzSpan]="6" class="search-area">
<button nz-button [nzType]="'primary'" (click)="getRequest(true)">查询</button> <button nz-button [nzType]="'primary'" (click)="getRequest(true)">查询</button>
@ -74,7 +85,7 @@
[nzData]="tableData.list" > [nzData]="tableData.list" >
<thead> <thead>
<tr> <tr>
<th nzWidth="80px">商户</th> <th *ngIf="objectType != 2" 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>
@ -88,7 +99,7 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.merName}}</td> <td *ngIf="objectType != 2">{{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="" />
@ -124,7 +135,7 @@
<ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template> <ng-template #totalTemplate let-total>总计 {{ total }} 条</ng-template>
<!--添加弹出框--> <!--添加弹出框-->
<nz-modal [(nzVisible)]="isVisibleEdit" [nzMaskClosable] = false nzTitle="编辑类目" (nzOnCancel)="isVisibleEdit = false" (nzOnOk)="handleEdit()"> <nz-modal [nzWidth]="1000" [(nzVisible)]="isVisibleEdit" [nzMaskClosable] = false nzTitle="编辑类目" (nzOnCancel)="isVisibleEdit = false" (nzOnOk)="handleEdit()">
<ng-container *nzModalContent> <ng-container *nzModalContent>
<form nz-form [formGroup]="editForm"> <form nz-form [formGroup]="editForm">
<nz-form-item > <nz-form-item >

@ -12,7 +12,7 @@ import {NzMessageService} from "ng-zorro-antd/message";
import {CommonService} from "../../../services/common/common.service"; import {CommonService} from "../../../services/common/common.service";
import {GoodsService} from "../../../services/goods/goods.service"; import {GoodsService} from "../../../services/goods/goods.service";
import { fallbackImg } from '../../../data/goods/goods.namespace'; import { fallbackImg } from '../../../data/goods/goods.namespace';
import {GoodsMsgData, GoodsTypeData, SpecsData} from "../../../model/goods.interface"; import {GoodsMsgData, SpecsData} from "../../../model/goods.interface";
import {NzDividerComponent} from "ng-zorro-antd/divider"; import {NzDividerComponent} from "ng-zorro-antd/divider";
import {NzIconDirective} from "ng-zorro-antd/icon"; import {NzIconDirective} from "ng-zorro-antd/icon";
import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image"; import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image";
@ -25,7 +25,6 @@ import {
import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select"; import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select";
import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe"; import {DictionaryPipe} from "../../../pipes/common/dictionary.pipe";
import {GoodsStatusPipe} from "../../../pipes/goods/goods-status.pipe"; import {GoodsStatusPipe} from "../../../pipes/goods/goods-status.pipe";
import {NzConfigService} from "ng-zorro-antd/core/config";
import {NzDropDownADirective, NzDropDownDirective, NzDropdownMenuComponent} from "ng-zorro-antd/dropdown"; import {NzDropDownADirective, NzDropDownDirective, NzDropdownMenuComponent} from "ng-zorro-antd/dropdown";
import {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu"; import {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu";
import { import {
@ -37,6 +36,9 @@ 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"; import {Observable, Observer} from "rxjs";
import {BrowserStorageService} from "../../../utils/localStorage.service";
import {DATA} from "../../../data/login/localStorage.namespace";
import {MerService} from "../../../services/merchant/mer.service";
const getBase64 = (file: File): Promise<string | ArrayBuffer | null> => const getBase64 = (file: File): Promise<string | ArrayBuffer | null> =>
new Promise((resolve, reject) => { new Promise((resolve, reject) => {
@ -133,27 +135,29 @@ export class GoodsListComponent {
nodesBrand = []; nodesBrand = [];
nodesSpecs:SpecsData[] = []; nodesSpecs:SpecsData[] = [];
nodesVpdSource; nodesVpdSource;
merData: any;
objectType: number;
goodsMsg?: GoodsMsgData; goodsMsg?: GoodsMsgData;
protected readonly fallbackImg = fallbackImg; protected readonly fallbackImg = fallbackImg;
constructor(private fb: NonNullableFormBuilder, constructor(private fb: NonNullableFormBuilder,
private msg: NzMessageService, private msg: NzMessageService,
private merService: MerService,
private storage: BrowserStorageService,
private commonService: CommonService, private commonService: CommonService,
private goodsService: GoodsService) { private goodsService: GoodsService) {
this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE'); this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE');
this.objectType = this.storage.get(DATA)['account']['objectType'];
this.merList();
// 初始化搜索框 // 初始化搜索框
this.searchForm = this.fb.group({ this.searchForm = this.fb.group({
title: [''], title: [''],
goodsType: [''], goodsType: [''],
goodsBrand: [''], goodsBrand: [''],
merId: [''],
type: [''], type: [''],
status: [''], status: [''],
}); });
@ -490,5 +494,16 @@ export class GoodsListComponent {
}); });
merList() {
let params = {
pageNum: 1 ,
pageSize: 10000
}
this.merService.queryList(params, (data: any) => {
if (data['return_code'] == '000000') {
this.merData = data['return_data'].list;
}
});
}
} }

@ -69,13 +69,12 @@ export class CommonService {
for (const i of imgUrl.split(',')) { for (const i of imgUrl.split(',')) {
imgArray.push( imgArray.push(
{ {
uid: 1, uid: i,
name: i, name: i,
status: 'done', status: 'done',
url: environment.imageUrl + i url: environment.imageUrl + i
}); });
} }
console.log(imgArray);
return imgArray; return imgArray;
} }

Loading…
Cancel
Save