<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                [TOC] ## 范圍查詢設置默認值 ### 1、數值默認值查詢 - 效果展示 ![](https://img.kancloud.cn/ba/76/ba762c3c242d03ecb9c06b4149829cb2_1141x661.png) - 默認查詢年齡在16-22歲之間的,中間用`|`表示,`16|22` ![](https://img.kancloud.cn/f9/b4/f9b4272523e8c478214c0e205503aafa_1901x912.png) ### 2、日期范圍設置默認值 #### 2.1 非表達式默認值 - 效果展示 ![](https://img.kancloud.cn/c0/74/c074af7d8a6fb2545b19c5d045c0aa55_1242x805.png) - 日期查詢2021年11月1日到2021年11月30日的數據 ![](https://img.kancloud.cn/ea/31/ea310c081e6cd472fce7da912a053cb2_1920x900.png) 默認值配置成:`2021-11-01|2021-11-30` #### 2.2 表達式默認值 - 效果展示 ![](https://img.kancloud.cn/e7/da/e7da0fc1dfb2629c8e7d8b759a18dc67_985x504.png) - 通過表達式設置默認,查詢當月1號到今日的數據: ![](https://img.kancloud.cn/d5/80/d5805c88ea5a46f66905d58ee294637a_1915x832.png) 默認值配置成:`=concat(string.substring(dateStr('yyyy-MM-dd'),0, 8), '01')|=dateStr('yyyy-MM-dd')` 注意: 示例2和示例3本質上是一樣的,傳到后臺的查詢值都是日期字符串,**字符串**,所以sql執行的時候也是直接用這個字符串作的比較。 #### 2.3 查詢N天前數據 - 效果展示 ![](https://img.kancloud.cn/4f/9c/4f9c996d01ef79078293e64860d4adcc_594x78.png) - 默認查詢N天前數據,時間格式為:yyyy-MM-dd HH:mm:ss,例如:配置10天前的零點至當前時間 ![](https://img.kancloud.cn/12/e0/12e0c4311525bb0262735611d1574132_1916x894.png) 默認值配置:`=concat(dateStr('yyyy-MM-dd',-10),' 00:00:00')|=dateStr('yyyy-MM-dd HH:mm:ss')` 查詢日期格式:`yyyy-MM-dd HH:mm:ss` 不填時默認為yyyy-MM-dd #### 2.4 查詢近3個月數據 - 效果展示 ![](https://img.kancloud.cn/2d/7c/2d7cd65dbe8534b10811d6930b50b989_906x342.png) - 默認查詢近3個月數據 ![](https://img.kancloud.cn/51/a4/51a4316be10c3dd4116e24b17e3606b1_1904x895.png) 默認值配置:`=concat(dateStr('yyyy',-1),'-', dateStr('MM', -3),'-',dateStr('dd'))|=dateStr('yyyy-MM-dd')` 日期格式:`yyyy-MM-dd` dateStr('MM', -3) 中負數為月份往前,正數為月份往后,年日同理 #### 2.5 查詢當前月第一天和最后一天數據 通過JS增強動態賦值 [js增強專題](http://report.jeecg.com/2373408) * 字段設置日期范圍查詢,設置默認格式 ![](https://img.kancloud.cn/8e/90/8e90f6bdd5784faf8b2abb00c13e3d04_1782x148.png) * 設置js增強 ![](https://img.kancloud.cn/13/00/13001cdef30f9856aa1a1521db5a692e_1658x620.png) ``` function init(){ var date=new Date(); //獲取當月第一天 date.setDate(1); var month = parseInt(date.getMonth() + 1); var day = date.getDate(); if (month < 10) { month = '0' + month } if (day < 10) { day = '0' + day } var start = date.getFullYear() + '-' + month + '-' + day; //獲取當月最后一天 var currentMonth=date.getMonth(); var nextMonth=++currentMonth; var nextMonthFirstDay=new Date(date.getFullYear(),nextMonth,1); var oneDay=1000*60*60*24; var end = new Date(nextMonthFirstDay-oneDay) //賦值 this.updateSearchFormValue('dbCode', 'fieldName', start+'|'+end) } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看