From 587c89a718c83997a8323fa243cbd59c04e3dbc2 Mon Sep 17 00:00:00 2001
From: dy <dingyang@lnfxkj.tech>
Date: 星期一, 14 四月 2025 20:41:36 +0800
Subject: [PATCH] Merge branch 'dev' of http://192.168.50.149:8085/r/aps-kj-web into dev

---
 src/views/basicData/ApsResourceGroup/index.vue |  205 ++++++++++++++++++++++++--------------------------
 1 files changed, 98 insertions(+), 107 deletions(-)

diff --git a/src/views/basicData/ApsResourceGroup/index.vue b/src/views/basicData/ApsResourceGroup/index.vue
index 6a7cd11..2c27b4c 100644
--- a/src/views/basicData/ApsResourceGroup/index.vue
+++ b/src/views/basicData/ApsResourceGroup/index.vue
@@ -1,6 +1,9 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="90px">
+      <el-row :gutter="20">
+        <el-col
+        :span="6">
       <el-form-item label="璧勬簮缁�" prop="resourceGroupName">
         <el-input
           v-model="queryParams.resourceGroupName"
@@ -9,6 +12,9 @@
           @keyup.enter="handleQuery"
         />
       </el-form-item>
+        </el-col>
+        <el-col
+        :span="6">
       <el-form-item label="鎴鏈哄姞闇�姹傛棩鏈�" style="width: 400px" label-width="150px">
         <el-date-picker
           v-model="daterangeRequestDate"
@@ -19,10 +25,16 @@
           end-placeholder="缁撴潫鏃ユ湡"
         ></el-date-picker>
       </el-form-item>
+        </el-col>
+        <el-col
+          :span="12"
+          style="text-align: right;">
       <el-form-item>
         <el-button type="primary" icon="Search" @click="handleQuery">鎼滅储</el-button>
         <el-button icon="Refresh" @click="resetQuery">閲嶇疆</el-button>
       </el-form-item>
+        </el-col>
+      </el-row>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
@@ -32,7 +44,7 @@
           plain 
           icon="Upload" 
           @click="handleImport" 
-          v-hasPermi="['partPlan:import']"
+          v-hasPermi="['ApsResourceGroup:ApsResourceGroup:importData']"
           >瀵煎叆</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -57,7 +69,7 @@
     >
     </HxlhTable>
   <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� -->
-  <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body>
+  <el-dialog :title="upload.title" v-model="upload.open" width="90%" append-to-body @close="dialogCancel">
       <el-row :gutter="10">
         <el-col>
           <div style="border-bottom: 1px solid #ccc;" >
@@ -82,20 +94,6 @@
               </div>
             </template>
           </el-upload>
-        </el-col>
-      </el-row>
-      <el-row style="margin-top: 20px;">
-        <el-col>
-          <div>
-            <el-button
-              type="success"
-              plain
-              icon="Check"
-              :disabled="planned"
-              @click="uploadParse"
-              v-hasPermi="['partPlan:edit']"
-            >涓婁紶骞惰В鏋�</el-button>
-          </div>
         </el-col>
       </el-row>
       <el-row>
@@ -128,9 +126,29 @@
             <h4>鍏变笂浼�<span style="color: blue;">{{ total }}</span>鏉¤祫婧愭睜鏁版嵁</h4>
           </div>
         </el-col>
+        <el-col>
+          <el-form-item label="鎴鏈哄姞闇�姹傛棩鏈�" prop="requestDate" >
+            <el-date-picker clearable
+              v-model="requestDate"
+              type="date"
+              value-format="YYYY-MM-DD HH:mm:ss"
+              placeholder="璇烽�夋嫨鏈哄姞闇�姹傛棩鏈�"
+              :disabled-date="disabledDate"
+              >
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
       </el-row>
       <template #footer>
         <div class="dialog-footer">
+          <el-button
+            type="success"
+            plain
+            icon="Check"
+            :disabled="planned"
+            @click="uploadParse"
+            v-hasPermi="['partPlan:edit']"
+          >纭涓婁紶</el-button>
           <el-button @click="dialogCancel">鍙� 娑�</el-button>
         </div>
       </template>
@@ -165,6 +183,16 @@
 const exampleHeight = ref("500px");
 const uploadRef = ref();
 const exampleList = ref([]);
+const requestDate = ref(null);
+// 璁$畻褰撳墠鏃堕棿寰�鍚庢帹 15 澶╃殑鏃ユ湡
+const disabledDate = (time) => {
+  // return time.getTime() > Date.now()
+   // 璁$畻 15 澶╃殑姣鏁�
+   const fifteenDaysInMillis = 15 * 24 * 60 * 60 * 1000;
+    // 璁$畻褰撳墠鏃堕棿鍔犱笂 15 澶╁悗鐨勬绉掓暟
+    const maxTime = Date.now() + fifteenDaysInMillis;
+    return time.getTime() > maxTime;
+}
 /*** 鐢ㄦ埛瀵煎叆鍙傛暟 */
 const upload = reactive({
   // 鏄惁鏄剧ず寮瑰嚭灞傦紙鐢ㄦ埛瀵煎叆锛�
@@ -185,63 +213,39 @@
   { type: 'checkbox', width: 60, align:"center"},
   { type: 'seq', title: '搴忓彿', width: 60 },
   {
-    title: '鏂欏彿',
-    field: 'itemNo',
+    title: '璧勬簮缁勫悕绉�',
+    field: 'resourceGroupName',
+    width: 300,
+    align:"center",
+  },
+  {
+    title: '璁惧鏁伴噺',
+    field: 'devicesQuantity',
     width: 150,
     align:"center",
   },
   {
-    title: '宸ュ崟鍙�',
-    field: 'workOrderNo',
-    width: 150,
+    title: '姣忔棩鐞嗚鏃堕棿',
+    field: 'theoryHours',
+    width: 300,
     align:"center",
   },
   {
-    title: '宸ュ簭搴忓彿',
-    field: 'processNumber',
-    width: 100,
+    title: '鎴闇�姹傛棩鍓╀綑澶╂暟',
+    field: 'restDays',
+    width: 210,
     align:"center",
   },
   {
-    title: '宸ュ簭鍚嶇О',
-    field: 'processName',
-    width: 150,
+    title: '鐞嗚浜ц兘',
+    field: 'theoryCapacity',
+    width: 300,
     align:"center",
   },
   {
-    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
-    field: 'processPlanStartDay',
-    width: 200,
-    align:"center",
-  },
-  {
-    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
-    field: 'processPlanEndDay',
-    width: 200,
-    align:"center",
-  },
-  {
-    title: '鏈紑宸ユ暟閲�',
-    field: 'notStartWorkCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '宸插畬鎴愭暟閲�',
-    field: 'completedCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '搴熷純鏁伴噺',
-    field: 'discardCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '闆嗘垚鏃ユ湡',
-    field: 'integrationDay',
-    width: 160,
+    title: '鎴鏈哄姞闇�姹傛棩鏈�',
+    field: 'requestDate',
+    width: 300,
     align:"center",
   }
 ]);
@@ -249,63 +253,39 @@
 const exampleColumns = ref([
   { type: 'seq', title: '搴忓彿', width: 60 },
   {
-    title: '鏂欏彿',
-    field: 'itemNo',
+    title: '璧勬簮缁勫悕绉�',
+    field: 'resourceGroupName',
+    width: 300,
+    align:"center",
+  },
+  {
+    title: '璁惧鏁伴噺',
+    field: 'devicesQuantity',
     width: 150,
     align:"center",
   },
   {
-    title: '宸ュ崟鍙�',
-    field: 'workOrderNo',
-    width: 150,
+    title: '姣忔棩鐞嗚鏃堕棿',
+    field: 'theoryHours',
+    width: 300,
     align:"center",
   },
   {
-    title: '宸ュ簭搴忓彿',
-    field: 'processNumber',
-    width: 100,
+    title: '鎴闇�姹傛棩鍓╀綑澶╂暟',
+    field: 'restDays',
+    width: 210,
     align:"center",
   },
   {
-    title: '宸ュ簭鍚嶇О',
-    field: 'processName',
-    width: 150,
+    title: '鐞嗚浜ц兘',
+    field: 'theoryCapacity',
+    width: 300,
     align:"center",
   },
   {
-    title: '宸ュ簭璁″垝寮�濮嬫棩鏈�',
-    field: 'processPlanStartDay',
-    width: 200,
-    align:"center",
-  },
-  {
-    title: '宸ュ簭璁″垝缁撴潫鏃ユ湡',
-    field: 'processPlanEndDay',
-    width: 200,
-    align:"center",
-  },
-  {
-    title: '鏈紑宸ユ暟閲�',
-    field: 'notStartWorkCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '宸插畬鎴愭暟閲�',
-    field: 'completedCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '搴熷純鏁伴噺',
-    field: 'discardCount',
-    width: 150,
-    align:"center",
-  },
-  {
-    title: '闆嗘垚鏃ユ湡',
-    field: 'integrationDay',
-    width: 160,
+    title: '鎴鏈哄姞闇�姹傛棩鏈�',
+    field: 'requestDate',
+    width: 370,
     align:"center",
   }
 ]);
@@ -323,6 +303,7 @@
     plant: null
   },
   rules: {
+
   }
 });
 
@@ -342,7 +323,7 @@
     loading.value = false;
   });
 }
-
+function handleCheckboxChange(){}
 // 鍙栨秷鎸夐挳
 function cancel() {
   open.value = false;
@@ -485,8 +466,15 @@
 }
 /** 涓婁紶骞惰В鏋愭寜閽搷浣� */
 function uploadParse() {
+  if (requestDate.value === null || typeof requestDate.value === 'undefined' || requestDate.value === '') {
+    ElMessage({
+      message: '璇烽�夋嫨鎴鏈哄姞闇�姹傛棩鏈�',
+      type: 'warning',
+    })
+    return
+  }
   queryParams.value.params = {};
-  queryParams.value.params["batchNumber"] = batchNumber.value;
+  queryParams.value.params["requestDate"] = requestDate.value;
   confirmApsResourceGroup(queryParams.value).then(response => {
     exampleList.value = response.rows;
     loading.value = false;
@@ -494,6 +482,7 @@
     isError.value = false;
     planned.value = true;
     upload.open = false;
+    requestDate.value = null;
     ElMessage({
       message: '璧勬簮姹犳暟鎹凡鎴愬姛涓婁紶鍜岃В鏋�',
       type: 'success',
@@ -507,10 +496,12 @@
   if (uploadRef.value) {
     uploadRef.value.clearFiles();
   }
+  requestDate.value = null;
   isVisible.value = false;
   isError.value = false;
   planned.value = true;
   upload.open = false;
+  upload.isUploading = false;
 }
 
 getList();

--
Gitblit v1.9.3