From bcad306ae5934d111d14e05934e97b07ed6a38a9 Mon Sep 17 00:00:00 2001 From: wangshiming Date: Tue, 18 Jan 2022 16:36:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../edit-password/edit-password.component.ts | 4 +- .../components/bulk/bulk.component.ts | 62 ++--------- .../components/vehicle/vehicle.component.ts | 100 +++++++----------- .../confir-receipt.component.ts | 4 +- .../modal/vehicle/cancel/cancel.component.ts | 6 +- .../confir-receipt.component.ts | 4 +- .../sure-arrive/sure-arrive.component.ts | 4 - .../sure-depart/sure-depart.component.ts | 4 - .../retrieve-password.component.ts | 2 - .../bulk-publish/bulk-publish.component.ts | 4 - .../bulk-release-publish.component.ts | 2 - .../components/bulk/bulk.component.ts | 2 - .../onecar-publish.component.ts | 8 -- .../release-publish.component.ts | 8 -- .../components/list/edit/edit.component.ts | 2 - .../list/img-view/img-view.component.ts | 6 +- .../components/bulk/bulk.component.ts | 60 ++--------- .../components/vehicle/vehicle.component.ts | 60 ++--------- 18 files changed, 67 insertions(+), 275 deletions(-) diff --git a/src/app/routes/account/components/edit-password/edit-password.component.ts b/src/app/routes/account/components/edit-password/edit-password.component.ts index f180ac1d..7e5d7a8e 100644 --- a/src/app/routes/account/components/edit-password/edit-password.component.ts +++ b/src/app/routes/account/components/edit-password/edit-password.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-11-29 13:50:46 - * @LastEditTime: 2021-12-28 14:19:32 + * @LastEditTime: 2022-01-18 16:34:46 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\account\components\edit\edit.component.ts @@ -109,8 +109,6 @@ export class AccountComponentsCenterEditComponent implements OnInit { this.router.navigate(['/passport/login']) this.modalRef.close() }, 3000) - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/order-management/components/bulk/bulk.component.ts b/src/app/routes/order-management/components/bulk/bulk.component.ts index 75834a8c..473f8b4a 100644 --- a/src/app/routes/order-management/components/bulk/bulk.component.ts +++ b/src/app/routes/order-management/components/bulk/bulk.component.ts @@ -211,78 +211,32 @@ tabs = { } } }, - driverId: { + driverName: { title: '承运司机', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) - .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.appUserId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - carNo: { title: '车牌号', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getCarLicenseListByCarNo, { - carNo: q - }) - .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.appUserId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - payeeId: { + captainName: { title: '车队长', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, - model: 1, type: 2 }) - .pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.userId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value, }, - } as SFSelectWidgetSchema, + } }, paymentstatus: { title: '支付状态', @@ -765,8 +719,6 @@ tabs = { if (res) { this.st.load(1); this.getGoodsSourceStatistical() - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -800,9 +752,7 @@ tabs = { this.stFloat.reload() this.st?.reload(1); this.getGoodsSourceStatistical() - } else { - this.service.msgSrv.error(res.msg) - } + } }) }); } diff --git a/src/app/routes/order-management/components/vehicle/vehicle.component.ts b/src/app/routes/order-management/components/vehicle/vehicle.component.ts index a536c6bf..5886a857 100644 --- a/src/app/routes/order-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/order-management/components/vehicle/vehicle.component.ts @@ -207,78 +207,56 @@ resourceStatus: any; } } }, - driverId: { + // driverId: { + // title: '承运司机', + // type: 'string', + // ui: { + // widget: 'select', + // serverSearch: true, + // searchDebounceTime: 300, + // searchLoadingText: '搜索中...', + // onSearch: (q: any) => { + // if (!!q) { + // return this.service + // .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) + // .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.appUserId } as SFSchemaEnum)))) + // .toPromise(); + // } else { + // return of([]); + // } + // }, + // visibleIf: { + // _$expand: (value: boolean) => value + // } + // } as SFSelectWidgetSchema + // }, + driverName: { title: '承运司机', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) - .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.appUserId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - CarNo: { + carNo: { title: '车牌号', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getCarLicenseListByCarNo, { - carNo: q - }) - .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - payeeId: { + captainName: { title: '车队长', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, - model: 1, type: 2 }) - .pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.userId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value, }, - } as SFSelectWidgetSchema, + } }, paymentStatus: { title: '支付状态', @@ -603,7 +581,7 @@ resourceStatus: any; this.resourceStatus = e; this.initST(); setTimeout(() => { - this.st.load(); + this.st.load(1); this.getGoodsSourceStatistical() }, 500); } @@ -680,7 +658,10 @@ resourceStatus: any; // return false; // } }); - modal.afterClose.subscribe(_ => this.st.reload(1)); + modal.afterClose.subscribe(_ => { + this.st.load(1); + this.getGoodsSourceStatistical() + }); } }); } @@ -706,6 +687,7 @@ resourceStatus: any; modal.afterClose.subscribe((result) => { if (result) { this.st.load(1); + this.getGoodsSourceStatistical() } }); } @@ -745,6 +727,7 @@ resourceStatus: any; modal.afterClose.subscribe((result) => { if (result) { this.st.load(1); + this.getGoodsSourceStatistical() } }); } @@ -780,6 +763,7 @@ resourceStatus: any; modal.afterClose.subscribe((result) => { if (result) { this.st.load(1); + this.getGoodsSourceStatistical() } }); } @@ -807,8 +791,6 @@ resourceStatus: any; if(res) { this.service.msgSrv.success('撤销成功!') this.stFloat.reload() - } else { - this.service.msgSrv.error(res.msg) } }) }); @@ -823,7 +805,8 @@ resourceStatus: any; this.service.request(this.service.$api_get_cancelAnOrder, {id: item.id}).subscribe((res) => { if (res === true) { this.service.msgSrv.success('操作成功!'); - this.st?.reload(1); + this.st.load(1); + this.getGoodsSourceStatistical() this.initST(); } }), @@ -841,9 +824,8 @@ resourceStatus: any; this.service.request(this.service.$api_get_batchSignWholeOrder, params).subscribe(res => { if (res) { console.log(res); - this.st?.reload(1); - } else { - this.service.msgSrv.error(res.msg); + this.st.load(1); + this.getGoodsSourceStatistical() } }); } diff --git a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.ts b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.ts index b8f256fd..1853df53 100644 --- a/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.ts +++ b/src/app/routes/order-management/modal/bulk/confir-receipt/confir-receipt.component.ts @@ -2,7 +2,7 @@ import { preloaderFinished } from '@delon/theme'; /* * @Author: your name * @Date: 2021-12-14 14:03:07 - * @LastEditTime: 2022-01-13 16:19:28 + * @LastEditTime: 2022-01-18 16:34:59 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\bulk\update-freight\update-freight.component.ts @@ -76,8 +76,6 @@ export class ConfirReceiptComponent implements OnInit { if(res) { this.service.msgSrv.success('确认签收成功!') this.modal.destroy(true); - } else { - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/order-management/modal/vehicle/cancel/cancel.component.ts b/src/app/routes/order-management/modal/vehicle/cancel/cancel.component.ts index 86250b1e..067e50ab 100644 --- a/src/app/routes/order-management/modal/vehicle/cancel/cancel.component.ts +++ b/src/app/routes/order-management/modal/vehicle/cancel/cancel.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-21 10:14:52 - * @LastEditTime: 2021-12-21 10:17:02 + * @LastEditTime: 2022-01-18 16:35:03 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\cancel\cancel.component.ts @@ -68,8 +68,6 @@ export class OneCarOrderCancelComponent implements OnInit { this.service.request(this.service.$api_get_cancelAnOrder, { id: this.i?.id, ...this.sf.value }).subscribe(res => { if (res) { this.modalRef.close(true); - } else { - this.service.msgSrv.error(res.msg); } }), nzOnCancel: () => this.modalRef.destroy() @@ -78,8 +76,6 @@ export class OneCarOrderCancelComponent implements OnInit { this.service.request(this.service.$api_get_cancelAnOrder, { id: this.i?.id, ...this.sf.value }).subscribe(res => { if (res) { this.modalRef.close(true); - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts index ed49cdde..e526fdc1 100644 --- a/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts +++ b/src/app/routes/order-management/modal/vehicle/confir-receipt/confir-receipt.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-15 13:17:42 - * @LastEditTime: 2022-01-12 14:01:00 + * @LastEditTime: 2022-01-18 16:35:11 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\order-management\modal\vehicle\confir-receipt\confir-receipt.component.ts @@ -79,8 +79,6 @@ export class VehicleConfirReceiptComponent implements OnInit { if(res) { this.service.msgSrv.success('确认签收成功!') this.modal.destroy(); - } else { - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts index f8d39ee1..e0e8f6e3 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-arrive/sure-arrive.component.ts @@ -438,8 +438,6 @@ export class VehicleSureArriveComponent implements OnInit { if(res) { this.service.msgSrv.success('确认到车成功!') this.modal.destroy(true); - } else{ - this.service.msgSrv.error(res.msg) } }) } else { @@ -463,8 +461,6 @@ export class VehicleSureArriveComponent implements OnInit { if(res) { this.service.msgSrv.success('确认到车成功!') this.modal.destroy(true); - } else{ - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts index b2b11c61..31f94dd1 100644 --- a/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts +++ b/src/app/routes/order-management/modal/vehicle/sure-depart/sure-depart.component.ts @@ -283,8 +283,6 @@ export class VehicleSureDepartComponent implements OnInit { if(res) { this.service.msgSrv.success('确认发车成功!') this.modal.destroy(true); - } else{ - this.service.msgSrv.error(res.msg) } }) } else { @@ -306,8 +304,6 @@ export class VehicleSureDepartComponent implements OnInit { if(res) { this.service.msgSrv.success('确认发车成功!') this.modal.destroy(true); - } else{ - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/passport/components/retrieve-password/retrieve-password.component.ts b/src/app/routes/passport/components/retrieve-password/retrieve-password.component.ts index df0184b0..7d5318e8 100644 --- a/src/app/routes/passport/components/retrieve-password/retrieve-password.component.ts +++ b/src/app/routes/passport/components/retrieve-password/retrieve-password.component.ts @@ -163,8 +163,6 @@ export class UserRetrievePasswordComponent implements OnInit, AfterViewInit { } else { this.service.msgSrv.error('获取验证码失败!'); } - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts index 7c948fbf..4e1d92cb 100644 --- a/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-publish/bulk-publish.component.ts @@ -672,8 +672,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { nzFooter: null, nzComponentParams: { type: 'onecar', change: change } }); - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -700,8 +698,6 @@ export class SupplyManagementBulkPublishComponent implements OnInit { if(this.sf3data.goodsNameId){ this.sf3.setValue('/goodsNameId',this.sf3data.goodsNameId); } - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts index a92774ff..e67e40be 100644 --- a/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts +++ b/src/app/routes/supply-management/components/bulk-release-publish/bulk-release-publish.component.ts @@ -748,8 +748,6 @@ export class SupplyManagementBulkReleasePublishComponent implements OnInit { if (this.sf3data?.goodsNameId) { this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/supply-management/components/bulk/bulk.component.ts b/src/app/routes/supply-management/components/bulk/bulk.component.ts index f278a619..13d2036a 100644 --- a/src/app/routes/supply-management/components/bulk/bulk.component.ts +++ b/src/app/routes/supply-management/components/bulk/bulk.component.ts @@ -563,8 +563,6 @@ export class SupplyManagementBulkComponent implements OnInit { this.service.msgSrv.success('已取消货源!') this.st?.reload(); this.getGoodsSourceStatistical(); - } else { - this.service.msgSrv.error(res.msg) } }) }) diff --git a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts index 43331df3..c4474e29 100644 --- a/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts +++ b/src/app/routes/supply-management/components/onecar-publish/onecar-publish.component.ts @@ -608,12 +608,8 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { .subscribe(res => { if (res) { this.currentRate = res.rate * 100; - } else { - this.service.msgSrv.error(res.msg); } }); - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -706,8 +702,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { if (this.sf3data.goodsNameId) { this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -854,8 +848,6 @@ export class SupplyManagementOnecarPublishComponent implements OnInit { nzFooter: null, nzComponentParams: { type: 'onecar', change: change } }); - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts index ae8ea7ec..b1588b47 100644 --- a/src/app/routes/supply-management/components/release-publish/release-publish.component.ts +++ b/src/app/routes/supply-management/components/release-publish/release-publish.component.ts @@ -603,12 +603,8 @@ export class SupplyManagementReleasePublishComponent implements OnInit { .subscribe((res: any) => { if (res) { this.currentRate = res.rate; - } else { - this.service.msgSrv.error(res.msg); } }); - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -767,8 +763,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { this.service.request(reqUrl, params).subscribe((res: any) => { if (res) { this.openFinishPage(); - } else { - this.service.msgSrv.error(res.msg); } }); } @@ -907,8 +901,6 @@ export class SupplyManagementReleasePublishComponent implements OnInit { if (this.sf3data.goodsNameId) { this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId); } - } else { - this.service.msgSrv.error(res.msg); } }); } diff --git a/src/app/routes/vehicle/components/list/edit/edit.component.ts b/src/app/routes/vehicle/components/list/edit/edit.component.ts index 183c29a0..ef6b14f3 100644 --- a/src/app/routes/vehicle/components/list/edit/edit.component.ts +++ b/src/app/routes/vehicle/components/list/edit/edit.component.ts @@ -118,8 +118,6 @@ export class VehicleComponentsListEditComponent implements OnInit { if(res) { this.modal.destroy(true); this.service.msgSrv.success('上传协议成功!') - } else { - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/vehicle/components/list/img-view/img-view.component.ts b/src/app/routes/vehicle/components/list/img-view/img-view.component.ts index 9df4f200..26149480 100644 --- a/src/app/routes/vehicle/components/list/img-view/img-view.component.ts +++ b/src/app/routes/vehicle/components/list/img-view/img-view.component.ts @@ -1,7 +1,7 @@ /* * @Author: your name * @Date: 2021-12-07 17:30:18 - * @LastEditTime: 2022-01-13 11:27:12 + * @LastEditTime: 2022-01-18 16:36:27 * @LastEditors: Please set LastEditors * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @FilePath: \tms-obc-web\src\app\routes\vehicle\components\list\img-view\img-view.component.ts @@ -39,8 +39,6 @@ export class VehicleImgViewComponent implements OnInit { if(res) { this.modal.destroy(true); this.service.msgSrv.success('已驳回') - } else { - this.service.msgSrv.error(res.msg) } }) } @@ -54,8 +52,6 @@ export class VehicleImgViewComponent implements OnInit { if(res) { this.modal.destroy(true); this.service.msgSrv.success('已通过') - } else { - this.service.msgSrv.error(res.msg) } }) } diff --git a/src/app/routes/waybill-management/components/bulk/bulk.component.ts b/src/app/routes/waybill-management/components/bulk/bulk.component.ts index e44bd7d3..6eaab2a3 100644 --- a/src/app/routes/waybill-management/components/bulk/bulk.component.ts +++ b/src/app/routes/waybill-management/components/bulk/bulk.component.ts @@ -144,78 +144,32 @@ tabs = { }, } }, - driverId: { + driverName: { title: '承运司机', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, - model: 1, type: 1 }) - .pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { - _$expand: (value: boolean) => value, - }, - } as SFSelectWidgetSchema, + _$expand: (value: boolean) => value + } + } }, carNo: { title: '车牌号', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getCarLicenseListByCarNo, { - carNo: q - }) - .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - payeeId: { + captainName: { title: '车队长', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, - model: 1, type: 2 }) - .pipe(map((res) => (res as any[]).map((i) => ({ label: i.name, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value, }, - } as SFSelectWidgetSchema, + } }, paymentstatus: { title: '支付状态', diff --git a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts index b63b2932..fb8eb904 100644 --- a/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts +++ b/src/app/routes/waybill-management/components/vehicle/vehicle.component.ts @@ -144,77 +144,33 @@ export class WaybillManagementVehicleComponent implements OnInit { } } }, - driverId: { + driverName: { title: '承运司机', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 1 }) - .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.appUserId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, carNo: { title: '车牌号', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getCarLicenseListByCarNo, { - carNo: q - }) - .pipe(map((res: any) => (res?.records as any[]).map(i => ({ label: i.carNo, value: i.id } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { _$expand: (value: boolean) => value } - } as SFSelectWidgetSchema + } }, - payeeId: { + captainName: { title: '车队长', type: 'string', ui: { - widget: 'select', - serverSearch: true, - searchDebounceTime: 300, - searchLoadingText: '搜索中...', - onSearch: (q: any) => { - if (!!q) { - return this.service - .request(this.service.$api_get_getDriverInfo, { keyword: q, model: 1, type: 2 }) - .pipe(map(res => (res as any[]).map(i => ({ label: i.name, value: i.userId } as SFSchemaEnum)))) - .toPromise(); - } else { - return of([]); - } - }, visibleIf: { - _$expand: (value: boolean) => value - } - } as SFSelectWidgetSchema - }, + _$expand: (value: boolean) => value, + }, + } + }, paymentstatus: { title: '支付状态', type: 'string',