新购新增数量价格逻辑优化

This commit is contained in:
zzyuan 2024-12-24 09:56:53 +08:00
parent eca37e0151
commit 88119b83dd
1 changed files with 8 additions and 9 deletions

View File

@ -133,14 +133,14 @@
<el-table-column
label="购置单价(元含税)"
prop="purchaseTaxPrice"
align="center"
align="center" width="200"
>
<template v-slot="scope">
<el-input-number
v-model="scope.row.purchaseTaxPrice"
controls-position="right"
style="width: 100%"
:min="0" disabled
:min="0" :step="1"
@change="purchaseTaxPriceChange(scope.row,scope.$index)"
></el-input-number>
</template>
@ -148,14 +148,14 @@
<el-table-column
label="购置单价(元不含税)"
prop="purchasePrice"
align="center"
align="center" width="200"
>
<template slot-scope="scope">
<el-input-number
v-model="scope.row.purchasePrice"
controls-position="right"
style="width: 100%"
:min="0"
:min="0" :step="1"
@input="purchasePriceChange(scope.row,scope.$index)"
></el-input-number>
</template>
@ -164,7 +164,7 @@
label="是否为固定资产"
prop="fixCode"
align="center"
width="200"
width="120"
>
<template slot-scope="scope">
<el-select
@ -199,7 +199,7 @@
<el-table-column
label="相关配套资料"
align="center"
align="center" width="120"
prop="bmFileInfos"
>
<template slot-scope="scope">
@ -452,12 +452,11 @@ export default {
},
//
purchaseTaxPriceChange(row,val){
row.purchasePrice = (row.purchaseTaxPrice/(1 + this.maForm.taxRate/100)).toFixed(4)
// row.purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(3)
row.purchasePrice = ((row.purchaseTaxPrice/(100 + this.maForm.taxRate))*100).toFixed(10)
},
//
purchasePriceChange(row,val){
row.purchaseTaxPrice = (row.purchasePrice*(1 + this.maForm.taxRate/100)).toFixed(4)
row.purchaseTaxPrice = ((row.purchasePrice*(100 + this.maForm.taxRate))/100).toFixed(10)
},
/** 物资厂家-下拉选 */
supplierInfoList() {