Initial commit,修正
This commit is contained in:
Executable
+182
@@ -0,0 +1,182 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
<!--日期时间选择器-->
|
||||
<?=Html::jsFile('@web/js/plugins/layer/laydate/laydate.js')?>
|
||||
<?=Html::cssFile('@web/js/plugins/layer/laydate/need/laydate.css')?>
|
||||
<?=Html::cssFile('@web/js/plugins/layer/laydate/skins/molv/laydate.css')?>
|
||||
|
||||
<!--滑块选择器-->
|
||||
<?=Html::cssFile('@web/css/plugins/ionRangeSlider/ion.rangeSlider.css')?>
|
||||
<?=Html::cssFile('@web/css/plugins/ionRangeSlider/ion.rangeSlider.skinFlat.css')?>
|
||||
<?=Html::jsFile('@web/js/plugins/ionRangeSlider/ion.rangeSlider.min.js')?>
|
||||
|
||||
<!--旋扭输入-->
|
||||
<?=Html::jsFile('@web/js/plugins/jsKnob/jquery.knob.js')?>
|
||||
|
||||
|
||||
<!--下拉选择、选项框-->
|
||||
<?=Html::cssFile('@web/css/plugins/chosen/chosen.css')?>
|
||||
<?=Html::jsFile('@web/js/plugins/chosen/chosen.jquery.js')?>
|
||||
|
||||
<div class="wrapper wrapper-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5>板车资料</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link">
|
||||
<i class="fa fa-chevron-up"></i>
|
||||
</a>
|
||||
|
||||
<a class="close-link">
|
||||
<i class="fa fa-times"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="alert alert-info">
|
||||
此处录入公司大板车辆的基础资料
|
||||
</div>
|
||||
<form role="form" class="form-horizontal m-t" method="post" action="<?=Url::toRoute('truck/save')?>" >
|
||||
<input type="hidden" name="_csrf-backend" value="<?=Yii::$app->getRequest()->getCsrfToken();?>" />
|
||||
<input type="hidden" name="id" value="<?=isset($detail['id'])?$detail['id']:0;?>">
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label"><span class="red">*</span>车牌:</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group">
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary">省份标识</button>
|
||||
</span>
|
||||
<select data-placeholder="" class="form-control chosen-select" tabindex="3" name="num_p">
|
||||
<option value=""></option>
|
||||
<?php foreach(Yii::$app->params['carRegion'] as $key=>$val){?>
|
||||
<option value="<?=$val?>" hassubinfo="true" <?=isset($detail['num_p']) && $detail['num_p']==$val ? 'selected':'';?>><?=$val?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary">区域代码</button>
|
||||
</span>
|
||||
<select data-placeholder="" class="form-control chosen-select" tabindex="4" name="num_area">
|
||||
<option value=""></option>
|
||||
<?php foreach(Yii::$app->params['letters'] as $val){?>
|
||||
<option value="<?=$val?>" hassubinfo="true" <?=isset($detail['num_area']) && $detail['num_area']==$val ? 'selected':'';?>><?=$val?></option>
|
||||
<?php }?>
|
||||
</select>
|
||||
<span class="input-group-btn">
|
||||
<button type="button" class="btn btn-primary">尾号</button>
|
||||
</span>
|
||||
<input class="form-control" type="text" name="num_left" placeholder="车牌尾数" autocomplete="off" value="<?=isset($detail['num_left'])?$detail['num_left']: ''?>">
|
||||
</div>
|
||||
</div>
|
||||
<label class="col-sm-1 control-label">排序:</label>
|
||||
<div class="col-sm-2">
|
||||
<input class="form-control" type="text" name="order_by" placeholder="" autocomplete="off" value="<?=isset($detail['order_by'])?$detail['order_by']: ''?>">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">板位:</label>
|
||||
<div class="col-sm-9">
|
||||
<input id="max_cars" name="max_cars" type="number" value="<?=isset($detail['max_cars'])?($detail['max_cars']>=10?10:$detail['max_cars']):8?>">
|
||||
</div>
|
||||
<script>
|
||||
var max_cars = <?=isset($detail['max_cars'])?($detail['max_cars']>=10?10:$detail['max_cars']):8?>;
|
||||
max_cars = max_cars < 0 ? 0 : max_cars;
|
||||
$("#max_cars").ionRangeSlider({
|
||||
min: 0,
|
||||
max: 10,
|
||||
postfix: " 位板",
|
||||
from: max_cars
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">主驾司机:</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="driver_title" id="driver-title" value="<?=isset($detail['driver_title'])?$detail['driver_title']:'';?>" placeholder="点击选择关联司机" autocomplete="off" href="<?=Url::toRoute(['driver/select','callback'=>'driver']);?>" w="80%;" h="90%;" title="选择关联司机" mini="load">
|
||||
<input type="hidden" class="form-control" name="driver" id="driver-value" value="<?=isset($detail['driver_id'])?$detail['driver_id']:0;?>">
|
||||
</div>
|
||||
|
||||
<label class="col-sm-1 control-label">副驾司机:</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="text" class="form-control" name="driver2_title" id="driver2-title" value="<?=isset($detail['driver2_title'])?$detail['driver2_title']:'';?>" placeholder="点击选择关联司机" autocomplete="off" href="<?=Url::toRoute(['driver/select','callback'=>'driver2']);?>" w="80%;" h="90%;" title="选择关联司机" mini="load">
|
||||
<input type="hidden" class="form-control" name="driver2" id="driver2-value" value="<?=isset($detail['driver2_id'])?$detail['driver2_id']:0;?>">
|
||||
</div>
|
||||
<script>
|
||||
function selectDriver(title,id,callback)
|
||||
{
|
||||
layer.closeAll();
|
||||
layer.msg('已选择');
|
||||
$('#'+callback+'-value').val(id);
|
||||
$('#'+callback+'-title').val(title);
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
|
||||
<div class="form-group draggable">
|
||||
<label class="col-sm-1 control-label">板车状态:</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<?php foreach($status as $vo=>$ko):?>
|
||||
<div class="radio radio-primary radio-inline">
|
||||
<input type="radio" <?=((isset($detail['status_code'])&&$detail['status_code']==$vo)||(!isset($detail['status_code'])&&$vo==1))?'checked':'';?> value="<?=$vo?>" id="status_code" name="status_code" disabled="">
|
||||
<label for="status_code"><?=$ko?></label>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="hr-line-dashed"></div>
|
||||
<div class="form-group draggable">
|
||||
<div class="col-sm-12 col-sm-offset-3">
|
||||
<button class="btn btn-primary" type="submit">保存内容</button>
|
||||
<button class="btn btn-white" type="submit">取消</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function showImageFrame(obj){
|
||||
//取预设参数
|
||||
var id,title,width,height,url;
|
||||
id = $(obj).attr('data-id');
|
||||
title = $(obj).attr('data-title');
|
||||
width = $(obj).attr('data-width');
|
||||
height = $(obj).attr('data-height');
|
||||
url = $(obj).attr('data-src');
|
||||
//iframe层
|
||||
parent.layer.open({
|
||||
type: 2,
|
||||
title: title,
|
||||
shadeClose: true,
|
||||
shade: 0.8,
|
||||
area: [width, height],
|
||||
content: url //iframe的url
|
||||
});
|
||||
}
|
||||
|
||||
function deleteImage(elm){
|
||||
$(elm).prev().attr("src", "../img/nopic.jpg");
|
||||
$(elm).parent().prev().find("input").val("");
|
||||
parent.layer.msg('图片已删除;您可重新上传');
|
||||
}
|
||||
|
||||
function selectImage(title,path,src,callback)
|
||||
{
|
||||
layer.closeAll();
|
||||
layer.msg('图片已选择');
|
||||
$('#'+callback+'-value').val(path);
|
||||
$('#'+callback+'-preview').attr('src',src);
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user