作者 耿培杰

修改后台添加商品

... ... @@ -3,101 +3,77 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Category_one_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_one_id" data-source="category/selectpage" data-multiple="true"
data-params='{"custom[pid]":0}' class="form-control selectpage" name="row[category_one_id]"
type="text" value="{$row.category_one_id|htmlentities}">
<input id="c-category_one_id" data-source="category/selectpage" data-multiple="true" data-params='{"custom[pid]":0}' class="form-control selectpage" name="row[category_one_id]" type="text" value="{$row.category_one_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Category_two_id')}:</label>
<div class="col-xs-12 col-sm-8 category_two">
<input id="c-category_two_id" data-source="category/selectpage" data-multiple="true"
class="form-control selectpage" name="row[category_two_id]" type="text"
value="{$row.category_two_id}">
<input id="c-category_two_id" data-source="category/selectpage" data-multiple="true" class="form-control selectpage" name="row[category_two_id]" type="text" value="{$row.category_two_id}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Category_three_id')}:</label>
<div class="col-xs-12 col-sm-8 category_three">
<input id="c-category_three_id" data-source="category/selectpage" data-multiple="true"
class="form-control selectpage" name="row[category_three_id]" type="text"
value="{$row.category_three_id}">
<input id="c-category_three_id" data-source="category/selectpage" data-multiple="true" class="form-control selectpage" name="row[category_three_id]" type="text" value="{$row.category_three_id}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Category_group_ids')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category_group_ids" data-rule="required" data-source="category_group/index"
data-field="ch_name" data-multiple="true" class="form-control selectpage"
name="row[category_group_ids]" type="text" value="{$row.category_group_ids|htmlentities}">
<input id="c-category_group_ids" data-rule="required" data-source="category_group/index" data-field="ch_name" data-multiple="true" class="form-control selectpage" name="row[category_group_ids]" type="text" value="{$row.category_group_ids|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Country_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-country_id" data-rule="required" data-source="country/index" data-field="ch_name"
class="form-control selectpage" name="row[country_id]" type="text"
value="{$row.country_id|htmlentities}">
<input id="c-country_id" data-rule="required" data-source="country/index" data-field="ch_name" class="form-control selectpage" name="row[country_id]" type="text" value="{$row.country_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Brand_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-brand_id" data-rule="required" data-source="brand/index" data-field="ch_name"
class="form-control selectpage" name="row[brand_id]" type="text"
value="{$row.brand_id|htmlentities}">
<input id="c-brand_id" data-rule="required" data-source="brand/index" data-field="ch_name" class="form-control selectpage" name="row[brand_id]" type="text" value="{$row.brand_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Level_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-level_id" data-source="level/index" data-field="ch_name" class="form-control selectpage"
name="row[level_id]" type="text" value="{$row.level_id|htmlentities}">
<input id="c-level_id" data-source="level/index" data-field="ch_name" class="form-control selectpage" name="row[level_id]" type="text" value="{$row.level_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Part_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-part_id" data-source="part/index" data-field="ch_name" class="form-control selectpage"
name="row[part_id]" type="text" value="{$row.part_id|htmlentities}">
<input id="c-part_id" data-source="part/index" data-field="ch_name" class="form-control selectpage" name="row[part_id]" type="text" value="{$row.part_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Category2_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-category2_id" data-source="category2/index" data-field="ch_name"
class="form-control selectpage" name="row[category2_id]" type="text"
value="{$row.category2_id|htmlentities}">
<input id="c-category2_id" data-source="category2/index" data-field="ch_name" class="form-control selectpage" name="row[category2_id]" type="text" value="{$row.category2_id|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ch_name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ch_name" data-rule="required" class="form-control" name="row[ch_name]" type="text"
value="{$row.ch_name|htmlentities}">
<input id="c-ch_name" data-rule="required" class="form-control" name="row[ch_name]" type="text" value="{$row.ch_name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('En_name')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-en_name" class="form-control" name="row[en_name]" type="text"
value="{$row.en_name|htmlentities}">
<input id="c-en_name" class="form-control" name="row[en_name]" type="text" value="{$row.en_name|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" class="form-control" size="50" name="row[image]" type="text"
value="{$row.image|htmlentities}">
<input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-image" class="btn btn-danger plupload"
data-input-id="c-image"
data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i
class="fa fa-list"></i> {:__('Choose')}</button></span>
<span><button type="button" id="plupload-image" class="btn btn-danger plupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
... ... @@ -108,16 +84,10 @@
<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" class="form-control" size="50" name="row[images]" type="text"
value="{$row.images|htmlentities}">
<input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
<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>
<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>
... ... @@ -128,15 +98,10 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Video')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-video" class="form-control" size="50" name="row[video]" type="text"
value="{$row.video|htmlentities}">
<input id="c-video" class="form-control" size="50" name="row[video]" type="text" value="{$row.video|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-video" class="btn btn-danger plupload"
data-input-id="c-video" data-mimetype="mp4,mp3,avi,flv,wmv" data-multiple="false"
data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-video" class="btn btn-primary fachoose"
data-input-id="c-video" data-mimetype="mp4,mp3,avi,flv,wmv" data-multiple="false"><i
class="fa fa-list"></i> {:__('Choose')}</button></span>
<span><button type="button" id="plupload-video" class="btn btn-danger plupload" data-input-id="c-video" data-mimetype="mp4,mp3,avi,flv,wmv" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="mp4,mp3,avi,flv,wmv" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
... ... @@ -147,16 +112,10 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Video_image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-video_image" class="form-control" size="50" name="row[video_image]" type="text"
value="{$row.video_image|htmlentities}">
<input id="c-video_image" class="form-control" size="50" name="row[video_image]" type="text" value="{$row.video_image|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="plupload-video_image" class="btn btn-danger plupload"
data-input-id="c-video_image"
data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple="false" data-preview-id="p-video_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-video_image" class="btn btn-primary fachoose"
data-input-id="c-video_image" data-mimetype="image/*" data-multiple="false"><i
class="fa fa-list"></i> {:__('Choose')}</button></span>
<span><button type="button" id="plupload-video_image" class="btn btn-danger plupload" data-input-id="c-video_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-video_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-video_image" class="btn btn-primary fachoose" data-input-id="c-video_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-video_image"></span>
</div>
... ... @@ -167,50 +126,43 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Goods_no')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-goods_no" class="form-control" name="row[goods_no]" type="text"
value="{$row.goods_no|htmlentities}">
<input id="c-goods_no" class="form-control" name="row[goods_no]" type="text" value="{$row.goods_no|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ch_specification')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ch_specification" class="form-control" name="row[ch_specification]" type="text"
value="{$row.ch_specification|htmlentities}">
<input id="c-ch_specification" class="form-control" name="row[ch_specification]" type="text" value="{$row.ch_specification|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('En_specification')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-en_specification" class="form-control" name="row[en_specification]" type="text"
value="{$row.en_specification|htmlentities}">
<input id="c-en_specification" class="form-control" name="row[en_specification]" type="text" value="{$row.en_specification|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ch_save_where')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ch_save_where" class="form-control" name="row[ch_save_where]" type="text"
value="{$row.ch_save_where|htmlentities}">
<input id="c-ch_save_where" class="form-control" name="row[ch_save_where]" type="text" value="{$row.ch_save_where|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('En_save_where')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-en_save_where" class="form-control" name="row[en_save_where]" type="text"
value="{$row.en_save_where|htmlentities}">
<input id="c-en_save_where" class="form-control" name="row[en_save_where]" type="text" value="{$row.en_save_where|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Ch_period')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-ch_period" class="form-control" name="row[ch_period]" type="text"
value="{$row.ch_period|htmlentities}">
<input id="c-ch_period" class="form-control" name="row[ch_period]" type="text" value="{$row.ch_period|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('En_period')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-en_period" class="form-control" name="row[en_period]" type="text"
value="{$row.en_period|htmlentities}">
<input id="c-en_period" class="form-control" name="row[en_period]" type="text" value="{$row.en_period|htmlentities}">
</div>
</div>
<div class="form-group">
... ... @@ -228,18 +180,16 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Sales_initial')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-sales_initial" class="form-control" name="row[sales_initial]" type="number"
value="{$row.sales_initial|htmlentities}">
<input id="c-sales_initial" class="form-control" name="row[sales_initial]" type="number" value="{$row.sales_initial|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_group')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_group" class="form-control selectpicker" name="row[is_group]">
<select id="c-is_group" class="form-control selectpicker" name="row[is_group]">
{foreach name="isGroupList" item="vo"}
<option value="{$key}" {in name="key" value="$row.is_group" }selected{
/in}>{$vo}</option>
<option value="{$key}" {in name="key" value="$row.is_group"}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ... @@ -248,130 +198,112 @@
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_num')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_num" class="form-control" name="row[group_num]" type="number"
value="{$row.group_num|htmlentities}">
<input id="c-group_num" class="form-control" name="row[group_num]" type="number" value="{$row.group_num|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Grouptime')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-grouptime" class="form-control" name="row[grouptime]" type="number"
value="{$row.grouptime|htmlentities}">
<input id="c-grouptime" class="form-control" name="row[grouptime]" type="number" value="{$row.grouptime|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_vip_rebate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_vip_rebate" class="form-control" step="0.01" name="row[group_vip_rebate]" type="number"
value="{$row.group_vip_rebate|htmlentities}">
<input id="c-group_vip_rebate" class="form-control" step="0.01" name="row[group_vip_rebate]" type="number" value="{$row.group_vip_rebate|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_staff_rebate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_staff_rebate" class="form-control" step="0.01" name="row[group_staff_rebate]"
type="number" value="{$row.group_staff_rebate|htmlentities}">
<input id="c-group_staff_rebate" class="form-control" step="0.01" name="row[group_staff_rebate]" type="number" value="{$row.group_staff_rebate|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_one_agency_rebate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_one_agency_rebate" class="form-control" step="0.01" name="row[group_one_agency_rebate]"
type="number" value="{$row.group_one_agency_rebate|htmlentities}">
<input id="c-group_one_agency_rebate" class="form-control" step="0.01" name="row[group_one_agency_rebate]" type="number" value="{$row.group_one_agency_rebate|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_two_agency_rebate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_two_agency_rebate" class="form-control" step="0.01" name="row[group_two_agency_rebate]"
type="number" value="{$row.group_two_agency_rebate|htmlentities}">
<input id="c-group_two_agency_rebate" class="form-control" step="0.01" name="row[group_two_agency_rebate]" type="number" value="{$row.group_two_agency_rebate|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_three_agency_rebate')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_three_agency_rebate" class="form-control" step="0.01"
name="row[group_three_agency_rebate]" type="number"
value="{$row.group_three_agency_rebate|htmlentities}">
<input id="c-group_three_agency_rebate" class="form-control" step="0.01" name="row[group_three_agency_rebate]" type="number" value="{$row.group_three_agency_rebate|htmlentities}">
</div>
</div>
<div class="form-group group" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Group_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-group_price" class="form-control" step="0.01" name="row[group_price]" type="number"
value="{$row.group_price|htmlentities}">
<input id="c-group_price" class="form-control" step="0.01" name="row[group_price]" type="number" value="{$row.group_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Goods_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-goods_price" data-rule="required" class="form-control" step="0.01" name="row[goods_price]"
type="number" value="{$row.goods_price|htmlentities}">
<input id="c-goods_price" data-rule="required" class="form-control" step="0.01" name="row[goods_price]" type="number" value="{$row.goods_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Vip1_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-vip1_price" data-rule="required" class="form-control" step="0.01" name="row[vip1_price]"
type="number" value="{$row.vip1_price|htmlentities}">
<input id="c-vip1_price" data-rule="required" class="form-control" step="0.01" name="row[vip1_price]" type="number" value="{$row.vip1_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Staff_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-staff_price" data-rule="required" class="form-control" step="0.01" name="row[staff_price]"
type="number" value="{$row.staff_price|htmlentities}">
<input id="c-staff_price" data-rule="required" class="form-control" step="0.01" name="row[staff_price]" type="number" value="{$row.staff_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('One_agency_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-one_agency_price" data-rule="required" class="form-control" step="0.01"
name="row[one_agency_price]" type="number" value="{$row.one_agency_price|htmlentities}">
<input id="c-one_agency_price" data-rule="required" class="form-control" step="0.01" name="row[one_agency_price]" type="number" value="{$row.one_agency_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Two_agency_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-two_agency_price" data-rule="required" class="form-control" step="0.01"
name="row[two_agency_price]" type="number" value="{$row.two_agency_price|htmlentities}">
<input id="c-two_agency_price" data-rule="required" class="form-control" step="0.01" name="row[two_agency_price]" type="number" value="{$row.two_agency_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Three_agency_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-three_agency_price" data-rule="required" class="form-control" step="0.01"
name="row[three_agency_price]" type="number" value="{$row.three_agency_price|htmlentities}">
<input id="c-three_agency_price" data-rule="required" class="form-control" step="0.01" name="row[three_agency_price]" type="number" value="{$row.three_agency_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_vip_price')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_vip_price" class="form-control selectpicker" name="row[is_vip_price]">
<select id="c-is_vip_price" class="form-control selectpicker" name="row[is_vip_price]">
{foreach name="isVipPriceList" item="vo"}
<option value="{$key}" {in name="key" value="$row.is_vip_price" }selected{
/in}>{$vo}</option>
<option value="{$key}" {in name="key" value="$row.is_vip_price"}selected{/in}>{$vo}</option>
{/foreach}
</select>
</div>
</div>
<div class="form-group vip_price" style="display: none">
<div class="form-group vip_price" style="display: none">
<label class="control-label col-xs-12 col-sm-2">{:__('Vip_price')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-vip_price" class="form-control" step="0.01" name="row[vip_price]" type="number"
value="{$row.vip_price|htmlentities}">
<input id="c-vip_price" class="form-control" step="0.01" name="row[vip_price]" type="number" value="{$row.vip_price|htmlentities}">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Is_recommend')}:</label>
<div class="col-xs-12 col-sm-8">
<select id="c-is_recommend" class="form-control selectpicker" name="row[is_recommend]">
<select id="c-is_recommend" class="form-control selectpicker" name="row[is_recommend]">
{foreach name="isRecommendList" item="vo"}
<option value="{$key}" {in name="key" value="$row.is_recommend" }selected{
/in}>{$vo}</option>
<option value="{$key}" {in name="key" value="$row.is_recommend"}selected{/in}>{$vo}</option>
{/foreach}
</select>
... ... @@ -382,11 +314,9 @@
<div class="col-xs-12 col-sm-8">
<div class="radio">
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio"
value="{$key}" {in name="key" value="$row.status" }checked{/in}
/> {$vo}</label>
{/foreach}
{foreach name="statusList" item="vo"}
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
{/foreach}
</div>
</div>
... ... @@ -394,8 +324,7 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number"
value="{$row.weigh|htmlentities}">
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
</div>
</div>
<div class="form-group layer-footer">
... ...
... ... @@ -152,34 +152,33 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
$('.vip_price').hide();
}
});
$("#c-category_two_id").data("params", function (obj) {
var id = $("#c-category_one_id").val()?$("#c-category_one_id").val():-1;
return {wherein: {pid: id}};
});
$("#c-category_three_id").data("params", function (obj) {
var id = $("#c-category_two_id").val()?$("#c-category_two_id").val():-1;
return {wherein: {pid: id}};
});
},
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
$("#c-category_two_id").data("params", function (obj) {
var id = $("#c-category_one_id").val()?$("#c-category_one_id").val():-1;
return {wherein: {pid: id}};
$("#c-category_one_id").on('change',function(){
$("#c-category_two_id").val('');
$("#c-category_two_id_text").val('');
$("#c-category_three_id").val('');
$("#c-category_three_id_text").val('');
$(".category_two .selected_tag").remove();
$(".category_three .selected_tag").remove();
console.log(123);
});
$("#c-category_three_id").data("params", function (obj) {
var id = $("#c-category_two_id").val()?$("#c-category_two_id").val():-1;
return {wherein: {pid: id}};
$("#c-category_two_id").on('change',function(){
$("#c-category_three_id").val('');
$("#c-category_three_id_text").val('');
$(".category_three .selected_tag").remove();
});
// $("#c-category_one_id").on('change',function(){
// $("#c-category_two_id").val('');
// $("#c-category_two_id_text").val('');
// $("#c-category_three_id").val('');
// $("#c-category_three_id_text").val('');
// $(".category_two .selected_tag").remove();
// $(".category_three .selected_tag").remove();
// console.log(123);
// });
//
// $("#c-category_two_id").on('change',function(){
// $("#c-category_three_id").val('');
// $("#c-category_three_id_text").val('');
// $(".category_three .selected_tag").remove();
// });
}
}
};
... ...