|
@@ -679,6 +679,7 @@ export default {
|
|
|
},
|
|
|
on: {
|
|
|
'on-change': (e) => {
|
|
|
+ debugger
|
|
|
currentRow.no_tax_price = e.target.value
|
|
|
currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
@@ -690,21 +691,21 @@ export default {
|
|
|
// currentRow.total_price = (1 * currentRow.no_tax_amount + 1 * currentRow.tax_amount).toFixed(2)
|
|
|
this.tableData.splice(index, 1, currentRow);
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
- return
|
|
|
- }
|
|
|
- currentRow.no_tax_price = '';
|
|
|
- currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- // currentRow.total_price = (1 * currentRow.no_tax_amount + 1 * currentRow.tax_amount).toFixed(2)
|
|
|
- this.tableData.splice(index, 1, currentRow);
|
|
|
- }
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // currentRow.no_tax_price = '';
|
|
|
+ // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // // currentRow.total_price = (1 * currentRow.no_tax_amount + 1 * currentRow.tax_amount).toFixed(2)
|
|
|
+ // this.tableData.splice(index, 1, currentRow);
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -735,19 +736,19 @@ export default {
|
|
|
}
|
|
|
this.tableData.splice(index, 1, currentRow);
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
- return
|
|
|
- }
|
|
|
- currentRow.tax_rate = '';
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- this.tableData.splice(index, 1, currentRow);
|
|
|
- }
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // currentRow.tax_rate = '';
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // this.tableData.splice(index, 1, currentRow);
|
|
|
+ // }
|
|
|
}
|
|
|
}, [h('span', { slot: 'append' }, '%')])
|
|
|
}
|
|
@@ -779,20 +780,20 @@ export default {
|
|
|
}
|
|
|
this.tableData.splice(index, 1, currentRow);
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
- return
|
|
|
- }
|
|
|
- currentRow.price = ''
|
|
|
- currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- this.tableData.splice(index, 1, currentRow);
|
|
|
- }
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // currentRow.price = ''
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = (1 * currentRow.no_tax_price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // this.tableData.splice(index, 1, currentRow);
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -823,20 +824,20 @@ export default {
|
|
|
}
|
|
|
this.tableData.splice(index, 1, currentRow);
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
- return
|
|
|
- }
|
|
|
- currentRow.no_tax_amount = '';
|
|
|
- currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
|
|
|
- currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- this.tableData.splice(index, 1, currentRow);
|
|
|
- }
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // currentRow.no_tax_amount = '';
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.no_tax_amount / 1*currentRow.num).toFixed(2)
|
|
|
+ // currentRow.price = (1 * currentRow.no_tax_price * (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.total_price = (1 * currentRow.price * currentRow.num).toFixed(2)
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // this.tableData.splice(index, 1, currentRow);
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -890,21 +891,21 @@ export default {
|
|
|
this.tableData[index].no_tax_amount = ((this.tableData[index].total_price*1)-(row.tax_amount*1)).toFixed(2);
|
|
|
}
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3||this.$route.query.type==1){
|
|
|
- currentRow.tax_amount = (currentRow.tax_amount*1).toFixed(2);
|
|
|
- this.tableData.splice(index,1,currentRow)
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3||this.$route.query.type==1){
|
|
|
+ // currentRow.tax_amount = (currentRow.tax_amount*1).toFixed(2);
|
|
|
+ // this.tableData.splice(index,1,currentRow)
|
|
|
|
|
|
- }else{
|
|
|
- currentRow.tax_amount = ''
|
|
|
- // currentRow.fax = (1 * currentRow.tax_amount / currentRow.no_tax_price).toFixed(2)
|
|
|
- currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
|
|
|
- currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):0
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- this.tableData.splice(index, 1, currentRow);}
|
|
|
- }
|
|
|
+ // }else{
|
|
|
+ // currentRow.tax_amount = ''
|
|
|
+ // // currentRow.fax = (1 * currentRow.tax_amount / currentRow.no_tax_price).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = (1*(currentRow.total_price-currentRow.tax_amount)).toFixed(2)
|
|
|
+ // currentRow.no_tax_price = currentRow.num?(1*(currentRow.no_tax_amount/currentRow.num)).toFixed(2):0
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // this.tableData.splice(index, 1, currentRow);}
|
|
|
+ // }
|
|
|
}
|
|
|
},this.tableData[index].tax_amount)
|
|
|
}
|
|
@@ -935,20 +936,20 @@ export default {
|
|
|
}
|
|
|
this.tableData.splice(index, 1, currentRow);
|
|
|
},
|
|
|
- 'on-focus':()=>{
|
|
|
- if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
- return
|
|
|
- }
|
|
|
- currentRow.total_price =''
|
|
|
- currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
|
|
|
- currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
- currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
|
|
|
- currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
- if(!currentRow.copy&&!currentRow.edit){
|
|
|
- currentRow.change = true;
|
|
|
- }
|
|
|
- this.tableData.splice(index, 1, currentRow);
|
|
|
- }
|
|
|
+ // 'on-focus':()=>{
|
|
|
+ // if(this.$route.query.type==6||this.$route.query.type==3){
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // currentRow.total_price =''
|
|
|
+ // currentRow.price =currentRow.num?(1 * currentRow.total_price / currentRow.num).toFixed(2):0;
|
|
|
+ // currentRow.no_tax_price = (1 * currentRow.price / (1 + 1 * currentRow.tax_rate / 100)).toFixed(2)
|
|
|
+ // currentRow.no_tax_amount = currentRow.num?(1 * currentRow.no_tax_price * currentRow.num).toFixed(2):0;
|
|
|
+ // currentRow.tax_amount = (1 * currentRow.total_price - 1 * currentRow.no_tax_amount).toFixed(2)
|
|
|
+ // if(!currentRow.copy&&!currentRow.edit){
|
|
|
+ // currentRow.change = true;
|
|
|
+ // }
|
|
|
+ // this.tableData.splice(index, 1, currentRow);
|
|
|
+ // }
|
|
|
}
|
|
|
})
|
|
|
}
|