|
@@ -81,7 +81,7 @@
|
|
</el-row>
|
|
</el-row>
|
|
|
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
- 报销详情
|
|
|
|
|
|
+ 采购详情
|
|
<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly" size="mini" @click="insertEvent('detail')" plain>
|
|
<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly" size="mini" @click="insertEvent('detail')" plain>
|
|
新增
|
|
新增
|
|
</el-button>
|
|
</el-button>
|
|
@@ -135,7 +135,8 @@
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
<vxe-table-column field="priceSum" title="商品总价" :edit-render="{}">
|
|
<vxe-table-column field="priceSum" title="商品总价" :edit-render="{}">
|
|
<template v-slot:edit="scope">
|
|
<template v-slot:edit="scope">
|
|
- <el-input v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum)" maxlength="15"></el-input>
|
|
|
|
|
|
+ <el-input v-model="scope.row.priceSum" :readonly="true" maxlength="15"></el-input>
|
|
|
|
+<!-- <el-input v-model="scope.row.priceSum" @blur="scope.row.priceSum = twoDecimalPlaces(scope.row.priceSum, scope.$rowIndex)" maxlength="15"></el-input>-->
|
|
</template>
|
|
</template>
|
|
</vxe-table-column>
|
|
</vxe-table-column>
|
|
<vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
|
|
<vxe-table-column field="company" title="单位" :edit-render="{}" :rules="[{required: true, message:'请填写单位', trigger:'blur'}]">
|
|
@@ -614,7 +615,7 @@
|
|
]
|
|
]
|
|
return footerData
|
|
return footerData
|
|
},
|
|
},
|
|
- twoDecimalPlaces (num) {
|
|
|
|
|
|
+ twoDecimalPlaces (num, index) {
|
|
let str = num.toString()
|
|
let str = num.toString()
|
|
var len1 = str.substr(0, 1)
|
|
var len1 = str.substr(0, 1)
|
|
var len2 = str.substr(1, 1)
|
|
var len2 = str.substr(1, 1)
|
|
@@ -639,8 +640,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
// eslint-disable-next-line no-useless-escape
|
|
// eslint-disable-next-line no-useless-escape
|
|
- str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
|
|
|
|
- return str
|
|
|
|
|
|
+ this.inputForm.detailInfos[index].priceSum = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
|
|
},
|
|
},
|
|
twoDecimalPlaces2 (num) {
|
|
twoDecimalPlaces2 (num) {
|
|
let str = num.toString()
|
|
let str = num.toString()
|
|
@@ -737,7 +737,8 @@
|
|
for (let j = 0; j < i; j++) {
|
|
for (let j = 0; j < i; j++) {
|
|
if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradePrice)) {
|
|
if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].tradeNumber)) {
|
|
- this.inputForm.detailInfos[j].priceSum = this.inputForm.detailInfos[j].tradePrice * this.inputForm.detailInfos[j].tradeNumber
|
|
|
|
|
|
+ // parseFloat(item.account).toFixed(2)
|
|
|
|
+ this.inputForm.detailInfos[j].priceSum = parseFloat(parseFloat(this.inputForm.detailInfos[j].tradePrice) * parseFloat(this.inputForm.detailInfos[j].tradeNumber)).toFixed(2)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|