修改盘点正常的列表
This commit is contained in:
@@ -18,16 +18,49 @@
|
||||
|
||||
<el-tabs v-model="activeTabs" type="border-card" @tab-change="handleQueryInfo">
|
||||
<el-tab-pane v-for="item in statusList" :label="item.label" :name="item.value">
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" v-if="dialogParams.status == 0 || dialogParams.status == 1">
|
||||
<el-table-column prop="rkPcode" label="存放位置" />
|
||||
<el-table-column prop="realQty" label="数量" />
|
||||
<el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" show-overflow-tooltip show-summary
|
||||
:summary-method="getSummaries" v-if="dialogParams.status == 0 || dialogParams.status == 1">
|
||||
<el-table-column label="序号" align="center" type="index" width="70" />
|
||||
<el-table-column label="单据号" align="center" prop="billNo" width="180" />
|
||||
<el-table-column label="库存类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="订单编号" align="center" prop="sapNo" width="150" />
|
||||
<el-table-column label="项目号" align="center" prop="xmNo" width="150" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
||||
<el-table-column label="物料号" align="center" prop="wlNo" width="100" />
|
||||
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" />
|
||||
<el-table-column label="供应商名称" align="center" prop="gysMc" width="150" />
|
||||
<el-table-column label="合同单价" align="center" prop="htDj" />
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="单位" align="center" prop="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" />
|
||||
<el-table-column label="库位码" align="center" prop="pcode" width="120" />
|
||||
<el-table-column label="托盘码" align="center" prop="trayCode" />
|
||||
<el-table-column label="身份码" align="center" prop="entityId" width="150" />
|
||||
<el-table-column label="物资类型" align="center" prop="wlTypeName" />
|
||||
<el-table-column label="场景" align="center" prop="sceneName" width="150" />
|
||||
<el-table-column label="所属大库" align="center" prop="parentWarehouseName" width="150" />
|
||||
<el-table-column label="所属小库" align="center" prop="warehouseName" width="150" />
|
||||
<el-table-column label="入库类型" align="center" prop="operationTypeName" width="150" />
|
||||
<el-table-column label="入库时间" align="center" prop="operationTime" width="150" />
|
||||
<el-table-column label="还料时间" align="center" prop="returnTime" width="150">
|
||||
<template #default="scope">
|
||||
<span>{{ parseTime(scope.row.returnTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库龄" align="center" prop="stockAge" />
|
||||
|
||||
|
||||
|
||||
<el-table-column label="备注" align="center" prop="remark" width="150" />
|
||||
<el-table-column label="一次封样号" align="center" prop="fycde1" width="150" />
|
||||
<el-table-column label="二次封样号" align="center" prop="fycde2" width="150" />
|
||||
<!-- <el-table-column prop="count" label="操作" class-name="small-padding fixed-width">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="View" @click="handleView(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-table :data="dialogData" border empty-text="暂无数据" v-if="dialogParams.status == 2">
|
||||
<el-table-column prop="rkPcode" label="存放位置" />
|
||||
</el-table>
|
||||
@@ -64,7 +97,7 @@
|
||||
</template>
|
||||
|
||||
<script setup name="InventoryResult">
|
||||
import { getScanResult, getStockList } from "@/api/Inventory/autoInventory";
|
||||
import { getStockList, getTotalStatistics, inventoryList } from "@/api/Inventory/autoInventory";
|
||||
import { onMounted, ref } from "vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
@@ -91,13 +124,19 @@ const dialogParams = ref({
|
||||
status: 0,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
taskId: ""
|
||||
warehouseCode: '',
|
||||
sceneId: '',
|
||||
})
|
||||
const dialogData = ref([])
|
||||
const dialogTotal = ref(0)
|
||||
|
||||
const getHistoryInfo = () => {
|
||||
getScanResult(dialogParams.value).then(res => {
|
||||
if(dialogParams.value.status!=0){
|
||||
dialogData.value =null
|
||||
dialogTotal.value = 0
|
||||
return;
|
||||
}
|
||||
inventoryList(dialogParams.value).then(res => {
|
||||
dialogData.value = res.rows
|
||||
dialogTotal.value = res.total
|
||||
})
|
||||
@@ -122,25 +161,59 @@ const chageDialogPage = (e) => {
|
||||
const taskView = ref(false)
|
||||
const viewData = ref([])
|
||||
const handleView = (row) => {
|
||||
// let obj = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 100,
|
||||
// pcode: row.rkPcode
|
||||
// }
|
||||
getStockList(row.rkPcode).then(res => {
|
||||
console.log(res)
|
||||
viewData.value = res.data
|
||||
taskView.value = true
|
||||
})
|
||||
}
|
||||
|
||||
const totalMoney = ref(null)
|
||||
const pcodeCount = ref(null)
|
||||
const sumQty = ref(null)
|
||||
function getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 1) { // 第一列不进行合计操作,通常是序列号或选择框等非数值列。
|
||||
sums[index] = '总计'; // 这里可以设置为其他文字或空字符串。
|
||||
return;
|
||||
} else if (index === 2) { // 第二列是金额列,进行求和操作。
|
||||
sums[index] = '总金额:' + totalMoney.value;
|
||||
} else if (index === 3) {
|
||||
sums[index] = '共存于:' + pcodeCount.value + '个库位'
|
||||
} else if (index === 4) {
|
||||
sums[index] = '总数:' + sumQty.value
|
||||
}
|
||||
})
|
||||
return sums
|
||||
}
|
||||
|
||||
const route = useRoute()
|
||||
onMounted(() => {
|
||||
dialogParams.value.taskId = route.query.taskId
|
||||
// dialogParams.value.taskId = route.query.taskId
|
||||
dialogParams.value.warehouseCode = route.query.warehouseCode
|
||||
dialogParams.value.sceneId = route.query.sceneId
|
||||
dialogParams.value.pageNum = 1
|
||||
dialogParams.value.pageSize = 10
|
||||
getHistoryInfo()
|
||||
})
|
||||
// 获取总计
|
||||
|
||||
function getSumInfo() {
|
||||
//统计信息
|
||||
let rkInfo = JSON.parse(JSON.stringify({
|
||||
warehouseCode:route.query.warehouseCode,
|
||||
sceneId:route.query.sceneId,
|
||||
}))
|
||||
delete rkInfo.pageNum
|
||||
delete rkInfo.pageSize
|
||||
getTotalStatistics(rkInfo).then(response => {
|
||||
totalMoney.value = response.data.totalAmount
|
||||
pcodeCount.value = response.data.locationCount
|
||||
sumQty.value = response.data.totalQuantity
|
||||
});
|
||||
}
|
||||
getSumInfo()
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
</style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user