Merge branch 'develop' of https://gitlab.eascs.com/tms-ui/tms-obc-web into develop

This commit is contained in:
Taric Xin
2022-04-27 17:07:18 +08:00
6 changed files with 41 additions and 61 deletions

View File

@ -1,8 +1,8 @@
import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core'; import { AfterViewInit, Component, OnDestroy, OnInit } from '@angular/core';
import { SFComponent, SFSchema } from '@delon/form'; import { SFComponent, SFSchema } from '@delon/form';
import { SearchDrawerService } from '@shared';
import { fromEvent, Subscription } from 'rxjs'; import { fromEvent, Subscription } from 'rxjs';
import { debounceTime } from 'rxjs/operators'; import { debounceTime } from 'rxjs/operators';
import { SearchDrawerService } from 'src/app/shared/components/search-drawer/search-drawer.service';
@Component({ @Component({
template: '' template: ''
@ -40,14 +40,14 @@ export class BasicTableComponent implements AfterViewInit, OnDestroy {
} else { } else {
const drawer = this.searchDrawerService.create(this.sfValue, this.schema); const drawer = this.searchDrawerService.create(this.sfValue, this.schema);
this.drawer.push( this.drawer.push(
drawer.initEvent.subscribe(sf => { drawer.initEvent.subscribe((sf: SFComponent) => {
if (sf) { if (sf) {
this.sf = sf; this.sf = sf;
} }
}) })
); );
this.drawer.push( this.drawer.push(
drawer.closeEvent.subscribe(res => { drawer.closeEvent.subscribe((res: Record<string, any>) => {
this.sfValue = res; this.sfValue = res;
if (res) { if (res) {
this.search(); this.search();

View File

@ -103,6 +103,8 @@ export class OrderManagementBulkComponent extends BasicTableComponent implements
} }
}); });
} }
console.log(requestOptions);
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };

View File

@ -53,14 +53,14 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
if (this.resourceStatus) { if (this.resourceStatus) {
a.auditStatus = this.resourceStatus; a.auditStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
return { return {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}; };
} }
@ -69,15 +69,15 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
if (this.resourceStatus) { if (this.resourceStatus) {
a.auditStatus = this.resourceStatus; a.auditStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
if (this.sf) { if (this.sfValue) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}); });
} }
@ -170,9 +170,6 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
searchDebounceTime: 300, searchDebounceTime: 300,
searchLoadingText: '搜索中...', searchLoadingText: '搜索中...',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
onSearch: (q: any) => { onSearch: (q: any) => {
let str = q.replace(/^\s+|\s+$/g, ''); let str = q.replace(/^\s+|\s+$/g, '');
if (str) { if (str) {
@ -195,54 +192,42 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
ui: { ui: {
widget: 'select', widget: 'select',
placeholder: '请先选择货主', placeholder: '请先选择货主',
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingPlace: { loadingPlace: {
type: 'string', type: 'string',
title: '装货地', title: '装货地',
ui: { ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
dischargePlace: { dischargePlace: {
type: 'string', type: 'string',
title: '卸货地', title: '卸货地',
ui: { ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
driverName: { driverName: {
title: '承运司机', title: '承运司机',
type: 'string', type: 'string',
ui: { ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
carNo: { carNo: {
title: '车牌号', title: '车牌号',
type: 'string', type: 'string',
ui: { ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
carCaptainName: { carCaptainName: {
title: '车队长', title: '车队长',
type: 'string', type: 'string',
ui: { ui: {
visibleIf: {
_$expand: (value: boolean) => value
}
} }
}, },
paymentStatus: { paymentStatus: {
@ -252,9 +237,7 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'overall:payment:status' }, params: { dictKey: 'overall:payment:status' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
enterpriseInfoId: { enterpriseInfoId: {
@ -264,9 +247,6 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
},
asyncData: () => this.shipperservice.getNetworkFreightForwarder() asyncData: () => this.shipperservice.getNetworkFreightForwarder()
} }
}, },
@ -278,9 +258,7 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'service:type' }, params: { dictKey: 'service:type' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
billStatus: { billStatus: {
@ -291,9 +269,7 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
widget: 'dict-select', widget: 'dict-select',
params: { dictKey: 'bill:status' }, params: { dictKey: 'bill:status' },
containsAllLabel: true, containsAllLabel: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} as SFSelectWidgetSchema } as SFSelectWidgetSchema
}, },
loadingDocuments: { loadingDocuments: {
@ -310,9 +286,7 @@ export class OrderManagementReceiptsAuditComponent extends BasicTableComponent i
widget: 'select', widget: 'select',
placeholder: '请选择', placeholder: '请选择',
allowClear: true, allowClear: true,
visibleIf: {
_$expand: (value: boolean) => value
}
} }
} }
}, },

View File

@ -79,7 +79,7 @@ export class OrderManagementRiskDetailComponent implements OnInit {
'*': { '*': {
spanLabelFixed: 180, spanLabelFixed: 180,
grid: { span: 18 }, grid: { span: 18 },
width: 600, width: 900,
}, },
$title1: { $title1: {
spanLabelFixed: 0, spanLabelFixed: 0,
@ -94,6 +94,10 @@ export class OrderManagementRiskDetailComponent implements OnInit {
spanLabelFixed: 20, spanLabelFixed: 20,
grid: { span: 3 }, grid: { span: 3 },
}, },
$uploadVanchor: {
spanLabelFixed: 180,
grid: { span: 24 },
},
}; };
} }
/** /**

View File

@ -51,34 +51,38 @@ export class OrderManagementRiskComponent extends BasicTableComponent implements
if (this.resourceStatus) { if (this.resourceStatus) {
a.representationsStatus = this.resourceStatus; a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
return { return {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}; };
} }
beforeReq = (requestOptions: STRequestOptions) => { beforeReq = (requestOptions: STRequestOptions) => {
const a: any = {}; const a: any = {};
if (this.resourceStatus) { if (this.resourceStatus) {
console.log(this.resourceStatus);
a.representationsStatus = this.resourceStatus; a.representationsStatus = this.resourceStatus;
} }
const params: any = Object.assign({}, this.sf?.value || {}); const params: any = Object.assign({}, this.sfValue || {});
delete params._$expand; delete params._$expand;
if (this.sf) { if (this.sfValue) {
Object.assign(requestOptions.body, { Object.assign(requestOptions.body, {
...a, ...a,
...params, ...params,
createTime: { createTime: {
start: this.sf?.value?.createTime?.[0] || '', start: this.sfValue?.createTime?.[0] || '',
end: this.sf?.value?.createTime?.[1] || '' end: this.sfValue?.createTime?.[1] || ''
} }
}); });
} }
console.log(requestOptions);
this.loading = true; this.loading = true;
return requestOptions; return requestOptions;
}; };

View File

@ -469,13 +469,8 @@ export class CarSettleCarauthComponent implements OnInit {
title: '使用性质', title: '使用性质',
type: 'string', type: 'string',
maxLength: 30, maxLength: 30,
enum: [
{ label: '非营运', value: 0 },
{ label: '营运', value: 1 },
],
ui: { ui: {
widget: 'select', placeholder: '请输入',
placeholder: '请选择',
}, },
}, },
curbWeight: { curbWeight: {
@ -602,6 +597,7 @@ export class CarSettleCarauthComponent implements OnInit {
'carNo', 'carNo',
'carNoColor', 'carNoColor',
'carModel', 'carModel',
'carEnergyType',
'carLength', 'carLength',
'carLoad', 'carLoad',
'isSelf', 'isSelf',
@ -689,7 +685,7 @@ export class CarSettleCarauthComponent implements OnInit {
this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority); this.sf.setValue('/driverLicenseSigningOrg', res.issuingAuthority);
this.sf.setValue('/carDistinguishCode', res.vin); this.sf.setValue('/carDistinguishCode', res.vin);
this.sf.setValue('/carOwner', res.name); this.sf.setValue('/carOwner', res.name);
this.sf.setValue('/useNature', res.useCharacter === '非营运' ? 0 : 1); this.sf.setValue('/useNature', res.useCharacter);
this.sf.setValue('/carModel', res?.vehicleType); this.sf.setValue('/carModel', res?.vehicleType);
} else { } else {