云
4 天以前 fe6ba6220f32276f147a16c41e7a69c2a18e5012
feat(inventory): 优化库存管理批量详情页面功能

- 实现库存信息、入库信息、出库信息三个标签页独立数据加载
- 添加批号和入库数量字段到入库信息表格
- 优化出库信息表格字段映射和数据显示
- 实现三个标签页各自的分页控件和数据查询
- 添加标签页切换时的懒加载机制减少初始请求
- 重构数据变量命名提高代码可读性
- 优化图片上传组件添加永久存储标识
- 更新报表分析组件默认时间周期配置
- 优化储罐信息租客选择功能实现下拉选择
- 清理采购台账中已废弃的入库状态相关字段
- 修复弹窗关闭时的数据重置逻辑
已修改11个文件
400 ■■■■■ 文件已修改
deploy.bat 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/tankInfo/index.vue 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/OilStockInDialog.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/inventoryManagement/stockManagement/OilStockOutDialog.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/procurementManagement/procurementLedger/index.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/reportAnalysis/dataDashboard/index.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
deploy.bat
@@ -3,12 +3,12 @@
setlocal enabledelayedexpansion
:: ================= Config =================
set "USER=root"
set "PASS=Xdrjkj@10086#"
set "IP=36.213.180.217
set "PORT=65022"
set "USER=dell"
set "PASS=qweasdzxc2580@.."
set "IP=114.132.189.42
set "PORT=9100"
set "DIST_DIR=dist"
set "REMOTE_DIR=/data/project/pim/vue/xjgm"
set "REMOTE_DIR=/home/vue/tjbm-product"
set "SSH_OPTS=-o StrictHostKeyChecking=no -o ConnectTimeout=10"
:: ===========================================
src/views/basicData/tankInfo/index.vue
@@ -85,7 +85,7 @@
        <el-table-column label="罐容"
                         prop="capacity"
                         min-width="120" />
        <el-table-column label="库存余量(m³)"
        <el-table-column label="库存余量"
                         prop="remaining"
                         min-width="140" />
        <el-table-column label="是否启用"
@@ -205,7 +205,7 @@
        </el-row>
        <el-row :gutter="30">
          <el-col :span="12">
            <el-form-item label="库存余量(m³):"
            <el-form-item label="库存余量:"
                          prop="remaining">
              <el-input-number v-model="form.remaining"
                               :precision="2"
@@ -247,9 +247,16 @@
                trigger: 'blur',
              }
            ]">
              <el-input v-model="form.tenantInfo"
                        placeholder="请输入租客信息"
                        clearable />
              <el-select v-model="form.tenantInfo"
                         placeholder="请选择租客"
                         clearable
                         filterable
                         style="width: 100%">
                <el-option v-for="item in tenantSelectOptions"
                           :key="item.id"
                           :label="item.customerName"
                           :value="item.customerName" />
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
@@ -261,7 +268,7 @@
<script setup>
  import FormDialog from "@/components/Dialog/FormDialog.vue";
  import pagination from "@/components/PIMTable/Pagination.vue";
  import { ref, reactive, toRefs, watch, getCurrentInstance } from "vue";
  import { ref, reactive, toRefs, watch, computed, getCurrentInstance } from "vue";
  import { Search } from "@element-plus/icons-vue";
  import { ElMessageBox } from "element-plus";
  import {
@@ -270,8 +277,10 @@
    updateTankInfo,
    delTankInfo,
  } from "@/api/basicData/tankInfo.js";
  import { listCustomer } from "@/api/basicData/customer.js";
  const { proxy } = getCurrentInstance();
  const { customer_type } = proxy.useDict("customer_type");
  const tableData = ref([]);
  const selectedRows = ref([]);
  const tableLoading = ref(false);
@@ -311,6 +320,33 @@
  // 用途文案:1 租赁 / 2 自用
  const getUsageTypeText = value => ({ 1: "租赁", 2: "自用" })[value] || "--";
  // 租客只能从「代储客户」分类里选;字典的 value 未必就是中文标签,按 label 反查真实取值
  const tenantOptions = ref([]);
  let loadedTenantType = null;
  const loadTenantOptions = () => {
    const hit = (customer_type.value || []).find(
      item => item.label === "代储客户"
    );
    const customerType = hit ? hit.value : "代储客户";
    if (customerType === loadedTenantType) return;
    loadedTenantType = customerType;
    listCustomer({ current: -1, size: -1, customerType }).then(res => {
      tenantOptions.value = res.data.records || [];
    });
  };
  // 字典异步到达后再拉一次;字典命中缓存时 immediate 这一次就够了
  watch(customer_type, loadTenantOptions, { immediate: true });
  // 历史数据是手工填的租客名,未必还在代储客户列表里,补一个临时选项保证回显
  const tenantSelectOptions = computed(() => {
    const list = tenantOptions.value;
    const current = form.value.tenantInfo;
    if (current && !list.some(item => item.customerName === current)) {
      return [...list, { id: `legacy-${current}`, customerName: current }];
    }
    return list;
  });
  // 未启用时用途与租客信息一律清空;选自用时租客信息自动清空(租赁才需要租客)
  watch(
    () => [form.value.isEnabled, form.value.usageType],
src/views/inventoryManagement/stockManagement/BatchNoQtyDetail.vue
@@ -10,13 +10,14 @@
    <div class="detail-content">
      <div class="detail-table-wrapper">
        <el-tabs v-model="detailTab"
                 class="detail-tabs">
                 class="detail-tabs"
                 @tab-change="handleTabChange">
          <el-tab-pane label="库存信息"
                       name="main">
            <el-table
              :data="tableData"
              :data="inventoryData"
              border
              v-loading="tableLoading"
              v-loading="inventoryLoading"
              style="width: 100%"
              height="100%"
            >
@@ -92,9 +93,9 @@
          <el-tab-pane label="入库信息"
                       name="in">
            <el-table
              :data="tableData"
              :data="inboundData"
              border
              v-loading="tableLoading"
              v-loading="inboundLoading"
              style="width: 100%"
              height="100%"
            >
@@ -102,6 +103,8 @@
                           align="center"
                           :header-cell-style="groupHeaderStyle">
            <el-table-column label="油品" prop="productName" min-width="90" show-overflow-tooltip />
            <el-table-column label="批号" prop="batchNo" min-width="150" show-overflow-tooltip />
            <el-table-column label="入库数量(吨)" prop="stockInNum" min-width="110" show-overflow-tooltip />
            <el-table-column label="入库名称" prop="oilDepotName" min-width="130" show-overflow-tooltip />
            <el-table-column label="入库类别" prop="inboundCategory" min-width="100" show-overflow-tooltip />
            <el-table-column label="储罐号" prop="tankNo" min-width="100" show-overflow-tooltip />
@@ -168,9 +171,9 @@
          <el-tab-pane label="出库信息"
                       name="out">
            <el-table
              :data="tableData"
              :data="outboundData"
              border
              v-loading="tableLoading"
              v-loading="outboundLoading"
              style="width: 100%"
              height="100%"
            >
@@ -178,21 +181,22 @@
                           align="center"
                           :header-cell-style="groupHeaderStyle">
            <el-table-column label="出库类别" prop="outCategory" min-width="90" show-overflow-tooltip />
            <el-table-column label="储库名称" prop="outOilDepotName" min-width="130" show-overflow-tooltip />
            <el-table-column label="储罐号" prop="outTankNo" min-width="100" show-overflow-tooltip />
            <el-table-column label="批号" prop="batchNo" min-width="150" show-overflow-tooltip />
            <el-table-column label="储库名称" prop="oilDepotName" min-width="130" show-overflow-tooltip />
            <el-table-column label="储罐号" prop="tankNo" min-width="100" show-overflow-tooltip />
            <el-table-column label="出库日期" prop="outDate" min-width="110" show-overflow-tooltip />
            <el-table-column label="油品" prop="productName" min-width="90" show-overflow-tooltip />
            <el-table-column label="出库吨位(吨)" prop="outTonnage" min-width="110" show-overflow-tooltip />
            <el-table-column label="客户名称" prop="outCustomerName" min-width="120" show-overflow-tooltip />
            <el-table-column label="客户对接人" prop="outContactPerson" min-width="100" show-overflow-tooltip />
            <el-table-column label="对接人电话" prop="outContactPhone" min-width="120" show-overflow-tooltip />
            <el-table-column label="客户名称" prop="customerName" min-width="120" show-overflow-tooltip />
            <el-table-column label="客户对接人" prop="contactPerson" min-width="100" show-overflow-tooltip />
            <el-table-column label="对接人电话" prop="contactPhone" min-width="120" show-overflow-tooltip />
          </el-table-column>
          <el-table-column label="装油操作信息"
                           align="center"
                           :header-cell-style="groupHeaderStyle">
            <el-table-column label="装油检验" prop="loadingInspectionStatus" min-width="90" show-overflow-tooltip />
            <el-table-column label="装车鹤位" prop="loadingCranePosition" min-width="100" show-overflow-tooltip />
            <el-table-column label="密度" prop="outDensity" min-width="80" show-overflow-tooltip />
            <el-table-column label="密度" prop="density" min-width="80" show-overflow-tooltip />
            <el-table-column label="装油拍照" prop="loadingPhotos" align="center" min-width="90">
              <template #default="scope">
                <el-image
@@ -210,17 +214,17 @@
          <el-table-column label="出库过磅数据"
                           align="center"
                           :header-cell-style="groupHeaderStyle">
            <el-table-column label="毛重(吨)" prop="outGrossWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="皮重(吨)" prop="outTareWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="净重(吨)" prop="outNetWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="亏量(吨)" prop="outLossQuantity" min-width="90" show-overflow-tooltip />
            <el-table-column label="实际入库体积(升)" prop="outActualVolume" min-width="130" show-overflow-tooltip />
            <el-table-column label="磅单" prop="outPoundPhotos" align="center" min-width="90">
            <el-table-column label="毛重(吨)" prop="grossWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="皮重(吨)" prop="tareWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="净重(吨)" prop="netWeight" min-width="90" show-overflow-tooltip />
            <el-table-column label="亏量(吨)" prop="lossQuantity" min-width="90" show-overflow-tooltip />
            <el-table-column label="实际出库体积(升)" prop="actualVolume" min-width="130" show-overflow-tooltip />
            <el-table-column label="磅单" prop="poundPhotos" align="center" min-width="90">
              <template #default="scope">
                <el-image
                  v-if="toPhotoArray(scope.row.outPoundPhotos).length"
                  :src="getPhotoUrl(toPhotoArray(scope.row.outPoundPhotos)[0])"
                  :preview-src-list="getPhotoUrls(scope.row.outPoundPhotos)"
                  v-if="toPhotoArray(scope.row.poundPhotos).length"
                  :src="getPhotoUrl(toPhotoArray(scope.row.poundPhotos)[0])"
                  :preview-src-list="getPhotoUrls(scope.row.poundPhotos)"
                  preview-teleported
                  fit="cover"
                  style="width: 40px; height: 40px; border-radius: 4px"
@@ -232,24 +236,43 @@
          <el-table-column label="出库物流信息"
                           align="center"
                           :header-cell-style="groupHeaderStyle">
            <el-table-column label="司机姓名" prop="outDriverName" min-width="100" show-overflow-tooltip />
            <el-table-column label="司机电话" prop="outDriverPhone" min-width="120" show-overflow-tooltip />
            <el-table-column label="押运员姓名" prop="outEscortName" min-width="100" show-overflow-tooltip />
            <el-table-column label="押运员电话" prop="outEscortPhone" min-width="120" show-overflow-tooltip />
            <el-table-column label="车牌号" prop="outTruckPlateNo" min-width="110" show-overflow-tooltip />
            <el-table-column label="车挂牌号" prop="outTrailerPlateNo" min-width="110" show-overflow-tooltip />
            <el-table-column label="司机姓名" prop="driverName" min-width="100" show-overflow-tooltip />
            <el-table-column label="司机电话" prop="driverPhone" min-width="120" show-overflow-tooltip />
            <el-table-column label="押运员姓名" prop="escortName" min-width="100" show-overflow-tooltip />
            <el-table-column label="押运员电话" prop="escortPhone" min-width="120" show-overflow-tooltip />
            <el-table-column label="车牌号" prop="truckPlateNo" min-width="110" show-overflow-tooltip />
            <el-table-column label="车挂牌号" prop="trailerPlateNo" min-width="110" show-overflow-tooltip />
          </el-table-column>
            </el-table>
          </el-tab-pane>
        </el-tabs>
      </div>
      <pagination
        v-show="total > 0"
        :total="total"
        v-if="detailTab === 'main'"
        v-show="inventoryTotal > 0"
        :total="inventoryTotal"
        layout="total, sizes, prev, pager, next, jumper"
        :page="page.current"
        :limit="page.size"
        @pagination="paginationChange"
        :page="inventoryPage.current"
        :limit="inventoryPage.size"
        @pagination="handleInventoryPageChange"
      />
      <pagination
        v-if="detailTab === 'in'"
        v-show="inboundTotal > 0"
        :total="inboundTotal"
        layout="total, sizes, prev, pager, next, jumper"
        :page="inboundPage.current"
        :limit="inboundPage.size"
        @pagination="handleInboundPageChange"
      />
      <pagination
        v-if="detailTab === 'out'"
        v-show="outboundTotal > 0"
        :total="outboundTotal"
        layout="total, sizes, prev, pager, next, jumper"
        :page="outboundPage.current"
        :limit="outboundPage.size"
        @pagination="handleOutboundPageChange"
      />
    </div>
  </el-dialog>
@@ -259,6 +282,8 @@
import pagination from "@/components/PIMTable/Pagination.vue";
import { computed, reactive, ref, watch } from "vue";
import { getStockInventoryBatchNoQty } from "@/api/inventoryManagement/stockInventory.js";
import { getStockInRecordListPage } from "@/api/inventoryManagement/stockInRecord.js";
import { getStockOutPage } from "@/api/inventoryManagement/stockOut.js";
const props = defineProps({
  visible: {
@@ -282,36 +307,112 @@
  },
});
const tableData = ref([]);
const tableLoading = ref(false);
const total = ref(0);
// 三个页签各自独立查询、各自分页:库存信息走批号明细,入库/出库走各自的记录列表
const detailTab = ref("main");
const page = reactive({
const inventoryData = ref([]);
const inventoryLoading = ref(false);
const inventoryTotal = ref(0);
const inventoryPage = reactive({
  current: 1,
  size: 20,
});
const inboundData = ref([]);
const inboundLoading = ref(false);
const inboundTotal = ref(0);
const inboundPage = reactive({
  current: 1,
  size: 20,
});
const inboundLoaded = ref(false);
const outboundData = ref([]);
const outboundLoading = ref(false);
const outboundTotal = ref(0);
const outboundPage = reactive({
  current: 1,
  size: 20,
});
const outboundLoaded = ref(false);
const getList = () => {
  if (!props.record?.productId || !props.record?.productModelId) {
    tableData.value = [];
    total.value = 0;
    inventoryData.value = [];
    inventoryTotal.value = 0;
    return;
  }
  tableLoading.value = true;
  inventoryLoading.value = true;
  getStockInventoryBatchNoQty({
    current: page.current,
    size: page.size,
    current: inventoryPage.current,
    size: inventoryPage.size,
    productId: props.record.productId,
    productModelId: props.record.productModelId,
  })
    .then((res) => {
      tableData.value = res.data?.records || [];
      total.value = res.data?.total || 0;
      inventoryData.value = res.data?.records || [];
      inventoryTotal.value = res.data?.total || 0;
    })
    .finally(() => {
      tableLoading.value = false;
      inventoryLoading.value = false;
    });
};
const getInboundList = () => {
  if (!props.record?.productModelId) {
    inboundData.value = [];
    inboundTotal.value = 0;
    return;
  }
  inboundLoading.value = true;
  getStockInRecordListPage({
    current: inboundPage.current,
    size: inboundPage.size,
    productModelId: props.record.productModelId,
  })
    .then((res) => {
      inboundData.value = res.data?.records || [];
      inboundTotal.value = res.data?.total || 0;
      inboundLoaded.value = true;
    })
    .finally(() => {
      inboundLoading.value = false;
    });
};
const getOutboundList = () => {
  if (!props.record?.productModelId) {
    outboundData.value = [];
    outboundTotal.value = 0;
    return;
  }
  outboundLoading.value = true;
  getStockOutPage({
    current: outboundPage.current,
    size: outboundPage.size,
    productModelId: props.record.productModelId,
  })
    .then((res) => {
      outboundData.value = res.data?.records || [];
      outboundTotal.value = res.data?.total || 0;
      outboundLoaded.value = true;
    })
    .finally(() => {
      outboundLoading.value = false;
    });
};
// 点哪个页签查哪个:入库/出库首次进入时才请求,避免打开弹窗就发三个请求
const handleTabChange = (name) => {
  if (name === "in" && !inboundLoaded.value) {
    getInboundList();
  }
  if (name === "out" && !outboundLoaded.value) {
    getOutboundList();
  }
};
// 图片列:后端返回为 JSON 字符串,兼容数组/字符串两种形态
@@ -349,10 +450,22 @@
  fontSize: "13px",
};
const paginationChange = (obj) => {
  page.current = obj.page;
  page.size = obj.limit;
const handleInventoryPageChange = (obj) => {
  inventoryPage.current = obj.page;
  inventoryPage.size = obj.limit;
  getList();
};
const handleInboundPageChange = (obj) => {
  inboundPage.current = obj.page;
  inboundPage.size = obj.limit;
  getInboundList();
};
const handleOutboundPageChange = (obj) => {
  outboundPage.current = obj.page;
  outboundPage.size = obj.limit;
  getOutboundList();
};
const handleSubtract = (row) => {
@@ -369,10 +482,24 @@
const closeModal = () => {
  isShow.value = false;
  page.current = 1;
  page.size = 20;
  tableData.value = [];
  total.value = 0;
  detailTab.value = "main";
  inventoryPage.current = 1;
  inventoryPage.size = 20;
  inventoryData.value = [];
  inventoryTotal.value = 0;
  inboundPage.current = 1;
  inboundPage.size = 20;
  inboundData.value = [];
  inboundTotal.value = 0;
  inboundLoaded.value = false;
  outboundPage.current = 1;
  outboundPage.size = 20;
  outboundData.value = [];
  outboundTotal.value = 0;
  outboundLoaded.value = false;
};
watch(
@@ -381,7 +508,12 @@
    if (!visible) {
      return;
    }
    page.current = 1;
    detailTab.value = "main";
    inventoryPage.current = 1;
    inboundPage.current = 1;
    outboundPage.current = 1;
    inboundLoaded.value = false;
    outboundLoaded.value = false;
    getList();
  },
  { immediate: true }
src/views/inventoryManagement/stockManagement/OilStockInDialog.vue
@@ -408,7 +408,8 @@
                          prop="unloadPhotos"
                          :rules="[{ required: true, message: '请上传卸油关键环节与车辆关键位置拍照', trigger: 'change' }]">
              <ImageUpload v-model:file-list="formState.unloadPhotos"
                           :limit="10" />
                           :limit="10"
                           permanent />
            </el-form-item>
          </el-col>
        </el-row>
@@ -496,7 +497,8 @@
                          prop="poundPhotos"
                          :rules="[{ required: true, message: '请上传磅单', trigger: 'change' }]">
              <ImageUpload v-model:file-list="formState.poundPhotos"
                           :limit="10" />
                           :limit="10"
                           permanent />
            </el-form-item>
          </el-col>
        </el-row>
src/views/inventoryManagement/stockManagement/OilStockOutDialog.vue
@@ -362,7 +362,8 @@
                          prop="loadingPhotos"
                          :rules="[{ required: true, message: '请上传装油关键环节与车辆关键位置拍照', trigger: 'change' }]">
              <ImageUpload v-model:file-list="formState.loadingPhotos"
                           :limit="10" />
                           :limit="10"
                           permanent />
            </el-form-item>
          </el-col>
        </el-row>
@@ -445,7 +446,8 @@
                          prop="poundPhotos"
                          :rules="[{ required: true, message: '请上传磅单', trigger: 'change' }]">
              <ImageUpload v-model:file-list="formState.poundPhotos"
                           :limit="10" />
                           :limit="10"
                           permanent />
            </el-form-item>
          </el-col>
        </el-row>
src/views/procurementManagement/procurementLedger/index.vue
@@ -99,20 +99,8 @@
                               prop="specificationModel" />
              <el-table-column label="单位"
                               prop="unit" />
              <el-table-column label="入库审核状态"
                               prop="stockInApprovalStatus"
                               width="120">
                <template #default="scope">
                  <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
                          size="small">
                    {{ scope.row.stockInApprovalStatus || '--' }}
                  </el-tag>
                </template>
              </el-table-column>
              <el-table-column label="数量"
                               prop="quantity" />
              <el-table-column label="销售发货数量"
                               prop="shippedQuantity" />
              <el-table-column label="可用数量"
                               prop="availableQuality" />
              <el-table-column label="退货数量"
@@ -191,17 +179,6 @@
            <el-tag :type="getApprovalStatusType(scope.row.approvalStatus)"
                    size="small">
              {{ approvalStatusText[scope.row.approvalStatus] || '未知状态' }}
            </el-tag>
          </template>
        </el-table-column>
        <el-table-column label="入库状态"
                         prop="stockInStatus"
                         width="100"
                         show-overflow-tooltip>
          <template #default="scope">
            <el-tag :type="getStockInStatusType(scope.row.stockInStatus)"
                    size="small">
              {{ scope.row.stockInStatus || '--' }}
            </el-tag>
          </template>
        </el-table-column>
@@ -587,16 +564,6 @@
              </el-tag>
            </template>
          </el-table-column>
          <el-table-column label="入库审核状态"
                           prop="stockInApprovalStatus"
                           width="120">
            <template #default="scope">
              <el-tag :type="getStockInApprovalStatusType(scope.row.stockInApprovalStatus)"
                      size="small">
                {{ scope.row.stockInApprovalStatus || '--' }}
              </el-tag>
            </template>
          </el-table-column>
          <el-table-column fixed="right"
                           label="操作"
                           min-width="60"
@@ -604,8 +571,7 @@
            <template #default="scope">
              <el-button link
                         type="primary"
                         @click="openProductForm('edit', scope.row, scope.$index)"
                         :disabled="scope.row.stockInApprovalStatus === '完全入库'">编辑
                         @click="openProductForm('edit', scope.row, scope.$index)">编辑
              </el-button>
            </template>
          </el-table-column>
@@ -917,26 +883,6 @@
      2: "warning", // 审批中 - 橙色
      3: "success", // 审批通过 - 绿色
      4: "danger", // 审批失败 - 红色
    };
    return typeMap[status] || "";
  };
  // 获取入库状态标签类型
  const getStockInStatusType = status => {
    const typeMap = {
      待入库: "info", // 待入库 - 灰色
      入库中: "warning", // 入库中 - 橙色
      完全入库: "success", // 完全入库 - 绿色
    };
    return typeMap[status] || "";
  };
  // 获取入库审核状态标签类型
  const getStockInApprovalStatusType = status => {
    const typeMap = {
      待入库: "info", // 待入库 - 灰色
      入库中: "warning", // 入库中 - 橙色
      完全入库: "success", // 完全入库 - 绿色
    };
    return typeMap[status] || "";
  };
@@ -1447,14 +1393,6 @@
  };
  // 打开弹框
  const openForm = async (type, row) => {
    // 编辑时检查入库状态,完全入库时不能编辑
    if (type === "edit" && row) {
      if (row.stockInStatus === "完全入库") {
        proxy.$modal.msgWarning("完全入库状态的记录不能编辑");
        return;
      }
    }
    await getTemplateList();
    await userListNoPage().then(res => {
      userList.value = res.data;
@@ -1619,12 +1557,6 @@
  };
  // 打开产品弹框
  const openProductForm = async (type, row, index) => {
    // 编辑时检查产品入库审核状态,完全入库时不能编辑
    if (type === "edit" && row && row.stockInApprovalStatus === "完全入库") {
      proxy.$modal.msgWarning("完全入库状态的产品不能编辑");
      return;
    }
    productOperationType.value = type;
    productOperationIndex.value = index;
    productForm.value = {};
@@ -1809,14 +1741,6 @@
    }
    if (productSelectedRows.value.length === 0) {
      proxy.$modal.msgWarning("请选择数据");
      return;
    }
    // 检查选中的产品中是否有完全入库的
    const hasFullyStocked = productSelectedRows.value.some(
      row => row.stockInApprovalStatus === "完全入库"
    );
    if (hasFullyStocked) {
      proxy.$modal.msgWarning("选中的产品中包含完全入库的产品,无法删除");
      return;
    }
    if (operationType.value === "add") {
src/views/reportAnalysis/PSIDataAnalysis/components/center-bottom.vue
@@ -30,7 +30,9 @@
import ProductTypeSwitch from './ProductTypeSwitch.vue'
import { productInOutAnalysis } from '@/api/viewIndex.js'
const productType = ref(2) // 1=原材料 2=成品
// 1=原材料 2=成品 3=半成品。
// 默认成品:本租户「原材料」大类和「半成品」大类下都没有挂产品型号,选它们必然是一条全 0 的平线
const productType = ref(2)
const chartStyle = { width: '100%', height: '130%' }
src/views/reportAnalysis/dataDashboard/components/basic/left-bottom.vue
@@ -47,7 +47,7 @@
import { customerRevenueAnalysis } from '@/api/viewIndex.js'
import { listCustomer } from '@/api/basicData/customer.js'
const dateType = ref(1) // 1=周 2=月 3=季度
const dateType = ref(3) // 1=周 2=月 3=季度
const customerValue = ref(null)
const customerOptions = ref([])
src/views/reportAnalysis/dataDashboard/components/basic/right-bottom.vue
@@ -33,7 +33,7 @@
  height: '100%',
}
// 复用本组件的页面可指定初始周期,不传仍按「周」展示(dataDashboard 不受影响)
// 复用本组件的页面可指定初始周期,不传按「周」展示
const props = defineProps({
  defaultDateType: {
    type: Number,
src/views/reportAnalysis/dataDashboard/components/basic/right-top.vue
@@ -32,7 +32,7 @@
  height: '100%',
}
// 复用本组件的页面可指定初始周期,不传仍按「周」展示(dataDashboard 不受影响)
// 复用本组件的页面可指定初始周期,不传按「周」展示
const props = defineProps({
  defaultDateType: {
    type: Number,
src/views/reportAnalysis/dataDashboard/index.vue
@@ -34,9 +34,9 @@
    <!-- 右侧区域 -->
    <div class="right-panel">
      <RightTop />
      <RightTop :default-date-type="3" />
       <RightBottom />
       <RightBottom :default-date-type="3" />
    </div>
    </div>
    </div>