huminmin
2 天以前 fb1276b796c5212c18141fe2c732fb07d71fa31e
src/views/basicData/customerFileOpenSea/index.vue
@@ -681,20 +681,23 @@
  import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
  import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
  import {
    addCustomer,
    addCustomerPrivatePool,
    delCustomerPrivatePool,
    delCustomer,
    getCustomer,
    shareCustomer,
    listCustomer,
    updateCustomer,
    addCustomerFollow,
    updateCustomerFollow,
    delCustomerFollow,
    addReturnVisit,
    getReturnVisit,
  } from "@/api/basicData/customerFile.js";
  import {
    listCustomer,
    addCustomer,
    delCustomer,
    updateCustomer,
    getCustomer,
    assignCustomer,
    recycleCustomer
  } from "@/api/basicData/customer.js";
  import { ElMessageBox } from "element-plus";
  import { userListNoPage } from "@/api/system/user.js";
  import useUserStore from "@/store/modules/user";
@@ -915,7 +918,7 @@
          type: "text",
          showHide: row => row.usageStatus == 1,
          clickFun: row => {
            recycleCustomer(row);
            recycle(row);
          },
        },
            {
@@ -970,6 +973,7 @@
    searchForm: {
      customerName: "",
      customerType: "",
      type: 1
    },
    form: {
      customerName: "",
@@ -984,6 +988,7 @@
      bankAccount: "",
      bankCode: "",
      customerType: "",
      type: 1
    },
    rules: {
      customerName: [{ required: true, message: "请输入", trigger: "blur" }],
@@ -1122,6 +1127,7 @@
      },
    ];
    form.value.maintenanceTime = getCurrentDate();
    form.value.type = 1;
    userListNoPage().then(res => {
      userList.value = res.data;
    });
@@ -1231,9 +1237,9 @@
      if (!valid) {
        return;
      }
      addCustomerPrivatePool({
        customerId: assignForm.id,
        boundId: assignForm.boundId,
      assignCustomer({
        id: assignForm.id,
        usageUser: assignForm.boundId,
      }).then(() => {
        proxy.$modal.msgSuccess("分配成功");
        closeAssignDialog();
@@ -1256,18 +1262,17 @@
      });
    });
  };
  const recycleCustomer = row => {
  const recycle = row => {
    ElMessageBox.confirm("确认回收客户“" + row.customerName + "”吗?", "回收提示", {
      confirmButtonText: "确认",
      cancelButtonText: "取消",
      type: "warning",
    })
      .then(() => {
        return delCustomerPrivatePool(row.id);
      })
      .then(() => {
        proxy.$modal.msgSuccess("回收成功");
        getList();
        return recycleCustomer({id: row.id}).then(() => {
          proxy.$modal.msgSuccess("回收成功");
          getList();
        })
      })
      .catch(error => {
        if (error === "cancel" || error === "close") {