``requestInoviceId(){
let id=null;
this.invBody.invID.splice(0,this.invBody.invID.length);
this.watchIndex = -1
for (let v of Object.values(this.selected)) {
// console.log(k,v);
let a = this.allInvoices1.indexOf(v);
this.watchIndex=a;
console.log(a);
for (const [key, value] of Object.entries(v)) {
// console.log(key,value);
if (key === 'id') {
id = value;
this.invBody.invID.push({
id:id
});
//
}
}
}
this.$
http.post('
http://10.50.50.23:8080/InvoiceGnk/api/receive3', {
invBody: this.invBody
}).then(response=>{
localStorage.setItem('invData',JSON.stringify(
response.data));
// console.log(response.data.body);
let dataHandle=response.data.body;
var test = signOnce(8, 'stringTest');
});
//this.fetchInvoices(this.invoice);
localStorage.removeItem('invData');
this.loading = false;
this.refresh();
}
refresh(){
let r = {header: {
auth_code: '9b6e6eec-684e-4a99-b5f5-6a98b83a478a',
request_date: '01.03.2019',
request_id: '1',
request_type: 'FETCHINGINVOICES'
},
body: {
elements: [
{
filial_code:localStorage.getItem('childFilialCode')
}
]
}};
this.fetchInvoices(r);
},``