gaoluyang
13 小时以前 2e77330d87341624c88301562fd137b58f9a101a
src/views/basicData/supplierManage/index.vue
@@ -141,7 +141,9 @@
                v-model="form.maintainUserId"
                placeholder="请选择"
                clearable
                disabled
                filterable
                default-first-option
                :reserve-keyword="false"
              >
                <el-option
                  v-for="item in userList"
@@ -234,6 +236,7 @@
} from "@/api/basicData/supplierManageFile.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();
@@ -299,9 +302,6 @@
        clickFun: (row) => {
          openForm("edit", row);
        },
            disabled: (row) => {
               return row.maintainUserName !== userStore.nickName
            }
      },
    ],
  },
@@ -496,12 +496,6 @@
const handleDelete = () => {
  let ids = [];
  if (selectedRows.value.length > 0) {
      // 检查是否有他人维护的数据
      const unauthorizedData = selectedRows.value.filter(item => item.maintainUserName !== userStore.nickName);
      if (unauthorizedData.length > 0) {
         proxy.$modal.msgWarning("不可删除他人维护的数据");
         return;
      }
    ids = selectedRows.value.map((item) => item.id);
  } else {
    proxy.$modal.msgWarning("请选择数据");
@@ -528,14 +522,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();