车辆对接

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

@ -2,6 +2,7 @@ import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
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';
@ -48,11 +49,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
type: 5,
count: 0,
},
{
name: '待接单',
type: 5,
count: 0,
},
{
name: '待发车',
type: 5,
@ -79,7 +75,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
count: 0,
},
];
constructor(public service: SupplyManagementService, private modal: NzModalService) { }
constructor(public service: SupplyManagementService, private modal: NzModalService, public service2: ShipperBaseService) { }
/**
* 查询参数
@ -104,7 +100,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
/**
* 初始化查询表单
*/
initSF() {
initSF() {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
@ -112,7 +108,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
type: 'string',
title: '运单号',
},
no2: {
resourceCode: {
type: 'string',
title: '货源编号'
},
@ -120,7 +116,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
type: 'string',
title: '货主'
},
no3: {
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
@ -129,7 +125,7 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
}
},
no4: {
dischargePlace: {
type: 'string',
title: '卸货地',
ui: {
@ -138,25 +134,56 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
}
},
no7: {
type: 'string',
driverId: {
title: '承运司机',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
no9: {
type: 'string',
title: '车牌号',
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,
},
brandId2: {
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: {
@ -180,18 +207,13 @@ export class WaybillManagementVehicleComponent implements OnInit {
},
} as SFSelectWidgetSchema,
},
sex: {
paymentstatus: {
title: '支付状态',
type: 'string',
default: 0,
enum: [
{ label: '未知', value: 0 },
{ label: '男', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
],
ui: {
widget: 'select',
widget: 'dict-select',
params: { dictKey: 'payment:status' },
containAllLable:true,
visibleIf: {
_$expand: (value: boolean) => value,
},
@ -209,20 +231,24 @@ export class WaybillManagementVehicleComponent 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,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
},
},
appId2: {
enterpriseInfoName: {
type: 'string',
title: '网络货运人',
ui: {
@ -232,10 +258,10 @@ export class WaybillManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
asyncData: () => this.service2.getNetworkFreightForwarder(),
},
},
appId4: {
goodsName: {
type: 'string',
title: '货物名称',
ui: {
@ -248,7 +274,6 @@ export class WaybillManagementVehicleComponent implements OnInit {
asyncData: () => this.getCatalogueMember(),
},
},
},
type: 'object',
};
@ -265,108 +290,56 @@ export class WaybillManagementVehicleComponent implements OnInit {
title: '运单号',
width: '100px',
className: 'text-center',
render: 'goodsId'
render: 'wayBillCode'
},
{
title: '货源编号',
width: '100px',
className: 'text-center',
index: 'resourceCode'
},
{ 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: 'loadingAddressArr', width: '120px', className: 'text-center' },
{
title: '卸货地',
className: 'text-center',
width: '120px',
index: 'unloadingAddressArr'
},
{
title: '货物名称',
{
title: '货物信息',
className: 'text-center',
width: '120px',
}, {
title: '重量/体积',
className: 'text-center',
width: '120px',
width: '180px',
render: 'goodsInfos'
},
{
title: '承运司机',
className: 'text-center',
width: '120px',
},
{
title: '车牌号',
className: 'text-center',
width: '120px',
},
{
title: '出价',
className: 'text-center',
width: '120px',
render: 'enStatusStr27878'
},
{
title: '浮动费用',
className: 'text-center',
width: '120px',
render: 'feiong'
},
{
title: '成交金额',
className: 'text-center',
width: '120px',
index: 'driverName'
},
{
title: '收款人',
className: 'text-center',
index: 'enStatusStr2',
type: 'badge',
width: '100px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
width: '120px',
index: 'payeeName'
},
{
title: '支付状态',
width: '170px',
title: '装卸货时间',
className: 'text-center',
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',
type: 'badge',
width: '100px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
},
{
title: '运单状态',
className: 'text-center',
index: 'enStatusStr3',
type: 'badge',
width: '100px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
},
index: 'createTime',
},
{
title: '操作',