fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-24 16:58:02
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-28 11:58:21
|
||||
* @LastEditTime : 2022-02-28 12:01:57
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\components\\bulk-detail-change\\bulk-detail-change.component.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -555,88 +555,170 @@ loadTime: any; // 货源单设置回显
|
||||
});
|
||||
}
|
||||
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
goodsTypeId: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请选择货物类型' },
|
||||
asyncData: () =>
|
||||
this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
|
||||
map((data: any) => {
|
||||
return data[0].children?.map((m: any) => {
|
||||
return { label: m.name, value: m.id };
|
||||
});
|
||||
})
|
||||
),
|
||||
change: (value: any, data: any) => {
|
||||
this.changeGoodsType(value, data);
|
||||
this.sf3.setValue('/goodsTypeName', data.label);
|
||||
initSF3() {
|
||||
this.schema3 = {
|
||||
properties: {
|
||||
goodsTypeId: {
|
||||
type: 'string',
|
||||
title: '货物名称',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请选择货物类型' },
|
||||
asyncData: () =>
|
||||
this.service.loadConfigByKey('goods.name.config.type').pipe(
|
||||
map((data: any) => {
|
||||
return data[0].children?.map((m: any) => {
|
||||
return { label: m.name, value: m.id };
|
||||
});
|
||||
})
|
||||
),
|
||||
change: (value, data: any) => {
|
||||
this.changeGoodsType(value, data);
|
||||
this.sf3.setValue('/goodsTypeName', data.label);
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
goodsTypeName: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
} as SFSelectWidgetSchema
|
||||
},
|
||||
goodsTypeName: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true
|
||||
}
|
||||
},
|
||||
goodsNameId: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请填写货物名称' },
|
||||
change: (_value: any, data: any) => {
|
||||
this.sf3.setValue('/goodsName', data.label);
|
||||
},
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value !== '其它'
|
||||
},
|
||||
goodsNameId: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
placeholder: '请选择',
|
||||
errors: { required: '请填写货物名称' },
|
||||
change: (_value: any, data: any) => {
|
||||
this.sf3.setValue('/goodsName', data.label);
|
||||
},
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value !== '其它'
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsName: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true,
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value !== '其它'
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsName1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value === '其它'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsName: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
hidden: true,
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value !== '其它'
|
||||
}
|
||||
}
|
||||
},
|
||||
goodsName1: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
errors: { required: '请填写货物名称' },
|
||||
visibleIf: {
|
||||
goodsTypeName: (value: any) => value && value === '其它'
|
||||
}
|
||||
}
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 12 }
|
||||
}
|
||||
},
|
||||
required: ['goodsTypeId', 'goodsName', 'goodsNameId']
|
||||
};
|
||||
this.ui3 = {
|
||||
'*': {
|
||||
spanLabelFixed: 110,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$goodsName: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$qita: {
|
||||
grid: { span: 12 }
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
number: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carModel: {
|
||||
type: 'string',
|
||||
title: '车型/车长',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
placeholder: '请选择车型',
|
||||
errors: { required: '请选择车型' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:model' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
carLength: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'select',
|
||||
mode: 'multiple',
|
||||
maxMultipleCount:3,
|
||||
placeholder: '请选择车长',
|
||||
errors: { required: '请选择车长' },
|
||||
asyncData: () => this.service.getDictOptions({ dictKey: 'car:length' }),
|
||||
change:(tag:any , org:any)=>{
|
||||
if(tag.includes("999")){
|
||||
this.sf4.setValue('/carModel',["999"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
required: ['weight', 'carModel', 'carLength']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$volume: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$number: {
|
||||
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||
},
|
||||
$carModel: {
|
||||
spanLabelFixed: 100,
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carLength: {
|
||||
grid: { span: 8 }
|
||||
}
|
||||
};
|
||||
}
|
||||
changeGoodsType(value: string, data: any) {
|
||||
if (data.label === '其它') return;
|
||||
const params = {
|
||||
@ -663,165 +745,165 @@ changeGoodsType(value: string, data: any) {
|
||||
}
|
||||
});
|
||||
}
|
||||
initSF4() {
|
||||
this.schema4 = {
|
||||
properties: {
|
||||
weight: {
|
||||
type: 'string',
|
||||
title: '货物数量',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入',
|
||||
errors: { required: '必填项' }
|
||||
}
|
||||
},
|
||||
volume: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
number: {
|
||||
type: 'string',
|
||||
title: '',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
carmand: {
|
||||
type: 'string',
|
||||
title: '用车需求',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
drivers: {
|
||||
type: 'string',
|
||||
title: '承运司机',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
weightModel: {
|
||||
type: 'string',
|
||||
title: '车型车长承重',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
loadTime: {
|
||||
type: 'string',
|
||||
title: '发车时间',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
unloadTime: {
|
||||
type: 'string',
|
||||
title: '到车时间',
|
||||
ui: {
|
||||
widget: 'custom',
|
||||
placeholder: '请输入'
|
||||
}
|
||||
},
|
||||
acceptWeight: {
|
||||
type: 'number',
|
||||
title: '装货重量',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
acceptVolume: {
|
||||
type: 'number',
|
||||
title: '装货体积',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementWeight: {
|
||||
type: 'number',
|
||||
title: '卸货重量',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
},
|
||||
settlementVolume: {
|
||||
type: 'number',
|
||||
title: '卸货体积',
|
||||
minimum:0,
|
||||
maximum:99999,
|
||||
ui: {
|
||||
unit: '吨',
|
||||
placeholder: '请输入',
|
||||
grid: {
|
||||
span: 12
|
||||
},
|
||||
hideStep: true,
|
||||
} as SFNumberWidgetSchema
|
||||
}
|
||||
},
|
||||
required: ['weight','loadTime','unloadTime']
|
||||
};
|
||||
this.ui4 = {
|
||||
'*': {
|
||||
spanLabelFixed: 90,
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weight: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$volume: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$number: {
|
||||
grid: { span: 8 }
|
||||
},
|
||||
$carmand: {
|
||||
grid: { span: 24 }
|
||||
},
|
||||
$weightModel: {
|
||||
spanLabelFixed: 120,
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$drivers: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$loadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
$unloadTime: {
|
||||
grid: { span: 12 }
|
||||
},
|
||||
};
|
||||
}
|
||||
// initSF4() {
|
||||
// this.schema4 = {
|
||||
// properties: {
|
||||
// weight: {
|
||||
// type: 'string',
|
||||
// title: '货物数量',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入',
|
||||
// errors: { required: '必填项' }
|
||||
// }
|
||||
// },
|
||||
// volume: {
|
||||
// type: 'string',
|
||||
// title: '',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// number: {
|
||||
// type: 'string',
|
||||
// title: '',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// carmand: {
|
||||
// type: 'string',
|
||||
// title: '用车需求',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// drivers: {
|
||||
// type: 'string',
|
||||
// title: '承运司机',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// weightModel: {
|
||||
// type: 'string',
|
||||
// title: '车型车长承重',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// loadTime: {
|
||||
// type: 'string',
|
||||
// title: '发车时间',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// unloadTime: {
|
||||
// type: 'string',
|
||||
// title: '到车时间',
|
||||
// ui: {
|
||||
// widget: 'custom',
|
||||
// placeholder: '请输入'
|
||||
// }
|
||||
// },
|
||||
// acceptWeight: {
|
||||
// type: 'number',
|
||||
// title: '装货重量',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// acceptVolume: {
|
||||
// type: 'number',
|
||||
// title: '装货体积',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// settlementWeight: {
|
||||
// type: 'number',
|
||||
// title: '卸货重量',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// },
|
||||
// settlementVolume: {
|
||||
// type: 'number',
|
||||
// title: '卸货体积',
|
||||
// minimum:0,
|
||||
// maximum:99999,
|
||||
// ui: {
|
||||
// unit: '吨',
|
||||
// placeholder: '请输入',
|
||||
// grid: {
|
||||
// span: 12
|
||||
// },
|
||||
// hideStep: true,
|
||||
// } as SFNumberWidgetSchema
|
||||
// }
|
||||
// },
|
||||
// required: ['weight','loadTime','unloadTime']
|
||||
// };
|
||||
// this.ui4 = {
|
||||
// '*': {
|
||||
// spanLabelFixed: 90,
|
||||
// grid: { span: 24 }
|
||||
// },
|
||||
// $weight: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $volume: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $number: {
|
||||
// grid: { span: 8 }
|
||||
// },
|
||||
// $carmand: {
|
||||
// grid: { span: 24 }
|
||||
// },
|
||||
// $weightModel: {
|
||||
// spanLabelFixed: 120,
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $drivers: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $loadTime: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// $unloadTime: {
|
||||
// grid: { span: 12 }
|
||||
// },
|
||||
// };
|
||||
// }
|
||||
// 处理上传图片
|
||||
handlePreview1 = async (file: NzUploadFile) => {
|
||||
if (!file.url && !file.preview) {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
* @Author : Shiming
|
||||
* @Date : 2021-12-03 15:31:52
|
||||
* @LastEditors : Shiming
|
||||
* @LastEditTime : 2022-02-24 20:20:23
|
||||
* @LastEditTime : 2022-02-28 12:01:42
|
||||
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||
*/
|
||||
@ -190,6 +190,22 @@ export class OrderManagementService extends ShipperBaseService {
|
||||
})
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 获取车型、车长字典数据
|
||||
* @returns
|
||||
*/
|
||||
getDictOptions(params = {}) {
|
||||
return this.request(this.$api_getDictValue, params).pipe(
|
||||
map((res: any) => {
|
||||
if (!res) {
|
||||
return [];
|
||||
}
|
||||
const obj = [];
|
||||
obj.push({ label: '不限', value: '999' });
|
||||
return [...obj, ...res];
|
||||
})
|
||||
);
|
||||
}
|
||||
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||
super(injector, eaCacheSrv);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user