gaoluyang
6 小时以前 c56e5d01939c67e3e7abdc0ff9d369719cd26f25
进销存升级
1.客户档案分为公海和私海
2.销售所有模块查询客户数据接口更改
已修改5个文件
488 ■■■■ 文件已修改
src/api/basicData/customerFile.js 104 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/customerFile/index.vue 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/customerFileOpenSea/index.vue 198 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 79 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesQuotation/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/customerFile.js
@@ -1,7 +1,5 @@
// 客户档案页面接口
import request from '@/utils/request'
// 分页查询
export function listCustomer(query) {
    return request({
        url: '/basic/customer/list',
@@ -9,14 +7,76 @@
        params: query
    })
}
// 查询客户档案详细
// 客户档案私海查询
export function listCustomerPrivatePool(query) {
    return request({
        url: '/customerPrivatePool/listPage',
        method: 'get',
        params: query
    })
}
export function addCustomerPrivatePool(data) {
    return request({
        url: '/customerPrivatePool/add',
        method: 'post',
        data: data
    })
}
export function addCustomerPrivate(data) {
    return request({
        url: '/customerPrivate/add',
        method: 'post',
        data: data
    })
}
export function delCustomerPrivate(ids) {
    return request({
        url: '/customerPrivate/delete',
        method: 'delete',
        data: ids
    })
}
export function delCustomerPrivatePool(id) {
    return request({
        url: '/customerPrivatePool/delete/' + id,
        method: 'delete',
    })
}
export function shareCustomer(data) {
    return request({
        url: '/customerPrivatePool/together',
        method: 'post',
        data: data
    })
}
export function getCustomer(id) {
    return request({
        url: '/basic/customer/' + id,
        method: 'get'
    })
}
// 新增客户档案
export function getCustomerPrivatePoolById(id) {
    return request({
        url: '/customerPrivatePool/getbyId/' + id,
        method: 'get'
    })
}
export function getCustomerPrivatePoolInfo(id) {
    return request({
        url: '/customerPrivatePool/info/' + id,
        method: 'get'
    })
}
export function addCustomer(data) {
    return request({
        url: '/basic/customer/addCustomer',
@@ -24,7 +84,7 @@
        data: data
    })
}
// 修改客户档案
export function updateCustomer(data) {
    return request({
        url: '/basic/customer/updateCustomer',
@@ -32,7 +92,15 @@
        data: data
    })
}
// 导出客户档案
export function updateCustomerPrivatePool(data) {
    return request({
        url: '/customerPrivatePool/update',
        method: 'put',
        data: data
    })
}
export function exportCustomer(query) {
    return request({
        url: '/basic/customer/export',
@@ -41,7 +109,7 @@
        responseType: 'blob'
    })
}
// 删除客户档案
export function delCustomer(ids) {
    return request({
        url: '/basic/customer/delCustomer',
@@ -50,8 +118,6 @@
    })
}
// 新增客户跟进
export function addCustomerFollow(data) {
    return request({
        url: '/basic/customer-follow/add',
@@ -60,23 +126,21 @@
    })
}
// 修改客户跟进
export function updateCustomerFollow(data) {
  return request({
    url: '/basic/customer-follow/edit',
    method: 'put',
    data: data,
  })
    return request({
        url: '/basic/customer-follow/edit',
        method: 'put',
        data: data,
    })
}
// 删除客户跟进
export function delCustomerFollow(id) {
    return request({
        url: '/basic/customer-follow/'+id,
        url: '/basic/customer-follow/' + id,
        method: 'delete',
    })
}
// 回访提醒-新增/更新
export function addReturnVisit(data) {
    return request({
        url: '/basic/customer-follow/return-visit',
@@ -84,10 +148,10 @@
        data: data
    })
}
// 获取回访提醒详情
export function getReturnVisit(id) {
    return request({
        url: '/basic/customer-follow/return-visit/' + id,
        method: 'get'
    })
}
}
src/views/basicData/customerFile/index.vue
@@ -612,11 +612,13 @@
  import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
  import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
  import {
    addCustomer,
    delCustomer,
    addCustomerPrivate,
    delCustomerPrivate,
    getCustomer,
    listCustomer,
    updateCustomer,
    getCustomerPrivatePoolById,
    getCustomerPrivatePoolInfo,
    listCustomerPrivatePool,
    updateCustomerPrivatePool,
    addCustomerFollow,
    updateCustomerFollow,
    delCustomerFollow,
@@ -654,7 +656,7 @@
  const negotiationFormRef = ref();
  const negotiationForm = reactive({
    customerName: "",
    customerId: "",
        customerPrivatePoolId: "",
    followUpMethod: "",
    followUpLevel: "",
    followUpTime: "",
@@ -726,7 +728,7 @@
    },
    {
      label: "地址及联系方式",
      prop: "addressPhone",
      prop: "companyAddress",
      width: 250,
    },
    {
@@ -766,6 +768,24 @@
    {
      label: "维护人",
      prop: "maintainer",
    },
    {
      label: "客户来源",
      prop: "type",
      dataType: "tag",
      width: 100,
      formatData: value => {
        if (value === 1 || value === "1") {
          return "公海";
        }
        return "私海";
      },
      formatType: value => {
        if (value === 1 || value === "1") {
          return "warning";
        }
        return "success";
      },
    },
    {
      label: "维护时间",
@@ -881,7 +901,7 @@
    // 设置上传的请求头部
    headers: { Authorization: "Bearer " + getToken() },
    // 上传的地址
    url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
    url: import.meta.env.VITE_APP_BASE_API + "/customerPrivate/importData",
    // 文件上传前的回调
    beforeUpload: file => {
      console.log("文件即将上传", file);
@@ -952,10 +972,10 @@
  };
  const getList = () => {
    tableLoading.value = true;
    listCustomer({ ...searchForm.value, ...page }).then(res => {
    listCustomerPrivatePool({ ...searchForm.value, ...page }).then(res => {
      tableLoading.value = false;
      tableData.value = res.records;
      page.total = res.total;
      tableData.value = res.data.records;
      page.total = res.data.total;
    });
  };
  // 表格选择数据
@@ -974,7 +994,7 @@
  }
  /** 下载模板 */
  function importTemplate() {
    proxy.download("/basic/customer/downloadTemplate", {}, "客户导入模板.xlsx");
    proxy.download("/customerPrivate/downloadTemplate", {}, "客户导入模板.xlsx");
  }
  // 打开弹框
  const openForm = (type, row) => {
@@ -992,7 +1012,7 @@
      userList.value = res.data;
    });
    if (type === "edit") {
      getCustomer(row.id).then(res => {
      getCustomerPrivatePoolById(row.id).then(res => {
        form.value = { ...res.data };
        formYYs.value.contactList = res.data.contactPerson
          .split(",")
@@ -1029,7 +1049,7 @@
    form.value.contactPhone = formYYs.value.contactList
      .map(item => item.contactPhone)
      .join(",");
    addCustomer(form.value).then(res => {
    addCustomerPrivate(form.value).then(res => {
      proxy.$modal.msgSuccess("提交成功");
      closeDia();
      getList();
@@ -1043,7 +1063,7 @@
    form.value.contactPhone = formYYs.value.contactList
      .map(item => item.contactPhone)
      .join(",");
    updateCustomer(form.value).then(res => {
    updateCustomerPrivatePool(form.value).then(res => {
      proxy.$modal.msgSuccess("提交成功");
      closeDia();
      getList();
@@ -1062,7 +1082,7 @@
      type: "warning",
    })
      .then(() => {
        proxy.download("/basic/customer/export", {}, "客户档案.xlsx");
        proxy.download("/customerPrivate/export", {}, "客户档案.xlsx");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");
@@ -1072,12 +1092,11 @@
  const handleDelete = () => {
    let ids = [];
    if (selectedRows.value.length > 0) {
      // 检查是否有他人维护的数据
      const unauthorizedData = selectedRows.value.filter(
        item => item.maintainer !== userStore.nickName
        item => item.type === 1 || item.type === "1"
      );
      if (unauthorizedData.length > 0) {
        proxy.$modal.msgWarning("不可删除他人维护的数据");
        proxy.$modal.msgWarning("公海分配的客户不能删除");
        return;
      }
      ids = selectedRows.value.map(item => item.id);
@@ -1092,8 +1111,8 @@
    })
      .then(() => {
        tableLoading.value = true;
        delCustomer(ids)
          .then(res => {
        delCustomerPrivate(ids)
          .then(() => {
            proxy.$modal.msgSuccess("删除成功");
            getList();
          })
@@ -1146,7 +1165,8 @@
        if (reminderForm.id) {
          submitvalue.value = {
            id: reminderForm.id,
            customerId: currentCustomerId.value,
                        customerPrivatePoolId: reminderForm.id,
                        customerPrivatePoolId: currentCustomerId.value,
            isEnabled: reminderForm.reminderSwitch ? 1 : 0,
            content: reminderForm.reminderContent,
            reminderTime: reminderForm.reminderTime,
@@ -1154,15 +1174,13 @@
          };
        } else {
          submitvalue.value = {
            customerId: currentCustomerId.value,
                        customerPrivatePoolId: currentCustomerId.value,
            isEnabled: reminderForm.reminderSwitch ? 1 : 0,
            content: reminderForm.reminderContent,
            reminderTime: reminderForm.reminderTime,
            remindUserId: userStore.id,
          };
        }
        console.log("提交回访提醒数据:", submitvalue.value);
        // 调用接口
        addReturnVisit(submitvalue.value)
@@ -1185,20 +1203,12 @@
  // 打开洽谈进度弹窗
  const openNegotiationDialog = row => {
    negotiationForm.customerName = row.customerName;
    negotiationForm.customerId = row.id;
    negotiationForm.customerPrivatePoolId = row.id;
    negotiationForm.followUpMethod = "";
    negotiationForm.followUpLevel = "";
    negotiationForm.followUpTime = "";
    negotiationForm.followerUserName = userStore.nickName; // 默认当前登录人
    negotiationForm.content = "";
    // {
    //     "customerId": 152,
    //     "followUpMethod": "电话沟通",
    //     "followUpLevel": "没有意向",
    //     "followUpTime": "2026-03-04T15:30:00",
    //     "followerUserName": "管理员账号",
    //     "content": "111"
    // }
    negotiationDialogVisible.value = true;
  };
@@ -1220,26 +1230,9 @@
        if (isEdit) {
          // 修改操作
          console.log("修改洽谈进度数据:", negotiationForm);
          // 这里可以调用更新接口
          // 实际项目中需要根据后端接口进行调整
          // 示例:updateCustomerFollow(negotiationForm).then(res => {
          //   // 更新本地数据
          //   const index = negotiationForm.editIndex;
          //   negotiationRecords.value[index] = {
          //     followUpTime: negotiationForm.followUpTime,
          //     followUpMethod: negotiationForm.followUpMethod,
          //     followUpLevel: negotiationForm.followUpLevel,
          //     followerUserName: negotiationForm.followerUserName,
          //     content: negotiationForm.content,
          //     id: negotiationForm.id,
          //   };
          //   proxy.$modal.msgSuccess("修改成功");
          //   closeNegotiationDialog();
          // });
          updateCustomerFollow(negotiationForm).then(res => {
            // 更新本地数据
            getCustomer(negotiationForm.customerId).then(res => {
            getCustomer(negotiationForm.customerPrivatePoolId).then(res => {
              // 更新本地数据
              negotiationRecords.value = res.data.followUpList || [];
            });
@@ -1271,8 +1264,7 @@
  // 打开详情弹窗
  const openDetailDialog = row => {
    // 调用getCustomer接口获取客户详情
    getCustomer(row.id).then(res => {
    getCustomerPrivatePoolInfo(row.id).then(res => {
      // 填充客户基本信息
      Object.assign(detailForm, res.data);
@@ -1293,7 +1285,7 @@
    // 将当前记录数据填充到表单
    Object.assign(negotiationForm, {
      customerName: row.customerName,
      customerId: row.customerId,
            customerPrivatePoolId: row.customerPrivatePoolId,
      followUpMethod: row.followUpMethod,
      followUpLevel: row.followUpLevel,
      followUpTime: row.followUpTime,
@@ -1321,7 +1313,7 @@
        // });
        delCustomerFollow(row.id).then(() => {
          // 删除成功后更新本地数据
          getCustomer(row.customerId).then(res => {
          getCustomer(row.customerPrivatePoolId).then(res => {
            // 更新本地数据
            negotiationRecords.value = res.data.followUpList || [];
          });
src/views/basicData/customerFileOpenSea/index.vue
@@ -215,15 +215,15 @@
                    disabled />
        </el-form-item>
        <el-form-item label="分配人员"
                      prop="maintainer">
          <el-select v-model="assignForm.maintainer"
                      prop="boundId">
          <el-select v-model="assignForm.boundId"
                     placeholder="请选择分配人员"
                     style="width: 100%"
                     filterable>
            <el-option v-for="item in userList"
                       :key="item.userId || item.nickName"
                       :label="item.nickName"
                       :value="item.nickName" />
                       :value="item.userId" />
          </el-select>
        </el-form-item>
      </el-form>
@@ -232,6 +232,42 @@
          <el-button type="primary"
                     @click="submitAssignForm">确认</el-button>
          <el-button @click="closeAssignDialog">取消</el-button>
        </div>
      </template>
    </el-dialog>
    <el-dialog v-model="shareDialogVisible"
               title="共享客户"
               width="500px"
               @close="closeShareDialog">
      <el-form :model="shareForm"
               :rules="shareRules"
               ref="shareFormRef"
               label-width="100px">
        <el-form-item label="客户名称">
          <el-input v-model="shareForm.customerName"
                    disabled />
        </el-form-item>
        <el-form-item label="共享人员"
                      prop="boundIds">
          <el-select v-model="shareForm.boundIds"
                     placeholder="请选择共享人员"
                     style="width: 100%"
                     filterable
                     multiple
                     collapse-tags
                     collapse-tags-tooltip>
            <el-option v-for="item in userList"
                       :key="item.userId || item.nickName"
                       :label="item.nickName"
                       :value="item.userId" />
          </el-select>
        </el-form-item>
      </el-form>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary"
                     @click="submitShareForm">确认</el-button>
          <el-button @click="closeShareDialog">取消</el-button>
        </div>
      </template>
    </el-dialog>
@@ -646,8 +682,11 @@
  import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
  import {
    addCustomer,
    addCustomerPrivatePool,
    delCustomerPrivatePool,
    delCustomer,
    getCustomer,
    shareCustomer,
    listCustomer,
    updateCustomer,
    addCustomerFollow,
@@ -667,10 +706,20 @@
  const assignForm = reactive({
    id: undefined,
    customerName: "",
    maintainer: "",
    boundId: undefined,
  });
  const assignRules = {
    maintainer: [{ required: true, message: "请选择分配人员", trigger: "change" }],
    boundId: [{ required: true, message: "请选择分配人员", trigger: "change" }],
  };
  const shareDialogVisible = ref(false);
  const shareFormRef = ref();
  const shareForm = reactive({
    id: undefined,
    customerName: "",
    boundIds: [],
  });
  const shareRules = {
    boundIds: [{ required: true, message: "请选择共享人员", trigger: "change" }],
  };
  // 回访提醒相关
@@ -781,16 +830,16 @@
      prop: "contactPhone",
      width: 150,
    },
    {
      label: "跟进进度",
      prop: "followUpLevel",
      width: 120,
    },
    {
      label: "跟进时间",
      prop: "followUpTime",
      width: 120,
    },
    // {
    //   label: "跟进进度",
    //   prop: "followUpLevel",
    //   width: 120,
    // },
    // {
    //   label: "跟进时间",
    //   prop: "followUpTime",
    //   width: 120,
    // },
    {
      label: "银行基本户",
      prop: "basicBankAccount",
@@ -810,22 +859,53 @@
      label: "维护人",
      prop: "maintainer",
    },
        {
            label: "维护时间",
            prop: "maintenanceTime",
            width: 100,
        },
    {
      label: "维护时间",
      prop: "maintenanceTime",
      width: 100,
      label: "领用人",
      prop: "usageUserName",
      width: 120,
            fixed: "right",
    },
    {
      label: "领用状态",
      prop: "usageStatus",
      dataType: "tag",
      width: 100,
            fixed: "right",
      formatData: value => {
        if (value === 1 || value === "1") {
          return "已领用";
        }
        return "未领用";
      },
      formatType: value => {
        if (value === 1 || value === "1") {
          return "success";
        }
        return "info";
      },
    },
        {
            label: "共享人",
            prop: "togetherUserNames",
            width: 120,
            fixed: "right",
        },
    {
      dataType: "action",
      label: "操作",
      align: "center",
      fixed: "right",
      width: 320,
      width: 200,
      operation: [
        {
          name: "分配",
          type: "text",
          showHide: row => !row.maintainer,
          showHide: row => row.usageStatus != 1,
          clickFun: row => {
            openAssignDialog(row);
          },
@@ -833,11 +913,19 @@
        {
          name: "回收",
          type: "text",
          showHide: row => !!row.maintainer,
          showHide: row => row.usageStatus == 1,
          clickFun: row => {
            recycleCustomer(row);
          },
        },
                {
                    name: "共享",
                    type: "text",
                    showHide: row => row.usageStatus == 1,
                    clickFun: row => {
                        openShareDialog(row);
                    },
                },
                {
                    name: "编辑",
                    type: "text",
@@ -845,13 +933,13 @@
                        openForm("edit", row);
                    },
                },
        {
          name: "详情",
          type: "text",
          clickFun: row => {
            openDetailDialog(row);
          },
        },
        // {
        //   name: "详情",
        //   type: "text",
        //   clickFun: row => {
        //     openDetailDialog(row);
        //   },
        // },
      ],
    },
  ]);
@@ -997,10 +1085,11 @@
  };
  const getList = () => {
    tableLoading.value = true;
    listCustomer({ ...searchForm.value, ...page }).then(res => {
    const { total, ...queryPage } = page;
    listCustomer({ ...searchForm.value, ...queryPage }).then(res => {
      tableLoading.value = false;
      tableData.value = res.records;
      page.total = res.total;
      tableData.value = res.data.records;
      page.total = res.data.total;
    });
  };
  // 表格选择数据
@@ -1110,7 +1199,7 @@
  const openAssignDialog = row => {
    assignForm.id = row.id;
    assignForm.customerName = row.customerName;
    assignForm.maintainer = row.maintainer || "";
    assignForm.boundId = undefined;
    ensureUserList().then(() => {
      assignDialogVisible.value = true;
    });
@@ -1119,21 +1208,50 @@
    proxy.resetForm("assignFormRef");
    assignForm.id = undefined;
    assignForm.customerName = "";
    assignForm.maintainer = "";
    assignForm.boundId = undefined;
    assignDialogVisible.value = false;
  };
  const openShareDialog = row => {
    shareForm.id = row.id;
    shareForm.customerName = row.customerName;
    shareForm.boundIds = [];
    ensureUserList().then(() => {
      shareDialogVisible.value = true;
    });
  };
  const closeShareDialog = () => {
    proxy.resetForm("shareFormRef");
    shareForm.id = undefined;
    shareForm.customerName = "";
    shareForm.boundIds = [];
    shareDialogVisible.value = false;
  };
  const submitAssignForm = () => {
    proxy.$refs.assignFormRef.validate(valid => {
      if (!valid) {
        return;
      }
      updateCustomer({
        id: assignForm.id,
        maintainer: assignForm.maintainer,
        maintenanceTime: getCurrentDate(),
      addCustomerPrivatePool({
        customerId: assignForm.id,
        boundId: assignForm.boundId,
      }).then(() => {
        proxy.$modal.msgSuccess("分配成功");
        closeAssignDialog();
        getList();
      });
    });
  };
  const submitShareForm = () => {
    proxy.$refs.shareFormRef.validate(valid => {
      if (!valid) {
        return;
      }
      shareCustomer({
        customerId: shareForm.id,
        boundIds: shareForm.boundIds,
      }).then(() => {
        proxy.$modal.msgSuccess("共享成功");
        closeShareDialog();
        getList();
      });
    });
@@ -1145,11 +1263,7 @@
      type: "warning",
    })
      .then(() => {
        return updateCustomer({
          id: row.id,
          maintainer: "",
          maintenanceTime: "",
        });
        return delCustomerPrivatePool(row.id);
      })
      .then(() => {
        proxy.$modal.msgSuccess("回收成功");
src/views/salesManagement/salesLedger/index.vue
@@ -42,7 +42,7 @@
        <el-table-column align="center" type="selection" width="55" fixed="left"/>
        <el-table-column type="expand" width="60" fixed="left">
          <template #default="props">
            <el-table :data="props.row.children" border show-summary :summary-method="summarizeChildrenTable">
            <el-table :data="props.row.children" border show-summary :summary-method="(param) => summarizeChildrenTable(param, props.row)">
              <el-table-column align="center" label="序号" type="index"/>
              <el-table-column label="产品大类" prop="productCategory" />
              <el-table-column label="规格型号" prop="specificationModel" />
@@ -89,9 +89,9 @@
              </el-table-column>
              <el-table-column label="数量" prop="quantity" />
              <el-table-column label="税率(%)" prop="taxRate" />
              <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="formattedNumber" />
              <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="formattedNumber" />
              <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="formattedNumber" />
              <el-table-column label="含税单价(元)" prop="taxInclusiveUnitPrice" :formatter="sensitiveAmountFormatter" />
              <el-table-column label="含税总价(元)" prop="taxInclusiveTotalPrice" :formatter="sensitiveAmountFormatter" />
              <el-table-column label="不含税总价(元)" prop="taxExclusiveTotalPrice" :formatter="sensitiveAmountFormatter" />
            <!--操作-->
              <el-table-column Width="60px" label="操作" align="center">
                <template #default="scope">
@@ -122,7 +122,7 @@
        <el-table-column label="备注" prop="remarks" width="200" show-overflow-tooltip />
        <el-table-column fixed="right" label="操作" width="130" align="center">
          <template #default="scope">
            <el-button link type="primary" @click="openForm('edit', scope.row)" :disabled="!scope.row.isEdit || scope.row.hasProductionRecord">编辑</el-button>
            <el-button link type="primary" @click="openForm('edit', scope.row)" :disabled="!scope.row.isEdit || scope.row.hasProductionRecord || !canEditLedger(scope.row)">编辑</el-button>
            <el-button link type="primary" @click="downLoadFile(scope.row)">附件</el-button>
          </template>
        </el-table-column>
@@ -674,6 +674,7 @@
import useFormData from "@/hooks/useFormData.js";
import dayjs from "dayjs";
import { getCurrentDate } from "@/utils/index.js";
import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
@@ -923,7 +924,48 @@
    });
};
const formattedNumber = (row, column, cellValue) => {
    if (cellValue === undefined || cellValue === null || cellValue === "") {
        return "0.00";
    }
    return parseFloat(cellValue).toFixed(2);
};
const findLedgerRecordByRow = (row) => {
    if (!row) return null;
    if (
        row.maintainer !== undefined ||
        row.maintainerName !== undefined ||
        row.entryPerson !== undefined ||
        row.entryPersonName !== undefined
    ) {
        return row;
    }
    if (row.salesLedgerId !== undefined && row.salesLedgerId !== null) {
        return tableData.value.find((item) => String(item.id) === String(row.salesLedgerId)) || null;
    }
    return null;
};
const isCurrentUserMaintainer = (row) => {
    const ledgerRecord = findLedgerRecordByRow(row);
    if (!ledgerRecord) return true;
    const currentUserId = String(userStore.id ?? "");
    const currentNickName = String(userStore.nickName ?? "").trim();
    const maintainerId = ledgerRecord.maintainerId ?? ledgerRecord.entryPerson;
    const maintainerName =
        ledgerRecord.maintainerName ?? ledgerRecord.maintainer ?? ledgerRecord.entryPersonName;
    if (maintainerId !== undefined && maintainerId !== null && String(maintainerId) !== "") {
        return String(maintainerId) === currentUserId;
    }
    if (maintainerName !== undefined && maintainerName !== null && String(maintainerName).trim() !== "") {
        return String(maintainerName).trim() === currentNickName;
    }
    return true;
};
const canEditLedger = (row) => isCurrentUserMaintainer(row);
const sensitiveAmountFormatter = (row, column, cellValue) => {
    if (!isCurrentUserMaintainer(row)) {
        return "*****";
    }
    return formattedNumber(row, column, cellValue);
};
// 获取tree子数据
const getModels = (value) => {
@@ -1038,7 +1080,19 @@
    ]);
};
// 子表合计方法
const summarizeChildrenTable = (param) => {
const summarizeChildrenTable = (param, parentRow) => {
    if (!isCurrentUserMaintainer(parentRow)) {
        const { columns } = param;
        return columns.map((column, index) => {
            if (index === 0) {
                return "合计";
            }
            if (["taxInclusiveUnitPrice", "taxInclusiveTotalPrice", "taxExclusiveTotalPrice"].includes(column.property)) {
                return "*****";
            }
            return "";
        });
    }
    return proxy.summarizeTable(param, [
        "taxInclusiveUnitPrice",
        "taxInclusiveTotalPrice",
@@ -1047,14 +1101,18 @@
};
// 打开弹框
const openForm = async (type, row) => {
    if (type === "edit" && row && !canEditLedger(row)) {
        proxy.$modal.msgWarning("当前系统登录人不是维护人,不能编辑数据");
        return;
    }
    operationType.value = type;
    form.value = {};
    productData.value = [];
    selectedQuotation.value = null;
    let userLists = await userListNoPage();
    userList.value = userLists.data;
    customerList().then((res) => {
        customerOption.value = res;
    listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
        customerOption.value = res.data.records;
    });
    form.value.entryPerson = userStore.id;
    if (type === "add") {
@@ -1090,8 +1148,9 @@
    // 先确保客户列表已加载,便于后续回填 customerId
    if (!customerOption.value || customerOption.value.length === 0) {
        try {
            const res = await customerList();
            customerOption.value = res;
            listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
                customerOption.value = res.data.records;
            });
        } catch (e) {
            // ignore,允许用户后续手动选择客户
        }
src/views/salesManagement/salesQuotation/index.vue
@@ -360,6 +360,7 @@
import {userListNoPage} from "@/api/system/user.js";
import {customerList} from "@/api/salesManagement/salesLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
// 响应式数据
const loading = ref(false)
@@ -489,8 +490,8 @@
    userName: item.userName || ''
  }));
    getProductOptions();
    customerList().then((res) => {
        customerOption.value = res;
    listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
        customerOption.value = res.data.records;
    });
}
const getProductOptions = () => {