From 594080ee60b0c811dd26989448c1b03a78a25ea9 Mon Sep 17 00:00:00 2001
From: TanYibin <5491541@qq.com>
Date: Thu, 6 Apr 2023 19:20:02 +0800
Subject: [PATCH] 库位比较功能支持比较所有库位任务

---
 ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue | 27 ++++++++++++++++++++++++---
 1 file changed, 24 insertions(+), 3 deletions(-)

diff --git a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue
index 2768e61..1122922 100644
--- a/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue
+++ b/ant-design-vue-jeecg/src/views/system/compare/CompareWcsLocationTask.vue
@@ -109,16 +109,40 @@ export default {
       required: false
     }
   },
+
   watch: {
     mainId: {
       immediate: true,
       handler(val) {
+        var nowDate = new Date()
+        this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000).format('yyyy-MM-dd hh:mm:ss')
+        this.queryParam['taskCreateTimeEnd'] = nowDate.format('yyyy-MM-dd hh:mm:ss')
         this.queryParam['locationCode'] = val
         this.loadData(1)
       }
     }
   },
   data() {
+    Date.prototype.format = function(fmt) {
+      var o = {
+        'M+': this.getMonth() + 1, //月份
+        'd+': this.getDate(), //日
+        'h+': this.getHours(), //小时
+        'm+': this.getMinutes(), //分
+        's+': this.getSeconds(), //秒
+        'q+': Math.floor((this.getMonth() + 3) / 3), //季度
+        S: this.getMilliseconds() //毫秒
+      }
+      if (/(y+)/.test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
+      }
+      for (var k in o) {
+        if (new RegExp('(' + k + ')').test(fmt)) {
+          fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length))
+        }
+      }
+      return fmt
+    }
     return {
       description: '库位任务信息比较页面',
       disableMixinCreated: true,
@@ -217,9 +241,6 @@ export default {
   },
   created() {
     this.initDictData()
-    var nowDate = new Date()
-    this.queryParam['taskCreateTimeBegin'] = new Date(nowDate.getTime() - 90 * 24 * 60 * 60 * 1000)
-    this.queryParam['taskCreateTimeEnd'] = nowDate
   },
   methods: {
     initDictData() {
--
libgit2 0.22.2