updateDeviceModel.html 7.49 KB
<div class="modal-box addModel">
  <div class="modal-header">
    <button type="button" class="close" ng-click="handleAddClose()" aria-label="Close"><span
        aria-hidden="true">&times;</span></button>
    <h3 class="modal-title" id="modal-title">添加设备</h3>
  </div>
  <div class="modal-body">
    <form class="form-inline" name="addForm" role="addForm" ng-submit="">

      <div class="form-group">
        <label class="control-label col-sm-5 required">设备号:</label>
        <div class="col-sm-7">
          <input type="text" style="height: 24px;" maxlength="30" class="form-control" name="imei" required
            ng-model="addData.imei"  disabled/>
          <p ng-show="addForm.imei.$invalid && submitted" class="text-danger form-text">设备号是必填项</p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5 required" >客户姓名:</label>
        <div class="col-sm-7">
          <input type="text" style="height: 24px;" maxlength="20" class="form-control" name="name"
            ng-required="required" ng-model="addData.name" ng-disabled="isAuth"/>
          <p ng-show="!addData.name && submitted" class="text-danger form-text">客户姓名是必填项</p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5" >性别:</label>
        <div class="col-sm-7">
          <input type="radio" name="gender" value="1" ng-required="required" ng-model="addData.gender"> 男
          <input type="radio" name="gender" value="2" ng-required="required" ng-model="addData.gender" style="margin-left: 60px;"> 女
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5 required" >客户手机号:</label>
        <div class="col-sm-7">
          <input type="text" style="height: 24px;" maxlength="11" class="form-control" name="phone"
            ng-required="required" ng-model="addData.phone" ng-disabled="isAuth"/>
          <p ng-show="!addData.phone && submitted" class="text-danger form-text">客户手机号是必填项</p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5 required" >车架号:</label>
        <div class="col-sm-7">
          <input type="text" style="height: 24px;" maxlength="30" class="form-control" name="standNo"
                 ng-required="required" ng-model="addData.standNo" />
          <p ng-show=" !addData.standNo && submitted" class="text-danger form-text">车架号是必填项</p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5">车牌号:</label>
        <div class="col-sm-7">
          <input type="text" style="height: 24px;" maxlength="20" class="form-control" name="plateNum"
            ng-required="required" ng-model="addData.plateNum" />
          <p ng-show="required && !addData.plateNum && submitted" class="text-danger form-text">车牌号是必填项</p>
        </div>
      </div>



      <div class="form-group">
        <label class="control-label col-sm-5">车辆品牌:</label>
        <div class="col-sm-7">
          <div class="wo-span">
            <ui-select class="a_select pd0" ng-model="model.carBrand" ng-change="changeCarBrand($select.selected.id)"
              theme="select2" style="width:150px;">
              <ui-select-match placeholder="请选择">
                <span ng-bind="$select.selected.name"></span>
              </ui-select-match>
              <ui-select-choices repeat="item in (carBrandOptions | filter: $select.search) track by item.id">
                <span ng-bind="item.name"></span>
              </ui-select-choices>
            </ui-select>

          </div>
          <p ng-show="required && !model.carBrand  && submitted" class="text-danger form-text">
            车辆品牌是必填项
          </p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5">子品牌:</label>
        <div class="col-sm-7">
          <div class="wo-span">

            <ui-select class="a_select pd0" ng-model="model.carSmallBrand"
              ng-change="changeCarSmallBrand($select.selected.id)" theme="select2" style="width:150px;">
              <ui-select-match placeholder="请选择">
                <span ng-bind="$select.selected.name"></span>
              </ui-select-match>
              <ui-select-choices repeat="item in (carSmallBrandOptions | filter: $select.search) track by item.id">
                <span ng-bind="item.name"></span>
              </ui-select-choices>
            </ui-select>

          </div>
          <p ng-show="required && !model.carSmallBrand  && submitted" class="text-danger form-text">
            子品牌是必填项
          </p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5">车系:</label>
        <div class="col-sm-7">
          <div class="wo-span">

            <ui-select class="a_select pd0" ng-model="model.carSeries" ng-change="changeCarSeries($select.selected.id)"
              theme="select2" style="width:150px;">
              <ui-select-match placeholder="请选择">
                <span ng-bind="$select.selected.name"></span>
              </ui-select-match>
              <ui-select-choices repeat="item in (carSeriesOptions | filter: $select.search) track by item.id">
                <span ng-bind="item.name"></span>
              </ui-select-choices>
            </ui-select>

          </div>
          <p ng-show="required && !model.carSeries  && submitted" class="text-danger form-text">
            车系是必填项
          </p>
        </div>
      </div>

      <div class="form-group">
        <label class="control-label col-sm-5">车型:</label>
        <div class="col-sm-7">
          <div class="wo-span">

            <ui-select class="a_select pd0" ng-model="model.carType" theme="select2" style="width:150px;">
              <ui-select-match placeholder="请选择">
                <span ng-bind="$select.selected.name"></span>
              </ui-select-match>
              <ui-select-choices repeat="item in (carTypeOptions | filter: $select.search) track by item.id">
                <span ng-bind="item.name"></span>
              </ui-select-choices>
            </ui-select>

          </div>
          <p ng-show="required && !model.carType  && submitted" class="text-danger form-text">
            车型是必填项
          </p>
        </div>
        
        <div class="form-group">
          <label class="control-label col-sm-5" >是否更换设备:</label>
          <div class="col-sm-7">
            <input type="radio" name="isChange" value="1" ng-required="required" ng-model="addData.isChange"> 保修更换-免费
            <input type="radio" name="isChange" value="2" ng-required="required" ng-model="addData.isChange" style="margin-left: 15px;"> 维修更换
            <input type="radio" name="isChange" value="3" ng-required="required" ng-model="addData.isChange" style="margin-left: 15px;"> 购买
          </div>
        </div>

      </div>

    </form>
    <div class="modal-footer">
      <button class="btn btn-default" type="button" ng-click="handleAddClose()">取消</button>
      <button class="btn btn-primary" type="button" ng-click="handleAddConfirm()">保存<i class="fa fa-spinner fa-spin"
          ng-show="isWorking"></i></button>
    </div>
  </div>

  <style>
    .addModel .w-150 {
      width: 150px;
    }

    .addModel .form-group {
      width: 100%;
      padding-bottom: 6px;
    }
  </style>