8 天以前 08393db6ecfd62910afd4a5e2be60f6f0bb286ca
feat(inventory): 添加入库记录管理中的源单号列显示功能

- 调整入库批次列宽度从280到200以优化表格布局
- 新增源单号列,仅在特定产品ID条件下显示
- 实现源单号格式化函数,空值显示为--
- 添加计算属性控制源单号列的显示条件
- 优化表格样式布局
已修改1个文件
23 ■■■■■ 文件已修改
src/views/inventoryManagement/receiptManagement/Record.vue 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/receiptManagement/Record.vue
@@ -102,7 +102,7 @@
                         width="60"/>
        <el-table-column label="入库批次"
                         prop="inboundBatches"
                         width="280"
                         width="200"
                         show-overflow-tooltip/>
        <el-table-column label="入库时间"
                         prop="createTime"
@@ -130,6 +130,16 @@
                         show-overflow-tooltip>
          <template #default="scope">
            {{ getRecordType(scope.row.recordType) }}
          </template>
        </el-table-column>
        <el-table-column
            v-if="showSourceOrderNoColumn"
            label="源单号"
            width="150"
            prop="sourceOrderNo"
            show-overflow-tooltip>
          <template #default="scope">
            {{ formatSourceOrderNo(scope.row?.sourceOrderNo) }}
          </template>
        </el-table-column>
        <el-table-column label="审批状态"
@@ -271,6 +281,15 @@
});
const canDelete = computed(() => canBatchApprove.value);
const showSourceOrderNoColumn = computed(() => {
  const topParentProductId = Number(props.topParentProductId);
  return topParentProductId === 276 || topParentProductId === 278;
});
const formatSourceOrderNo = (value) => {
  const text = String(value ?? "").trim();
  return text || "--";
};
const pageProductChange = obj => {
  page.current = obj.page;
@@ -439,4 +458,4 @@
  justify-content: flex-end;
  margin-bottom: 10px;
}
</style>
</style>