c 3 éve
szülő
commit
5c79017f76
2 módosított fájl, 50 hozzáadás és 42 törlés
  1. 12 12
      whepi-ui/templates/home/ribao.ftl
  2. 38 30
      whepi-ui/templates/home/ribao.js

+ 12 - 12
whepi-ui/templates/home/ribao.ftl

@@ -668,17 +668,17 @@
                     <textarea id="notInoculate" class="weui-textarea" placeholder="输入内容(300字内)" rows="2"
                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 5px;"></textarea>
                 </div>
-<#--                <div id="weui-uploader"-->
-<#--                     style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">-->
-<#--                    <div style="color: gray;height: 30px; line-height: 30px;width: 35%;">图片上传</div>-->
+                <div id="weui-uploader"
+                     style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                    <div style="color: gray;height: 30px; line-height: 30px;width: 35%;">图片上传</div>
 
-<#--                    <div class="weui-uploader__bd">-->
-<#--                        <div class="weui-uploader__input-box">-->
-<#--                            <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*"-->
-<#--                                   multiple/>-->
-<#--                        </div>-->
-<#--                    </div>-->
-<#--                </div>-->
+                    <div class="weui-uploader__bd">
+                        <div class="weui-uploader__input-box">
+                            <input id="uploaderInput" class="weui-uploader__input" type="file" accept="image/*"
+                                   multiple/>
+                        </div>
+                    </div>
+                </div>
 
 
                 <div id="inoculate_type_view"
@@ -691,7 +691,7 @@
                 </div>
                 <div id="inoculate_type_view"
                      style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
-                    <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">新冠疫苗接种记录</div>
+                    <div style="color: gray;height: 30px; line-height: 30px;">新冠疫苗接种记录</div>
                 </div>
 
                 <div class="weui-loadmore weui-loadmore_line inoculate_yes"
@@ -702,7 +702,7 @@
                      style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
                     <div style="color: gray;height: 30px; line-height: 30px; width: 35%;">接种日期</div>
                     <div class="weui-cell__ft"></div>
-                    <input id="inoculate_first" onclick="setTime()" class="weui-input inoculate_time" autofocus="" type="text"
+                    <input id="inoculate_first" class="weui-input inoculate_time" type="text"
                            placeholder="请选择"
                            style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                 </div>

+ 38 - 30
whepi-ui/templates/home/ribao.js

@@ -486,27 +486,35 @@ function ribao_init() {
                 value: "3",
             }]
     });
-    // $("#inoculate_first").datetimePicker({
-    //     times: function () {
-    //         return [{values: ['&nbsp;']}];
-    //     }, value: new Date().format("yyyy-MM-dd") + ' ',
-    // })
-    $('.inoculate_time').click(function(event) {
-        var _this = this;
-        weui.datePicker({
-            start: new Date(),
-            end: 2030,
-            defaultValue: [new Date().getFullYear(), new Date().getMonth()+1, new Date().getDate()],
-            onConfirm: function(result){
-                // 二级调用:时间
-                $('.ma_expect_date_picker .weui-picker').on('animationend webkitAnimationEnd', function() {
-                    show_expect_time_picker(_this, result);
-                });
-            },
-            id: 'ma_expect_date',
-            className: 'ma_expect_date_picker'
-        });
-    });
+    $("#inoculate_first").datetimePicker({
+        times: function () {
+            return [{values: ['']}];
+        },
+        onClose:function (picker) {
+            if(!picker.value){
+                picker.setValue([new Date().getFullYear()+'',(new Date().getMonth()+1)+'',new Date().getDate()+'',''])
+            }
+        },
+        value: new Date().format("yyyy-MM-dd") + ' ',
+    })
+
+    // $('.inoculate_time').click(function(event) {
+    //     console.log($('#inoculate_first').datetimePicker)
+    //     // var _this = this;
+    //     // $(this).datePicker({
+    //     //     start: new Date(),
+    //     //     end: 2030,
+    //     //     defaultValue: [new Date().getFullYear(), new Date().getMonth()+1, new Date().getDate()],
+    //     //     onConfirm: function(result){
+    //     //         // 二级调用:时间
+    //     //         $('.ma_expect_date_picker .weui-picker').on('animationend webkitAnimationEnd', function() {
+    //     //             show_expect_time_picker(_this, result);
+    //     //         });
+    //     //     },
+    //     //     id: 'ma_expect_date',
+    //     //     className: 'ma_expect_date_picker'
+    //     // });
+    // });
     // updateSuspected({
     //   userName : 'www',
     //   grender : 2,
@@ -530,15 +538,15 @@ function ribao_init() {
     initRadioEvent()
 }
 
-// function setTime() {
-//     if ($("#inoculate_first").val() == "") {
-//         $("#inoculate_first").datetimePicker({
-//             times: function () {
-//                 return [{values: ['&nbsp;']}];
-//             }, value: new Date().format("yyyy-MM-dd") + ' ',
-//         })
-//     }
-// }
+function setTime() {
+    // if ($("#inoculate_first").val() == "") {
+    //     $("#inoculate_first").datetimePicker({
+    //         times: function () {
+    //             return [{values: ['&nbsp;']}];
+    //         }, value: new Date().format("yyyy-MM-dd") + ' ',
+    //     })
+    // }
+}
 
 function selectinput1(obj) {
     var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");