车辆接口更新

This commit is contained in:
wangshiming
2022-01-26 16:56:50 +08:00
parent b733972e11
commit 9b2c25524a
2 changed files with 36 additions and 9 deletions

View File

@ -1,8 +1,10 @@
import { Component, OnInit, ViewChild } from '@angular/core'; import { Component, OnInit, ViewChild } from '@angular/core';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st'; import { STComponent, STColumn, STRequestOptions } from '@delon/abc/st';
import { SFComponent, SFSchema, SFDateWidgetSchema } from '@delon/form'; import { SFComponent, SFSchema, SFDateWidgetSchema, SFSelectWidgetSchema, SFSchemaEnum } from '@delon/form';
import { NzModalService } from 'ng-zorro-antd/modal'; import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { FreightAccountService } from '../../services/freight-account.service'; import { FreightAccountService } from '../../services/freight-account.service';
@Component({ @Component({
@ -179,26 +181,50 @@ export class CostManagementComponent implements OnInit {
hrto: { hrto: {
type: 'string', type: 'string',
title: '应付对象', title: '应付对象',
enum: [{ label: '全部', value: '全部' }],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
if (!!q) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} } as SFSelectWidgetSchema
}, },
arto: { arto: {
type: 'string', type: 'string',
title: '应收对象', title: '应收对象',
enum: [{ label: '全部', value: '全部' }],
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请选择', serverSearch: true,
searchDebounceTime: 300,
searchLoadingText: '搜索中...',
allowClear: true,
onSearch: (q: any) => {
if (!!q) {
return this.service
.request(this.service.$api_enterpriceList, { enterpriseName: q })
.pipe(map((res: any) => (res as any[]).map(i => ({ label: i.enterpriseName, value: i.id } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
visibleIf: { visibleIf: {
expand: (value: boolean) => value expand: (value: boolean) => value
} }
} } as SFSelectWidgetSchema
}, },
createTime: { createTime: {
title: '创建时间', title: '创建时间',

View File

@ -4,7 +4,7 @@
* @Author : Shiming * @Author : Shiming
* @Date : 2022-01-18 15:57:44 * @Date : 2022-01-18 15:57:44
* @LastEditors : Shiming * @LastEditors : Shiming
* @LastEditTime : 2022-01-18 19:05:23 * @LastEditTime : 2022-01-26 16:53:11
* @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\services\\freight-account.service.ts * @FilePath : \\tms-obc-web\\src\\app\\routes\\financial-management\\services\\freight-account.service.ts
* Copyright (C) 2022 huzhenhong. All rights reserved. * Copyright (C) 2022 huzhenhong. All rights reserved.
*/ */
@ -118,7 +118,8 @@ export class FreightAccountService extends ShipperBaseService {
}); });
} }
} }
// 获取货主企业列表
public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
reviewPDF(url: string) { reviewPDF(url: string) {
if (!url) { if (!url) {
return; return;