|
|
|
@ -12,7 +12,7 @@ import {NzMessageService} from "ng-zorro-antd/message"; |
|
|
|
|
import {CommonService} from "../../../services/common/common.service"; |
|
|
|
|
import {GoodsService} from "../../../services/goods/goods.service"; |
|
|
|
|
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 {NzIconDirective} from "ng-zorro-antd/icon"; |
|
|
|
|
import {NzImageDirective, NzImageModule} from "ng-zorro-antd/image"; |
|
|
|
@ -25,7 +25,6 @@ import { |
|
|
|
|
import {NzTreeSelectComponent} from "ng-zorro-antd/tree-select"; |
|
|
|
|
import {DictionaryPipe} from "../../../pipes/common/dictionary.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 {NzMenuDirective, NzMenuItemComponent} from "ng-zorro-antd/menu"; |
|
|
|
|
import { |
|
|
|
@ -37,6 +36,9 @@ 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"; |
|
|
|
|
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> => |
|
|
|
|
new Promise((resolve, reject) => { |
|
|
|
@ -133,27 +135,29 @@ export class GoodsListComponent { |
|
|
|
|
nodesBrand = []; |
|
|
|
|
nodesSpecs:SpecsData[] = []; |
|
|
|
|
nodesVpdSource; |
|
|
|
|
merData: any; |
|
|
|
|
objectType: number; |
|
|
|
|
goodsMsg?: GoodsMsgData; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected readonly fallbackImg = fallbackImg; |
|
|
|
|
|
|
|
|
|
constructor(private fb: NonNullableFormBuilder, |
|
|
|
|
private msg: NzMessageService, |
|
|
|
|
|
|
|
|
|
private merService: MerService, |
|
|
|
|
private storage: BrowserStorageService, |
|
|
|
|
private commonService: CommonService, |
|
|
|
|
private goodsService: GoodsService) { |
|
|
|
|
|
|
|
|
|
this.nodesVpdSource = new DictionaryPipe().getDictionaryList('GOODS_VPD_SOURCE'); |
|
|
|
|
|
|
|
|
|
this.objectType = this.storage.get(DATA)['account']['objectType']; |
|
|
|
|
this.merList(); |
|
|
|
|
|
|
|
|
|
// 初始化搜索框
|
|
|
|
|
this.searchForm = this.fb.group({ |
|
|
|
|
title: [''], |
|
|
|
|
goodsType: [''], |
|
|
|
|
goodsBrand: [''], |
|
|
|
|
merId: [''], |
|
|
|
|
type: [''], |
|
|
|
|
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; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|