feat(wms): 增加重量列并优化报表查询逻辑

- 在delivery.vue和receive.vue中增加重量(吨)列
- 修改所有报表页面的时间范围默认为当天00:00:00至23:59:59
- 优化zha.vue的查询逻辑,改为从三个仓库并行获取数据
- 调整QR码尺寸从60增加到80
This commit is contained in:
砂糖
2026-01-09 19:37:18 +08:00
parent 35e197ebe6
commit b474b250b5
4 changed files with 75 additions and 37 deletions

View File

@@ -12,7 +12,7 @@
<el-descriptions title="统计信息" :column="3" border>
<el-descriptions-item label="总钢卷数量">{{ summary.totalCount }}</el-descriptions-item>
<el-descriptions-item label="总重">{{ summary.totalWeight.toFixed(2) }}t</el-descriptions-item>
<el-descriptions-item label="总重">{{ summary.totalWeight }}t</el-descriptions-item>
<el-descriptions-item label="均重">{{ summary.avgWeight }}t</el-descriptions-item>
</el-descriptions>
@@ -37,6 +37,7 @@
<RawMaterialInfo v-else-if="scope.row.itemType === 'raw_material'" :material="scope.row.rawMaterial" />
</template>
</el-table-column>
<el-table-column label="重量 (吨)" align="center" prop="netWeight" />
<el-table-column label="长度 (米)" align="center" prop="length" />
<el-table-column label="更新人" align="center" prop="updateByName" />
</el-table>
@@ -62,8 +63,8 @@ export default {
// 获取昨天0点到今天0点的时间范围
const now = new Date()
const yesterday = new Date(now.getTime() - 24 * 60 * 60 * 1000)
const startTime = yesterday.toISOString().slice(0, 10) + ' 00:00:00'
const endTime = yesterday.toISOString().slice(0, 10) + ' 23:59:59'
const startTime = now.toISOString().slice(0, 10) + ' 00:00:00'
const endTime = now.toISOString().slice(0, 10) + ' 23:59:59'
return {
list: [],
queryParams: {
@@ -84,7 +85,7 @@ export default {
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
return {
totalCount,
totalWeight,
totalWeight: totalWeight.toFixed(2),
avgWeight,
}
}