edit
This commit is contained in:
@ -26,7 +26,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
@ViewChild('st') private readonly st!: STComponent;
|
||||
@ViewChild('sf', { static: false }) sf!: SFComponent;
|
||||
@ViewChild('sfFre', { static: false }) sfFre!: SFComponent;
|
||||
columns: STColumn[] = [];
|
||||
columns: STColumn[] = this.initST();
|
||||
tabs = {
|
||||
totalQuantity: 0,
|
||||
cancelQuantity: 0,
|
||||
@ -53,7 +53,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
return this.st?.list.filter(item => item.checked) || [];
|
||||
}
|
||||
ngOnInit(): void {
|
||||
this.initST();
|
||||
this.initSFFre();
|
||||
this.getGoodsSourceStatistical();
|
||||
}
|
||||
@ -78,149 +77,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
};
|
||||
this.ui2 = { '*': { spanLabelFixed: 120, grid: { span: 24 } } };
|
||||
}
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
initST() {
|
||||
this.columns = [
|
||||
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
|
||||
{
|
||||
title: '货源编号',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'resourceCode'
|
||||
},
|
||||
// {
|
||||
// title: '服务类型',
|
||||
// index: 'serviceType',
|
||||
// width: '120px',
|
||||
// className: 'text-center',
|
||||
// type: 'enum',
|
||||
// enum: { '1': '抢单', '2': '指派' }
|
||||
// },
|
||||
{ title: '货主', index: 'shipperAppUserNmae', width: '120px' },
|
||||
{
|
||||
title: '项目名称',
|
||||
index: 'enterpriseProjectName',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '装货地',
|
||||
index: 'loadingAddressArr',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '卸货地',
|
||||
index: 'unloadingAddressArr',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '货物名称',
|
||||
index: 'goodsName',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '货物数量',
|
||||
width: '120px',
|
||||
index: 'goodsNumber',
|
||||
format: item => item.goodsNumber.join('/')
|
||||
},
|
||||
{
|
||||
title: '用车需求',
|
||||
width: '120px',
|
||||
format: (item: any) => `<p>车型: ${item.vehicleDemand?.maxWeight || ''}</p><p>车长: ${item.vehicleDemand?.maxCube || ''}米</p>`,
|
||||
index: 'vehicleDemand'
|
||||
},
|
||||
{
|
||||
title: '总费用',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'totalAmount',
|
||||
render: 'totalAmount'
|
||||
},
|
||||
{
|
||||
title: '总运费',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: '总运费'
|
||||
},
|
||||
{
|
||||
title: '附加费',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'surcharge',
|
||||
format: item => `¥${item.surcharge}`
|
||||
},
|
||||
{
|
||||
title: '货源状态',
|
||||
className: 'text-center',
|
||||
index: 'resourceStatus',
|
||||
type: 'badge',
|
||||
width: '120px',
|
||||
badge: {
|
||||
'1': { text: '待接单', color: 'warning' },
|
||||
'2': { text: '已接单', color: 'success' }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
width: '170px',
|
||||
index: 'createTime',
|
||||
className: 'text-center',
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
className: 'text-center',
|
||||
index: 'auditStatus',
|
||||
type: 'badge',
|
||||
width: '170px',
|
||||
badge: {
|
||||
'1': { text: '待审核', color: 'warning' },
|
||||
'2': { text: '审核通过', color: 'success' },
|
||||
'3': { text: '不通过', color: 'error' },
|
||||
'4': { text: '已取消', color: 'default' }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '110px',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '货源审核',
|
||||
click: _record => this.audit(_record, 1),
|
||||
iif: item => item.auditStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '修改货源',
|
||||
click: _record => this.amend(_record),
|
||||
iif: item => item.resourceStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '修改运费',
|
||||
click: _record => this.updateFreight(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2'
|
||||
},
|
||||
{
|
||||
text: '取消货源',
|
||||
click: _record => this.cancleGoodsSource(_record),
|
||||
iif: item => item.resourceStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '再下一单',
|
||||
click: _record => this.nextOrder(_record)
|
||||
},
|
||||
{
|
||||
text: '重新指派',
|
||||
click: _record => this.assignedCar(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
add(): void {
|
||||
// this.modal
|
||||
// .createStatic(FormEditComponent, { i: { id: 0 } })
|
||||
@ -234,9 +91,6 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
this._$expand = !this._$expand;
|
||||
this.sf?.setValue('/_$expand', this._$expand);
|
||||
}
|
||||
tabChange(item: any) {
|
||||
console.log(item);
|
||||
}
|
||||
/**
|
||||
* 重置表单
|
||||
*/
|
||||
@ -246,9 +100,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
|
||||
selectChange(e: number) {
|
||||
console.log(e);
|
||||
this.resourceStatus = e;
|
||||
this.initST();
|
||||
setTimeout(() => {
|
||||
this.st.load();
|
||||
}, 500);
|
||||
@ -463,4 +315,148 @@ export class SupplyManagementVehicleComponent implements OnInit {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化数据列表
|
||||
*/
|
||||
private initST(): STColumn[] {
|
||||
return [
|
||||
{ title: '', type: 'checkbox', width: '50px', className: 'text-center' },
|
||||
{
|
||||
title: '货源编号',
|
||||
width: '100px',
|
||||
className: 'text-center',
|
||||
render: 'resourceCode'
|
||||
},
|
||||
// {
|
||||
// title: '服务类型',
|
||||
// index: 'serviceType',
|
||||
// width: '120px',
|
||||
// className: 'text-center',
|
||||
// type: 'enum',
|
||||
// enum: { '1': '抢单', '2': '指派' }
|
||||
// },
|
||||
{ title: '货主', index: 'shipperAppUserNmae', width: '120px' },
|
||||
{
|
||||
title: '项目名称',
|
||||
index: 'enterpriseProjectName',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '装货地',
|
||||
index: 'loadingAddressArr',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '卸货地',
|
||||
index: 'unloadingAddressArr',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '货物名称',
|
||||
index: 'goodsName',
|
||||
width: '120px'
|
||||
},
|
||||
{
|
||||
title: '货物数量',
|
||||
width: '120px',
|
||||
index: 'goodsNumber',
|
||||
format: item => item.goodsNumber.join('/')
|
||||
},
|
||||
{
|
||||
title: '用车需求',
|
||||
width: '120px',
|
||||
format: (item: any) => `<p>车型: ${item.vehicleDemand?.maxWeight || ''}</p><p>车长: ${item.vehicleDemand?.maxCube || ''}米</p>`,
|
||||
index: 'vehicleDemand'
|
||||
},
|
||||
{
|
||||
title: '总费用',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'totalAmount',
|
||||
render: 'totalAmount'
|
||||
},
|
||||
{
|
||||
title: '总运费',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: '总运费'
|
||||
},
|
||||
{
|
||||
title: '附加费',
|
||||
className: 'text-center',
|
||||
width: '120px',
|
||||
index: 'surcharge',
|
||||
format: item => `¥${item.surcharge}`
|
||||
},
|
||||
{
|
||||
title: '货源状态',
|
||||
className: 'text-center',
|
||||
index: 'resourceStatus',
|
||||
type: 'badge',
|
||||
width: '120px',
|
||||
badge: {
|
||||
'1': { text: '待接单', color: 'warning' },
|
||||
'2': { text: '已接单', color: 'success' }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
width: '170px',
|
||||
index: 'createTime',
|
||||
className: 'text-center',
|
||||
type: 'date'
|
||||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
className: 'text-center',
|
||||
index: 'auditStatus',
|
||||
type: 'badge',
|
||||
width: '170px',
|
||||
badge: {
|
||||
'1': { text: '待审核', color: 'warning' },
|
||||
'2': { text: '审核通过', color: 'success' },
|
||||
'3': { text: '不通过', color: 'error' },
|
||||
'4': { text: '已取消', color: 'default' }
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
width: '110px',
|
||||
className: 'text-center',
|
||||
buttons: [
|
||||
{
|
||||
text: '货源审核',
|
||||
click: _record => this.audit(_record, 1),
|
||||
iif: item => item.auditStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '修改货源',
|
||||
click: _record => this.amend(_record),
|
||||
iif: item => item.resourceStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '修改运费',
|
||||
click: _record => this.updateFreight(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2'
|
||||
},
|
||||
{
|
||||
text: '取消货源',
|
||||
click: _record => this.cancleGoodsSource(_record),
|
||||
iif: item => item.resourceStatus === '1'
|
||||
},
|
||||
{
|
||||
text: '再下一单',
|
||||
click: _record => this.nextOrder(_record)
|
||||
},
|
||||
{
|
||||
text: '重新指派',
|
||||
click: _record => this.assignedCar(_record),
|
||||
iif: item => item.resourceStatus === '1' && item.serviceType === '2'
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user