提交
This commit is contained in:
@@ -8,18 +8,10 @@ export const getMonthCount = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 预警
|
||||
export const getInventoryAge = () => {
|
||||
return request({
|
||||
url: '/stat/age',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 库龄统计(库龄超过30/60天统计)
|
||||
// 预警 + 库龄统计(库龄超过30/60天统计)
|
||||
export const getAgeLong = () => {
|
||||
return request({
|
||||
url: '/stat/age/count',
|
||||
url: '/stat/stockAge/stat',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
@@ -27,27 +19,19 @@ export const getAgeLong = () => {
|
||||
// 仓库使用率
|
||||
export const getInventoryReview = () => {
|
||||
return request({
|
||||
url: '/stat/warehouseScene',
|
||||
url: '/stat/warehouse/slot',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 待办事项(应到未到统计)
|
||||
export const getWaitIn = (params) => {
|
||||
export const getWait = (params) => {
|
||||
return request({
|
||||
url: '/stat/undelivered',
|
||||
url: '/stat/todo',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
// 待办事项(应出未出统计)
|
||||
export const getWaitOut = (params) => {
|
||||
return request({
|
||||
url: '/stat/age/gt30',
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// 当前入库类型统计(根据入库类型统计项目数,条目数,总金额)
|
||||
export const getInStorage = () => {
|
||||
@@ -65,14 +49,6 @@ export const getGoodsType = () => {
|
||||
})
|
||||
}
|
||||
|
||||
// 县局统计(根据县局统计项目数,条目数,总金额)
|
||||
// export const getCounty = () => {
|
||||
// return request({
|
||||
// url: '/stat/county/summary',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
// 入/出库指标统计(天级出入库统计)
|
||||
export const getDailyInventory = (params) => {
|
||||
return request({
|
||||
@@ -100,11 +76,3 @@ export const getOutInventoryType = (params) => {
|
||||
})
|
||||
}
|
||||
|
||||
// (每一种入库类型的统计)
|
||||
// export const getEveryInventory = () => {
|
||||
// return request({
|
||||
// url: '/stat/type/pie',
|
||||
// method: 'get'
|
||||
// })
|
||||
// }
|
||||
|
||||
|
||||
@@ -187,9 +187,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="situation" label="情况" /> -->
|
||||
<el-table-column prop="projectCount" label="项目数" align="center"/>
|
||||
<el-table-column prop="itemCount" label="条目数" align="center"/>
|
||||
<el-table-column prop="amountPlan" label="总金额" align="center"/>
|
||||
<el-table-column prop="projectCnt" label="项目数" align="center"/>
|
||||
<el-table-column prop="totalAmt" label="总金额" align="center"/>
|
||||
<el-table-column prop="totalQty" label="总数量" align="center"/>
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -398,7 +397,7 @@
|
||||
<script setup>
|
||||
import * as echarts from 'echarts';
|
||||
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 { 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 }) => {
|
||||
// // 示例:根据“类型”和“情况”设置颜色
|
||||
@@ -439,62 +452,34 @@ const handleCellStyle = ()=>{
|
||||
return { backgroundColor: '#f5f7fa' }
|
||||
}
|
||||
let waitTableData = ref([
|
||||
{
|
||||
type: '应到未到[部分未到]',
|
||||
situation: '部分未到',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
},
|
||||
{
|
||||
type: '应到未到[全部未到]',
|
||||
situation: '全部未到',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
},
|
||||
{
|
||||
type: '应出未出[全部未出]',
|
||||
situation: '全部未出',
|
||||
projectCount: '',
|
||||
itemCount: '',
|
||||
totalQty: '',
|
||||
amountPlan: ''
|
||||
}
|
||||
// {
|
||||
// type: '应到未到[部分未到]',
|
||||
// situation: '部分未到',
|
||||
// projectCount: '',
|
||||
// itemCount: '',
|
||||
// totalQty: '',
|
||||
// amountPlan: ''
|
||||
// },
|
||||
// {
|
||||
// type: '应到未到[全部未到]',
|
||||
// situation: '全部未到',
|
||||
// projectCount: '',
|
||||
// itemCount: '',
|
||||
// totalQty: '',
|
||||
// amountPlan: ''
|
||||
// },
|
||||
// {
|
||||
// type: '应出未出[全部未出]',
|
||||
// situation: '全部未出',
|
||||
// projectCount: '',
|
||||
// itemCount: '',
|
||||
// totalQty: '',
|
||||
// amountPlan: ''
|
||||
// }
|
||||
])
|
||||
const getWaitList = () => {
|
||||
getWaitIn().then(res => {
|
||||
waitTableData.value[0].projectCount = res.data.undelivered.projectCount
|
||||
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")
|
||||
getWait().then(res => {
|
||||
waitTableData.value = res.data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -716,12 +701,11 @@ const goNotice = (noticeId) => {
|
||||
|
||||
onMounted(() => {
|
||||
// getMonthCountList()
|
||||
// getWaitList()
|
||||
// getInventoryAgeList()
|
||||
// getInventoryReviewList()
|
||||
getAgeLongList()
|
||||
getWaitList()
|
||||
getInventoryReviewList()
|
||||
// getInStorageList()
|
||||
// getGoodsTypeList()
|
||||
// getAgeLongList()
|
||||
// getInventoryTypeList()
|
||||
// getOutInventoryTypeList()
|
||||
// getDailyInventoryList()
|
||||
@@ -729,7 +713,7 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
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 usedData = []
|
||||
let freeData = []
|
||||
data.items.forEach(item => {
|
||||
xAxisData.push(item.warehouseName)
|
||||
totalData.push(item.totalPositions)
|
||||
usedData.push(item.usedPositions)
|
||||
freeData.push(item.freePositions)
|
||||
data.forEach(item => {
|
||||
xAxisData.push(item.cangkuName)
|
||||
totalData.push(item.totalSlot)
|
||||
usedData.push(item.usedSlot)
|
||||
freeData.push(item.unusedSlot)
|
||||
})
|
||||
var chartDom = document.getElementById('echartsInventoryReview');
|
||||
var myChart = echarts.init(chartDom);
|
||||
|
||||
@@ -143,6 +143,7 @@
|
||||
<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="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="dw" />
|
||||
<el-table-column label="实际入库数量" align="center" prop="realQty" width="120" />
|
||||
@@ -368,16 +369,6 @@
|
||||
</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="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.entityId" placeholder="请输入身份码"></el-input>
|
||||
@@ -403,6 +394,16 @@
|
||||
<el-input v-if="scope.row.isnew" v-model="scope.row.gysMc" 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">
|
||||
<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">
|
||||
<template #default="scope">
|
||||
<el-input v-model="scope.row.fycde1" placeholder="请输入一次封样号"></el-input>
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-form-item label="单据号" prop="billNoCk">
|
||||
<el-form-item label="单据号" prop="billNo">
|
||||
<el-input
|
||||
v-model="queryParams.billNoCk"
|
||||
v-model="queryParams.billNo"
|
||||
placeholder="请输入单据号"
|
||||
clearable
|
||||
@keyup.enter="handleQuery"
|
||||
@@ -147,7 +147,7 @@
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="picDetailFun(scope.row.billNoCk)"
|
||||
@click="picDetailFun(scope.row.billNo)"
|
||||
>图片</el-button
|
||||
>
|
||||
<el-button
|
||||
@@ -282,6 +282,7 @@
|
||||
prop="htDj"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="总计" align="center" prop="totalAmount" />
|
||||
<el-table-column label="计量单位" align="center" prop="dw" />
|
||||
<el-table-column
|
||||
label="实际出库数量"
|
||||
@@ -1275,10 +1276,10 @@ function reset() {
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
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];
|
||||
} else {
|
||||
queryParams.value.statDate = "";
|
||||
queryParams.value.startDate = "";
|
||||
queryParams.value.endDate = "";
|
||||
}
|
||||
queryParams.value.pageNum = 1;
|
||||
@@ -1546,8 +1547,8 @@ const handleStockDelete = (row) => {
|
||||
|
||||
|
||||
|
||||
function picDetailFun(billNoCk) {
|
||||
picDetail({ billNo: billNoCk, photoType: 1 }).then((response) => {
|
||||
function picDetailFun(billNo) {
|
||||
picDetail({ billNo: billNo, photoType: 1 }).then((response) => {
|
||||
if (response.data.length > 0) {
|
||||
dialogPicDetailVisible.value = true;
|
||||
picList.value = response.data;
|
||||
|
||||
@@ -119,6 +119,8 @@
|
||||
<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="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="xmNo" width="150" />
|
||||
<el-table-column label="项目描述" align="center" prop="xmMs" width="150" />
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
<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" />
|
||||
|
||||
Reference in New Issue
Block a user