| | |
| | | <el-table-column label="入库状态" prop="stockInStatus" width="100" show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | <el-tag :type="getStockInStatusType(scope.row.stockInStatus)" size="small"> |
| | | {{ scope.row.stockInStatus || '--' }} |
| | | {{ formatStockInStatus(scope.row.stockInStatus) || '--' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | return typeMap[status] || ""; |
| | | }; |
| | | |
| | | // 入库状态显示:入库中也展示为完全入库 |
| | | const formatStockInStatus = status => { |
| | | if (status === "入库中") return "完全入库"; |
| | | return status; |
| | | }; |
| | | |
| | | // 获取入库状态标签类型 |
| | | const getStockInStatusType = status => { |
| | | const typeMap = { |
| | | "待入库": "info", // 待入库 - 灰色 |
| | | "入库中": "warning", // 入库中 - 橙色 |
| | | "入库中": "success", // 入库中 - 绿色 |
| | | "完全入库": "success", // 完全入库 - 绿色 |
| | | }; |
| | | return typeMap[status] || ""; |