sen
2025-09-10 9578ae952527cdafc64d642f5183aa60ef92b7f2
ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue
@@ -171,8 +171,21 @@
        }
      ],
    },
    deadlineTime: {
      label: '领取截止时间',
      minWidth: 180,
      type: 'datetime',  // 改为 datetime 类型
      format: 'YYYY-MM-DD HH:mm:ss',
      valueFormat: 'YYYY-MM-DD HH:mm:ss',
      addDisplay: true,  // 新增时不显示
      minWidth: 200,
        rules: [
        {
          required: true,
          message: "领取截止时间不能为空", trigger: "change"
        }
      ],
    },
    cancelTime: {
      label: '作废时间',
      minWidth: 180,
@@ -257,6 +270,9 @@
    handleBeforeOpenFunc: (done: Function, type: string) => {
      if (done == 'add') {
        option.value.column.lockerNo.value = '接驳站智能钥匙柜'
        option.value.column.deadlineTime.value =formatDateTime(new Date(Date.now() + 24 * 60 * 60 * 1000));
      }
    },
    handleSelectionChangeFunc: (selection: any) => {
@@ -264,10 +280,18 @@
    }
  })
  const formatDateTime = (date) => {
  const year = date.getFullYear();
  const month = String(date.getMonth() + 1).padStart(2, '0');
  const day = String(date.getDate()).padStart(2, '0');
  const hours = String(date.getHours()).padStart(2, '0');
  const minutes = String(date.getMinutes()).padStart(2, '0');
  const seconds = String(date.getSeconds()).padStart(2, '0');
  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
};
// 在 script setup 部分定义防抖节流函数
let debounceTimer: NodeJS.Timeout | null = null;
let throttleTimer: NodeJS.Timeout | null = null;
// 防抖函数
const debounce = (func: Function, delay: number) => {
  return function (...args: any[]) {