|
|
<style>
|
|
|
.goods_type{
|
|
|
display: none;
|
|
|
}
|
|
|
.band_type{
|
|
|
display: none;
|
|
|
}
|
|
|
</style>
|
|
|
<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">{:__('G_type')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
{:build_radios('row[g_type]', $g_type,1, ['class'=>'form-control', 'required'=>''])}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group goods_type">
|
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('T_id')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
{:build_select('row[t_id]', $gtype, null, ['class'=>'form-control', 'required'=>''])}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group band_type">
|
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('B_id')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
{:build_select('row[b_id]', $btype, null, ['class'=>'form-control', 'required'=>''])}
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('Flag')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
...
|
...
|
@@ -16,7 +37,7 @@ |
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
<div class="input-group">
|
|
|
<input id="c-file" data-rule="required" class="form-control" size="50" name="row[file]" type="text" placeholder="请上传视频">
|
|
|
<input id="c-file" class="form-control" size="50" name="row[file]" type="text" placeholder="请上传视频">
|
|
|
<div class="input-group-addon no-border no-padding">
|
|
|
<span><button type="button" id="plupload-file" class="btn btn-danger plupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
|
|
<span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
...
|
...
|
@@ -54,6 +75,21 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
<div class="input-group">
|
|
|
<input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text">
|
|
|
<div class="input-group-addon no-border no-padding">
|
|
|
<span><button type="button" id="plupload-images" class="btn btn-danger plupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
|
|
|
<span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
|
|
|
</div>
|
|
|
<span class="msg-box n-right" for="c-images"></span>
|
|
|
</div>
|
|
|
<ul class="row list-inline plupload-preview" id="p-images"></ul>
|
|
|
<span style="color:red;">图片尺寸:750*750</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="form-group">
|
|
|
<label class="control-label col-xs-12 col-sm-2">{:__('Sale_price')}:</label>
|
|
|
<div class="col-xs-12 col-sm-8">
|
|
|
<input id="c-sale_price" data-rule="required" class="form-control" name="row[sale_price1]" type="text" placeholder="请输入商品销售价格(多个以'|'隔开)">
|
...
|
...
|
@@ -115,3 +151,30 @@ |
|
|
</div>
|
|
|
</div>
|
|
|
</form>
|
|
|
<script src="https://code.jquery.com/jquery-3.0.0.min.js"></script>
|
|
|
<script>
|
|
|
$(function(){
|
|
|
var value1 = $('input[type=radio]:checked').val();
|
|
|
type(value1);
|
|
|
$('input[type=radio]').change(function () {
|
|
|
var value = $(this).val();
|
|
|
type(value);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
function type(value){
|
|
|
if(value == 1){
|
|
|
//品类显示,品牌隐藏
|
|
|
$('.goods_type').css('display','block');
|
|
|
$('.band_type').css('display','none');
|
|
|
}else if(value == 2){
|
|
|
//品类隐藏,品牌显示
|
|
|
$('.goods_type').css('display','none');
|
|
|
$('.band_type').css('display','block');
|
|
|
}else if(value == 3){
|
|
|
//品类显示,品牌显示
|
|
|
$('.goods_type').css('display','block');
|
|
|
$('.band_type').css('display','block');
|
|
|
}
|
|
|
}
|
|
|
</script> |
...
|
...
|
|