Commit 0e38d764 by hanpeng

Merge branch 'dev' of 192.168.2.12:kevinhan/wechat_lung into dev

# Conflicts: # wechat_lung_push_doctor/javaScript/createTreatmentInfo.js
parents f4d02323 2ebfed63
<<<<<<< HEAD
define(['zepto', 'medtap'], function($, medtap) { define(['zepto', 'medtap'], function($, medtap) {
var treatment = { var treatment = {
pointList: '', pointList: '',
...@@ -73,3 +74,76 @@ define(['zepto', 'medtap'], function($, medtap) { ...@@ -73,3 +74,76 @@ define(['zepto', 'medtap'], function($, medtap) {
} }
treatment.init(); treatment.init();
}) })
=======
define(['zepto','medtap'],function($,medtap){
var treatment = {
pointList:'',
init:function(){
treatment.bindEve();
},
bindEve:function(){
$('#hasPoint').on('click',function(){
$('.select_btn_warp').show();
$('.content_mod').show();
$('.select_item').on('click',function(){
$(this).children('img').attr('src', '../images/pop_select_active@2x.png');
$(this).siblings('.select_item').children('img').attr('src', '../images/pop_select_default@2x.png');
$(this).attr('data-select', 'yes');
$(this).siblings('.select_item').attr('data-select', 'no');
if($('.yes').attr('data-select') == 'yes'){
$('.select_btn_list .select_btn_item').removeAttr('disabled');
$('.select_btn_list .select_btn_item').removeClass('dis');
}else if($('.no').attr('data-select') == 'yes'){
$('.select_btn_list .select_btn_item').addClass('dis');
$('.select_btn_list .select_btn_item').removeClass('selectOn');
$('.select_btn_list .select_btn_item').attr('disabled','disabled');
}
})
$('.select_btn_list .select_btn_item').on('click',function(){
if($('.yes').attr('data-select') == 'yes'){
//$(this).toggleClass('selectOn');
if($(this).hasClass('selectOn')){
$(this).removeClass('selectOn');
}else{
$(this).addClass('selectOn');
}
}else if($('.no').attr('data-select') == 'yes'){
}
})
});
$('.content_mod').on('click',function(){
$('.select_btn_warp').hide();
$('.content_mod').hide();
});
$('.select_btn_confirm').on('click',function(){
treatment.pointList ='';
$('.select_btn_warp').hide();
$('.content_mod').hide();
var str = [];
if($('.yes').attr('data-select') == 'yes'){
$('.select_btn_list .select_btn_item').each(function(index, el) {
var selectValue = $(this).text();
if($(this).hasClass('selectOn')){
str.push(selectValue);
treatment.pointList = str.join(',');
}else{
}
});
}else if($('.no').attr('data-select') == 'yes'){
}
$('.hasPoint').text(treatment.pointList)
});
},
}
treatment.init();
})
>>>>>>> 2ebfed631022216f46ee580f29a192aef707288f
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment