| | |
| | | <el-table-column fixed="right" label="操作" min-width="90" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="showSubtractModal(scope.row)" :disabled="getQualifiedUnLockedStock(scope.row) <= 0">领用</el-button> |
| | | <el-button link type="primary" v-if="getQualifiedUnLockedStock(scope.row) > 0" @click="showFrozenModal(scope.row)">冻结</el-button> |
| | | <el-button link type="primary" v-if="getQualifiedLockedStock(scope.row) > 0" @click="showThawModal(scope.row)">解冻</el-button> |
| | | <el-button link type="primary" v-if="getQualifiedUnLockedStock(scope.row) > 0 || getUnqualifiedUnLockedStock(scope.row) > 0" @click="showFrozenModal(scope.row)">冻结</el-button> |
| | | <el-button link type="primary" v-if="getQualifiedLockedStock(scope.row) > 0 || getUnqualifiedLockedStock(scope.row) > 0" @click="showThawModal(scope.row)">解冻</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | return toNumber(row?.qualifiedUnLockedQuantity ?? row?.unLockedQuantity ?? row?.qualifiedQuantity ?? row?.qualitity) |
| | | } |
| | | |
| | | const getUnqualifiedUnLockedStock = (row) => { |
| | | return toNumber(row?.unQualifiedUnLockedQuantity ?? row?.unqualifiedUnLockedQuantity ?? row?.unQualifiedQuantity ?? row?.unqualifiedQuantity) |
| | | } |
| | | |
| | | // 表格行类名 |
| | | const tableRowClassName = ({ row }) => { |
| | | const stock = getQualifiedUnLockedStock(row); |