车辆接口更新

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 { Router } from '@angular/router';
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 { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { FreightAccountService } from '../../services/freight-account.service';
@Component({
@ -179,26 +181,50 @@ export class CostManagementComponent implements OnInit {
hrto: {
type: 'string',
title: '应付对象',
enum: [{ label: '全部', value: '全部' }],
ui: {
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: {
expand: (value: boolean) => value
}
}
} as SFSelectWidgetSchema
},
arto: {
type: 'string',
title: '应收对象',
enum: [{ label: '全部', value: '全部' }],
ui: {
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: {
expand: (value: boolean) => value
}
}
} as SFSelectWidgetSchema
},
createTime: {
title: '创建时间',

View File

@ -4,7 +4,7 @@
* @Author : Shiming
* @Date : 2022-01-18 15:57:44
* @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
* 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) {
if (!url) {
return;