|
|
@ -148,19 +148,63 @@ |
|
|
|
<div class="two-row mt-14px"> |
|
|
|
<div class="data1 w-[47.3%]"> |
|
|
|
<div class="title">高低储预警</div> |
|
|
|
<el-table :data="tableData" style="width: 100%" stripe height="240px"> |
|
|
|
<el-table-column prop="title" label="标题" /> |
|
|
|
<el-table-column prop="name" label="发布人" /> |
|
|
|
<el-table-column prop="date" label="发布日期" /> |
|
|
|
<el-table |
|
|
|
:data="materialData?.warningBalanceList" |
|
|
|
style="width: 100%" |
|
|
|
stripe |
|
|
|
height="240px" |
|
|
|
> |
|
|
|
<el-table-column prop="itemCode" label="物料代码" width="180px" /> |
|
|
|
<el-table-column prop="batch" label="批次" width="180px" /> |
|
|
|
<el-table-column prop="packingNumber" label="包装号" width="180px" /> |
|
|
|
<el-table-column prop="containerNumber" label="器具代码" width="180px" /> |
|
|
|
<el-table-column prop="qty" label="数量" width="180px" /> |
|
|
|
<el-table-column prop="uom" label="计量单位" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ formatter(scope.row.uom, DICT_TYPE.UOM) }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="locationCode" label="库位代码" width="180px" /> |
|
|
|
<el-table-column prop="warehouseCode" label="仓库代码" width="180px" /> |
|
|
|
<el-table-column prop="inventoryStatus" label="库存状态" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
{{ formatter(scope.row.inventoryStatus, DICT_TYPE.INVENTORY_STATUS) }} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="locationGroupCode" label="库位组代码" width="180px" /> |
|
|
|
<el-table-column prop="areaCode" label="库区代码" width="180px" /> |
|
|
|
<el-table-column prop="erpLocationCode" label="ERP库位代码" width="180px" /> |
|
|
|
<el-table-column prop="altBatch" label="替代批次" width="180px" /> |
|
|
|
<el-table-column prop="arriveDate" label="到货日期" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ formatDate(scope.row.planDate) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="produceDate" label="生产日期" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ formatDate(scope.row.planDate) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="expireDate" label="失效日期" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ formatDate(scope.row.planDate) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="ownerCode" label="货主代码" width="180px" /> |
|
|
|
<el-table-column prop="lockedQty" label="锁定数量" width="180px" /> |
|
|
|
<el-table-column prop="usableQty" label="可用数量" width="180px" /> |
|
|
|
<el-table-column prop="singlePrice" label="单价" width="180px" /> |
|
|
|
<el-table-column prop="amount" label="金额" width="180px" /> |
|
|
|
<el-table-column prop="putInTime" label="入库时间" width="180px"> |
|
|
|
<template #default="scope"> |
|
|
|
<span>{{ formatDate(scope.row.planDate) }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div class="data1 w-[47.3%]"> |
|
|
|
<div class="title">待处理任务</div> |
|
|
|
<el-table :data="tableData" style="width: 100%" stripe height="240px"> |
|
|
|
<el-table-column prop="title" label="标题" /> |
|
|
|
<el-table-column prop="name" label="发布人" /> |
|
|
|
<el-table-column prop="date" label="发布日期" /> |
|
|
|
</el-table> |
|
|
|
<Echart :options="barOptions" :height="280" :key="lineIndex" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -169,55 +213,41 @@ |
|
|
|
import * as IndexApi from '@/api/home' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' |
|
|
|
const tableData = [ |
|
|
|
{ |
|
|
|
date: '2016-05-03', |
|
|
|
name: 'Tom', |
|
|
|
title: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: '2016-05-02', |
|
|
|
title: 'Tom', |
|
|
|
name: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: '2016-05-04', |
|
|
|
title: 'Tom', |
|
|
|
name: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: '2016-05-01', |
|
|
|
title: 'Tom', |
|
|
|
name: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: '2016-05-01', |
|
|
|
title: 'Tom', |
|
|
|
name: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
}, |
|
|
|
{ |
|
|
|
date: '2016-05-01', |
|
|
|
title: 'Tom', |
|
|
|
name: 'Tom', |
|
|
|
text: 'No. 189, Grove St, Los Angeles' |
|
|
|
} |
|
|
|
] |
|
|
|
import { set } from 'lodash-es' |
|
|
|
import { EChartsOption } from 'echarts' |
|
|
|
import { barOptions } from '../echarts-data' |
|
|
|
const lineIndex = ref(0) |
|
|
|
|
|
|
|
const materialData = ref() |
|
|
|
// 获取原料管理员数据 |
|
|
|
const getMaterialData = async () => { |
|
|
|
IndexApi.getMaterialData().then((res) => { |
|
|
|
await IndexApi.getMaterialData().then((res) => { |
|
|
|
materialData.value = res |
|
|
|
getJobCharts() |
|
|
|
}) |
|
|
|
} |
|
|
|
const formatter = (type, dict) => { |
|
|
|
let str = getStrDictOptions(dict).filter((item) => type == item.value)[0].label |
|
|
|
return str |
|
|
|
} |
|
|
|
const barOptionsData = reactive<EChartsOption>(barOptions) as EChartsOption |
|
|
|
const getJobCharts = async () => { |
|
|
|
set( |
|
|
|
barOptionsData, |
|
|
|
'xAxis.data', |
|
|
|
Object.keys( materialData.value.jobCount) |
|
|
|
) |
|
|
|
set(barOptionsData, 'legend.data', ['待处理任务']) |
|
|
|
set(barOptionsData, 'series', [ |
|
|
|
{ |
|
|
|
name:'待处理任务', |
|
|
|
data: Object.values( materialData.value.jobCount), |
|
|
|
type: 'bar', |
|
|
|
barMaxWidth:30 |
|
|
|
} |
|
|
|
]) |
|
|
|
lineIndex.value++ |
|
|
|
} |
|
|
|
onMounted(async () => { |
|
|
|
await getMaterialData() |
|
|
|
}) |
|
|
|