| | |
| | | </el-form> |
| | | </div> |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table v-loading="loading" :data="dataList" :border="true" :cell-style="cellStyle"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="流转时间" prop="updateTime" align="center" width="120"/> |
| | | <el-table-column label="品名" prop="hazmatBasic.name" align="center" /> |
| | |
| | | <el-table-column label="二维码识别号" prop="code" align="center" /> |
| | | <el-table-column label="类型" prop="hazmatBasic.productSn" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.state === 0 ? '入库' :scope.row.state === 1 ? '取用' :scope.row.state === 2 ? '归还' : scope.row.state === 3? '标签作废':''}}</span> |
| | | <span>{{scope.row.state === 0 ? '入库' :scope.row.state === 1 ? '取用' :scope.row.state === 2 ? '归还' : scope.row.state === 3? '标签作废':scope.row.state === 4 ? '用尽登记':scope.row.state === 5? '销售': scope.row.state === 6?'零头入库':''}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="数量" prop="num" align="center" width="120" > |
| | |
| | | /> |
| | | <el-dialog |
| | | v-model="dialogVisible" |
| | | width="600px" |
| | | width="650px" |
| | | :before-close="handleClose" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | |
| | | } |
| | | getList() |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getRawFlow(data.queryParams) |
| | |
| | | const getProRecord = (val) => { |
| | | dialogRef.value.openDialog(val) |
| | | } |
| | | const cellStyle = ({ row, column,rowIndex, columnIndex }) => { |
| | | let arr = [] |
| | | if (data.dataList !== null) { |
| | | data.dataList.filter((item, index) => { |
| | | arr.push(item.basicId) |
| | | }) |
| | | } |
| | | |
| | | for (let i = 0; i <= arr.length; i++) { |
| | | if (arr[i] == row.basicId) { |
| | | if (columnIndex === 6 || columnIndex === 5){ |
| | | if(row.num > 0){ |
| | | return { color:' green' } |
| | | }else{ |
| | | return { color:' red' } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | }; |
| | | |
| | | defineExpose({ |
| | | getList |