...
|
...
|
@@ -23,13 +23,13 @@ |
|
|
<div class="title">
|
|
|
<text>姓名</text>
|
|
|
</div>
|
|
|
<div class="info_input"><input class="" type="text" placeholder="请填写姓名" id="user_name"></div>
|
|
|
<div class="info_input"><input type="text" placeholder="请填写姓名" id="user_name"></div>
|
|
|
</div>
|
|
|
<div class="info_item sex_type">
|
|
|
<div class="title">
|
|
|
<text>性别</text>
|
|
|
</div>
|
|
|
<div class="info_input"><input class="sex_value" type="text" placeholder="请选择性别" readonly
|
|
|
<div class="info_input"><input class="sex_value" type="text" data-var="0" placeholder="请选择性别" readonly
|
|
|
onfocus="this.focus()" id="user_sex">
|
|
|
<text class="iconfont icon-xiala"></text>
|
|
|
</div>
|
...
|
...
|
@@ -38,13 +38,13 @@ |
|
|
<div class="title">
|
|
|
<text>年龄</text>
|
|
|
</div>
|
|
|
<div class="info_input"><input class="" type="number" placeholder="请填写年龄" id="user_age"></div>
|
|
|
<div class="info_input"><input type="number" placeholder="请填写年龄" id="user_age"></div>
|
|
|
</div>
|
|
|
<div class="info_item">
|
|
|
<div class="title">
|
|
|
<text>地址</text>
|
|
|
</div>
|
|
|
<div class="info_input"><input class="" type="text" placeholder="请填写地址" id="user_address"></div>
|
|
|
<div class="info_input"><input type="text" placeholder="请填写地址" id="user_address"></div>
|
|
|
</div>
|
|
|
<div class="info_item inquiry_type">
|
|
|
<div class="title">
|
...
|
...
|
@@ -307,10 +307,10 @@ |
|
|
<div>已停止</div>
|
|
|
</div>
|
|
|
<div class="popup_center play start">
|
|
|
<img class="" src="__TMPL__/public/assets/images/eicon11@2x.png" alt="">
|
|
|
<img src="__TMPL__/public/assets/images/eicon11@2x.png" alt="">
|
|
|
</div>
|
|
|
<div class="popup_center stopping" hidden>
|
|
|
<img class="" src="__TMPL__/public/assets/images/eicon12@2x.png" alt="">
|
|
|
<img src="__TMPL__/public/assets/images/eicon12@2x.png" alt="">
|
|
|
</div>
|
|
|
<div class="popup_item next_step">
|
|
|
<img class="popup_icon" src="__TMPL__/public/assets/images/eicon10@2x.png" alt="">
|
...
|
...
|
@@ -344,9 +344,11 @@ |
|
|
<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="http://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
|
|
|
<!--<script src="__TMPL__/public/assets/js/referral.js"></script>-->
|
|
|
|
|
|
<script>
|
|
|
wx.config({$sdk});
|
|
|
var serverIds = '';
|
|
|
//文本框显示字数
|
|
|
$(".area").on("input propertychange", function () {
|
...
|
...
|
@@ -364,48 +366,82 @@ |
|
|
// 疾病分类下拉
|
|
|
$('.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)
|
|
|
}
|
|
|
<volist name='platment' id='vo'>
|
|
|
{label: '{$vo.name}', value: {$vo.id}},
|
|
|
</volist>
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
$('.expert_value').val('')
|
|
|
$('.expert_value').data('data-id','')
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('.inquiry_value').val(res[0].label)
|
|
|
$('.inquiry_value').data('data-id',res[0].value)
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
// 疾病分类下拉
|
|
|
$('.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)
|
|
|
var doctor = new Array()
|
|
|
var platment_id = $('.inquiry_value').data('data-id');
|
|
|
if (!platment_id) {
|
|
|
weui.toast('请先选择疾病分类!');
|
|
|
return;
|
|
|
}
|
|
|
$.ajax({
|
|
|
url: "{:url('getExportByPlatment')}",
|
|
|
data: {
|
|
|
platment_id: platment_id
|
|
|
},
|
|
|
type: 'POST',
|
|
|
success: function (res) {
|
|
|
console.log(res);
|
|
|
|
|
|
if(res.data.length>0){
|
|
|
for (key in res.data) {
|
|
|
var info = new Object();
|
|
|
info.label = res.data[key].user_login;
|
|
|
info.value = res.data[key].id;
|
|
|
doctor[key] = info
|
|
|
}
|
|
|
}else{
|
|
|
weui.toast('暂无专家!');
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
console.log(doctor);
|
|
|
var doctor1 = new Array();
|
|
|
weui.picker(doctor, {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('.expert_value').val(res[0].label)
|
|
|
$('.expert_value').data('data-id', res[0].value)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
})
|
|
|
// 性别分类
|
|
|
$('.sex_type').click(function () {
|
|
|
weui.picker([
|
|
|
{label: '男', value: 0},
|
|
|
{label: '女', value: 1}
|
|
|
{label: '男', value: 1},
|
|
|
{label: '女', value: 2}
|
|
|
], {
|
|
|
onChange: function (res) {
|
|
|
console.log(res)
|
|
|
},
|
|
|
onConfirm: function (res) {
|
|
|
$('.sex_value').val(res[0].label)
|
|
|
$('.sex_value').val(res[0].label);
|
|
|
$('.sex_value').attr('data-var',res[0].value)
|
|
|
}
|
|
|
}
|
|
|
)
|
|
|
})
|
|
|
|
|
|
// 性别分类
|
|
|
$('.unit_type').click(function () {
|
|
|
weui.picker([
|
...
|
...
|
@@ -781,7 +817,10 @@ |
|
|
$('.addpic').on('click', function (res) {
|
|
|
var length = $('.length').length;
|
|
|
if (length >= 9) {
|
|
|
weui.toast('不能上传了')
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('不能上传了');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
$('#addpic').hide();
|
|
|
return false;
|
|
|
}
|
...
|
...
|
@@ -824,7 +863,7 @@ |
|
|
//提交按钮
|
|
|
$('.submit').click(function () {
|
|
|
var user_name = $('#user_name').val();
|
|
|
var user_sex = $('#user_sex').val();
|
|
|
var user_sex = $('#user_sex').attr('data-var');
|
|
|
var user_age = $('#user_age').val();
|
|
|
var user_address = $('#user_address').val();
|
|
|
if (user_name == '') {
|
...
|
...
|
@@ -832,7 +871,7 @@ |
|
|
$('.form_popup_box').text('姓名不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return false;
|
|
|
} else if (user_sex == '') {
|
|
|
} else if (user_sex == ''||user_sex==0) {
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('性别不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
...
|
...
|
@@ -852,13 +891,17 @@ |
|
|
/*获取疾病分类*/
|
|
|
var ill_id=$('.inquiry_value').data('data-id');
|
|
|
if(!ill_id){
|
|
|
weui.toast('疾病分类不能为空!');
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('疾病分类不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
/*获取问诊专家*/
|
|
|
var expert_id=$('.expert_value').data('data-id');
|
|
|
if(!expert_id){
|
|
|
weui.toast('问诊专家不能为空!');
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('问诊专家不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
|
...
|
...
|
@@ -884,7 +927,9 @@ |
|
|
var clinical=$('.textarea1').val();
|
|
|
var clinical_type='2';
|
|
|
if (!clinical){
|
|
|
weui.toast('临床表现不能为空!');
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('临床表现不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -911,7 +956,9 @@ |
|
|
var inspected=$('.textarea1').val();
|
|
|
var inspected_type='2';
|
|
|
if (!inspected){
|
|
|
weui.toast('已做检查不能为空!')
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('已做检查不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -936,7 +983,9 @@ |
|
|
var diagnose=$('.textarea3').val();
|
|
|
var diagnose_type='2';
|
|
|
if (!diagnose){
|
|
|
weui.toast('目前诊断不能为空!')
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('目前诊断不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -961,7 +1010,9 @@ |
|
|
var used_drugs=$('.textarea3').val();
|
|
|
var used_drugs_type='2';
|
|
|
if (!used_drugs){
|
|
|
weui.toast('已用药物不能为空!')
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('已用药物不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -987,7 +1038,9 @@ |
|
|
var problem=$('.textarea5').val();
|
|
|
var problem_type='5';
|
|
|
if (!problem){
|
|
|
weui.toast('当前困惑不能为空!')
|
|
|
$('.form_popup_box').show();
|
|
|
$('.form_popup_box').text('当前困惑不能为空');
|
|
|
$('.form_popup_box').delay(1000).hide(0);
|
|
|
return;
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -1027,69 +1080,6 @@ |
|
|
})
|
|
|
})
|
|
|
|
|
|
//我要转诊表单判断
|
|
|
$('.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)
|
|
|
}
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |
|
|
\ No newline at end of file |
...
|
...
|
|