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

@@ -40,7 +40,7 @@
</div>
</td>
<td class="value-cell" colspan="1">
<QRCode :content="content.qrcodeRecordId || ' '" :size="60" />
<QRCode :content="content.qrcodeRecordId || ' '" :size="80" />
</td>
</tr>
<!-- <tr>

View File

@@ -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="exportTime" />
<el-table-column label="更新人" align="center" prop="updateByName" />
@@ -60,8 +61,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 = now.toISOString().slice(0, 10) + ' 00:00:00'
const startTime = now.toISOString().slice(0, 10) + ' 00:00:00'
const endTime = now.toISOString().slice(0, 10) + ' 23:59:59'
return {
list: [],
queryParams: {
@@ -82,7 +83,7 @@ export default {
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
return {
totalCount,
totalWeight,
totalWeight: totalWeight.toFixed(2),
avgWeight,
}
}

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,
}
}

View File

@@ -6,13 +6,13 @@
placeholder="选择开始时间"></el-date-picker>
结束时间<el-date-picker v-model="queryParams.endTime" type="datetime" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择结束时间"></el-date-picker>
<el-button type="primary" style="margin-left: 10px;" @click="getList">查询</el-button>
<el-button type="primary" style="margin-left: 10px;" @click="getList">查询</el-button>
<el-button type="primary" @click="exportData">导出</el-button>
</el-row>
<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>
@@ -62,8 +62,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 +84,7 @@ export default {
const avgWeight = totalCount > 0 ? (totalWeight / totalCount).toFixed(2) : 0
return {
totalCount,
totalWeight,
totalWeight: totalWeight.toFixed(2),
avgWeight,
}
}
@@ -92,32 +92,68 @@ export default {
methods: {
getList() {
this.loading = true
listPendingAction({
// actionStatus: 2,
actionType: 11,
pageSize: 999,
pageNum: 1,
startTime: this.queryParams.startTime,
endTime: this.queryParams.endTime,
}).then(res => {
const actions = res.rows
const coilIds = actions.map(item => item.coilId).join(',')
console.log(coilIds)
if (!coilIds) {
this.$message({
message: '暂无数据',
type: 'warning',
})
this.loading = false
return
}
Promise.all([
// 酸连轧成品库
listMaterialCoil({
coilIds: coilIds,
}).then(res => {
this.list = res.rows
this.loading = false
})
startTime: this.queryParams.startTime,
endTime: this.queryParams.endTime,
pageSize: 9999,
pageNum: 1,
dataType: 1,
createBy: 'suanzhakuguan',
warehouseId: '1988150099140866050'
}),
// 镀锌原料库
listMaterialCoil({
startTime: this.queryParams.startTime,
endTime: this.queryParams.endTime,
pageSize: 9999,
pageNum: 1,
dataType: 1,
createBy: 'suanzhakuguan',
warehouseId: '1988150263284953089'
}),
// 脱脂原料库
listMaterialCoil({
startTime: this.queryParams.startTime,
endTime: this.queryParams.endTime,
pageSize: 9999,
pageNum: 1,
dataType: 1,
createBy: 'suanzhakuguan',
warehouseId: '1988150545175736322'
}),
]).then(([res1, res2, res3]) => {
console.log(res1, res2, res3)
this.list = [...res1.rows, ...res2.rows, ...res3.rows]
this.loading = false
})
// listPendingAction({
// // actionStatus: 2,
// actionType: 11,
// pageSize: 999,
// pageNum: 1,
// startTime: this.queryParams.startTime,
// endTime: this.queryParams.endTime,
// }).then(res => {
// const actions = res.rows
// const coilIds = actions.map(item => item.coilId).join(',')
// console.log(coilIds)
// if (!coilIds) {
// this.$message({
// message: '暂无数据',
// type: 'warning',
// })
// this.loading = false
// return
// }
// listMaterialCoil({
// coilIds: coilIds,
// }).then(res => {
// this.list = res.rows
// this.loading = false
// })
// })
},
// 导出
exportData() {