| | |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | style="width: 240px;" /> |
| | | <span class="search_title ml10">采购订单号:</span> |
| | | <el-input v-model="searchForm.purchaseOrderNo" |
| | | placeholder="请输入采购订单号" |
| | | clearable |
| | | style="width: 180px;" /> |
| | | <el-button type="primary" |
| | | @click="onSearch" |
| | | style="margin-left: 10px"> |
| | |
| | | label="序号" |
| | | type="index" |
| | | width="60" /> |
| | | <el-table-column label="入库时间" |
| | | <el-table-column label="时间" |
| | | prop="createTime" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" /> |
| | | <el-table-column label="入库批次" |
| | | prop="inboundBatches" |
| | | <el-table-column label="方向" |
| | | width="80" |
| | | align="center" |
| | | v-if="searchForm.reportType !== 'inout'"> |
| | | <template #default="scope"> |
| | | <el-tag :type="scope.row.direction === 'out' ? 'warning' : 'success'" |
| | | size="small"> |
| | | {{ scope.row.direction === 'out' ? '出库' : '入库' }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="单据批次" |
| | | width="180" |
| | | show-overflow-tooltip |
| | | v-if="searchForm.reportType !== 'inout'" /> |
| | | v-if="searchForm.reportType !== 'inout'"> |
| | | <template #default="scope"> |
| | | {{ scope.row.direction === 'out' ? scope.row.outboundBatches : scope.row.inboundBatches }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="批号" |
| | | prop="batchNo" |
| | | width="180" |
| | |
| | | <el-table-column label="入库数量" |
| | | prop="stockInNum" |
| | | align="center" |
| | | v-else /> |
| | | v-else> |
| | | <template #default="scope"> |
| | | {{ scope.row.direction === 'out' ? '-' : scope.row.stockInNum }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="出库数量" |
| | | prop="totalStockOut" |
| | | width="100" |
| | | align="center" |
| | | v-if="searchForm.reportType === 'inout'" /> |
| | | <el-table-column label="出库数量" |
| | | prop="stockOutNum" |
| | | width="100" |
| | | align="center" |
| | | v-else> |
| | | <template #default="scope"> |
| | | {{ scope.row.direction === 'out' ? scope.row.stockOutNum : '-' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="现在库存" |
| | | prop="currentStock" |
| | | align="center" /> |
| | |
| | | v-if="searchForm.reportType !== 'inout'" |
| | | show-overflow-tooltip> |
| | | <template #default="scope"> |
| | | {{ getRecordType(scope.row.recordType) }} |
| | | {{ getRecordType(scope.row) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="入库人" |
| | | <el-table-column label="经手人" |
| | | prop="createBy" |
| | | width="80" |
| | | v-if="searchForm.reportType !== 'inout'" |
| | |
| | | } from "@/api/inventoryManagement/stockInventory.js"; |
| | | import { |
| | | findAllQualifiedStockInRecordTypeOptions, |
| | | findAllQualifiedStockOutRecordTypeOptions, |
| | | // findAllUnQualifiedStockInRecordTypeOptions, |
| | | } from "@/api/basicData/enum.js"; |
| | | |
| | |
| | | singleDate: "", |
| | | dateRange: [], |
| | | monthRange: [], |
| | | purchaseOrderNo: "", |
| | | }); |
| | | |
| | | const reportData = ref({ |
| | |
| | | const total = ref(0); |
| | | |
| | | const stockRecordTypeOptions = ref([]); |
| | | const stockOutRecordTypeOptions = ref([]); |
| | | |
| | | const getRecordType = recordType => { |
| | | return ( |
| | | stockRecordTypeOptions.value.find(item => item.value === recordType) |
| | | ?.label || "" |
| | | ); |
| | | const getRecordType = row => { |
| | | const options = |
| | | row.direction === "out" |
| | | ? stockOutRecordTypeOptions.value |
| | | : stockRecordTypeOptions.value; |
| | | return options.find(item => item.value === row.recordType)?.label || ""; |
| | | }; |
| | | |
| | | // 获取来源类型选项 |
| | |
| | | // ...res.data, |
| | | // ]; |
| | | // }); |
| | | }); |
| | | findAllQualifiedStockOutRecordTypeOptions().then(res => { |
| | | stockOutRecordTypeOptions.value = res.data; |
| | | }); |
| | | }; |
| | | |
| | |
| | | endMonth: "", |
| | | startDate: "", |
| | | endDate: "", |
| | | purchaseOrderNo: searchForm.purchaseOrderNo, |
| | | }; |
| | | |
| | | if (searchForm.reportType === "daily") { |
| | |
| | | searchForm.singleDate = ""; |
| | | searchForm.dateRange = []; |
| | | searchForm.monthRange = []; |
| | | searchForm.purchaseOrderNo = ""; |
| | | reportData.value = { |
| | | summary: null, |
| | | chartData: null, |