fix bug
This commit is contained in:
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-24 16:58:02
|
* @Date : 2021-12-24 16:58:02
|
||||||
* @LastEditors : Shiming
|
* @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
|
* @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.
|
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
||||||
*/
|
*/
|
||||||
@ -555,7 +555,7 @@ loadTime: any; // 货源单设置回显
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
initSF3() {
|
initSF3() {
|
||||||
this.schema3 = {
|
this.schema3 = {
|
||||||
properties: {
|
properties: {
|
||||||
goodsTypeId: {
|
goodsTypeId: {
|
||||||
@ -566,14 +566,14 @@ initSF3() {
|
|||||||
placeholder: '请选择',
|
placeholder: '请选择',
|
||||||
errors: { required: '请选择货物类型' },
|
errors: { required: '请选择货物类型' },
|
||||||
asyncData: () =>
|
asyncData: () =>
|
||||||
this.shipperservice.loadConfigByKey('goods.name.config.type').pipe(
|
this.service.loadConfigByKey('goods.name.config.type').pipe(
|
||||||
map((data: any) => {
|
map((data: any) => {
|
||||||
return data[0].children?.map((m: any) => {
|
return data[0].children?.map((m: any) => {
|
||||||
return { label: m.name, value: m.id };
|
return { label: m.name, value: m.id };
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
),
|
),
|
||||||
change: (value: any, data: any) => {
|
change: (value, data: any) => {
|
||||||
this.changeGoodsType(value, data);
|
this.changeGoodsType(value, data);
|
||||||
this.sf3.setValue('/goodsTypeName', data.label);
|
this.sf3.setValue('/goodsTypeName', data.label);
|
||||||
}
|
}
|
||||||
@ -626,44 +626,12 @@ initSF3() {
|
|||||||
};
|
};
|
||||||
this.ui3 = {
|
this.ui3 = {
|
||||||
'*': {
|
'*': {
|
||||||
spanLabelFixed: 110,
|
spanLabelFixed: 90,
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
$goodsName: {
|
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
$qita: {
|
|
||||||
grid: { span: 12 }
|
grid: { span: 12 }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
|
||||||
changeGoodsType(value: string, data: any) {
|
|
||||||
if (data.label === '其它') return;
|
|
||||||
const params = {
|
|
||||||
pageIndex: 1,
|
|
||||||
pageSize: 100,
|
|
||||||
configId: value
|
|
||||||
};
|
|
||||||
this.service
|
|
||||||
.request(this.service.$api_get_config_item_page, params)
|
|
||||||
.pipe(
|
|
||||||
map(data => {
|
|
||||||
return data.records?.map((m: any) => {
|
|
||||||
return { label: m.name, value: m.id };
|
|
||||||
});
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.subscribe(res => {
|
|
||||||
if (res) {
|
|
||||||
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
|
|
||||||
this.sf3.getProperty('/goodsNameId')!.widget?.reset(res);
|
|
||||||
if (this.sf3data.goodsNameId) {
|
|
||||||
this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId);
|
|
||||||
}
|
}
|
||||||
}
|
initSF4() {
|
||||||
});
|
|
||||||
}
|
|
||||||
initSF4() {
|
|
||||||
this.schema4 = {
|
this.schema4 = {
|
||||||
properties: {
|
properties: {
|
||||||
weight: {
|
weight: {
|
||||||
@ -691,104 +659,42 @@ initSF4() {
|
|||||||
placeholder: '请输入'
|
placeholder: '请输入'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
carmand: {
|
carModel: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '用车需求',
|
title: '车型/车长',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'select',
|
||||||
placeholder: '请输入'
|
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"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
drivers: {
|
carLength: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
title: '承运司机',
|
title: '',
|
||||||
ui: {
|
ui: {
|
||||||
widget: 'custom',
|
widget: 'select',
|
||||||
placeholder: '请输入'
|
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"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
weightModel: {
|
|
||||||
type: 'string',
|
|
||||||
title: '车型车长承重',
|
|
||||||
ui: {
|
|
||||||
widget: 'custom',
|
|
||||||
placeholder: '请输入'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
loadTime: {
|
required: ['weight', 'carModel', 'carLength']
|
||||||
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 = {
|
this.ui4 = {
|
||||||
'*': {
|
'*': {
|
||||||
@ -796,32 +702,208 @@ initSF4() {
|
|||||||
grid: { span: 24 }
|
grid: { span: 24 }
|
||||||
},
|
},
|
||||||
$weight: {
|
$weight: {
|
||||||
grid: { span: 8 }
|
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||||
},
|
},
|
||||||
$volume: {
|
$volume: {
|
||||||
grid: { span: 8 }
|
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||||
},
|
},
|
||||||
$number: {
|
$number: {
|
||||||
|
grid: { lg: 8, md: 12, sm: 12, xs: 24 }
|
||||||
|
},
|
||||||
|
$carModel: {
|
||||||
|
spanLabelFixed: 100,
|
||||||
grid: { span: 8 }
|
grid: { span: 8 }
|
||||||
},
|
},
|
||||||
$carmand: {
|
$carLength: {
|
||||||
grid: { span: 24 }
|
grid: { span: 8 }
|
||||||
},
|
}
|
||||||
$weightModel: {
|
|
||||||
spanLabelFixed: 120,
|
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
$drivers: {
|
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
$loadTime: {
|
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
$unloadTime: {
|
|
||||||
grid: { span: 12 }
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
changeGoodsType(value: string, data: any) {
|
||||||
|
if (data.label === '其它') return;
|
||||||
|
const params = {
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
configId: value
|
||||||
|
};
|
||||||
|
this.service
|
||||||
|
.request(this.service.$api_get_config_item_page, params)
|
||||||
|
.pipe(
|
||||||
|
map(data => {
|
||||||
|
return data.records?.map((m: any) => {
|
||||||
|
return { label: m.name, value: m.id };
|
||||||
|
});
|
||||||
|
})
|
||||||
|
)
|
||||||
|
.subscribe(res => {
|
||||||
|
if (res) {
|
||||||
|
this.sf3.getProperty('/goodsNameId')!.schema.enum = res;
|
||||||
|
this.sf3.getProperty('/goodsNameId')!.widget?.reset(res);
|
||||||
|
if (this.sf3data.goodsNameId) {
|
||||||
|
this.sf3.setValue('/goodsNameId', this.sf3data.goodsNameId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
// 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) => {
|
handlePreview1 = async (file: NzUploadFile) => {
|
||||||
if (!file.url && !file.preview) {
|
if (!file.url && !file.preview) {
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
* @Author : Shiming
|
* @Author : Shiming
|
||||||
* @Date : 2021-12-03 15:31:52
|
* @Date : 2021-12-03 15:31:52
|
||||||
* @LastEditors : Shiming
|
* @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
|
* @FilePath : \\tms-obc-web\\src\\app\\routes\\order-management\\services\\order-management.service.ts
|
||||||
* Copyright (C) 2022 huzhenhong. All rights reserved.
|
* 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) {
|
constructor(public injector: Injector, public eaCacheSrv: EACacheService) {
|
||||||
super(injector, eaCacheSrv);
|
super(injector, eaCacheSrv);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user