Fixed: Review

This commit is contained in:
zhaojisen
2025-03-11 18:23:23 +08:00
parent d7e2ac6e5f
commit 41f5c6cbb7
2 changed files with 14 additions and 2 deletions

View File

@@ -28,7 +28,7 @@
</div> </div>
</div> </div>
<div class="drawer-footer"> <div class="drawer-footer">
<div v-if="selectedRows.length > 0 && selectedRows[0].status.value === '0'"> <div v-if="isBatch">
<el-input v-model="comment" :placeholder="$tc('PleaseEnterReason')" type="textarea" /> <el-input v-model="comment" :placeholder="$tc('PleaseEnterReason')" type="textarea" />
<span class="buttons"> <span class="buttons">
<el-button size="small" type="primary" @click="handleClose"> <el-button size="small" type="primary" @click="handleClose">
@@ -104,6 +104,18 @@ export default {
} else { } else {
return this.selectedRows return this.selectedRows
} }
},
isBatch() {
// 如果是批量,则判断批量中所选的第一个的 Status如果是在表格中那么会存在 row.id 那么也应该出现 button
if (this.selectedRows.length > 0 && this.selectedRows[0] && this.selectedRows[0].status) {
return this.selectedRows[0].status.value === '0'
}
if (this.row.status) {
return this.row.status.value === '0'
}
return false
} }
}, },
methods: { methods: {

View File

@@ -133,7 +133,7 @@ export default {
this.reviewDrawer = true this.reviewDrawer = true
}, },
showReview() { showReview() {
if (this.selectedRows.length === 0) { if (this.selectedRows.length === 0 && !this.row.id) {
return this.$message.warning(`请选择需要勾选的数据`) return this.$message.warning(`请选择需要勾选的数据`)
} }
this.reviewDrawer = true this.reviewDrawer = true