Put the data into the array and loop them out

Hi, how can I put the billID into the array and for loop them out?

javascript
<script lang="ts">
import { defineComponent,ref } from 'vue';

import { IonPage, IonHeader, IonToolbar, IonTitle, IonContent, loadingController, IonCard, IonCardContent,
IonInput, IonButton, IonLabel,
IonGrid, IonRow, IonCol,
IonDatetime, IonPopover, IonIcon } from '@ionic/vue';

import {PersonalPurchaseHistoryInterface} from '../../interfaces/personalPurchaseHistory.interface';
import {BillInterface} from '../../interfaces/getInvoiceBillId.interface'
import {PPHService} from "../../services/personalPurchaseHistory.service";

import {Constants} from "../../components/global/const";
import datetimeHelper from "../../components/helpers/datetime";
import { TokenService } from '@/services/token.service';



export default defineComponent({
  name: 'PersonalPurchaseHistory',
  components: {  
    IonHeader, IonToolbar, IonTitle, IonContent, IonPage, IonCard, IonCardContent,
    IonInput, IonButton, IonLabel,
    IonGrid, IonRow, IonCol,
    IonDatetime, IonPopover, IonIcon },
  data(){
    return  {
    }
  },
  methods:{
    formatDate(value:string)
    {
      if(value.length>10)
      {
        return value.substring(0, 10);
      }
      else{
        return value;
      }
    },
  },
  setup(){
    const isDisabled = ref(false);
    const pageNo = ref(1);
    const pageTotal = ref(0);
    const dateFrom = ref(datetimeHelper.formatDateYYYYMMDD(datetimeHelper.getFirstDateOfMonth(datetimeHelper.getToday()), "-"));
    const dateTo = ref(datetimeHelper.formatDateYYYYMMDD(datetimeHelper.getToday(), "-"));
    let currentMId = parseInt(TokenService.getCustomToken("mId") as string);
    
    //const id = ref(0);
    const BillID = ref([]);
    const personalList = ref<PersonalPurchaseHistoryInterface[]>([]);
    const billList = ref<BillInterface[]>([]);
    const itemP = ref<PersonalPurchaseHistoryInterface[]>([]);
    //const itemB = ref<BillInterface[]>([]);

     const changeDateFrom = async ($value:string)=>{
      dateFrom.value  = $value;
      //resetSearch();
    }

    const changeDateTo = async ($value:string)=>{
      dateTo.value  = $value;
      //resetSearch();
    }
    
    const resetSearch = ()=>{
      pageNo.value = 1;
      pageTotal.value  = 0;
      itemP.value = [];
      pushData();
      console.log("Clicked search");
    }

    const getbIdFromPersonalPurchaseHistoryByDateRange = async() =>{
      const res = await PPHService.getbIdFromPersonalPurchaseHistoryByDateRange(currentMId,dateFrom.value,dateTo.value,pageNo.value,10).then(function(response){
        return response;
        })
      if(res.status == 200){
        if(res.data.success){
          if(res.data.returnData != "No Record Found"){
              personalList.value = res.data.returnData;
              console.warn(res.data.returnData);
              (personalList.value).forEach((value: PersonalPurchaseHistoryInterface) => {
                BillID.value = value.bId;
                console.log("BillID Values:"+BillID.value);
                //itemP.value.push(value);
              })
            }
          }
        }
     }

    const getDataBybID = async () =>{
      console.warn(BillID.value)
      }     

    const pushData = async () => {
      //await getmemberTreeDailySalesTotalRecordByDateRangeLeft();
      await getbIdFromPersonalPurchaseHistoryByDateRange();
      await getDataBybID();
      if(pageTotal.value > 0){
        
        //await getbIdFromPersonalPurchaseHistoryByDateRange();
        if(itemP.value.length <= pageTotal.value)
        {
          pageNo.value++;
        }

      }
      
    }
    return{
      changeDateFrom,
      changeDateTo,
      dateFrom,
      dateTo,
      pageNo,
      resetSearch,
      BillID,
      //id,
      getbIdFromPersonalPurchaseHistoryByDateRange,
      getDataBybID,
    }
  },
});
</script>


Here is the current problem the Billid.value already loop out but when i call the billid.value in other place just only store one value.

Capture2

You are replacing the array with a single value. You must push new values to the array.

BillID.value.push(value.bId);

Thank you~ for guiding me