|
|
@ -293,28 +293,29 @@ const selectionPlan = async ()=>{ |
|
|
|
}) |
|
|
|
console.log('批量生成要货计划', rows.join(',')) |
|
|
|
tableObjectPlan.params.masterIds = rows.join(',') |
|
|
|
tableObjectPlan.params.dueDate = tableObject.params.dueDate |
|
|
|
handlePreviewPlan() |
|
|
|
} |
|
|
|
const handlePreviewPlan = async ()=>{ |
|
|
|
|
|
|
|
if(tableObject.params.dueDate&&tableObject.params.dueDate.length>0){ |
|
|
|
if(isString(tableObject.params.dueDate[0])){ |
|
|
|
tableObjectPlan.params.startDate = tableObject.params.dueDate[0] |
|
|
|
}else{ |
|
|
|
tableObjectPlan.params.startDate = tableObject.params.dueDate[0].format('YYYY-MM-DD') |
|
|
|
} |
|
|
|
} |
|
|
|
if(tableObject.params.dueDate&&tableObject.params.dueDate.length>1){ |
|
|
|
if(isString(tableObject.params.dueDate[1])){ |
|
|
|
tableObjectPlan.params.endDate = tableObject.params.dueDate[1] |
|
|
|
}else{ |
|
|
|
tableObjectPlan.params.endDate = tableObject.params.dueDate[1].format('YYYY-MM-DD') |
|
|
|
} |
|
|
|
} |
|
|
|
if (!tableObject.params.dueDate || tableObject.params.dueDate.length == 0) { |
|
|
|
tableObjectPlan.params.startDate = '' |
|
|
|
tableObjectPlan.params.endDate = '' |
|
|
|
} |
|
|
|
// if(tableObject.params.dueDate&&tableObject.params.dueDate.length>0){ |
|
|
|
// if(isString(tableObject.params.dueDate[0])){ |
|
|
|
// tableObjectPlan.params.startDate = tableObject.params.dueDate[0] |
|
|
|
// }else{ |
|
|
|
// tableObjectPlan.params.startDate = tableObject.params.dueDate[0].format('YYYY-MM-DD') |
|
|
|
// } |
|
|
|
// } |
|
|
|
// if(tableObject.params.dueDate&&tableObject.params.dueDate.length>1){ |
|
|
|
// if(isString(tableObject.params.dueDate[1])){ |
|
|
|
// tableObjectPlan.params.endDate = tableObject.params.dueDate[1] |
|
|
|
// }else{ |
|
|
|
// tableObjectPlan.params.endDate = tableObject.params.dueDate[1].format('YYYY-MM-DD') |
|
|
|
// } |
|
|
|
// } |
|
|
|
// if (!tableObject.params.dueDate || tableObject.params.dueDate.length == 0) { |
|
|
|
// tableObjectPlan.params.startDate = '' |
|
|
|
// tableObjectPlan.params.endDate = '' |
|
|
|
// } |
|
|
|
|
|
|
|
await getListPlan() |
|
|
|
selectionPlanRows.value = [] |
|
|
|