From 7dd5eac2e6c1da2794fb6e45fe6c0fea7d787105 Mon Sep 17 00:00:00 2001
From: liuxiaoyan <lxy@bronet.cn>
Date: Thu, 10 Jan 2019 13:08:11 +0800
Subject: [PATCH] Merge branch 'master' of http://114.215.101.231:8099/root/jyht into liuxiaoyan

# Conflicts:
#	public/themes/simpleboot3/user/index/inquiry.html
---
 public/themes/simpleboot3/user/index/transfer.html | 529 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 528 insertions(+), 1 deletion(-)

diff --git a/public/themes/simpleboot3/user/index/transfer.html b/public/themes/simpleboot3/user/index/transfer.html
index 7cbf7f4..1426b0d 100644
--- a/public/themes/simpleboot3/user/index/transfer.html
+++ b/public/themes/simpleboot3/user/index/transfer.html
@@ -355,6 +355,533 @@
 <script src="__TMPL__/public/assets/js/jquery-2.1.0.js"></script>
 <script src="__TMPL__/public/assets/js/weui.js"></script>
 <script src="__TMPL__/public/assets/js/myweui.js"></script>
-<script src="__TMPL__/public/assets/js/referral.js"></script>
+<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
+<script>
+    //文本框显示字数
+    $(".area").on("input propertychange", function () {
+
+        var $this = $(this),
+            _val = $this.val(),
+            count = "";
+        if (_val.length > 1000) {
+            $this.val(_val.substring(0, 1000));
+        }
+        count = 1000 - $this.val().length;
+        $(this).siblings(".text_num").children('.text-count').text(count);
+    });
+
+    //    疾病分类下拉
+    $('.inquiry_type').click(function () {
+        weui.picker([
+                {label: '一类', value: 0},
+                {label: '二类', value: 1}
+            ], {
+                onChange: function (res) {
+                    console.log(res)
+                },
+                onConfirm: function (res) {
+                    $('.inquiry_value').val(res[0].label)
+                }
+            }
+        )
+    })
+    //    疾病分类下拉
+    $('.expert').click(function () {
+        weui.picker([
+                {label: '王医生', value: 0},
+                {label: '刘易斯', value: 1}
+            ], {
+                onChange: function (res) {
+                    console.log(res)
+                },
+                onConfirm: function (res) {
+                    $('.expert_value').val(res[0].label)
+                }
+            }
+        )
+    })
+    //  性别分类
+    $('.sex_type').click(function () {
+        weui.picker([
+                {label: '男', value: 0},
+                {label: '女', value: 1}
+            ], {
+                onChange: function (res) {
+                    console.log(res)
+                },
+                onConfirm: function (res) {
+                    $('.sex_value').val(res[0].label)
+                }
+            }
+        )
+    })
+    //  性别分类
+    $('.unit_type').click(function () {
+        weui.picker([
+                {label: '国企', value: 0},
+                {label: '私企', value: 1}
+            ], {
+                onChange: function (res) {
+                    console.log(res)
+                },
+                onConfirm: function (res) {
+                    $('.unit_value').val(res[0].label)
+                }
+            }
+        )
+    })
+
+    var title_id = ''
+    //语音模块
+    $('.icon-tianxie').hide()
+    $('.voice_first').hide()
+    $('.voice_second').hide()
+    $('.voice_third').hide()
+    $('.icon_cancle').hide()
+    // $('.voice_module').hide()
+
+
+    //点击
+    $('.title').click(function () {
+        title_id = $(this).attr("data-id");
+        if ($(this).children(".voice_btn").css("display") == "inline") {
+            $(this).children(".voice_btn").css("display", "none");
+            $(this).children(".icon-tianxie").css("display", "inline")
+            $(this).parents('.info_item').children('.textarea_box').hide()
+            $(this).parents('.info_item').find('.voice_first').show()
+            // if($(this).children(".voice_third").css("display") == "inline"){
+            //     $(this).parents('.info_item').children('.textarea_box').hide()
+            // }
+
+        } else if ($(this).children(".icon-tianxie").css("display") == "inline") {
+            $(this).children(".voice_btn").css("display","inline");
+            $(this).children(".icon-tianxie").css("display","none")
+            $(this).parents('.info_item').children('.textarea_box').show()
+            $(this).parents('.info_item').find('.voice_first').hide()
+            // if($(this).children(".voice_third").css("display") == "inline"){
+            //     $(this).parents('.info_item').children('.textarea_box').hide()
+            // }
+        }
+    })
+
+
+    //点击正在播放按钮
+    $('.icon-luying_ongoing').click(function () {
+        var videolist = $(".voice_module");
+        for (var i = 0; i < videolist.length; i++) {
+            var videoid = $(videolist[i]).attr("video-id");
+            if (videoid == title_id) {
+                $(videolist[i]).show();
+                $(videolist[i]).children('.voice_second').hide()
+                $(videolist[i]).children('.voice_third').show();
+            }
+        }
+    })
+
+
+    var times = "";//倒计时总秒数量
+    var time = "";
+
+    function countDown(times) {
+        var timer = null;
+        timer = setInterval(function () {
+            var day = 0,
+                hour = 0,
+                minute = 0,
+                second = 0;//时间默认值
+            if (times > 0) {
+                day = Math.floor(times / (60 * 60 * 24));
+                hour = Math.floor(times / (60 * 60)) - (day * 24);
+                minute = Math.floor(times / 60) - (day * 24 * 60) - (hour * 60);
+                second = Math.floor(times) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
+            }
+            if (day <= 9) day = '0' + day;
+            if (hour <= 9) hour = '0' + hour;
+            if (minute <= 9) minute = '0' + minute;
+            if (second <= 9) second = '0' + second;
+
+            $('#hour_show').html('<text id="h"></text>' + hour + ':');
+            $('#minute_show').html('<text></text>' + minute + ':');
+            $('#second_show').html('<text></text>' + second + '');
+
+            //
+            console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
+            times--;
+
+        }, 1000);
+        // if (times <= 0) {
+        //     clearInterval(timer);
+        // }
+
+        $('.pause').click(function () {
+            // timer(intDiff);
+            clearInterval(timer);
+            localStorage.setItem("times", times)
+        })
+        $('.stop').click(function () {
+            clearInterval(timer);
+            times = 0;
+        })
+        $('.stopping').click(function () {
+            clearInterval(timer);
+            localStorage.clear()
+        })
+    }
+
+    $('.start').click(function () {
+        time = localStorage.getItem("times")
+        if (time == null) {
+            times = parseInt(60)
+        } else {
+            times = time;
+        }
+        console.log(time)
+        countDown(times);
+        localStorage.setItem("times", times)
+    })
+
+
+    //添加一条新语音
+    var num = 0;
+    $('.voice_module').on('click', '.add_voice', function () {
+        // $('.voice_module').append($('.voice_list').html());
+        // $('.voice_list .voice_first').show()
+        // $('.add_icon').show()
+
+
+        // var parent = $(this).parents('.voice_module')
+        // parent.append($('.temp_list').clone());
+
+
+        // var videolist = $(".voice_module");
+        // for (var i = 0; i < videolist.length; i++) {
+        //
+        //     var videoid = $(videolist[i]).attr("video-id");
+        //     if (videoid == title_id) {
+        //         $(videolist[i]).show();
+        //         $(videolist[i]).append($('.voice_list').html());
+        //         $(videolist[i]).children('.voice_list .voice_first').show();
+        //         $('.icon_cancle').show()
+        //     }
+        // }
+
+        times=60
+        // clearInterval(timer);
+        var day = 0,
+            hour = 0,
+            minute = 0,
+            second = 0;//时间默认值
+        if (day <= 9) day = '0' + day;
+        if (hour <= 9) hour = '0' + hour;
+        if (minute <= 9) minute = '0' + minute;
+        if (second <= 9) second = '0' + second;
+
+        $('#hour_show').html('<text id="h"></text>' + hour + ':');
+        $('#minute_show').html('<text></text>' + minute + ':');
+        $('#second_show').html('<text></text>' + second + '');
+
+
+        num = num + 1
+        var parent = $(this).parents('.voice_module')
+        var html =  '<div class="voice_list" voiceitemid="'+num+'">\n' +
+            '<div class="voice_box voice_third" style="display: none;">\n' +
+            '           <div class="voice_item">\n' +
+            '               <text class="iconfont icon-luyin voice_icon"></text>\n' +
+            '               <text class="voice_font luyin">点击图标可播放 时长:10秒</text>\n' +
+            '           </div>\n' +
+            '           <div class="voice_btn_box">\n' +
+            '               <text class="iconfont icon-quxiao cancle_voice"></text>\n' +
+            // '               <text class="iconfont icon-tianjia add_voice"></text>\n' +
+            '           </div>\n' +
+            '    </div>\n' +
+            '    <div class="voice_box voice_first">\n' +
+            '      <div class="voice_item">\n' +
+            '       <text class="iconfont icon-huatong mike voice_icon"></text>\n' +
+            '       <text class="voice_font huatong">点击图标开始语音语音最长60秒</text>\n' +
+            '      </div>\n' +
+            '    <div class="voice_btn_box">\n' +
+            '        <text class="iconfont icon-quxiao icon_cancle cancle_voice"></text>\n' +
+            '    </div>\n' +
+            '   </div>\n' +
+            '</div>'
+
+
+        // parent.append($('.voice_list').html());
+        parent.append(html)
+
+    })
+
+    //显示弹窗
+    var videoid=''
+    //生命全局唯一 音频
+    var voiceBox;
+    $(document).on("click", ".mike", function () {
+        $('.first').show()
+        $('.play').show()
+        $('.start').show()
+        $('.stopping').hide()
+        $('.stop').hide()
+        $('.next_step').hide();
+        voiceBox = $(this).parents('.voice_list');
+    });
+
+    //删除语音
+    $(".voice_module").on("click",".cancle_voice",function(){
+        $(this).parents(".voice_box").remove();
+    })
+
+    //开始录音
+    $('.start').click(function () {
+        $('.start').hide()
+        $('.play').hide()
+        $('.pause').show()
+        $('.stopping').show()
+        $('.next_step').hide()
+    })
+
+    //暂停
+    $('.pause').click(function () {
+        $('.pause').hide()
+        $('.start').show()
+        $('.stopping').hide()
+
+    })
+
+    //停止录音
+    $('.stopping').click(function () {
+        $('.next_step').show()
+        $('.stop').show()
+        $('.pause').hide()
+    })
+
+    //下一步
+    $('.next_step').click(function () {
+        $('.first').hide()
+        $('.second').show()
+    })
+
+    //点击试听
+    $('.audition').click(function () {
+        // var videolist = $(".voice_module");
+        // for (var i = 0; i < videolist.length; i++) {
+        //     var videoid = $(videolist[i]).attr("video-id");
+        //     if (videoid == title_id) {
+        //         $('.second').hide()
+        //         $(videolist[i]).show();
+        //         $(videolist[i]).children('.voice_list').hide()
+        //         $(videolist[i]).children('.voice_third').show();
+        //     }
+        // }
+    })
+
+
+    //我要发送
+    $('.submit_voice').click(function () {
+
+        // var videolist = $(".voice_module");
+        // console.log(videolist,videolist.length)
+        // for (var i = 0; i<videolist.length; i++) {
+        //      videoid = $(videolist[i]).attr("video-id");
+        //     if (videoid == title_id) {
+        //     $('.second').hide()
+        //     $(videolist[i]).children(".voice_list").children('.voice_first').hide()
+        //     $(videolist[i]).children(".voice_list").children('.voice_third').show();
+        //     }
+        // }
+
+
+        voiceBox.find('.voice_first').hide().siblings('.voice_third').show()
+        $('.second').hide()
+
+    })
+
+    //重新录制
+    $('.rerecord').click(function () {
+        $('.first').show()
+        $('.second').hide()
+        $('.stop').hide()
+        $('.stopping').hide()
+        $('.start').show()
+        $('.start').show()
+    })
+    //上传图片
+    $(function () {
+        var tmpl = '<li class="weui-uploader__file" style="background-image:url(#url#)"></li>',
+            $gallery = $("#gallery"), $galleryImg = $("#galleryImg"),
+            $uploaderInput = $("#uploaderInput"),
+            $uploaderFiles = $("#uploaderFiles")
+        ;
+
+        $uploaderInput.on("change", function (e) {
+            // console.log(e)
+            var src, url = window.URL || window.webkitURL || window.mozURL, files = e.target.files;
+            for (var i = 0, len = files.length; i < len; ++i) {
+                var file = files[i];
+                console.log(url.createObjectURL(file))
+
+                if (url) {
+                    src = url.createObjectURL(file);
+                    // var
+                } else {
+                    src = e.target.result;
+                }
+                $uploaderFiles.append($(tmpl.replace('#url#', src)));
+            }
+        });
+        $uploaderFiles.on("click", "li", function () {
+            $galleryImg.attr("style", this.getAttribute("style"));
+            $gallery.fadeIn(100);
+        });
+        $gallery.on("click", function () {
+            $gallery.fadeOut(100);
+        });
+    });
+
+    //提交按钮
+    // $('.submit').click(function () {
+    //     $('.box').show().delay(2000).hide(2)
+    // })
+
+    //我要转诊表单判断
+    $('.referral_btn').click(function () {
+        var user_name = $('#user_name').val()
+        var user_sex = $('#user_sex').val()
+        var user_age = $('#user_age').val()
+        var user_address = $('#user_address').val()
+        var disease_type = $('#disease_type').val()
+        var expert = $('#expert').val()
+        var behavior = $('#behavior').val()
+        var examination = $('#examination').val()
+        var diagnosis = $('#diagnosis').val()
+        var drugs = $('#drugs').val()
+        var confused = $('#confused').val()
+
+        if (user_name == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('姓名不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (user_sex == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('性别不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (user_age == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('年龄不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (user_address == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('地址不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (disease_type == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('疾病种类不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (expert == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('转诊专家不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (behavior == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('临床表现不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (examination == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('已做检查不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (diagnosis == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('目前诊断不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (drugs == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('已用药物不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (confused == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('当前困惑不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else {
+            $('.box').show().delay(2000).hide(2)
+        }
+    })
+
+    //我要进修表单判断
+    $('.train_btn').click(function () {
+        var unit = $('#unit').val()
+        var user_name = $('#user_name').val()
+        var profession = $('#profession').val()
+        var duration = $('#duration').val()
+        var level = $('#level').val()
+        var card_num = $('#card_num').val()
+        var id_card = $('#id_card').val()
+        var nation = $('#nation').val()
+        var school = $('#school').val()
+        var principal = $('#principal').val()
+        var phone_num = $('#phone_num').val()
+        var unit_address = $('#unit_address').val()
+        var job_title = $('#job_title').val()
+        var need_info = $('#need_info').val()
+
+        if (unit == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('单位不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (user_name == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('姓名不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (profession == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('进修专业不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (duration == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('进修时长不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (level == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('文化程度不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (card_num == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('医师资格证号不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (id_card == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('身份证号不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (nation == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('民族不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (school == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('毕业学校不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (principal == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('科室负责人不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (phone_num == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('科室电话不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (unit_address == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('单位地址不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (job_title == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('当前职称不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else if (need_info == '') {
+            $('.form_popup_box').show()
+            $('.form_popup_box').text('进修要求不能为空')
+            $('.form_popup_box').delay(1000).hide(0);
+        } else {
+            $('.box').show().delay(2000).hide(2)
+        }
+    })
+</script>
 </body>
 </html>
\ No newline at end of file
--
libgit2 0.24.0