车辆对接

This commit is contained in:
wangshiming
2021-12-17 16:03:22 +08:00
parent 6d65ead997
commit 4bb0520a73
16 changed files with 524 additions and 343 deletions

View File

@ -1,8 +1,10 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { SFComponent, SFDateWidgetSchema, SFSchema, SFSchemaEnum, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
import { ModalHelper, _HttpClient } from '@delon/theme';
import { ShipperBaseService } from '@shared';
import { NzModalService } from 'ng-zorro-antd/modal';
import { of } from 'rxjs';
import { map } from 'rxjs/operators';
import { SupplyManagementService } from '../../services/waybill-management.service';
@ -13,7 +15,6 @@ import { SupplyManagementService } from '../../services/waybill-management.servi
styleUrls: ['./bulk.component.less']
})
export class WaybillManagementBulkComponent implements OnInit {
url = `/user?_allow_anonymous=true`;
ui: SFUISchema = {};
uiView: SFUISchema = {};
schema: SFSchema = {};
@ -78,7 +79,7 @@ export class WaybillManagementBulkComponent implements OnInit {
count: 0,
},
];
constructor(public service: SupplyManagementService, private modal: NzModalService) { }
constructor(public service: SupplyManagementService, private modal: NzModalService, public service2: ShipperBaseService) { }
/**
* 查询参数
@ -112,15 +113,15 @@ export class WaybillManagementBulkComponent implements OnInit {
type: 'string',
title: '运单号',
},
no2: {
resourceCode: {
type: 'string',
title: '货源编号'
},
no1: {
type: 'string',
title: '托运公司'
title: '货主'
},
no3: {
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
@ -129,7 +130,7 @@ export class WaybillManagementBulkComponent implements OnInit {
},
}
},
no4: {
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
@ -138,45 +139,86 @@ export class WaybillManagementBulkComponent implements OnInit {
},
}
},
no7: {
type: 'string',
driverId: {
title: '承运司机',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
no9: {
type: 'string',
title: '车牌号',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
no10: {
type: 'string',
title: '收款人',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
sex: {
title: '支付状态',
type: 'string',
default: 0,
enum: [
{ label: '未知', value: 0 },
{ label: '男', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
],
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,
},
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 as any[]).map((i) => ({ label: i.carNo, value: i.carNo } as SFSchemaEnum))))
.toPromise();
} else {
return of([]);
}
},
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
payeeId: {
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: '支付状态',
type: 'string',
ui: {
widget: 'dict-select',
params: { dictKey: 'payment:status' },
containAllLable:true,
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -194,9 +236,51 @@ export class WaybillManagementBulkComponent implements OnInit {
},
} as SFDateWidgetSchema,
},
appId: {
isRiskSheet: {
type: 'string',
title: '是否风险单',
default: '0',
enum: [
{ label: '全部', value: '0' },
{ label: '是', value: '1' },
{ label: '否', value: '2' }
],
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
},
},
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
visibleIf: {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.service2.getNetworkFreightForwarder(),
},
},
settlementBasis: {
title: '结算依据',
type: 'string',
ui: {
widget: 'dict-select',
containsAllLable: true,
params: { dictKey: 'goodresource:settlement:type' },
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
goodsName: {
type: 'string',
title: '货物名称',
ui: {
widget: 'select',
placeholder: '请选择',
@ -207,6 +291,19 @@ export class WaybillManagementBulkComponent implements OnInit {
asyncData: () => this.getCatalogueMember(),
},
},
serviceType: {
title: '服务类型',
type: 'string',
default: '',
ui: {
widget: 'dict-select',
params: { dictKey: 'service:type' },
containAllLable:true,
visibleIf: {
_$expand: (value: boolean) => value,
},
} as SFSelectWidgetSchema,
},
},
type: 'object',
};
@ -258,109 +355,80 @@ export class WaybillManagementBulkComponent implements OnInit {
/**
* 初始化数据列表
*/
initST() {
initST() {
this.columns = [
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
{
title: '运单号',
width: '100px',
className: 'text-center',
render: 'goodsId'
render: 'wayBillCode'
},
{
title: '货源编号',
title: '运费明细',
width: '100px',
className: 'text-center',
render: 'billExpenseDetailVOList'
},
{ title: '托运公司', index: 'externalSn', width: '120px', className: 'text-center' },
{ title: '装货地', index: 'linkUrl', width: '120px', className: 'text-center' },
{ title: '网络货运人', index: 'enterpriseInfoName', width: '120px', className: 'text-center' },
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' },
{ title: '关联订单号', render: 'wayBill', width: '120px', className: 'text-center' },
{ title: '货源编号', index: 'resourceCode', width: '120px', className: 'text-center' },
{ title: '装货地', index: 'loadingPlace', width: '120px', className: 'text-center' },
{
title: '卸货地',
className: 'text-center',
width: '120px',
index: 'dischargePlace'
},
{
title: '货物名称',
{
title: '货物信息',
className: 'text-center',
width: '120px',
},
{
title: '承运司机',
className: 'text-center',
width: '120px',
},
{
title: '车牌号',
className: 'text-center',
width: '120px',
width: '180px',
render: 'goodsInfos'
},
{
title: '运费单价',
className: 'text-center',
width: '120px',
index: 'freightPrice'
},
{
title: '接单量',
title: '接单量',
className: 'text-center',
width: '120px',
},
{
title: '运费变更记录',
className: 'text-center',
width: '120px',
render: 'feiong'
index: 'orderReceivingQuantity'
},
{
title: '结算重量',
className: 'text-center',
width: '120px',
width: '200px',
index: 'settlementWeight'
},
{
title: '成交金额',
title: '承运司机',
className: 'text-center',
width: '120px',
render: 'enStatusStr27878'
width: '200px',
index: 'driverName'
},
{
title: '收款人',
className: 'text-center',
width: '120px',
index: 'payeeName'
},
{
title: '支付状态',
title: '装卸货时间',
className: 'text-center',
width: '120px',
width: '200px',
render: 'loadingTime'
},
{
title: '创建时间',
width: '130px',
className: 'text-center',
index: 'enStatusStr3',
type: 'badge',
width: '100px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
},
{
title: '异常原因',
className: 'text-center',
index: 'enStatusStr3',
width: '100px',
},
{
title: '运单状态',
className: 'text-center',
index: 'enStatusStr3',
type: 'badge',
width: '100px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
index: 'createTime',
},
{
title: '操作',