From 0b25e55e1639b921c01156a7f13e2cb83b6b8773 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期四, 11 六月 2026 16:47:10 +0800
Subject: [PATCH] fix: 注释客户洽谈进度
---
src/views/basicData/customerFile/index.vue | 142 ++++++++++++++++++++++++++++++-----------------
1 files changed, 91 insertions(+), 51 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 66ef08d..237b6ce 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -1,6 +1,7 @@
<template>
<div class="app-container">
- <div class="search_form" style="margin-bottom: 20px;">
+ <div class="search_form"
+ style="margin-bottom: 20px;">
<div>
<span class="search_title">瀹㈡埛鍚嶇О锛�</span>
<el-input v-model="searchForm.customerName"
@@ -27,6 +28,9 @@
<div>
<el-button type="primary"
@click="openForm('add')">鏂板瀹㈡埛</el-button>
+ <el-button type="primary"
+ plain
+ @click="back">娴佸叆鍏捣</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
<el-button type="info"
plain
@@ -211,7 +215,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"
@@ -276,7 +281,8 @@
</el-form>
<template #footer>
<div class="dialog-footer">
- <el-button type="primary" @click="submitReminderForm">纭</el-button>
+ <el-button type="primary"
+ @click="submitReminderForm">纭</el-button>
<el-button @click="closeReminderDialog">鍙栨秷</el-button>
</div>
</template>
@@ -359,7 +365,8 @@
</el-form>
<template #footer>
<div class="dialog-footer">
- <el-button type="primary" @click="submitNegotiationForm">纭</el-button>
+ <el-button type="primary"
+ @click="submitNegotiationForm">纭</el-button>
<el-button @click="closeNegotiationDialog">鍙栨秷</el-button>
</div>
</template>
@@ -460,14 +467,9 @@
</div>
</div>
<!-- 娲借皥杩涘害璁板綍 -->
- <div class="detail-section">
+ <!-- <div class="detail-section">
<div class="section-header">
<h3 class="section-title">娲借皥杩涘害璁板綍</h3>
- <el-button type="primary"
- size="small"
- @click="openNegotiationDialog(detailForm)">
- 娣诲姞杩涘害
- </el-button>
</div>
<el-table :data="negotiationRecords"
border
@@ -497,7 +499,6 @@
<Paperclip />
</el-icon>
闄勪欢
- <!-- {{ row.fileList && row.fileList.length > 0 ? row.fileList.length : '涓婁紶' }} -->
</el-button>
</template>
</el-table-column>
@@ -522,7 +523,7 @@
class="no-records">
鏆傛棤娲借皥杩涘害璁板綍
</div>
- </div>
+ </div> -->
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDetailDialog">鍏抽棴</el-button>
@@ -612,14 +613,20 @@
import { onMounted, ref, reactive, getCurrentInstance, toRefs } from "vue";
import { Search, Paperclip, Upload } from "@element-plus/icons-vue";
import {
- delCustomerPrivate,
addCustomerFollow,
updateCustomerFollow,
delCustomerFollow,
addReturnVisit,
getReturnVisit,
} from "@/api/basicData/customerFile.js";
- import {listCustomer, getCustomer, addCustomer, updateCustomer, delCustomer} from "@/api/basicData/customer.js";
+ import {
+ listCustomer,
+ getCustomer,
+ addCustomer,
+ updateCustomer,
+ delCustomer,
+ backCustomer,
+ } from "@/api/basicData/customer.js";
import { ElMessageBox } from "element-plus";
import { userListNoPage } from "@/api/system/user.js";
import useUserStore from "@/store/modules/user";
@@ -651,7 +658,7 @@
const negotiationFormRef = ref();
const negotiationForm = reactive({
customerName: "",
- customerId: "",
+ customerId: "",
followUpMethod: "",
followUpLevel: "",
followUpTime: "",
@@ -735,16 +742,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",
@@ -764,7 +771,7 @@
label: "缁存姢浜�",
prop: "maintainer",
},
- {
+ /*{
label: "瀹㈡埛鏉ユ簮",
prop: "type",
dataType: "tag",
@@ -781,7 +788,7 @@
}
return "success";
},
- },
+ },*/
{
label: "缁存姢鏃堕棿",
prop: "maintenanceTime",
@@ -801,27 +808,27 @@
openForm("edit", row);
},
},
- {
- name: "娣诲姞娲借皥杩涘害",
- type: "text",
- clickFun: row => {
- openNegotiationDialog(row);
- },
- },
+ // {
+ // name: "娣诲姞娲借皥杩涘害",
+ // type: "text",
+ // clickFun: row => {
+ // openNegotiationDialog(row);
+ // },
+ // },
+ // {
+ // name: "鍥炶鎻愰啋",
+ // type: "text",
+ // clickFun: row => {
+ // openReminderDialog(row);
+ // },
+ // },
{
- name: "鍥炶鎻愰啋",
+ name: "璇︽儏",
type: "text",
clickFun: row => {
- openReminderDialog(row);
+ openDetailDialog(row);
},
},
- {
- name: "璇︽儏",
- type: "text",
- clickFun: row => {
- openDetailDialog(row);
- },
- },
],
},
]);
@@ -852,7 +859,7 @@
searchForm: {
customerName: "",
customerType: "",
- type: 0
+ type: 0,
},
form: {
customerName: "",
@@ -867,7 +874,7 @@
bankAccount: "",
bankCode: "",
customerType: "",
- type: 0
+ type: 0,
},
rules: {
customerName: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
@@ -898,7 +905,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 +1001,7 @@
}
/** 涓嬭浇妯℃澘 */
function importTemplate() {
- proxy.download("/customerPrivate/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
+ proxy.download("/basic/customer/downloadTemplate", {}, "瀹㈡埛瀵煎叆妯℃澘.xlsx");
}
// 鎵撳紑寮规
const openForm = (type, row) => {
@@ -1080,7 +1090,7 @@
type: "warning",
})
.then(() => {
- proxy.download("/customerPrivate/export", {}, "瀹㈡埛妗f.xlsx");
+ proxy.download("/basic/customer/export", { type: 0 }, "瀹㈡埛妗f.xlsx");
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
@@ -1120,6 +1130,36 @@
})
.catch(() => {
proxy.$modal.msg("宸插彇娑�");
+ });
+ };
+
+ const back = () => {
+ if (selectedRows.value.length === 0) {
+ proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
+ return;
+ }
+ const ids = selectedRows.value.map(item => item.id);
+ ElMessageBox.confirm("閫変腑鐨勫鎴峰皢娴佸叆鍏捣锛屾槸鍚︾‘璁わ紵", "娴佸叆鍏捣鎻愮ず", {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ })
+ .then(() => {
+ tableLoading.value = true;
+ return Promise.all(ids.map(id => backCustomer(id)))
+ .then(() => {
+ proxy.$modal.msgSuccess("娴佸叆鍏捣鎴愬姛");
+ selectedRows.value = [];
+ getList();
+ })
+ .finally(() => {
+ tableLoading.value = false;
+ });
+ })
+ .catch(error => {
+ if (error === "cancel" || error === "close") {
+ proxy.$modal.msg("宸插彇娑�");
+ }
});
};
@@ -1163,7 +1203,7 @@
if (reminderForm.id) {
submitvalue.value = {
id: reminderForm.id,
- customerId: currentCustomerId.value,
+ customerId: currentCustomerId.value,
isEnabled: reminderForm.reminderSwitch ? 1 : 0,
content: reminderForm.reminderContent,
reminderTime: reminderForm.reminderTime,
@@ -1282,7 +1322,7 @@
// 灏嗗綋鍓嶈褰曟暟鎹~鍏呭埌琛ㄥ崟
Object.assign(negotiationForm, {
customerName: row.customerName,
- customerId: row.customerId,
+ customerId: row.customerId,
followUpMethod: row.followUpMethod,
followUpLevel: row.followUpLevel,
followUpTime: row.followUpTime,
@@ -1410,7 +1450,7 @@
const downloadAttachment = row => {
if (row.url) {
// proxy.download(row.url, {}, row.name);
- proxy.$download.name(row.url);
+ proxy.$download.byUrl(row.url, row.originalFilename);
} else {
proxy.$modal.msgError("涓嬭浇閾炬帴涓嶅瓨鍦�");
}
--
Gitblit v1.9.3