| | |
| | | >订单入库</el-button> |
| | | </el-form-item> |
| | | <el-form-item label="申购单号:" > |
| | | <el-input v-model="data.queryParams.params.name" placeholder="请输入申购单号" clearable></el-input> |
| | | <el-input v-model="data.queryParams.subscribeNum" placeholder="请输入申购单号" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="主柜:" prop="warehouseName" > |
| | | <el-select |
| | | clearable |
| | | v-model="data.queryParams.params.warehouseName" |
| | | v-model="data.warehouseName" |
| | | filterable |
| | | remote |
| | | reserve-keyword |
| | |
| | | <el-form-item label="副柜:" prop="cupboardId" > |
| | | <el-select |
| | | clearable |
| | | v-model="data.queryParams.params.cupboardId" |
| | | v-model="data.queryParams.cupboardId" |
| | | placeholder="请选择副柜" |
| | | style="width: 100%" |
| | | > |
| | |
| | | <!-- 表格数据 --> |
| | | <el-table v-loading="loading" :data="dataList" :border="true"> |
| | | <el-table-column label="序号" type="index" align="center" width="80" /> |
| | | <el-table-column label="申购单号" prop="hazmatBasicNo" align="center" /> |
| | | <el-table-column label="危化品名称" prop="hazmatBasic.productSn" align="center" class-name="subscribe-quantity-cell"> |
| | | <el-table-column label="申购单号" prop="subscribeNum" align="center" /> |
| | | <el-table-column label="危化品名称" align="center" class-name="subscribe-quantity-cell"> |
| | | <template #default="scope"> |
| | | <div style="width: 100%; height: 100%;display: flex; flex-direction: column;justify-content: center;align-items: center; "> |
| | | <div |
| | | v-for="(item, index) in scope.row.subscribeHazmats" |
| | | v-for="(item, index) in scope.row.subscribe.subscribeHazmats" |
| | | :key="item.id" |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | borderBottom: index === scope.row.subscribe.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | }" |
| | | > |
| | | <span>{{ item.hazmatName }}</span> |
| | |
| | | <template #default="scope"> |
| | | <div style="width: 100%; height: 100%;display: flex; flex-direction: column;justify-content: center;align-items: center; "> |
| | | <div |
| | | v-for="(item, index) in scope.row.subscribeHazmats" |
| | | v-for="(item, index) in scope.row.subscribe.subscribeHazmats" |
| | | style=" |
| | | width: 100%; |
| | | text-align: center; |
| | | padding: 8px 0; |
| | | height: 70px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-bottom: 1px solid #ebeef5;" |
| | | :style="{ |
| | | borderBottom: index === scope.row.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | borderBottom: index === scope.row.subscribe.subscribeHazmats.length - 1 ? 'none' : '1px solid #ebeef5' |
| | | }" |
| | | > |
| | | {{ item.hazmatCount }} |
| | |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主柜" prop="warehouseName" align="center" > |
| | | <template #default="scope"> |
| | | <span>{{scope.row.name}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="主柜" prop="warehouse.name" align="center" /> |
| | | <el-table-column label="副柜" prop="cupboard.cupboardName" align="center" width="120" /> |
| | | <el-table-column label="批号" prop="batchNo" align="center" width="120" /> |
| | | <el-table-column label="状态" prop="state" align="center"> |
| | |
| | | import {delRawRecord, doEntryRaw, getRawRecord, getRawWarehouseRecord} from "@/api/hazardousChemicals/rawRecord"; |
| | | import {useRoute, useRouter} from "vue-router"; |
| | | import {getCupById, getWarehouse} from "@/api/hazardousChemicals/warehouse"; |
| | | import {delOrder, getOrderList, intoOrder} from "@/api/hazardousChemicals/orderWarehouse"; |
| | | const { proxy } = getCurrentInstance(); |
| | | const loading = ref(false); |
| | | const dialogRef = ref(); |
| | |
| | | queryParams: { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | params :{ |
| | | name: '', |
| | | productSn: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | } |
| | | subscribeNum: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | }, |
| | | warehouseName:'', |
| | | total: 0, |
| | | dataList: [], |
| | | wareHouseList: [], |
| | |
| | | }) |
| | | |
| | | const getList = async () => { |
| | | // loading.value = true |
| | | // const res = await getRawRecord(data.queryParams) |
| | | // if(res.code == 200){ |
| | | // data.dataList = res.data.list |
| | | // data.total = res.data.total |
| | | // }else{ |
| | | // ElMessage.warning(res.message) |
| | | // } |
| | | // loading.value = false |
| | | loading.value = true |
| | | const res = await getOrderList(data.queryParams) |
| | | if(res.code == 200){ |
| | | data.dataList = res.data.list.filter(i => i.subscribeNum ) |
| | | data.total = res.data.total |
| | | }else{ |
| | | ElMessage.warning(res.message) |
| | | } |
| | | loading.value = false |
| | | } |
| | | |
| | | const openDialog = (type, value) => { |
| | |
| | | data.queryParams = { |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | params :{ |
| | | name: '', |
| | | productSn: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | } |
| | | subscribeNum: '', |
| | | cupboardId: null, |
| | | warehouseId: null |
| | | } |
| | | data.warehouseName = '' |
| | | data.cupList = [] |
| | | |
| | | getList() |
| | | getWareHouseList("") |
| | | |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await delRawRecord(val.id) |
| | | const res = await delOrder(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('数据删除成功') |
| | | await getList() |
| | |
| | | type: 'warning', |
| | | }) |
| | | .then( async() => { |
| | | const res = await doEntryRaw(val.id) |
| | | const res = await intoOrder(val.id) |
| | | if(res.code == 200){ |
| | | ElMessage.success('入库成功') |
| | | await getList() |
| | |
| | | } |
| | | } |
| | | const selectWareValue = (val) => { |
| | | data.queryParams.params.cupboardId = null |
| | | data.queryParams.cupboardId = null |
| | | data.wareHouseList.forEach(item => { |
| | | if(item.name === val){ |
| | | data.queryParams.params.warehouseId = item.id |
| | | data.queryParams.warehouseId = item.id |
| | | getCupList(item.id) |
| | | } |
| | | }) |