\ \ \ \
\
\
\ \ \
\
\ \
\ \ \
\
\
\ \ \
\
\ \
\ '; var contentlist = '
\ \
\ \ \ \
\
\
\ \ \ \
\
例:2013-9-20 下午三点
\
\
\ \ \
\
\
\ \ \
\
\ \
\
'; art.dialog({ title: '选择咨询老师', content: content, lock: true, cancel: true, width: '670px', height:'300px', ok: function() { if ($('#conDate').val() == '') $('#conDate').focus(); else if ($('#Consult_question').val() == '') $('#Consult_question').focus(); else { var checkValue = $("#change_guider").val(); $("#hiddentext").attr('value', ''); $("#hiddentext").attr('value', checkValue); $("#consult-form").submit(); } return false; } }); $("#consult-form").Validform({ tiptype: function(msg, o, cssctl) { if (!o.obj.is("form")) { var objtip = o.obj.parents('div.row').find("div.Validform_checktip"); cssctl(objtip, o.type); objtip.text(msg); } } }); function strtotime(date) { return date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate(); } var temp_date = new Date().getTime(); $("#conDate").datepicker({ changeYear: true, changeMonth: true, yearRange: "c:+1", //minDate: "", minDate: "2026-08-26", defaultDate: "2026-08-26", beforeShowDay: function(date) { //日期模式 var dayjson = json['day']; var k = strtotime(date); if (dayjson && dayjson[k]) { return [true, 'dayTip', '']; } //星期模式 var flag = false; var d = date.getDay(); var weekjson = json['week'] || []; for (var i = 0; i < weekjson.length ; i++) { for (var j = 0; j< weekjson[i].length ; j++) { if(weekjson[i][j] == 0){ flag = true; } else if (weekjson[i][j] ==7 && d ==0) { flag = true; } else if (weekjson[i][j] == d) { flag = true; } }; }; if(flag){ return [true, 'dayTip', '']; } else { return [false, '', '']; } }, onClose: function(selectedDate) { var url = "/consult/gettime"; var tid = $("#Consult_tid").val(); $.post(url, {selectedDate: selectedDate, tid: tid}, function(data) { if (data.ret === 'success') { $("#guder_tip").attr("class", "Validform_checktip"); $("#guder_tip").html(""); $("#select_time").empty(); $("#select_time").html(data.msg); $("#conTime").show(); } else { $("#conTime").hide(); $("#select_time").empty(); $("#guder_tip").attr("class", "Validform_checktip Validform_wrong"); $("#guder_tip").html("该老师此日期没有可以预约的时间段"); $("#conDate").val(""); } }, 'json'); $(this).blur(); } }); $("#chooseTeacher").click(function() { var tid = $("#tid").val(); if (tid) { $("#chooseConsultForm").find("input[type=radio]").removeAttr("checked"); $("#l" + tid).find("input[type=radio]").attr("checked", "checked"); } else { $("#chooseConsultForm").find("input[type=radio]:eq(0)").attr("checked", "checked"); } var content = $("#chooseConsultForm").html(); var dialog = art.dialog({ title: '选择咨询老师', content: content, lock: true, cancel: true, ok: function() { var choose = $(".aui_border").find("input[type=radio]:checked"); var realName = choose.parent().next().text(); $("#conName").val(choose.val()); $("#realName").val(realName).removeClass('Validform_error'); $('#realName_Validform_checktip').removeClass('Validform_wrong').addClass('Validform_right').html(''); } }); }); }); });