This commit is contained in:
wangshiming
2021-12-06 14:57:20 +08:00
parent 72708a6f91
commit 1c5643b7e9
8 changed files with 872 additions and 17 deletions

View File

@ -1,3 +1,4 @@
import { ActivatedRoute, Router } from '@angular/router';
import { Component, OnInit, ViewChild } from '@angular/core';
import { STColumn, STComponent } from '@delon/abc/st';
import { SFComponent, SFSchema, SFSelectWidgetSchema, SFUISchema } from '@delon/form';
@ -48,7 +49,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
count: 0,
},
];
constructor(public service: SupplyManagementService, private modal: NzModalService) { }
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,private ar: ActivatedRoute) { }
/**
* 查询参数
@ -80,16 +81,59 @@ export class SupplyManagementVehicleComponent implements OnInit {
type: 'string',
title: '货源编号',
},
sex2: {
title: '服务类型',
type: 'string',
default: 0,
enum: [
{ label: '未知', value: 0 },
{ label: '男', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
],
ui: {
widget: 'select',
} as SFSelectWidgetSchema,
},
categoryId: {
type: 'string',
title: '货物名称',
// enum: this.secondCatList || [],
ui: {
widget: 'select',
placeholder: '请选择',
} as SFSelectWidgetSchema,
},
no2: {
type: 'string',
title: '装货地'
title: '装货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
no1: {
type: 'string',
title: '卸货地'
title: '卸货地',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
no4: {
type: 'string',
title: '货主',
ui: {
visibleIf: {
_$expand: (value: boolean) => value,
},
}
},
sex: {
title: '货物类型',
title: '审核状态',
type: 'string',
default: 0,
enum: [
@ -107,7 +151,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
appId: {
type: 'string',
title: '录单员',
title: '网络货运人',
ui: {
widget: 'select',
placeholder: '请选择',
@ -121,7 +165,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
type: 'object',
};
this.ui = { '*': { spanLabelFixed: 80, grid: { span: 8, gutter: 4 } } };
this.ui = { '*': { spanLabelFixed: 110, grid: { span: 8, gutter: 4 } } };
}
initSFFre() {
this.freightSchema = {
@ -199,6 +243,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
className: 'text-center',
index: 'enStatusStr2',
type: 'badge',
width: '120px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
@ -215,6 +260,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
className: 'text-center',
index: 'enStatusStr3',
type: 'badge',
width: '170px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
@ -225,7 +271,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '操作',
fixed: 'right',
width: '200px',
className: 'text-center',
className: 'text-left',
buttons: [
{
text: '货源审核',
@ -233,7 +279,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
{
text: '修改货源',
// click: (_record) => this.editOne(_record),
click: (_record) => this.amend(_record),
},
{
text: '修改运费',
@ -380,4 +426,13 @@ export class SupplyManagementVehicleComponent implements OnInit {
handleOK() {
}
/**
* 跳转修改货源
*/
amend(item: any) {
console.log(item)
this.router.navigate(['/supply-management/vehicle-amend', item.id], {
relativeTo: this.ar
})
}
}