From b23d80cdbc375643e6a94122c6507fca79e18103 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期四, 18 九月 2025 17:28:58 +0800
Subject: [PATCH] 新增要求出发时间

---
 ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue |   45 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 39 insertions(+), 6 deletions(-)

diff --git a/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue b/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue
index 3801c99..d90556d 100644
--- a/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue
+++ b/ui/admin-ui3/src/views/cwgl/smartLockerApplication/index.vue
@@ -17,7 +17,10 @@
         </el-button> -->
       </template>
       <template #menu="{ size, row, index }">
-
+       <el-link class="link-btn" type="primary" :underline="false" plain :size="size"
+          @click="handleEditBtn(row, index)" v-if="row.status == 0"
+          v-hasPermi="['cwgl:smartLockerApplication:cancel']"> 缂栬緫
+        </el-link>
         <el-link class="link-btn"  v-if="row.status == 0" type="primary" :underline="false" plain  @click="handleInvalid(row)"
           v-hasPermi="['cwgl:smartLockerApplication:invalid']"> 浣滃簾
         </el-link>
@@ -171,14 +174,28 @@
         }
       ],
     },
-
-
+    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,
       type: 'datetime',  // 鏀逛负 datetime 绫诲瀷
       format: 'YYYY-MM-DD HH:mm:ss',
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
+      editDisplay: false,
       addDisplay: false,  // 鏂板鏃朵笉鏄剧ず
 
       minWidth: 200,
@@ -188,6 +205,7 @@
       minWidth: 180,
       type: 'datetime',  // 鏀逛负 datetime 绫诲瀷
       format: 'YYYY-MM-DD HH:mm:ss',
+      editDisplay: false,
       addDisplay: false,  // 鏂板鏃朵笉鏄剧ず
 
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
@@ -197,7 +215,7 @@
       label: '鍒涘缓鏃堕棿',
       minWidth: 180,
       addDisplay: false,  // 鏂板鏃朵笉鏄剧ず
-
+      editDisplay: false,
       type: 'datetime',  // 鏀逛负 datetime 绫诲瀷
       format: 'YYYY-MM-DD HH:mm:ss',
       valueFormat: 'YYYY-MM-DD HH:mm:ss',
@@ -216,6 +234,7 @@
       fixed: 'right',
       dataType: 'string',
       type: 'select',
+      editDisplay: false,
       addDisplay: false,  // 鏂板鏃朵笉鏄剧ず
       dicUrl: '/system/dict/data/type/sys_apply_status',
     },
@@ -257,6 +276,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 +286,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[]) {
@@ -317,5 +347,8 @@
   })
 
 }
-
+const handleEditBtn = (row, index) => {
+  crudRef.value.rowEdit(row, index)
+  // option.value.editBtn = true;
+}
 </script>

--
Gitblit v1.8.0