修改bug
This commit is contained in:
tczjx58520 2019-09-18 18:17:10 +08:00
parent d1d8cc1083
commit 493d4f81fd

View file

@ -323,7 +323,7 @@
:precision="2"
:controls="false"
v-model="scope.row.discountRate"
@input="getdiscountRate(scope.row)"/>
@change="getdiscountRate(scope.row)"/>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInputNumber', attrs: {min: 0}, type: 'visible'}" prop="discountMoney" align="center" label="折扣额" min-width="170">
@ -332,7 +332,7 @@
:precision="2"
:controls="false"
v-model="scope.row.discountMoney"
@input="getdiscountMoney(scope.row)"/>
@change="getdiscountMoney(scope.row)"/>
</template>
</el-editable-column>
<el-editable-column :edit-render="{name: 'ElInput', type: 'visible'}" prop="carCode" align="center" label="车架编码" min-width="150" >
@ -1388,7 +1388,7 @@ export default {
getdiscountMoney(row) {
console.log(row)
if (row.taxprice !== 0 && row.quantity !== 0 && row.discountMoney !== 0) {
row.discountRate = ((1 - (row.discountMoney / row.includeTaxCostMoney).toFixed(2)) * 100).toFixed(2)
row.discountRate = ((1 - (row.discountMoney / row.includeTaxCostMoney)) * 100).toFixed(2)
}
},
//