作者 曹东东

1

... ... @@ -75,9 +75,11 @@ class SxBasement extends Frontend
if(!isset($params['station_id']) || empty($params['station_id'])){
$this->error('请选择工位');
}
if(!isset($params['enter_id']) || empty($params['enter_id'])){
if($params['station_type'] == 2 ) {
if(empty($params['enter_id'])) {
$this->error('请选择公司');
}
}
$startTime = strtotime($params['station_date'].$params['station_start_time']);
$endTime = strtotime($params['station_date'].$params['station_end_time']);
... ...
... ... @@ -713,7 +713,7 @@
<span><span class="required_s">*</span>参与人数</span>
<input name="station_user_count" type="text" class="form_input" placeholder="参与人数" />
</div>
<div class="input_control">
<div class="input_control" id="company">
<span><span class="required_s">*</span>选择公司</span>
<select class="apply_type enter_id" name="enter_id" lay-verify="" style="width: 70%;">
{foreach name='buildingEnter' item='vo'}
... ...
... ... @@ -121,6 +121,15 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'
});
//工位
$(document).on('change',".station_type",function () {
var val = $(".station_type").find("option:selected").val();
if(val == 2) {
$("#company").show();
}else {
$("#company").hide();
}
});
$("#company").hide();
$(document).on('click','#stations li:first-child, #stations li:not(:first-child),#stations li:not(:first-child),#stations li:not(:first-child)',function(){
// $(this).children('a').children('div').children('div').addClass("conditions_select");
// $(this).siblings('li').children('a').removeClass("conditions_select");
... ... @@ -215,10 +224,11 @@ define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'
layer.msg('参与人数不能为空');
return false;
}
if (enter_id == ''){
if(apply_type == 2 && enter_id == '') {
layer.msg('公司不能为空');
return false;
}
// setTimeout(function () {
// layer.msg('提交成功');
// }, 1000);
... ...