This commit is contained in:
2026-02-03 11:40:02 +08:00
parent 0744b3de01
commit 7340260cb2
6 changed files with 80 additions and 123 deletions

View File

@@ -8,18 +8,10 @@ export const getMonthCount = () => {
}) })
} }
// 预警 // 预警 + 库龄统计(库龄超过30/60天统计)
export const getInventoryAge = () => {
return request({
url: '/stat/age',
method: 'get'
})
}
// 库龄统计(库龄超过30/60天统计)
export const getAgeLong = () => { export const getAgeLong = () => {
return request({ return request({
url: '/stat/age/count', url: '/stat/stockAge/stat',
method: 'get' method: 'get'
}) })
} }
@@ -27,23 +19,15 @@ export const getAgeLong = () => {
// 仓库使用率 // 仓库使用率
export const getInventoryReview = () => { export const getInventoryReview = () => {
return request({ return request({
url: '/stat/warehouseScene', url: '/stat/warehouse/slot',
method: 'get' method: 'get'
}) })
} }
// 待办事项(应到未到统计) // 待办事项(应到未到统计)
export const getWaitIn = (params) => { export const getWait = (params) => {
return request({ return request({
url: '/stat/undelivered', url: '/stat/todo',
method: 'get',
params
})
}
// 待办事项(应出未出统计)
export const getWaitOut = (params) => {
return request({
url: '/stat/age/gt30',
method: 'get', method: 'get',
params params
}) })
@@ -65,14 +49,6 @@ export const getGoodsType = () => {
}) })
} }
// 县局统计(根据县局统计项目数,条目数,总金额)
// export const getCounty = () => {
// return request({
// url: '/stat/county/summary',
// method: 'get'
// })
// }
// 入/出库指标统计(天级出入库统计) // 入/出库指标统计(天级出入库统计)
export const getDailyInventory = (params) => { export const getDailyInventory = (params) => {
return request({ return request({
@@ -100,11 +76,3 @@ export const getOutInventoryType = (params) => {
}) })
} }
// (每一种入库类型的统计)
// export const getEveryInventory = () => {
// return request({
// url: '/stat/type/pie',
// method: 'get'
// })
// }

View File

@@ -187,9 +187,8 @@
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column prop="situation" label="情况" /> --> <!-- <el-table-column prop="situation" label="情况" /> -->
<el-table-column prop="projectCount" label="项目数" align="center"/> <el-table-column prop="projectCnt" label="项目数" align="center"/>
<el-table-column prop="itemCount" label="条目数" align="center"/> <el-table-column prop="totalAmt" label="总金额" align="center"/>
<el-table-column prop="amountPlan" label="总金额" align="center"/>
<el-table-column prop="totalQty" label="总数量" align="center"/> <el-table-column prop="totalQty" label="总数量" align="center"/>
</el-table> </el-table>
</div> </div>
@@ -398,7 +397,7 @@
<script setup> <script setup>
import * as echarts from 'echarts'; import * as echarts from 'echarts';
import { onMounted } from "vue"; import { onMounted } from "vue";
import { getMonthCount, getWaitIn, getWaitOut, getInventoryAge, getAgeLong, getInventoryReview, getInStorage, getGoodsType, getDailyInventory, getInventoryType, getOutInventoryType } from '@/api/index' import { getMonthCount, getAgeLong, getWait, getInventoryReview, getInStorage, getGoodsType, getDailyInventory, getInventoryType, getOutInventoryType } from '@/api/index'
import { listNotice,getNotice } from "@/api/system/notice"; import { listNotice,getNotice } from "@/api/system/notice";
import { parseTime } from '@/utils/manage' import { parseTime } from '@/utils/manage'
@@ -420,6 +419,20 @@ const getMonthCountList = () => {
}) })
} }
let startTime = parseTime(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000), '{y}-{m}-{d}') // 14天前
let endTime = parseTime(new Date(), '{y}-{m}-{d}') // 当前时间
const getAgeLongList = () => {
getAgeLong().then(res => {
let data1 = res.data.slice(0, 3)
getChartInventoryAge(data1, "inventoryAgeEchatrs")
let data2 = res.data.slice(3)
getChartInventoryAge(data2, "warningEchatrs")
})
}
// 自定义单元格样式 // 自定义单元格样式
// const handleCellStyle = ({ row, column, rowIndex, columnIndex }) => { // const handleCellStyle = ({ row, column, rowIndex, columnIndex }) => {
// // 示例:根据“类型”和“情况”设置颜色 // // 示例:根据“类型”和“情况”设置颜色
@@ -439,62 +452,34 @@ const handleCellStyle = ()=>{
return { backgroundColor: '#f5f7fa' } return { backgroundColor: '#f5f7fa' }
} }
let waitTableData = ref([ let waitTableData = ref([
{ // {
type: '应到未到[部分未到]', // type: '应到未到[部分未到]',
situation: '部分未到', // situation: '部分未到',
projectCount: '', // projectCount: '',
itemCount: '', // itemCount: '',
totalQty: '', // totalQty: '',
amountPlan: '' // amountPlan: ''
}, // },
{ // {
type: '应到未到[全部未到]', // type: '应到未到[全部未到]',
situation: '全部未到', // situation: '全部未到',
projectCount: '', // projectCount: '',
itemCount: '', // itemCount: '',
totalQty: '', // totalQty: '',
amountPlan: '' // amountPlan: ''
}, // },
{ // {
type: '应出未出[全部未出]', // type: '应出未出[全部未出]',
situation: '全部未出', // situation: '全部未出',
projectCount: '', // projectCount: '',
itemCount: '', // itemCount: '',
totalQty: '', // totalQty: '',
amountPlan: '' // amountPlan: ''
} // }
]) ])
const getWaitList = () => { const getWaitList = () => {
getWaitIn().then(res => { getWait().then(res => {
waitTableData.value[0].projectCount = res.data.undelivered.projectCount waitTableData.value = res.data
waitTableData.value[0].itemCount = res.data.undelivered.itemCount
waitTableData.value[0].totalQty = res.data.undelivered.totalQty
waitTableData.value[0].amountPlan = res.data.undelivered.amountPlan.toFixed(2)
waitTableData.value[1].projectCount = res.data.partialUndelivered.projectCount
waitTableData.value[1].itemCount = res.data.partialUndelivered.itemCount
waitTableData.value[1].totalQty = res.data.partialUndelivered.totalQty
waitTableData.value[1].amountPlan = res.data.partialUndelivered.amountPlan.toFixed(2)
})
getWaitOut().then(res => {
waitTableData.value[2].projectCount = res.data.projectCount
waitTableData.value[2].itemCount = res.data.goodsCountTotal
waitTableData.value[2].totalQty = res.data.sumQty
waitTableData.value[2].amountPlan = res.data.sumAmount.toFixed(2)
})
}
let startTime = parseTime(new Date(Date.now() - 30 * 24 * 60 * 60 * 1000), '{y}-{m}-{d}') // 14天前
let endTime = parseTime(new Date(), '{y}-{m}-{d}') // 当前时间
const getInventoryAgeList = () => {
getInventoryAge().then(res => {
getChartInventoryAge(res.data, "inventoryAgeEchatrs")
})
}
const getAgeLongList = () => {
getAgeLong().then(res => {
getChartInventoryAge(res.data, "warningEchatrs")
}) })
} }
@@ -716,12 +701,11 @@ const goNotice = (noticeId) => {
onMounted(() => { onMounted(() => {
// getMonthCountList() // getMonthCountList()
// getWaitList() getAgeLongList()
// getInventoryAgeList() getWaitList()
// getInventoryReviewList() getInventoryReviewList()
// getInStorageList() // getInStorageList()
// getGoodsTypeList() // getGoodsTypeList()
// getAgeLongList()
// getInventoryTypeList() // getInventoryTypeList()
// getOutInventoryTypeList() // getOutInventoryTypeList()
// getDailyInventoryList() // getDailyInventoryList()
@@ -729,7 +713,7 @@ onMounted(() => {
}); });
const downloadExcel = () => { const downloadExcel = () => {
proxy.download('/stat/age/export', {}, `库龄统计_${new Date().getTime()}.xlsx`) proxy.download('/stat/stockAge/export30', {}, `库龄统计_${new Date().getTime()}.xlsx`)
} }
@@ -767,11 +751,11 @@ const getChartInventoryReview = (data) => {
let totalData = [] let totalData = []
let usedData = [] let usedData = []
let freeData = [] let freeData = []
data.items.forEach(item => { data.forEach(item => {
xAxisData.push(item.warehouseName) xAxisData.push(item.cangkuName)
totalData.push(item.totalPositions) totalData.push(item.totalSlot)
usedData.push(item.usedPositions) usedData.push(item.usedSlot)
freeData.push(item.freePositions) freeData.push(item.unusedSlot)
}) })
var chartDom = document.getElementById('echartsInventoryReview'); var chartDom = document.getElementById('echartsInventoryReview');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);

View File

@@ -143,6 +143,7 @@
<el-table-column label="物料描述" align="center" prop="wlMs" width="250" /> <el-table-column label="物料描述" align="center" prop="wlMs" width="250" />
<el-table-column label="供应商名称" align="center" prop="gysMc" width="200" /> <el-table-column label="供应商名称" align="center" prop="gysMc" width="200" />
<el-table-column label="合同单价" align="center" prop="htDj" /> <el-table-column label="合同单价" align="center" prop="htDj" />
<el-table-column label="总计" align="center" prop="totalAmount" />
<el-table-column label="订单编号" align="center" prop="sapNo" width="150" /> <el-table-column label="订单编号" align="center" prop="sapNo" width="150" />
<el-table-column label="计量单位" align="center" prop="dw" /> <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="realQty" width="120" />
@@ -368,16 +369,6 @@
</el-input> </el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" width="200">
<template #default="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注"></el-input>
</template>
</el-table-column>
<el-table-column label="容器码" align="center" width="150">
<template #default="scope">
<el-input v-model="scope.row.trayCode" placeholder="请输入容器码"></el-input>
</template>
</el-table-column>
<el-table-column label="身份码" align="center" width="200"> <el-table-column label="身份码" align="center" width="200">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.entityId" placeholder="请输入身份码"></el-input> <el-input v-model="scope.row.entityId" placeholder="请输入身份码"></el-input>
@@ -403,6 +394,16 @@
<el-input v-if="scope.row.isnew" v-model="scope.row.gysMc" placeholder="供应商"></el-input> <el-input v-if="scope.row.isnew" v-model="scope.row.gysMc" placeholder="供应商"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="容器码" align="center" width="150">
<template #default="scope">
<el-input v-model="scope.row.trayCode" placeholder="请输入容器码"></el-input>
</template>
</el-table-column>
<el-table-column label="备注" align="center" width="200">
<template #default="scope">
<el-input v-model="scope.row.remark" placeholder="请输入备注"></el-input>
</template>
</el-table-column>
<el-table-column label="一次封样号" align="center" width="200"> <el-table-column label="一次封样号" align="center" width="200">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.fycde1" placeholder="请输入一次封样号"></el-input> <el-input v-model="scope.row.fycde1" placeholder="请输入一次封样号"></el-input>

View File

@@ -22,9 +22,9 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="10"> <el-col :span="10">
<el-form-item label="单据号" prop="billNoCk"> <el-form-item label="单据号" prop="billNo">
<el-input <el-input
v-model="queryParams.billNoCk" v-model="queryParams.billNo"
placeholder="请输入单据号" placeholder="请输入单据号"
clearable clearable
@keyup.enter="handleQuery" @keyup.enter="handleQuery"
@@ -147,7 +147,7 @@
<el-button <el-button
link link
type="primary" type="primary"
@click="picDetailFun(scope.row.billNoCk)" @click="picDetailFun(scope.row.billNo)"
>图片</el-button >图片</el-button
> >
<el-button <el-button
@@ -282,6 +282,7 @@
prop="htDj" prop="htDj"
width="120" width="120"
/> />
<el-table-column label="总计" align="center" prop="totalAmount" />
<el-table-column label="计量单位" align="center" prop="dw" /> <el-table-column label="计量单位" align="center" prop="dw" />
<el-table-column <el-table-column
label="实际出库数量" label="实际出库数量"
@@ -1275,10 +1276,10 @@ function reset() {
/** 搜索按钮操作 */ /** 搜索按钮操作 */
function handleQuery() { function handleQuery() {
if (ckTime.value && ckTime.value.length > 0) { if (ckTime.value && ckTime.value.length > 0) {
queryParams.value.statDate = ckTime.value[0]; queryParams.value.startDate = ckTime.value[0];
queryParams.value.endDate = ckTime.value[1]; queryParams.value.endDate = ckTime.value[1];
} else { } else {
queryParams.value.statDate = ""; queryParams.value.startDate = "";
queryParams.value.endDate = ""; queryParams.value.endDate = "";
} }
queryParams.value.pageNum = 1; queryParams.value.pageNum = 1;
@@ -1546,8 +1547,8 @@ const handleStockDelete = (row) => {
function picDetailFun(billNoCk) { function picDetailFun(billNo) {
picDetail({ billNo: billNoCk, photoType: 1 }).then((response) => { picDetail({ billNo: billNo, photoType: 1 }).then((response) => {
if (response.data.length > 0) { if (response.data.length > 0) {
dialogPicDetailVisible.value = true; dialogPicDetailVisible.value = true;
picList.value = response.data; picList.value = response.data;

View File

@@ -119,6 +119,8 @@
<el-table-column label="物料号" align="center" prop="wlNo" width="100" /> <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="wlMs" width="150" />
<el-table-column label="单位" align="center" prop="dw" /> <el-table-column label="单位" align="center" prop="dw" />
<el-table-column label="合同单价" align="center" prop="htDj" />
<el-table-column label="总计" align="center" prop="totalAmount" />
<el-table-column label="数量" align="center" prop="realQty" width="120" /> <el-table-column label="数量" align="center" prop="realQty" width="120" />
<el-table-column label="项目号" align="center" prop="xmNo" 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="xmMs" width="150" />

View File

@@ -121,6 +121,7 @@
<el-table-column label="物料描述" align="center" prop="wlMs" width="150" /> <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="gysMc" width="150" />
<el-table-column label="合同单价" align="center" prop="htDj" /> <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="dw" />
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" /> <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="pcode" width="120" />