This commit is contained in:
zds
2022-12-14 15:41:54 +08:00
parent ac1f546767
commit 3fca2fc149
2 changed files with 1 additions and 5 deletions

View File

@@ -142,7 +142,7 @@
<template scope="scope">
<el-button type="danger" class="filter-item" size="mini" icon="el-icon-delete" @click.native.prevent="delOne(scope.$index, form.tableData)" />
<el-button v-show="!scope.row.edit" type="primary" class="filter-item" size="mini" icon="el-icon-edit" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button v-show="scope.row.edit" :disabled="crud.status.edit && !scope.row.canDo" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
<el-button v-show="scope.row.edit" type="success" class="filter-item" size="mini" icon="el-icon-check" @click="handleEdit(scope.$index, scope.row)">完成</el-button>
</template>
</el-table-column>
</el-table>
@@ -258,9 +258,7 @@ export default {
},
handleEdit(index, row) {
// 判断是否可以关闭编辑状态
console.log(row.canDo)
if (!row.edit) {
row.canDo = true
if (parseFloat(row.standard_rate) <= 0) {
this.crud.notify('标准值必须大于0', CRUD.NOTIFICATION_TYPE.INFO)
return false
@@ -274,7 +272,6 @@ export default {
return false
}
if (row.is_need_manage === '1') {
debugger
if ((parseFloat(this.form.total_value) + parseFloat(row.standard_rate)) > 100) {
this.crud.notify('标准合计值不能超过100', CRUD.NOTIFICATION_TYPE.INFO)
return false

View File

@@ -102,7 +102,6 @@ export default {
}
}
this.form.total_value = parseFloat(all).toFixed(4)
// console.log(parseFloat(all).toFixed(4))
})
},
close() {