From 1779677cece5864b62a65df4b01a4a69496e149a Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 13 五月 2025 20:51:15 +0800
Subject: [PATCH] Merge branch 'master' into positec

---
 src/tabviews/zshare/topSearch/index.jsx |   16 +++++++++++++---
 1 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/topSearch/index.jsx b/src/tabviews/zshare/topSearch/index.jsx
index 2c3044e..06cddd2 100644
--- a/src/tabviews/zshare/topSearch/index.jsx
+++ b/src/tabviews/zshare/topSearch/index.jsx
@@ -85,7 +85,7 @@
       _setting.wrapperCol = {style: {width: (100 - _setting.labelwidth) + '%'}}
       _setting.borderRadius = config.wrap.borderRadius
       _setting.resetContrl = config.wrap.resetContrl || 'init'
-      _setting.size = config.wrap.searchSize || ''
+      _setting.order = config.wrap.searchSize || ''
 
       if (config.wrap.searchBtn === 'show') {
         _setting.showBtn = true
@@ -170,6 +170,10 @@
               item.initval = [moment(d).startOf('month').format(item.format), moment(d).endOf('month').format(item.format)].join(',')
             } else if (item.$initval === 'lastMonth') {
               item.initval = [moment(d).subtract(1, 'months').startOf('month').format(item.format), moment(d).subtract(1, 'months').endOf('month').format(item.format)].join(',')
+            } else if (item.$initval === 'year') {
+              item.initval = [moment(d).startOf('year').format(item.format), moment(d).endOf('year').format(item.format)].join(',')
+            } else if (item.$initval === 'lastYear') {
+              item.initval = [moment(d).subtract(1, 'years').startOf('year').format(item.format), moment(d).subtract(1, 'years').endOf('year').format(item.format)].join(',')
             } else {
               try {
                 let _initval = JSON.parse(item.$initval)
@@ -182,6 +186,7 @@
           } else {
             item.initval = moment(d).subtract(item.$initval, 'month').format('YYYY-MM')
           }
+          item.oriInitval = item.initval
         }
       }
 
@@ -376,7 +381,7 @@
   UNSAFE_componentWillReceiveProps(nextProps) {
     const { config, BID } = this.props
 
-    if (config.checkBid && config.type !== 'search' && nextProps.BID !== BID) {
+    if (config.$checkBid && nextProps.BID !== BID) {
       this.resetOptions(nextProps.BID)
     }
   }
@@ -445,6 +450,10 @@
               item.initval = [moment(d).startOf('month').format(item.format), moment(d).endOf('month').format(item.format)].join(',')
             } else if (item.$initval === 'lastMonth') {
               item.initval = [moment(d).subtract(1, 'months').startOf('month').format(item.format), moment(d).subtract(1, 'months').endOf('month').format(item.format)].join(',')
+            } else if (item.$initval === 'year') {
+              item.initval = [moment(d).startOf('year').format(item.format), moment(d).endOf('year').format(item.format)].join(',')
+            } else if (item.$initval === 'lastYear') {
+              item.initval = [moment(d).subtract(1, 'years').startOf('year').format(item.format), moment(d).subtract(1, 'years').endOf('year').format(item.format)].join(',')
             } else {
               try {
                 let _initval = JSON.parse(item.$initval)
@@ -457,6 +466,7 @@
           } else {
             item.initval = moment(d).subtract(item.$initval, 'month').format('YYYY-MM')
           }
+          item.oriInitval = item.initval
         }
       }
 
@@ -1256,7 +1266,7 @@
 
     return (
       <>
-        <Form {...formItemLayout} className={`mk-search-wrap mk-float-${setting.float} mk-size-${setting.size}`} style={setting.style}>
+        <Form {...formItemLayout} className={`mk-search-wrap mk-float-${setting.float} mk-order-${setting.order || 'none'}`} style={setting.style}>
           <Row gutter={24}>{this.getFields()}</Row>
           {advanceValues.length && (setting.advanceType !== 'pulldown' || (setting.advanceType === 'pulldown' && !visible)) ? <Row gutter={24}>
             <div className="advanced-list">

--
Gitblit v1.8.0