From 984b1ad87807a7053638e50d5f0b905b400077ca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 22 四月 2026 11:32:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_阳光印刷' into dev_天津_阳光印刷
---
src/views/basicData/customerFile/index.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index cc6590c..64618be 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -32,6 +32,9 @@
plain
icon="Upload"
@click="handleImport">瀵煎叆</el-button>
+ <el-button type="warning"
+ plain
+ @click="handleSyncPublic">鍚屾鍏捣</el-button>
<el-button type="danger"
plain
@click="handleDelete">鍒犻櫎</el-button>
@@ -670,6 +673,7 @@
delCustomerFollow,
addReturnVisit,
getReturnVisit,
+ throwCustomer,
} from "@/api/basicData/customerFile.js";
import { ElMessageBox } from "element-plus";
import { userListNoPage } from "@/api/system/user.js";
@@ -1221,6 +1225,51 @@
});
};
+ // 鍚屾鍏捣 - 灏嗛�変腑鐨勫鎴锋墧鍥炲叕娴�
+ const handleSyncPublic = () => {
+ if (selectedRows.value.length === 0) {
+ proxy.$modal.msgWarning("璇烽�夋嫨瑕佸悓姝ョ殑瀹㈡埛");
+ return;
+ }
+ // 妫�鏌ユ槸鍚︽湁鍏捣绫诲瀷鐨勫鎴�
+ const publicSeaData = selectedRows.value.filter(
+ item => item.type === 1 || item.type === "1"
+ );
+ if (publicSeaData.length > 0) {
+ const names = publicSeaData.map(item => item.customerName).join("銆�");
+ proxy.$modal.msgWarning(`鍏捣瀹㈡埛涓嶈兘鍚屾锛�${names}`);
+ return;
+ }
+ const ids = selectedRows.value.map(item => item.id);
+ const customerNames = selectedRows.value.map(item => item.customerName).join("銆�");
+ const confirmText = selectedRows.value.length === 1
+ ? `纭畾瑕佸皢瀹㈡埛銆�${customerNames}銆戝悓姝ュ埌鍏捣鍚楋紵`
+ : `纭畾瑕佸皢閫変腑鐨� ${selectedRows.value.length} 涓鎴峰悓姝ュ埌鍏捣鍚楋紵\n\n瀹㈡埛锛�${customerNames}`;
+ ElMessageBox.confirm(
+ confirmText,
+ "鍚屾鎻愮ず",
+ {
+ confirmButtonText: "纭",
+ cancelButtonText: "鍙栨秷",
+ type: "warning",
+ }
+ )
+ .then(() => {
+ tableLoading.value = true;
+ throwCustomer(ids)
+ .then(() => {
+ proxy.$modal.msgSuccess("鍚屾鍏捣鎴愬姛");
+ getList();
+ })
+ .finally(() => {
+ tableLoading.value = false;
+ });
+ })
+ .catch(() => {
+ proxy.$modal.msg("宸插彇娑�");
+ });
+ };
+
// 鎵撳紑鍥炶鎻愰啋寮圭獥
const openReminderDialog = row => {
currentCustomerId.value = row.id;
--
Gitblit v1.9.3