How to set same item but different batch it batch wise serial no?

Hello, I add one Stock Reconciliation in this Stock Reconciliation in add four items for item name is same like Apple but it item child table batch is different 1 Apple item batch 01 after next Apple batch 02 After next Apple batch 03 after next Apple batch 04 and it batch wise i want to generate serial no like, first Apple item in 4 qty after next 3 qty after next qty 2 after next qty 1 so i want to get that type after submit Stock Reconciliation Apple item batch 01 in create 4 serial no after next batch 02 for create 3 serial no after next 03 for create 2 serial number after next 04 for create 1 serial number but here come one issue Stock Reconciliation submit after Apple item first batch 01 in generate 10 serial no how to genrate same item but batch different in serial no?