This commit is contained in:
wangshiming
2021-12-08 14:21:05 +08:00
parent 55811ba396
commit a299e56181
11 changed files with 255 additions and 123 deletions

View File

@ -16,7 +16,6 @@ import { SupplyManagementUpdateFreightComponent } from '../update-freight/update
styleUrls: ['./vehicle.component.less']
})
export class SupplyManagementVehicleComponent implements OnInit {
url = `/user?_allow_anonymous=true`;
ui: SFUISchema = {};
ui2: SFUISchema = {};
schema: SFSchema = {};
@ -30,32 +29,40 @@ export class SupplyManagementVehicleComponent implements OnInit {
columns: STColumn[] = [];
tabs = [ {
name: '全部',
type: 5,
type: 0,
count: 0,
},
{
name: '待接单',
type: 5,
type: 1,
count: 0,
},
{
name: '已接单',
type: 5,
type: 2,
count: 0,
},
{
name: '已取消',
type: 5,
type: 3,
count: 0,
},
];
resourceStatus: any;
constructor(public service: SupplyManagementService, private modal: NzModalService, private router: Router,private ar: ActivatedRoute) { }
/**
* 查询参数
*/
get reqParams() {
console.log(this.resourceStatus)
const a:any = {};
if(this.resourceStatus) {
a.resourceStatus = this.resourceStatus
}
console.log(a)
return {
...a,
...this.sf?.value,
};
}
@ -77,35 +84,35 @@ export class SupplyManagementVehicleComponent implements OnInit {
this.schema = {
properties: {
_$expand: { type: 'boolean', ui: { hidden: true } },
no: {
resourceCode: {
type: 'string',
title: '货源编号',
},
sex2: {
serviceType: {
title: '服务类型',
type: 'string',
default: 0,
enum: [
{ label: '未知', value: 0 },
{ label: '', value: 1 },
{ label: '女', value: 2 },
{ label: '保密', value: 3 },
{ label: '抢单', value: 1 },
{ label: '指派', value: 2 },
],
ui: {
widget: 'select',
} as SFSelectWidgetSchema,
},
categoryId: {
goodsName: {
type: 'string',
title: '货物名称',
// enum: this.secondCatList || [],
enum: [
{ label: '普货', value: 1 },
{ label: '指派', value: 2 },
],
ui: {
widget: 'select',
placeholder: '请选择',
} as SFSelectWidgetSchema,
},
no2: {
loadingPlace: {
type: 'string',
title: '装货地',
ui: {
@ -135,12 +142,11 @@ export class SupplyManagementVehicleComponent implements OnInit {
sex: {
title: '审核状态',
type: 'string',
default: 0,
enum: [
{ label: '未知', value: 0 },
{ label: '', value: 1 },
{ label: '', value: 2 },
{ label: '保密', value: 3 },
{ label: '待审核', value: 1 },
{ label: '审核通过', value: 2 },
{ label: '不通过', value: 3 },
{ label: '已取消', value: 4 },
],
ui: {
widget: 'select',
@ -159,7 +165,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
_$expand: (value: boolean) => value,
},
allowClear: true,
asyncData: () => this.getCatalogueMember(),
// asyncData: () => this.getCatalogueMember(),
},
},
},
@ -193,26 +199,31 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '货源编号',
width: '100px',
className: 'text-center',
render: 'goodsId'
render: 'resourceCode'
},
{ title: '服务类型', index: 'externalSn', width: '120px', className: 'text-center' },
{ title: '货主', index: 'linkUrl', width: '120px', className: 'text-center' },
{ title: '服务类型', index: 'serviceType', width: '120px', className: 'text-center',render: 'serviceType'},
{ title: '货主', index: 'shipperAppUserName', width: '120px', className: 'text-center' },
{
title: '项目名称',
index: 'enterpriseProjectName',
className: 'text-center',
width: '120px',
},
{
title: '装货地',
index: 'loadingAddressArr',
className: 'text-center',
width: '120px',
render: 'loadingAddressArr'
}, {
title: '卸货地',
index: 'unloadingAddressArr',
className: 'text-center',
width: '120px',
},
{
title: '货物名称',
index: 'goodsName',
className: 'text-center',
width: '120px',
},
@ -220,9 +231,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '货物数量',
className: 'text-center',
width: '120px',
index: 'goodsNumber',
},
{
title: '用车需求',
index: 'vehicleDemand',
className: 'text-center',
width: '120px',
},
@ -230,41 +244,43 @@ export class SupplyManagementVehicleComponent implements OnInit {
title: '总费用',
className: 'text-center',
width: '120px',
index: 'goodsId',
render: 'enStatusStr27878'
index: 'totalAmount',
render: 'totalAmount'
},
{
title: '附加费',
className: 'text-center',
width: '120px',
index: 'surcharge',
},
{
title: '货源状态',
className: 'text-center',
index: 'enStatusStr2',
index: 'resourceStatus',
type: 'badge',
width: '120px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
1: { text: '待接单', color: 'success' },
2: { text: '已接单', color: 'warning' },
},
},
{
title: '创建时间',
width: '170px',
index: 'releaseTime',
className: 'text-center',
},
{
title: '审核状态',
className: 'text-center',
index: 'enStatusStr3',
index: 'auditStatus',
type: 'badge',
width: '170px',
badge: {
: { text: '正常', color: 'success' },
: { text: '冻结', color: 'warning' },
: { text: '废弃', color: 'default' },
1: { text: '待审核', color: 'warning' },
2: { text: '审核通过', color: 'success' },
3: { text: '不通过', color: 'default' },
4: { text: '已取消', color: 'default' },
},
},
{
@ -276,10 +292,12 @@ export class SupplyManagementVehicleComponent implements OnInit {
{
text: '货源审核',
click: (_record) => this.audit(_record, 1),
iif: item => item.status === 1,
},
{
text: '修改货源',
click: (_record) => this.amend(_record),
iif: item => item.status === 1 || item.status === 2,
},
{
text: '修改运费',
@ -287,6 +305,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
},
{
text: '取消货源',
iif: item => item.status === 1 || item.status === 2,
// click: (_record) => this.delOne(_record),
},
{
@ -296,6 +315,7 @@ export class SupplyManagementVehicleComponent implements OnInit {
{
text: '重新指派',
click: (_record) => this.assignedCar(_record),
iif: item => item.status === 2,
},
],
},
@ -332,21 +352,14 @@ export class SupplyManagementVehicleComponent implements OnInit {
// 获取录单员
getCatalogueMember() {
const params = {
};
return this.service.request(this.service.$api_get_catalogue_member, params, 'GET').pipe(
map((res) => {
if (res) {
console.log(res)
}
}),
);
}
selectChange(e: number) {
console.log(e);
this.resourceStatus = e;
this.initST();
setTimeout(() => {
this.st.load();
}, 500);
}
/**