From 93b747cf50fc3df5056554b4ef2c823eab55f7ff Mon Sep 17 00:00:00 2001
From: zhang_nuo <zhang_12370@163.com>
Date: 星期五, 28 八月 2026 23:10:32 +0800
Subject: [PATCH] fix[monitor/operlog]: 修正操作日志日期格式并隐藏请求参数
---
src/views/basicData/customerFile/index.vue | 102 +++++++++++++++++++++++++++++++++++++-------------
1 files changed, 75 insertions(+), 27 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index a080bd9..c343053 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -27,6 +27,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
@@ -619,7 +622,7 @@
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";
@@ -735,16 +738,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",
@@ -792,29 +795,34 @@
label: "鎿嶄綔",
align: "center",
fixed: "right",
- width: 290,
+ width: 130,
operation: [
{
name: "缂栬緫",
type: "text",
+ showHide: row => !isCustomerEditLocked(row),
clickFun: row => {
+ if (isCustomerEditLocked(row)) {
+ proxy.$modal.msgWarning("宸茶閿�鍞ā鍧楀紩鐢ㄧ殑绉佹捣瀹㈡埛涓嶈兘缂栬緫");
+ return;
+ }
openForm("edit", row);
},
},
- {
- name: "娣诲姞娲借皥杩涘害",
- type: "text",
- clickFun: row => {
- openNegotiationDialog(row);
- },
- },
- {
- name: "鍥炶鎻愰啋",
- type: "text",
- clickFun: row => {
- openReminderDialog(row);
- },
- },
+ // {
+ // name: "娣诲姞娲借皥杩涘害",
+ // type: "text",
+ // clickFun: row => {
+ // openNegotiationDialog(row);
+ // },
+ // },
+ // {
+ // name: "鍥炶鎻愰啋",
+ // type: "text",
+ // clickFun: row => {
+ // openReminderDialog(row);
+ // },
+ // },
{
name: "璇︽儏",
type: "text",
@@ -998,6 +1006,10 @@
}
// 鎵撳紑寮规
const openForm = (type, row) => {
+ if (type === "edit" && isCustomerEditLocked(row)) {
+ proxy.$modal.msgWarning("宸茶閿�鍞ā鍧楀紩鐢ㄧ殑绉佹捣瀹㈡埛涓嶈兘缂栬緫");
+ return;
+ }
operationType.value = type;
form.value = {};
form.value.maintainer = userStore.nickName;
@@ -1026,6 +1038,12 @@
});
}
dialogFormVisible.value = true;
+ };
+ const isCustomerEditLocked = row => {
+ const salesReferenced = Number(row?.salesReferenceFlag || 0) === 1;
+ const customerType = Number(row?.type);
+ const usageStatus = Number(row?.usageStatus || 0);
+ return salesReferenced && (customerType === 0 || (customerType === 1 && usageStatus === 1));
};
// 鎻愪氦琛ㄥ崟
const submitForm = () => {
@@ -1123,6 +1141,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("宸插彇娑�");
+ }
});
};
@@ -1413,7 +1461,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