| | |
| | | </template> |
| | | </el-table-column> |
| | | <!-- <el-table-column label="批号" prop="batchNo" align="center" width="120" />--> |
| | | <el-table-column label="当前库存" prop="stock" align="center" width="120" /> |
| | | <el-table-column label="不完整归还" prop="missStock" align="center" width="120" /> |
| | | <el-table-column label="当前库存" prop="stock" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | v-if="scope.row.stock +scope.row.missStock < scope.row.hazmatBasic.safeNum" |
| | | class="box-item" |
| | | effect="light" |
| | | :content="`当前库存小于安全库存(${scope.row.hazmatBasic.safeNum})`" |
| | | placement="top" |
| | | > |
| | | <span style="cursor: pointer">{{scope.row.stock}}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="不完整归还" prop="missStock" align="center" width="120" > |
| | | <template #default="scope"> |
| | | <el-tooltip |
| | | v-if="scope.row.stock +scope.row.missStock < scope.row.hazmatBasic.safeNum" |
| | | class="box-item" |
| | | effect="light" |
| | | :content="`当前库存小于安全库存(${scope.row.hazmatBasic.safeNum})`" |
| | | placement="top" |
| | | > |
| | | <span style="cursor: pointer">{{scope.row.missStock}}</span> |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="安全库存" prop="hazmatBasic.safeNum" align="center" width="120" /> |
| | | <el-table-column label="所在仓库" prop="warehouseName" align="center" > |
| | | </el-table-column> |
| | |
| | | const res = await getRawList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.dataList.forEach(item => { |
| | | if(item.stock+item.missStock < item.hazmatBasic.safeNum){ |
| | | selectValue.value.push(item) |
| | | } |
| | | }) |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | |
| | | |
| | | const cellStyle = ({ row, column,rowIndex, columnIndex }) => { |
| | | let arr = [] |
| | | if (selectValue.value !== null) { |
| | | selectValue.value.filter((item, index) => { |
| | | if (data.dataList !== null) { |
| | | data.dataList.filter((item, index) => { |
| | | arr.push(item.basicId) |
| | | }) |
| | | } |
| | | for (var i = 0; i <= arr.length; i++) { |
| | | if (arr[i] == row.basicId) { |
| | | if (columnIndex === 8 || columnIndex === 9 || columnIndex === 10){ |
| | | return { backgroundColor: '#FFD7CC !important',color:' red' } |
| | | if (arr[i] === row.basicId) { |
| | | if(row.stock + row.missStock < row.hazmatBasic.safeNum){ |
| | | if (columnIndex === 8 || columnIndex === 9){ |
| | | return { backgroundColor: '#FFD7CC !important',color:' red' } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |