look.html 21.7 KB
<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">所属仓库:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-depot_id" data-rule="required" disabled="disabled" data-source="depot/index" data-multiple="false" class="form-control selectpage" name="row[depot_id]" type="text" value="{$row.depot_id}">
        </div>
    </div>
    <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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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}">
                <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>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-image"></ul>
        </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" 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>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <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}">
                <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>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-video"></ul>
        </div>
    </div>
    <div class="form-group">
        <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}">
                <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>
                </div>
                <span class="msg-box n-right" for="c-video_image"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-video_image"></ul>
        </div>
    </div>

    <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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" class="form-control" name="row[en_period]" type="text" value="{$row.en_period|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ch_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-ch_content" disabled="disabled" class="form-control editor" rows="5" name="row[ch_content]" cols="50">{$row.ch_content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('En_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-en_content" disabled="disabled" class="form-control editor" rows="5" name="row[en_content]" cols="50">{$row.en_content|htmlentities}</textarea>
        </div>
    </div>
    <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" disabled="disabled" 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]">
                {foreach name="isGroupList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.is_group"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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" disabled="disabled" 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]">
                {foreach name="isVipPriceList" item="vo"}
                    <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">
        <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" disabled="disabled" 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]">
                {foreach name="isRecommendList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.is_recommend"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <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}
            </div>

        </div>
    </div>
    <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" disabled="disabled" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    var category_one_id = document.getElementById("c-category_one_id");
    category_one_id.onchange = 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();
    }

    var category_two_id = document.getElementById("c-category_two_id");
    category_two_id.onchange = function () {
        $("#c-category_three_id").val('');
        $("#c-category_three_id_text").val('');
        $(".category_three .selected_tag").remove();
    }
</script>