From 4bef3c1a0dd435b4c6bf8f8429db67dac027ed6b Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期三, 10 十二月 2025 14:48:17 +0800
Subject: [PATCH] 1、中空创建任务查询界面添加当总数量不等于已配对数时高亮显示
---
UI-Project/src/views/Returns/upreturnhistory.vue | 63 +++++++++++++++++++++++++------
1 files changed, 51 insertions(+), 12 deletions(-)
diff --git a/UI-Project/src/views/Returns/upreturnhistory.vue b/UI-Project/src/views/Returns/upreturnhistory.vue
index 0535c37..176e47f 100644
--- a/UI-Project/src/views/Returns/upreturnhistory.vue
+++ b/UI-Project/src/views/Returns/upreturnhistory.vue
@@ -8,14 +8,20 @@
<el-input v-model="slot" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('workOrder.upnumber')" />
<el-select v-model="selectValuesa[0]" filterable :placeholder="$t('searchOrder.taskstatus')" clearable
style="width: 200px;margin-left: 10px;">
+ <!-- 榛樿绌轰换鍔★細0 鎵ц涓細1 缁撴潫浠诲姟锛�2 -->
<el-option :label="$t('searchOrder.empty')" value="0"></el-option>
<el-option :label="$t('film.execution')" value="1"></el-option>
<el-option :label="$t('searchOrder.endtask')" value="2"></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-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="sethistorical()">{{$t('reportmanage.inquire')}}</el-button>
</div>
<el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}">
@@ -145,8 +151,8 @@
slot: pslot,
station: 1,
taskStateList: celllist,
- 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);
@@ -193,9 +199,9 @@
slot: pslot,
station: 1,
taskStateList: celllist,
- 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) {
currentPage2.value = 1
ElMessage.success(response.message);
@@ -226,11 +232,44 @@
const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
-// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
-const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
+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))
+},
+ },
+]
function parseAndSetTime() {
const backendTime = new Date(getglobalDate);
- const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
+ const oneWeekAgo = new Date(backendTime.getTime() - 0 * 24 * 60 * 60 * 1000); // 鍑忓幓7澶�
oneWeekAgo.setHours(0, 0, 0, 0);
timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)];
window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo))
--
Gitblit v1.8.0