From b3a4243739344b92af9339171e72829001b56fdf Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 30 十月 2025 15:01:34 +0800
Subject: [PATCH] 上片模块、钢化前大理片笼新增进页面接口,隐藏中空线预览任务按钮

---
 UI-Project/src/views/Slicecage/slicecagehistory.vue |  245 ++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 222 insertions(+), 23 deletions(-)

diff --git a/UI-Project/src/views/Slicecage/slicecagehistory.vue b/UI-Project/src/views/Slicecage/slicecagehistory.vue
index 0d060e3..51a439a 100644
--- a/UI-Project/src/views/Slicecage/slicecagehistory.vue
+++ b/UI-Project/src/views/Slicecage/slicecagehistory.vue
@@ -3,7 +3,7 @@
   <div style="display: flex;width: 1770px;">
     <el-input v-model="glassId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.inglassID')" />
     <el-input v-model="startSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('film.originateslot')" />
-    <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('film.endslot')" />
+    <el-input v-model="targetSlot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('film.endoriginateslot')" />
           <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('searchOrder.taskstatus')" clearable
           style="width: 200px;margin-left: 10px;">
           <el-option :label="$t('searchOrder.begin')" value="0"></el-option>
@@ -17,16 +17,55 @@
           <el-option :label="$t('searchOrder.outfilm')" value="2"></el-option>
           <el-option :label="$t('film.dispatch')" value="3"></el-option>
         </el-select>
-            <el-date-picker v-model="timeRange" type="datetimerange" range-separator="鑷�" :start-placeholder="$t('reportmanage.starttime')" 
-             style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss"
-              :end-placeholder="$t('reportmanage.endtime')">
-            </el-date-picker>
-          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
+        <el-date-picker
+            style="margin-left: 15px;"
+             v-model="timeRange"
+             type="datetimerange"
+             :shortcuts="shortcuts"
+             range-separator="鑷�"
+             :start-placeholder="$t('reportmanage.starttime')"
+             :end-placeholder="$t('reportmanage.endtime')"
+           />
+          <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button>
      </div>
+     <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;">
+      <el-form>
+        <el-row style="margin-top: -15px;margin-bottom: -2px;">
+          <el-col :span="4">
+              <div id="dt" style="font-size: 15px;">
+              <el-form-item :label="$t('hellow.countIn')"  style="width: 14vw">
+                {{ countIn }}
+              </el-form-item>
+              </div>
+          </el-col>
+          <el-col :span="5">
+              <div id="dt" style="font-size: 15px;">
+              <el-form-item :label="$t('hellow.totalAreaIn')" style="width: 14vw">
+                {{ totalAreaIn }}
+              </el-form-item>
+              </div>
+          </el-col>
+          <el-col :span="5">
+            <div id="dta" style="font-size: 15px;">
+          <el-form-item :label="$t('hellow.countOut')" style="width: 14vw">
+                {{ countOut }}
+              </el-form-item>
+              </div>
+          </el-col>
+          <el-col :span="5">
+              <div id="dt" style="font-size: 15px;">
+              <el-form-item :label="$t('hellow.totalAreaOut')" style="width: 14vw">
+                {{ totalAreaOut }}
+              </el-form-item>
+              </div>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
         <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
       <el-table-column prop="glassId" align="center" :label="$t('searchOrder.glassID')" min-width="80" />
       <el-table-column prop="startSlot" align="center" :label="$t('film.originateslot')" min-width="80" />
-          <el-table-column prop="targetSlot" align="center" :label="$t('film.endslot')" min-width="80" />
+          <el-table-column prop="targetSlot" align="center" :label="$t('film.endoriginateslot')" min-width="80" />
           <el-table-column
             align="center"
             :label="$t('film.taskstatus')"
@@ -86,6 +125,10 @@
 const tableDatax = ref([])
 const currentPage2 = ref(1)
 const totalRecords = ref(0)
+const countIn = ref(0)
+const countOut = ref(0)
+const totalAreaIn = ref(0)
+const totalAreaOut = ref(0)
 const glassId = ref('');
 const startSlot = ref('');
 const targetSlot = ref('');
@@ -111,24 +154,46 @@
         formattedCreateTime: formatTimestamp(record.createTime),
         formattedUpdateTime: formatTimestamp(record.updateTime),
       }));
-        // tableDatax.value = response.data.records;
         tableDatax.value = formattedData;
-        console.log(response.data.pages);
-        
         totalRecords.value = response.data.total/2 || 0
       } else {
         ElMessage.error(response.message);
     }
 }
 catch (error) {
-    console.error(error);
+  }
+}
+const Daily = async () => {
+  try {
+  let startTime = window.localStorage.getItem('startTime')
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigDailyProduction", {
+        pageNo: 1,
+        pageSize: 20,
+        glassId: glassId.value,
+        startSlot: 0,
+        targetSlot: 0,
+        taskStateList: [],
+        taskTypeList: [],
+        beginDate: startTime,
+        endDate: getglobalDate
+    })
+      if (response.code == 200) {
+        countIn.value = response.data.countIn
+        countOut.value = response.data.countOut
+        totalAreaIn.value = response.data.totalAreaIn
+        totalAreaOut.value = response.data.totalAreaOut
+      } else {
+        ElMessage.error(response.message);
+    }
+}
+catch (error) {
   }
 }
 const handlePageChange2 = (newPage) => {
   currentPage2.value = newPage;
-  console.log(currentPage2.value);
   window.localStorage.setItem('pagenumber', currentPage2.value)
   historicala(currentPage2.value);
+  Dailya(currentPage2.value);
 }; 
 const historicala = async (page) => {
   try { 
@@ -166,8 +231,8 @@
         targetSlot: ptargetSlot,
         taskStateList: celllist,
         taskTypeList: stateList,
-        beginDate: (timeRange.value && timeRange.value[0]) || '',
-        endDate: (timeRange.value && timeRange.value[1]) || '',
+        beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '',
+        endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '',
     })
       if (response.code == 200) {
         ElMessage.success(response.message);
@@ -176,19 +241,70 @@
         formattedCreateTime: formatTimestamp(record.createTime),
         formattedUpdateTime: formatTimestamp(record.updateTime),
       }));
-        // tableDatax.value = response.data.records;
         tableDatax.value = formattedData;
-        console.log(response.data.pages);
-        
         totalRecords.value = response.data.total/2 || 0
       } else {
         ElMessage.error(response.message);
     }
 }
 catch (error) {
-    console.error(error);
   }
 }
+const Dailya = async (page) => {
+  try { 
+  let celllist=[]
+  let stateList=[]
+  let pstartSlot= ''
+  let ptargetSlot=''
+  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
+    if(selectValuesa[0]!=""){
+      celllist=[selectValuesa[0]];
+    }
+  }
+  if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
+    if(selectValuesa[1]!=""){
+      stateList=[selectValuesa[1]];
+    }
+  }
+  if(startSlot.value != ""){
+    pstartSlot = startSlot.value
+  }else{
+    pstartSlot = '0'
+  }
+  if(targetSlot.value != ""){
+    ptargetSlot = targetSlot.value
+  }else{
+    ptargetSlot = '0'
+  }
+  let page = window.localStorage.getItem('pagenumber')
+  let startTime = window.localStorage.getItem('startTime')
+      const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigDailyProduction", {
+        pageNo: page,
+        pageSize: 20,
+        glassId: glassId.value,
+        startSlot: pstartSlot,
+        targetSlot: ptargetSlot,
+        taskStateList: celllist,
+        taskTypeList: stateList,
+        beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '',
+        endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '',
+    })
+      if (response.code == 200) {
+        countIn.value = response.data.countIn
+        countOut.value = response.data.countOut
+        totalAreaIn.value = response.data.totalAreaIn
+        totalAreaOut.value = response.data.totalAreaOut
+      } else {
+        ElMessage.error(response.message);
+    }
+}
+catch (error) {
+  }
+}
+const handleClick = async () => {
+  await sethistorical();
+  await Dailyhistorical();
+};
 // 鍘嗗彶鏌ヨ鐐瑰嚮
 const sethistorical = async () => {
   try { 
@@ -224,8 +340,8 @@
         targetSlot: ptargetSlot,
         taskStateList: celllist,
         taskTypeList: stateList,
-        beginDate: (timeRange.value && timeRange.value[0]) || '',
-        endDate: (timeRange.value && timeRange.value[1]) || '',
+        beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '',
+        endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '',
     })
       if (response.code == 200) {
         ElMessage.success(response.message);
@@ -243,7 +359,55 @@
     }
 }
 catch (error) {
-    console.error(error);
+  }
+}
+const Dailyhistorical = async () => {
+  try { 
+  let celllist=[]
+  let stateList=[]
+  let pstartSlot= ''
+  let ptargetSlot=''
+  if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){
+    if(selectValuesa[0]!=""){
+      celllist=[selectValuesa[0]];
+    }
+  }
+  if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){
+    if(selectValuesa[1]!=""){
+      stateList=[selectValuesa[1]];
+    }
+  }
+  if(startSlot.value != ""){
+    pstartSlot = startSlot.value
+  }else{
+    pstartSlot = '0'
+  }
+  if(targetSlot.value != ""){
+    ptargetSlot = targetSlot.value
+  }else{
+    ptargetSlot = '0'
+  }
+  const response = await request.post("/cacheVerticalGlass/bigStorageCageHistoryTask/queryBigDailyProduction", {
+        pageNo: 1,
+        pageSize: 20,
+        glassId: glassId.value,
+        startSlot: pstartSlot,
+        targetSlot: ptargetSlot,
+        taskStateList: celllist,
+        taskTypeList: stateList,
+        beginDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[0])) || '',
+        endDate: (formatTimestamp(timeRange.value) && formatTimestamp(timeRange.value[1])) || '',
+    })
+      if (response.code == 200) {
+        countIn.value = response.data.countIn
+        countOut.value = response.data.countOut
+        totalAreaIn.value = response.data.totalAreaIn
+        totalAreaOut.value = response.data.totalAreaOut
+      } else {
+        ElMessage.error(response.message);
+    }
+}
+catch (error) {
   }
 }
 const handleInputa = (value: string) => {
@@ -273,13 +437,47 @@
   const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
   return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
 }
+const shortcuts = [
+  {
+    text: '鏈�杩戜竴鍛�',
+    value: () => {
+      const backendTime = new Date(getglobalDate)
+      const oneWeekAgo = new Date(getglobalDate)
+      oneWeekAgo.setHours(0, 0, 0, 0);
+      oneWeekAgo.setDate(oneWeekAgo.getDate() - 7)
+      timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]
+      window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+    },
+  },
+  {
+    text: '鏈�杩戜竴涓湀',
+    value: () => {
+      const backendTime = new Date(getglobalDate)
+      const oneWeekAgo = new Date(getglobalDate)
+      oneWeekAgo.setHours(0, 0, 0, 0);
+      oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 1)
+      timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]
+      window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+    },
+  },
+  {
+    text: '鏈�杩戜笁涓湀',
+    value: () => {
+      const backendTime = new Date(getglobalDate)
+      const oneWeekAgo = new Date(getglobalDate)
+      oneWeekAgo.setHours(0, 0, 0, 0);
+      oneWeekAgo.setMonth(oneWeekAgo.getMonth() - 3)
+      timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]
+      window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
+},
+  },
+]
 // 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
 const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
 function parseAndSetTime() {
   const backendTime = new Date(getglobalDate);
   const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
-  console.log(formatTimestamp(oneWeekAgo));
-  console.log(oneWeekAgo);
+  oneWeekAgo.setHours(0, 0, 0, 0);
   timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
   window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
 }
@@ -330,6 +528,7 @@
 onMounted(() => {
   parseAndSetTime();
   historical();
+  Daily()
 });
   </script>
   <style scoped>  

--
Gitblit v1.8.0