huminmin
11 小时以前 ef3aab90e71b07ff22ecc40a0a49236b371c04cd
优化营销客户相关
已修改6个文件
118 ■■■■ 文件已修改
src/api/basicData/customerFile.js 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/customerFile/index.vue 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/basicData/customerFileOpenSea/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/returnOrder/components/formDia.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesLedger/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/salesManagement/salesQuotation/index.vue 17 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/basicData/customerFile.js
@@ -1,75 +1,5 @@
import request from '@/utils/request'
// 客户档案私海查询
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 getCustomerPrivatePoolById(id) {
    return request({
        url: '/customerPrivatePool/getbyId/' + id,
        method: 'get'
    })
}
export function getCustomerPrivatePoolInfo(id) {
    return request({
        url: '/customerPrivatePool/info/' + id,
        method: 'get'
    })
}
export function updateCustomerPrivatePool(data) {
    return request({
        url: '/customerPrivatePool/update',
        method: 'put',
        data: data
    })
}
export function addCustomerFollow(data) {
    return request({
        url: '/basic/customer-follow/add',
src/views/basicData/customerFile/index.vue
@@ -211,7 +211,8 @@
                 :limit="1"
                 accept=".xlsx, .xls"
                 :headers="upload.headers"
                 :action="upload.url + '?updateSupport=' + upload.updateSupport"
                 :action="upload.url"
                 :data="upload.data"
                 :disabled="upload.isUploading"
                 :before-upload="upload.beforeUpload"
                 :on-progress="upload.onProgress"
@@ -612,7 +613,6 @@
  import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
  import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
  import {
    delCustomerPrivate,
    addCustomerFollow,
    updateCustomerFollow,
    delCustomerFollow,
@@ -898,7 +898,10 @@
    // 设置上传的请求头部
    headers: { Authorization: "Bearer " + getToken() },
    // 上传的地址
    url: import.meta.env.VITE_APP_BASE_API + "/customerPrivate/importData",
    url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
    data: {
      type: 0
    },
    // 文件上传前的回调
    beforeUpload: file => {
      console.log("文件即将上传", file);
@@ -991,7 +994,7 @@
  }
  /** 下载模板 */
  function importTemplate() {
    proxy.download("/customerPrivate/downloadTemplate", {}, "客户导入模板.xlsx");
    proxy.download("/basic/customer/downloadTemplate", {}, "客户导入模板.xlsx");
  }
  // 打开弹框
  const openForm = (type, row) => {
@@ -1080,7 +1083,7 @@
      type: "warning",
    })
      .then(() => {
        proxy.download("/customerPrivate/export", {}, "客户档案.xlsx");
        proxy.download("/basic/customer/export", {type: 0}, "客户档案.xlsx");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");
src/views/basicData/customerFileOpenSea/index.vue
@@ -280,7 +280,8 @@
                 :limit="1"
                 accept=".xlsx, .xls"
                 :headers="upload.headers"
                 :action="upload.url + '?updateSupport=' + upload.updateSupport"
                 :action="upload.url"
                 :data="upload.data"
                 :disabled="upload.isUploading"
                 :before-upload="upload.beforeUpload"
                 :on-progress="upload.onProgress"
@@ -1020,6 +1021,9 @@
    headers: { Authorization: "Bearer " + getToken() },
    // 上传的地址
    url: import.meta.env.VITE_APP_BASE_API + "/basic/customer/importData",
    data: {
      type: 1
    },
    // 文件上传前的回调
    beforeUpload: file => {
      console.log("文件即将上传", file);
@@ -1288,7 +1292,7 @@
      type: "warning",
    })
      .then(() => {
        proxy.download("/basic/customer/export", {}, "客户档案.xlsx");
        proxy.download("/basic/customer/export", {type: 1}, "客户档案.xlsx");
      })
      .catch(() => {
        proxy.$modal.msg("已取消");
src/views/salesManagement/returnOrder/components/formDia.vue
@@ -171,7 +171,7 @@
import useUserStore from "@/store/modules/user.js";
import { userListNoPageByTenantId } from "@/api/system/user.js";
import { listProject } from "@/api/oaSystem/projectManagement.js";
import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
import {listCustomer} from "@/api/basicData/customer.js";
const { proxy } = getCurrentInstance();
const emit = defineEmits(['close'])
@@ -354,7 +354,7 @@
};
const initCustomers = async () => {
    listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
        customerNameOptions.value = res.data.records.map(item => ({
            label: item.customerName,
            value: item.customerName, // Keep value as name if needed for other logic, but request says customerId
src/views/salesManagement/salesLedger/index.vue
@@ -632,7 +632,7 @@
import useFormData from "@/hooks/useFormData.js";
import dayjs from "dayjs";
import { getCurrentDate } from "@/utils/index.js";
import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
import {listCustomer} from "@/api/basicData/customer.js";
const userStore = useUserStore();
const { proxy } = getCurrentInstance();
@@ -1060,7 +1060,7 @@
    selectedQuotation.value = null;
    let userLists = await userListNoPage();
    userList.value = userLists.data;
    listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
        customerOption.value = res.data.records;
    });
    form.value.entryPerson = userStore.id;
@@ -1097,7 +1097,7 @@
    // 先确保客户列表已加载,便于后续回填 customerId
    if (!customerOption.value || customerOption.value.length === 0) {
        try {
            listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
            listCustomer({current: -1,size:-1, type: 0}).then((res) => {
                customerOption.value = res.data.records;
            });
        } catch (e) {
src/views/salesManagement/salesQuotation/index.vue
@@ -16,8 +16,8 @@
          </el-input>
        </el-col>
        <el-col :span="8">
          <el-select v-model="searchForm.customer" placeholder="请选择客户" clearable>
                        <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.customerName">
          <el-select v-model="searchForm.customerId" placeholder="请选择客户" clearable>
                        <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id">
                            {{
                                item.customerName + "——" + item.taxpayerIdentificationNumber
                            }}
@@ -102,8 +102,8 @@
          <div class="form-content">
            <el-row :gutter="24">
              <el-col :span="12">
                <el-form-item label="客户名称" prop="customer">
                  <el-select v-model="form.customer" placeholder="请选择客户" style="width: 100%" clearable filterable>
                <el-form-item label="客户名称" prop="customerId">
                  <el-select v-model="form.customerId" placeholder="请选择客户" style="width: 100%" clearable filterable>
                    <el-option v-for="item in customerOption" :key="item.id" :label="item.customerName" :value="item.id"></el-option>
                  </el-select>
                </el-form-item>
@@ -302,14 +302,14 @@
import {getQuotationList,addQuotation,updateQuotation,deleteQuotation} from '@/api/salesManagement/salesQuotation.js'
import {customerList} from "@/api/salesManagement/salesLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {listCustomerPrivatePool} from "@/api/basicData/customerFile.js";
import {listCustomer} from "@/api/basicData/customer.js";
import { userListNoPage } from "@/api/system/user.js";
// 响应式数据
const loading = ref(false)
const searchForm = reactive({
  quotationNo: '',
  customer: '',
  customerId: '',
  status: ''
})
@@ -328,7 +328,7 @@
const dialogTitle = ref('新增报价')
const form = reactive({
  quotationNo: '',
  customer: '',
  customerId: '',
  salesperson: '',
  quotationDate: '',
  validDate: '',
@@ -407,7 +407,7 @@
  resetForm()
  dialogVisible.value = true
  getProductOptions();
  listCustomerPrivatePool({current: -1,size:-1}).then((res) => {
  listCustomer({current: -1,size:-1, type: 0}).then((res) => {
    customerOption.value = res.data.records;
  });
}
@@ -686,6 +686,7 @@
        return sum + price
      }, 0)
      form.customer = customerOption.value.find(item => item.id === form.customerId)?.customerName || ''
      if (isEdit.value) {
        // 编辑
        const index = quotationList.value.findIndex(item => item.id === editId.value)