shijiplus-web-plugin 0.1.32 → 0.1.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shijiplus-web-plugin",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "files": [
5
5
  "src"
6
6
  ],
@@ -107,7 +107,7 @@ export default {
107
107
  try {
108
108
  // 0. Validate the date range (limit to 1 month)
109
109
  const startDate = new Date(searchForm.startDate || searchForm.startTime || searchForm.createdAtStart || "")
110
- const endDate = new Date(searchForm.endDate || searchForm.endTime || searchForm.createdAtEnd || "")
110
+ let endDate = new Date(searchForm.endDate || searchForm.endTime || searchForm.createdAtEnd || "")
111
111
  const oneMonthInMs = 31 * 24 * 60 * 60 * 1000 // 1 个月的毫秒数
112
112
 
113
113
  if (!startDate || isNaN(startDate.getTime()) || !endDate || isNaN(endDate.getTime())) {
@@ -116,6 +116,9 @@ export default {
116
116
  }, 0)
117
117
  return
118
118
  }
119
+ if (endDate > new Date()) {
120
+ endDate = new Date()
121
+ }
119
122
  if (endDate - startDate > oneMonthInMs) {
120
123
  setTimeout(() => {
121
124
  this.$Message.error('导出时间范围不能超过1个月,请调整后重试', 3)
@@ -164,6 +167,9 @@ export default {
164
167
  // Update progress based on total count
165
168
  this.orderExportModalPercent = (exportedCount / this.totalCount * 100).toFixed(2)
166
169
  instance.updatePercent(this.orderExportModalPercent)
170
+ if (this.orderExportModalPercent >= 100) {
171
+ break
172
+ }
167
173
  }
168
174
 
169
175
  // 5. Export the data (logic omitted here, add your export implementation)