refactor(heli): 优化仓储管理模块的数据结构和界面显示
This commit is contained in:
parent
ea8ae8451f
commit
0de30962f3
@ -17,7 +17,7 @@ import java.time.LocalDate;
|
|||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class WmsStorageInExcelVO {
|
public class WmsStorageInExcelVO {
|
||||||
@ExcelProperty("系统编号")
|
@ExcelProperty("系统编号")
|
||||||
private Long systemID = 1L;
|
private Long id = 1L;
|
||||||
|
|
||||||
@ExcelProperty("业务类型")
|
@ExcelProperty("业务类型")
|
||||||
private String busiType;
|
private String busiType;
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import java.time.LocalDate;
|
|||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class WmsStorageOutExcelVO {
|
public class WmsStorageOutExcelVO {
|
||||||
@ExcelProperty("系统编号")
|
@ExcelProperty("系统编号")
|
||||||
private Long systemID = 1L;
|
private Long id = 1L;
|
||||||
|
|
||||||
@ExcelProperty("仓库")
|
@ExcelProperty("仓库")
|
||||||
private String whName;
|
private String whName;
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import java.math.BigDecimal;
|
|||||||
@ExcelIgnoreUnannotated
|
@ExcelIgnoreUnannotated
|
||||||
public class DetailInExcelVO {
|
public class DetailInExcelVO {
|
||||||
@ExcelProperty("系统编号")
|
@ExcelProperty("系统编号")
|
||||||
private Long systemID = 1L;
|
private Long id = 1L;
|
||||||
|
|
||||||
@ExcelProperty("物料编码")
|
@ExcelProperty("物料编码")
|
||||||
private String matCode;
|
private String matCode;
|
||||||
|
|||||||
@ -13,7 +13,7 @@ import java.math.BigDecimal;
|
|||||||
public class DetailOutExcelVO {
|
public class DetailOutExcelVO {
|
||||||
|
|
||||||
@ExcelProperty("系统编号")
|
@ExcelProperty("系统编号")
|
||||||
private Long systemID = 1L;
|
private Long id = 1L;
|
||||||
|
|
||||||
@ExcelProperty("物料编码")
|
@ExcelProperty("物料编码")
|
||||||
private String matCode;
|
private String matCode;
|
||||||
|
|||||||
@ -1,64 +1,38 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Dialog title="基础信息" v-model="dialogVisible" width="1200px" @close="handleClose">
|
<Dialog title="基础信息" v-model="dialogVisible" width="1200px" @close="handleClose">
|
||||||
<div v-loading="formLoading" style="min-height: 200px;">
|
<div v-loading="formLoading" style="min-height: 200px;">
|
||||||
<el-descriptions :column="2" border>
|
<!-- 表单信息 -->
|
||||||
<el-descriptions-item label="单据类型">
|
<el-form ref="formRef" :model="formData" :rules="formRules" label-width="100px" v-loading="formLoading">
|
||||||
{{ getHeliStockTypeLabel(formData.stockType) }}
|
<el-row :gutter="20">
|
||||||
</el-descriptions-item>
|
<el-col :span="8">
|
||||||
<el-descriptions-item label="单据状态">
|
<el-form-item label="单据编号" prop="stockNo">
|
||||||
{{ getHeliStorageStatusLabel(formData.status) }}
|
<el-input v-model="formData.stockNo" disabled placeholder="单据编号" />
|
||||||
</el-descriptions-item>
|
</el-form-item>
|
||||||
<el-descriptions-item label="单据编号">
|
</el-col>
|
||||||
{{ formData.stockNo }}
|
<el-col :span="8">
|
||||||
</el-descriptions-item>
|
<el-form-item label="业务日期" prop="busiDate">
|
||||||
<el-descriptions-item label="业务日期">
|
<el-input :model-value="formattedBusiDate" disabled placeholder="业务日期" />
|
||||||
{{ formatDate(formData.busiDate, 'YYYY-MM-DD') }}
|
</el-form-item>
|
||||||
</el-descriptions-item>
|
</el-col>
|
||||||
<el-descriptions-item label="仓库" :span="2">
|
<el-col :span="8">
|
||||||
{{ formData.whName }}
|
<el-form-item label="单据类型" prop="stockType">
|
||||||
</el-descriptions-item>
|
<el-input v-model="stockTypeLabel" disabled placeholder="单据类型" />
|
||||||
<el-descriptions-item label="供应商名称" :span="2">
|
</el-form-item>
|
||||||
{{ formData.supplierName }}
|
</el-col>
|
||||||
</el-descriptions-item>
|
</el-row>
|
||||||
<el-descriptions-item label="价格类型">
|
</el-form>
|
||||||
{{ formData.priceType }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="辅助项">
|
|
||||||
{{ formData.auItem }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="部门" :span="2">
|
|
||||||
{{ formData.deptName }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="发票编码">
|
|
||||||
{{ formData.incoiceCode }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="生成人">
|
|
||||||
{{ formData.stockEmp }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="生成时间">
|
|
||||||
{{ formatDate(formData.stockTime) }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="导出人" :span="2">
|
|
||||||
{{ formData.exportEmpName }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="导出时间">
|
|
||||||
{{ formatDate(formData.exprotTime) }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="备注" :span="2">
|
|
||||||
{{ formData.description }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
|
|
||||||
|
|
||||||
<!-- 明细列表 -->
|
<!-- 明细列表 -->
|
||||||
<div style="margin-top: 20px;">
|
<div class="detail-section">
|
||||||
<div style="font-weight: bold; margin-bottom: 10px; font-size: 14px;">入出库明细</div>
|
<div class="section-title">入出库明细</div>
|
||||||
<el-table
|
<el-table
|
||||||
:data="formData.detailList || []"
|
:data="formData.detailList || []"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
border
|
border
|
||||||
max-height="300"
|
max-height="300"
|
||||||
|
class="detail-table"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="80" label="序号" align="center" />
|
<el-table-column type="index" width="80" label="序号" align="center" />
|
||||||
<el-table-column label="物料编码" align="center" prop="matCode" min-width="120" />
|
<el-table-column label="物料编码" align="center" prop="matCode" min-width="120" />
|
||||||
@ -76,8 +50,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as WmsStorageApi from '@/api/heli/wmsstorage'
|
import * as WmsStorageApi from '@/api/heli/wmsstorage'
|
||||||
import {
|
import {
|
||||||
getHeliStockTypeLabel,
|
getHeliStockTypeLabel
|
||||||
getHeliStorageStatusLabel
|
|
||||||
} from '@/api/heli/wmsstorage'
|
} from '@/api/heli/wmsstorage'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
|
|
||||||
@ -125,6 +98,17 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|||||||
|
|
||||||
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
||||||
|
|
||||||
|
/** 单据类型标签 */
|
||||||
|
const stockTypeLabel = computed(() => {
|
||||||
|
return getHeliStockTypeLabel(formData.value.stockType)
|
||||||
|
})
|
||||||
|
|
||||||
|
/** 格式化业务日期 */
|
||||||
|
const formattedBusiDate = computed(() => {
|
||||||
|
if (!formData.value.busiDate) return ''
|
||||||
|
return formatDate(formData.value.busiDate, 'YYYY-MM-DD')
|
||||||
|
})
|
||||||
|
|
||||||
/** 关闭弹窗 */
|
/** 关闭弹窗 */
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
@ -132,3 +116,30 @@ const handleClose = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.detail-section {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-title {
|
||||||
|
font-weight: 600;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #303133;
|
||||||
|
padding-left: 4px;
|
||||||
|
border-left: 3px solid #409EFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-table {
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
|
||||||
|
border-radius: 4px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-input.is-disabled .el-input__inner) {
|
||||||
|
color: #606266;
|
||||||
|
background-color: #f5f7fa;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@ -65,7 +65,7 @@
|
|||||||
:data="list"
|
:data="list"
|
||||||
:stripe="true"
|
:stripe="true"
|
||||||
:show-overflow-tooltip="true"
|
:show-overflow-tooltip="true"
|
||||||
height="600px"
|
height="500px"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
@ -265,6 +265,7 @@ const handleExportSelected = async () => {
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// 设置默认日期范围:当月1号到当天
|
// 设置默认日期范围:当月1号到当天
|
||||||
queryParams.busiDate = getDefaultDateRange()
|
queryParams.busiDate = getDefaultDateRange()
|
||||||
// 不自动加载数据,需要点击查询按钮
|
// 自动加载数据
|
||||||
|
getList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user