diff --git a/js/car_demand_plan/child/dispatch_input_form.js b/js/car_demand_plan/child/dispatch_input_form.js index 32d9543..bac9b9e 100644 --- a/js/car_demand_plan/child/dispatch_input_form.js +++ b/js/car_demand_plan/child/dispatch_input_form.js @@ -225,10 +225,12 @@ function sel(selectStatus, that, id) { if (selectStatus) { $(that).prop('checked', true); if (item.type === '车辆') { + carType=1; for (let i = 1; i <= item.needNum; i++) { addCarFormData(item.modelId, i, item); } } else if (item.type === '吊车') { + carType=2; for (let i = 1; i <= item.needNum; i++) { addCraneFormData(item.modelId, i, item.isDriverSet, item); } @@ -236,11 +238,13 @@ function sel(selectStatus, that, id) { } else { $(that).prop('checked', false); if (item.type === '车辆') { + carType=1; removeCarFormData(item.modelId); fileList = fileList.filter(l => { return l.class !== item.modelId; }) } else if (item.type === '吊车') { + carType=2; removeCraneFormData(item.modelId); fileList = fileList.filter(l => { return l.class !== item.modelId;