-
-
-
-
-
-
-
4">
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
4">
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
客户
供应商
-
+
-
-
-
+
+
+
客户
供应商
-
+
diff --git a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts
index 0c5002fa..71457e9a 100644
--- a/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts
+++ b/src/app/routes/waybill-management/components/abnormal-appear/abnormal-appear.component.ts
@@ -1,7 +1,10 @@
import { Component, OnInit, ViewChild, Type } from '@angular/core';
import { STComponent, STColumn, STChange } from '@delon/abc/st';
-import { SFComponent, SFRadioWidgetSchema, SFSchema, SFUISchema } from '@delon/form';
+import { SFComponent, SFDateWidgetSchema, SFRadioWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
+import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
+import { of } from 'rxjs';
+import { map } from 'rxjs/operators';
import { WaybillManagementServe } from '../../services/waybill-management.service';
@Component({
@@ -12,8 +15,9 @@ import { WaybillManagementServe } from '../../services/waybill-management.servic
export class WaybillManagementAbnormalAppearComponent implements OnInit {
@ViewChild('st', { static: true })
st!: STComponent;
+ @ViewChild('st2', { static: true })
+ st2!: STComponent;
@ViewChild('sf', { static: false }) sf!: SFComponent;
- @ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
ui: SFUISchema = {};
ui2: SFUISchema = {};
schema: SFSchema = {};
@@ -24,101 +28,207 @@ export class WaybillManagementAbnormalAppearComponent implements OnInit {
isVisible = false;
edit = false;
editId = false;
+ selectedIndex = 0;
columns: STColumn[] = [
- { title: '异常编号', index: 'customerName' },
- { title: '关联运单号', index: 'customerName' },
- { title: '网络货运人', index: 'customerName' },
- { title: '货主', index: 'customerName' },
- { title: '装货地', index: 'customerName' },
- { title: '卸货地', index: 'customerName' },
- { title: '承运司机', index: 'customerName' },
- { title: '异常信息', index: 'customerName' },
- { title: '异常图片', index: 'customerName' },
- { title: '上报时间', index: 'customerName' },
+ { title: '异常编号', index: 'exceptionCode',width: '180px' },
+ { title: '关联运单号', index: 'wayBillCode',width: '180px' },
+ { title: '网络货运人', index: 'enterpriseInfoName',width: '180px' },
+ { title: '货主', index: 'shipperAppUserName' ,width: '180px'},
+ { title: '装货地', index: 'loadingPlace' ,width: '180px'},
+ { title: '卸货地', index: 'dischargePlace' ,width: '180px'},
+ { title: '承运司机', index: 'driver' ,width: '90px'},
+ { title: '异常信息', index: 'exceptionContent',width: '250px' },
+ { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '220px'},
+ { title: '上报时间', index: 'createTime',width: '180px' },
+ ];
+ columns2: STColumn[] = [
+ { title: '异常编号', index: 'exceptionCode',width: '180px' },
+ { title: '关联运单号', index: 'wayBillCode',width: '180px' },
+ { title: '网络货运人', index: 'enterpriseInfoName',width: '180px' },
+ { title: '货主', index: 'shipperAppUserName' ,width: '180px'},
+ { title: '装货地', index: 'loadingPlace' ,width: '180px'},
+ { title: '卸货地', index: 'dischargePlace' ,width: '180px'},
+ { title: '承运司机', index: 'driver' ,width: '90px'},
+ { title: '异常信息', index: 'exceptionContent',width: '250px' },
+ { title: '异常图片', render: 'exceptionCertificateFirstFilePath' ,width: '220px'},
+ { title: '上报时间', index: 'createTime',width: '180px' },
];
-
- selectedRows: any[] = [];
get reqParams (){
return {
...this.sf?.value,
}};
+ get reqParams2 (){
+ return {
+ ...this.sf?.value,
+ }};
- constructor(public service: WaybillManagementServe, private nzModalService: NzModalService) {}
+ constructor(
+ public service: WaybillManagementServe,
+ private nzModalService: NzModalService,
+ public shipperSrv: ShipperBaseService
+
+ ) {}
ngOnInit(): void {
this.initSF()
}
- stChange(e: STChange): void {
- switch (e.type) {
- case 'checkbox':
- this.selectedRows = e.checkbox!;
- break;
- case 'filter':
- this.st.load();
- break;
- }
- }
- /**
+ /**
* 伸缩查询条件
*/
- expandToggle(): void {
+ expandToggle(): void {
this._$expand = !this._$expand;
this.sf?.setValue('/_$expand', this._$expand);
- }
+ }
/**
* 查询字段个数
*/
- get queryFieldCount(): number {
+ get queryFieldCount(): number {
return Object.keys(this.schema?.properties || {}).length;
- }
+ }
initSF(){
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
- customerName: {
+ exceptionCode: {
type: 'string',
- title: '运单编号',
+ title: '异常编号',
ui: { placeholder: '请输入' }
},
- customerShortName: {
+ wayBillCode: {
type: 'string',
- title: '司机',
+ title: '运单号',
ui: { placeholder: '请输入' }
},
- customerCode: {
+ exceptionType: {
type: 'string',
title: '异常类型',
- ui: { placeholder: '请输入',
- }
+ ui: { placeholder: '请输入' }
+ },
+ shipperAppUserId: {
+ type: 'string',
+ title: '货主',
+ ui: {
+ widget: 'select',
+ serverSearch: true,
+ searchDebounceTime: 300,
+ searchLoadingText: '搜索中...',
+ onSearch: (q: any) => {
+ console.log(q)
+ 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,
+ },
+ enterpriseProjectId: {
+ type: 'string',
+ title: '所属项目',
+ ui: {
+ widget: 'select',
+ visibleIf: {
+ _$expand: (value: boolean) => value,
+ },
+ asyncData: () =>
+ this.shipperSrv.getEnterpriseProject()
+ } as SFSelectWidgetSchema,
+ },
+ 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.id } as SFSchemaEnum))))
+ .toPromise();
+ } else {
+ return of([]);
+ }
+ },
+ visibleIf: {
+ _$expand: (value: boolean) => value
+ }
+ } as SFSelectWidgetSchema
+ },
+ customerCode: {
+ 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 as any[]).map((i) => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum))))
+ .toPromise();
+ } else {
+ return of([]);
+ }
+ },
+ visibleIf: {
+ _$expand: (value: boolean) => value,
+ },
+ } as SFSelectWidgetSchema,
+ },
+ reportingTime: {
+ title: '上报时间',
+ type: 'string',
+ ui: {
+ widget: 'date',
+ mode: 'range',
+ format: 'yyyy-MM-dd',
+ visibleIf: {
+ _$expand: (value: boolean) => value
+ }
+ } as SFDateWidgetSchema
+ },
+ enterpriseInfoId: {
+ type: 'string',
+ title: '网络货运人',
+ ui: {
+ widget: 'select',
+ placeholder: '请选择',
+ visibleIf: {
+ _$expand: (value: boolean) => value,
+ },
+ allowClear: true,
+ asyncData: () => this.shipperSrv.getNetworkFreightForwarder(),
},
}
-
+ }
};
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
- roleAction(value: any,item?: any) {
-
- // this.service.request(this.service.$api_get_crmCustomer, {id: value.id}).subscribe((res: any) => {
- // console.log(res)
- // if(res) {
- // this.formData = res;
- // }
- // })
+ search() {
+ console.log(this.selectedIndex)
+ if(this.selectedIndex === 0) {
+ this.st?.load(1)
+ } else {
+ this.st2?.load(1)
+ }
}
-
- deleteAction(item?: any) {
- this.nzModalService.error({
- nzTitle: '确认删除?',
- nzClosable: false,
- nzCancelText: '取消',
- nzOnOk: () => {}
- });
- }
-
/**
* 重置表单
*/
diff --git a/src/app/routes/waybill-management/services/waybill-management.service.ts b/src/app/routes/waybill-management/services/waybill-management.service.ts
index 33dd7c80..29c8f0fb 100644
--- a/src/app/routes/waybill-management/services/waybill-management.service.ts
+++ b/src/app/routes/waybill-management/services/waybill-management.service.ts
@@ -2,7 +2,7 @@ import { WaybillManagementBulkComponent } from './../components/bulk/bulk.compon
/*
* @Author: your name
* @Date: 2021-12-07 14:52:29
- * @LastEditTime: 2022-01-05 20:36:38
+ * @LastEditTime: 2022-01-11 19:07:29
* @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\waybill-management\services\waybill-management.service.ts
@@ -51,6 +51,12 @@ export class WaybillManagementServe extends BaseService {
// 查询CRM客户信息表
$api_get_crmCustomer_page = '/api/mdc/cuc/crmCustomer/list/page';
+
+ // 查询运营端异常上报
+ $api_get_listOperatePage = '/api/sdc/exceptionReport/listOperateUnReplyPage';
+
+ // 获取货主企业列表
+ public $api_enterpriceList = '/api/mdc/cuc/enterpriseInfo/operate/enterpriceList';
constructor(public injector: Injector) {
super(injector)
}