From 2e77330d87341624c88301562fd137b58f9a101a Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 25 十二月 2025 10:57:35 +0800
Subject: [PATCH] 1.海川开心-录入日期都默认当天,封装公用组件和方法
---
src/views/basicData/customerFile/index.vue | 25 +++++--------------------
1 files changed, 5 insertions(+), 20 deletions(-)
diff --git a/src/views/basicData/customerFile/index.vue b/src/views/basicData/customerFile/index.vue
index 76a8c68..ffa8643 100644
--- a/src/views/basicData/customerFile/index.vue
+++ b/src/views/basicData/customerFile/index.vue
@@ -147,8 +147,10 @@
<el-select
v-model="form.maintainer"
placeholder="璇烽�夋嫨"
+ filterable
+ default-first-option
+ :reserve-keyword="false"
clearable
- disabled
>
<el-option
v-for="item in userList"
@@ -169,7 +171,6 @@
type="date"
placeholder="璇烽�夋嫨"
clearable
- disabled
/>
</el-form-item>
</el-col>
@@ -243,6 +244,7 @@
import { userListNoPage } from "@/api/system/user.js";
import useUserStore from "@/store/modules/user";
import { getToken } from "@/utils/auth.js";
+import { getCurrentDate } from "@/utils/index.js";
const { proxy } = getCurrentInstance();
const userStore = useUserStore();
@@ -306,10 +308,7 @@
type: "text",
clickFun: (row) => {
openForm("edit", row);
- },
- disabled: (row) => {
- return row.maintainer !== userStore.nickName
- }
+ }
},
],
},
@@ -559,12 +558,6 @@
const handleDelete = () => {
let ids = [];
if (selectedRows.value.length > 0) {
- // 妫�鏌ユ槸鍚︽湁浠栦汉缁存姢鐨勬暟鎹�
- const unauthorizedData = selectedRows.value.filter(item => item.maintainer !== userStore.nickName);
- if (unauthorizedData.length > 0) {
- proxy.$modal.msgWarning("涓嶅彲鍒犻櫎浠栦汉缁存姢鐨勬暟鎹�");
- return;
- }
ids = selectedRows.value.map((item) => item.id);
} else {
proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
@@ -591,14 +584,6 @@
});
};
-// 鑾峰彇褰撳墠鏃ユ湡骞舵牸寮忓寲涓� YYYY-MM-DD
-function getCurrentDate() {
- const today = new Date();
- const year = today.getFullYear();
- const month = String(today.getMonth() + 1).padStart(2, "0"); // 鏈堜唤浠�0寮�濮�
- const day = String(today.getDate()).padStart(2, "0");
- return `${year}-${month}-${day}`;
-}
onMounted(() => {
getList();
--
Gitblit v1.9.3