|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356 |
- <?php
- /**
- * Created by PhpStorm.
- * User: luocj
- * Date: 2017/2/15
- * Time: 11:38
- */
-
- use common\components\zActiveForm;
- use yii\widgets\Pjax;
- use common\models\BaseButtonPermission;
- use yii\helpers\Html;
- use backend\modules\motorcade\models\BusSearch;
- use backend\modules\api\models\DictType;
- use yii\helpers\Url;
-
- if ($model == '') {
- $model = new BusSearch(['scenario' => 'add_bus']);
- }
- ?>
- <style>
- body {
- background: none;
- }
-
- #bus_department {
- display: inline-block;
- }
-
- .form-group {
- display: inline-block;
- }
-
- /*p{*/
- /*display: inherit!important;*/
- /*}*/
- /*.help-block{*/
- /*display: inline-block!important;*/
- /*}*/
- .main {
- height: 65px;
- }
-
- .modal-open .datepicker {
- z-index: 101005 !important;
- }
-
- #seat_count1 {
- display: inline-block;
- }
-
- .modal-footer {
- text-align: left;
- }
-
- #bussearch-bus_belong {
- line-height: 25px;
- }
-
- .portlet > .portlet-body p {
- margin-top: 0;
- font-size: 12px;
- }
-
- .field-seat_type {
- vertical-align: top;
- }
-
- .field-seat_count {
- vertical-align: top;
- }
-
- #bus_company1 {
- margin-left: 35px;
- }
-
- .tab-content .form-group label {
- width: 50px !important;
- text-align: right;
- }
-
- .c_red {
- color: #e02222;
- }
-
- .date {
- width: 275px !important;
- }
-
- .search_name_this {
- display: inline-block !important;
- /*padding-left: 40px!important;*/
- padding-left: 0px !important;
- width: 91px !important;
- text-align: right !important;
- color: #80889a;
- }
-
- .search_name {
- display: inline-block !important;
- /*padding-left: 40px!important;*/
- padding-left: 15px !important;
- width: 115px !important;
- text-align: right !important;;
- }
-
- #bussearch-bus_belong > label {
- margin-left: 5px;
- margin-right: 10px
- }
-
- .form-inline {
- margin-bottom: 25px;
- margin-left: 0px;
- }
-
- .help-block {
- position: absolute;
- margin-left: 0px !important;
- }
-
- .form-horizontal .form-group {
- margin-right: 0 !important;
- margin-left: 0 !important;
- }
-
- .span_left {
- width: 90px;
- text-align: right;
- display: inline-block;
- color: #80889a;
- }
-
- li > a {
- color: #80889a;
- }
-
- li > .active > a {
- color: #3e4355;
- }
-
- .old-nav {
- color: #80889a;
- cursor: pointer;
-
- }
-
- .old-nav:hover, .old-nav:focus, .old-nav:active {
- text-decoration: none;
- }
-
- .new-nav {
- color: #3e4355;
- text-decoration: none;
- }
-
- .new-nav:hover, .new-nav:focus, .new-nav:active {
- text-decoration: none;
- }
-
- * {
- color: #80889a;
- font-size: 12px;
- }
-
- label {
- color: #80889a;
- }
-
- /*.toGrey {*/
- /*background: lightgrey !important;*/
- /*border: lightgray !important;*/
- /*}*/
- </style>
- <?php $this->registerJs('z.init()'); ?>
- <div class="iframe_box">
- <header style="margin-top:15px">
- <a class="old-nav" href="/motorcade/resource/bus-list">安全机务 / </a>
- <a class="old-nav" href="/motorcade/resource/bus-list">车辆管理 / </a>
- <span class="new-nav">添加车辆</>
- </header>
- <ul class="nav nav-tabs nav_title" role="tablist" style="margin-top:40px">
- <li href="#tab1" role="presentation" class="active" data-toggle="tab">
- <a style="cursor: pointer">基本信息</a>
- </li>
- <li href="#tab4" onclick='Command: parent.toastr["warning"]("请先保存车辆基本信息");' disabled="disabled"
- id="bus_attached" role="presentation" class="width5 hidden">
- <a style="cursor: pointer">合作经营协议</a>
- </li>
- <li href="#tab2" onclick='Command: parent.toastr["warning"]("请先保存车辆基本信息");' disabled="disabled"
- role="presentation" class="">
- <a style="cursor: pointer">运营资质</a>
- </li>
- <li href="#tab3" onclick='Command: parent.toastr["warning"]("请先保存车辆基本信息");' role="presentation" class="">
- <a style="cursor: pointer">保养</a>
- </li>
- </ul>
- <div role="tabpanel" class="tab-pane" id="tab1">
- <?php $form = zActiveForm::begin(['action' => '/motorcade/base-bus/add-bus?tab=tab2', 'id' => 'form', 'enableAjaxValidation' => true, 'validationUrl' => Url::toRoute(['validate-form']), 'options' => ['class' => 'form-horizontal', 'style' => 'border-left:1px solid #ddd;border-right:1px solid #ddd;border-bottom:1px solid #ddd']]); ?>
- <!--所属车队-->
- <div class="form-inline">
- <div class="form-group" style="margin-top: 10px;">
- <span class="span_left">
- <span class="c_red">*</span>所属车队:
- </span>
- <?= $form->field($model, 'BUS_BELONG')->radioList(\yii\helpers\ArrayHelper::map(DictType::findAll(['PARENT_ID' => 522]), 'ID', 'TYPE_NAME'), ['style' => 'display:inline-block;', 'onclick' => 'showBusCompany(\'BusSearch\')'])->label(false) ?>
- <div id="bus_company" style="display: none;vertical-align: top;">
- <?= $form->field($model, 'ORG_ID')->dropDownList(\yii\helpers\ArrayHelper::map(BusSearch::getBusCompany(), 'id', 'supplier_name'), ['class' => 'form-control select2 select2-hidden-accessible js-example-placeholder-single1', 'style' => 'display:inline-block', 'id' => 'bus_company'])->label(false); ?>
- </div>
- </div>
- </div>
- <!--车牌号-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- <span class="c_red">*</span>车牌号:
- </span>
- <?= $form->field($model, 'BUS_NO')->textInput(['placeholder' => '请输入车牌号', 'style' => 'width:275px;'])->label(false) ?>
- </div>
- </div>
-
- <!--品牌-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- <span class="c_red">*</span>品牌:
- </span>
- <?= $form->field($model, 'BRAND_ID')->dropDownList(\yii\helpers\ArrayHelper::map(BusSearch::getBrands(), 'res_id', 'res_name'), ['prompt' => '请选择', 'class' => 'form-control', 'style' => 'width:275px'])->label(false)->error(false) ?>
- </div>
- </div>
- <!--型号-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- 型号:
- </span>
- <?= $form->field($model, 'BUS_LICENSE')->textInput(['placeholder' => '请输入型号', 'style' => 'width:275px;display:inline-block'])->label(false)->error(false) ?>
- </div>
- </div>
- <!--燃料形式-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- <span class="c_red">*</span>燃料形式:
- </span>
- <?= $form->field($model, 'FUEL_FORM')->dropDownList(\yii\helpers\ArrayHelper::map(BusSearch::getFuel(), 'id', 'type_name'), ['prompt' => '请选择', 'class' => 'form-control', 'id' => 'fuelType', 'onChange' => 'fuelChange()', 'style' => 'width:275px;display:inline-block'])->label(false)->error(false) ?>
- </div>
- </div>
- <!--标准油耗-->
- <div class="form-inline">
- <div class="form-group">
- <span id="staFuel" class="span_left">标准油耗:</span>
- <?= $form->field($model, 'MPG')->textInput(['placeholder' => '请输入标准油耗', 'style' => 'width:150px;display:inline-block;'])->label(false); ?>
- </div>
- <div class="form-group">
- <span id="Units" class=""> 升 / 百公里</span>
- </div>
- </div>
- <!--座位-->
- <div class="form-inline">
- <div class="form-group">
- <span class="search_name_this"><span class="c_red">*</span>座位:</span>
- </div>
- <div class="form-group">
- <span style="margin-left: 17px;">客座数:</span>
- <?= $form->field($model, 'SEAT_TYPE')->dropDownList(\yii\helpers\ArrayHelper::map($model->getSeatType(), 'id', 'type_name'), ['prompt' => '请选择', 'class' => 'form-control', 'style' => 'display:inline-block;', 'id' => 'seat_type', 'onchange' => 'changeSeatCount()'])->label(false)->error(false) ?>
- <?php Pjax::begin(['id' => 'seat_count1']) ?>
- <?= $form->field($model, 'BUS_TYPE_RES_ID')->dropDownList(\yii\helpers\ArrayHelper::map($data, 'res_id', 'res_name'), ['prompt' => '请选择', 'class' => 'form-control', 'id' => 'seat_count', 'style' => 'display:inline-block;width:100px;vertical-align: top;', 'onchange' => 'changeSeatCount1()'])->label(false)->error(false) ?>
- <?php Pjax::end() ?>
- </div>
- <div class="form-group">
- <span
- style="margin-left: 17px;height: 16px;display: inline-block;vertical-align: middle;">核载数:</span>
- <?= $form->field($model, 'MAX_COUNT')->textInput(['placeholder' => '请输入核载数', 'style' => 'width:100px;display:inline-block;'])->label(false); ?>
- </div>
- </div>
- <!--购车日期-->
- <div class="form-inline">
- <div class="form-group">
- <span class="search_name_this"><span class="c_red">*</span>购车日期:</span>
- <?= $form->field($model, 'BUY_DATE', ['template' => '<div class="input-group date form_date">' .
- '{input}<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' .
- '</div>'])->textInput([$op_true_false => '', 'value' => $basic_info['BUY_DATE']])
- ?>
- </div>
- </div>
- <!--注册日期-->
- <div class="form-inline">
- <div class="form-group">
- <span class="search_name_this"><span class="c_red">*</span>注册日期:</span>
- <?= $form->field($model, 'REGISTER_TIME', ['template' => '<div class="input-group date form_date">' .
- '{input}<span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>' .
- '</div>'])->textInput([$op_true_false => '', 'value' => $basic_info['REGISTER_TIME']])
- ?>
- </div>
- </div>
- <!--业务范围、经营属性-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- 经营属性:
- </span>
- <?= $form->field($model, 'BUSINESS_TYPE')->dropDownList(BusSearch::BUS_BUSINESS_TYPE, ['prompt' => '请选择', 'class' => 'form-control', 'id' => 'business_type', 'style' => 'width:275px;display:inline-block'])->label(false)->error(false) ?>
- </div>
- </div>
-
- <!--车身属性-->
- <div class="form-inline">
- <div class="form-group">
- <span class="span_left">
- 车身属性:
- </span>
- <?= $form->field($model, 'SURFACE_TYPE')->dropDownList(BusSearch::BUS_SURFACE_TYPE, ['prompt' => '请选择', 'class' => 'form-control', 'id' => 'surface_type', 'style' => 'width:275px;display:inline-block'])->label(false)->error(false) ?>
- </div>
- </div>
-
- <!--保存按钮-->
- <div class="form-inline">
- <div class="form-group" style="margin-top: 30px">
- <div style="display: none">
- <input type="text" name="BusSearch[SEAT_DESC]" id="seat_type2">
- <input type="text" name="BusSearch[SEAT_COUNT]" id="seat_count2">
- </div>
- <div class="modal-footer" style="margin-left: 30px;border:0px">
- <?= Html::submitButton('保存', ['class' => 'btn btn-primary', 'name' => 'submit-button']) ?>
- </div>
-
- <?php zActiveForm::end(); ?>
- </div>
- </div>
-
-
- <!-- **********************************************************-->
-
-
- </div>
-
- </div>
-
- <script>
- //燃料形式的变更联动标准油耗或者电耗
- function fuelChange() {
- var fuel_type = $("#fuelType").find("option:selected").val();
- if (fuel_type == 487) {
- $("#staFuel").text('标准电耗:');
- $("#Units").text(' 度 / 百公里');
- $('#bussearch-mpg').attr('placeholder','请输入标准电耗');
- } else {
- $("#staFuel").text('标准油耗:');
- $("#Units").text(' 升 / 百公里');
- $('#bussearch-mpg').attr('placeholder','请输入标准油耗');
- }
-
- }
- </script>
-
|