| | |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :inline="true" style="display: flex;align-items: center;flex-wrap: wrap;" > |
| | | <el-form-item label="品名:" > |
| | | <el-input v-model="data.queryParams.name" placeholder="请输入品名" clearable></el-input> |
| | | <el-input v-model="data.queryParams.params.name" placeholder="请输入品名" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="产品编号:" > |
| | | <el-input v-model="data.queryParams.productSn" placeholder="请输入产品编号" clearable></el-input> |
| | | <el-input v-model="data.queryParams.params.productSn" placeholder="请输入产品编号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item > |
| | | <el-button |
| | |
| | | </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="hazmatBasic.name" align="center" /> |
| | | <el-table-column label="产品编号" prop="hazmatBasic.productSn" align="center" /> |
| | |
| | | <span>{{scope.row.hazmatBasic.metering}}{{scope.row.hazmatBasic.unit}} / {{scope.row.hazmatBasic.minPackage == 0 ? '瓶' :scope.row.hazmatBasic.minPackage == 1?'袋':scope.row.hazmatBasic.minPackage == 2?'桶 ':scope.row.hazmatBasic.minPackage == 3?'盒':scope.row.hazmatBasic.minPackage == 4?'箱':'其他'}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="批号" prop="batchNo" align="center" width="120" /> |
| | | <el-table-column label="所在仓库" prop="warehouseName" align="center" > |
| | | <!-- <el-table-column label="批号" prop="batchNo" align="center" width="120" />--> |
| | | <el-table-column label="当前库存" prop="stock" align="center" width="120"> |
| | | <template #default="scope"> |
| | | <span>{{scope.row.warehouse.name}}</span> |
| | | <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="state" align="center"> |
| | | <el-table-column label="不完整归还" prop="missStock" align="center" width="120" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.state === 0 ? '未入库' : '已入库'}}</span> |
| | | <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 label="存储柜" prop="cupboardName" align="center" /> |
| | | <el-table-column label="创建时间" prop="hazmatBasic.createTime" align="center" width="120" /> |
| | | <!-- <el-table-column label="状态" prop="state" align="center">--> |
| | | <!-- <template #default="scope">--> |
| | | <!-- <span>{{scope.row.state === 0 ? '未入库' : '已入库'}}</span>--> |
| | | <!-- </template>--> |
| | | <!-- </el-table-column>--> |
| | | <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" > |
| | | <template #default="scope"> |
| | | <el-button link type="primary" @click="getProRecord(scope.row)" >动库记录</el-button> |
| | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | import rawWarehouseDialog from './rawWarehouseRecord.vue' |
| | | import {delRawRecord, doEntryRaw, getRawRecord, getRawWarehouseRecord} from "@/api/hazardousChemicals/rawRecord"; |
| | | import { |
| | | delRawRecord, |
| | | doEntryRaw, |
| | | getRawList, |
| | | getRawRecord, |
| | | getRawWarehouseRecord |
| | | } from "@/api/hazardousChemicals/rawRecord"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '', |
| | | productSn: '' |
| | | params :{ |
| | | name: '', |
| | | productSn: '' |
| | | } |
| | | }, |
| | | total: 0, |
| | | dataList: [] |
| | | }); |
| | | |
| | | const selectValue = ref([]) |
| | | const { queryParams, total, dataList } = toRefs(data); |
| | | const classHourRef = ref(); |
| | | onMounted(()=>{ |
| | |
| | | |
| | | const getList = async () => { |
| | | loading.value = true |
| | | const res = await getRawRecord(data.queryParams) |
| | | const res = await getRawList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list |
| | | data.total = res.data.total |
| | |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | name: '', |
| | | productSn: '' |
| | | params :{ |
| | | name: '', |
| | | productSn: '' |
| | | } |
| | | } |
| | | getList() |
| | | } |
| | |
| | | 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 (var i = 0; i <= arr.length; i++) { |
| | | if (arr[i] === row.basicId) { |
| | | if(row.stock + row.missStock < row.hazmatBasic.safeNum){ |
| | | if (columnIndex === 8 || columnIndex === 9){ |
| | | return { backgroundColor: '#FFD7CC !important',color:' red' } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | |
| | | defineExpose({ |
| | | getList |
| | | }); |