fix bug
This commit is contained in:
@ -105,6 +105,7 @@ tabs = {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
loadingPlace: {
|
||||
|
||||
@ -103,8 +103,22 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
return of([]);
|
||||
}
|
||||
},
|
||||
change: (q: any) => {
|
||||
this.getRegionCode(q);
|
||||
}
|
||||
} as SFSelectWidgetSchema,
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
loadingPlace: {
|
||||
type: 'string',
|
||||
title: '装货地',
|
||||
@ -123,18 +137,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
},
|
||||
enterpriseProjectId: {
|
||||
type: 'string',
|
||||
title: '所属项目',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
visibleIf: {
|
||||
_$expand: (value: boolean) => value
|
||||
},
|
||||
allowClear: true,
|
||||
asyncData: () => this.shipperservice.getEnterpriseProject()
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
|
||||
driverName: {
|
||||
title: '承运司机',
|
||||
type: 'string',
|
||||
@ -235,6 +238,27 @@ export class WaybillManagementVehicleComponent implements OnInit {
|
||||
};
|
||||
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
|
||||
}
|
||||
// 获取城市列表
|
||||
getRegionCode(regionCode: any) {
|
||||
console.log(regionCode);
|
||||
return this.service
|
||||
.request(this.service.$api_get_enterprise_project, { id: regionCode })
|
||||
.pipe(
|
||||
map(res =>
|
||||
res.map((item: any) => ({
|
||||
label: item.projectName,
|
||||
value: item.id
|
||||
}))
|
||||
)
|
||||
)
|
||||
.subscribe(res => {
|
||||
this.sf.getProperty('/enterpriseProjectId')!.schema.enum = res;
|
||||
this.sf.getProperty('/enterpriseProjectId')!.widget.reset(res);
|
||||
// if (this.enterpriseProjectIds) {
|
||||
// this.sf1.setValue('/enterpriseProjectId', this.enterpriseProjectIds);
|
||||
// }
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
|
||||
@ -2,10 +2,10 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
|
||||
/*
|
||||
* @Author: your name
|
||||
* @Date: 2021-12-07 14:52:29
|
||||
* @LastEditTime: 2022-01-17 15:06:56
|
||||
* @LastEditors: Please set LastEditors
|
||||
* @LastEditTime : 2022-02-17 19:38:59
|
||||
* @LastEditors : Shiming
|
||||
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
* @FilePath: \tms-obc-web\src\app\routes\waybill-management\services\waybill-management.service.ts
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\waybill-management\\services\\waybill-management.service.ts
|
||||
*/
|
||||
import { Injectable, Injector } from '@angular/core';
|
||||
import { BaseService } from 'src/app/shared/services';
|
||||
@ -14,7 +14,7 @@ import { BaseService } from 'src/app/shared/services';
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class WaybillManagementServe extends BaseService {
|
||||
|
||||
$api_get_enterprise_project = `/api/mdc/cuc/enterpriseProject/getEnterpriseProjectList `; // 所属项目列表
|
||||
$api_get_catalogue_member = `/user?_allow_anonymous=true`;
|
||||
$api_del_driver = ``;
|
||||
// 据 手机号/姓名 查询 车队长/司机
|
||||
|
||||
Reference in New Issue
Block a user