作者 杨育虎

推送

... ... @@ -39,6 +39,6 @@ class BatteryCode extends Model
public function batterytype()
{
return $this->belongsTo('BatteryType', 'batter_type_id', 'id', [], 'LEFT')->setEagerlyType(0);
return $this->belongsTo('BatteryType', 'battery_type_id', 'id', [], 'LEFT')->setEagerlyType(0);
}
}
... ...
<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Batter_type_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Battery_type_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-batter_type_id" data-rule="required" data-source="batter/type/index" class="form-control selectpage" name="row[batter_type_id]" type="text" value="">
<input id="c-battery_type_id" data-rule="required" data-source="battery/type/index" class="form-control selectpage" name="row[battery_type_id]" type="text" value="">
</div>
</div>
<div class="form-group">
... ...
<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Batter_type_id')}:</label>
<label class="control-label col-xs-12 col-sm-2">{:__('Battery_type_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-batter_type_id" data-rule="required" data-source="batter/type/index" class="form-control selectpage" name="row[batter_type_id]" type="text" value="{$row.batter_type_id|htmlentities}">
<input id="c-battery_type_id" data-rule="required" data-source="battery/type/index" class="form-control selectpage" name="row[battery_type_id]" type="text" value="{$row.battery_type_id|htmlentities}">
</div>
</div>
<div class="form-group">
... ...