add.html 19.2 KB
<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">{:__('Goods_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_name" data-rule="required" class="form-control form-control" name="row[goods_name]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Keywords')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-keywords" data-rule="required" class="form-control form-control" name="row[keywords]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" data-source="litestore/litestorecategory/selectpage" class="form-control selectpage form-control" name="row[category_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Activity_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-activity_id" data-source="activity/index" class="form-control selectpage" name="row[activity_id]" type="text" value="">
        </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" data-rule="required" class="form-control form-control" size="50" name="row[image]" type="text">
                <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/jpeg,image/png,image/jpg" 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/jpeg,image/png,image/jpg" 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>
            <span class="help-block">建议尺寸:宽110,高110</span>
        </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 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 class="help-block">建议尺寸:宽375,高375</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Spec_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-spec_type" data-rule="required" class="form-control selectpicker" name="row[spec_type]">
                {foreach name="specTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="10"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

<!-- 商品规格属性 start -->
<div class="goods-spec-many form-group">
    <!-- <label class="control-label col-xs-12 col-sm-2"></label>-->
    <div class="goods-spec-box col-xs-12 col-sm-11" style="background-color: white;">
        <!-- 规格属性 -->
        <div class="spec-attr"></div>

        <!-- 添加规格:按钮 -->
        <div class="spec-group-button">
            <button type="button" class="btn-addSpecGroup btn btn-xs btn-success">添加规格</button>
        </div>

        <!-- 添加规格:表单 -->
        <div class="spec-group-add">
            <div class="spec-group-add-item form-group">
                <label class="control-label form-require">规格名 </label>
                <input type="text" class="input-specName tpl-form-input"
                       placeholder="请输入规格名称">
            </div>
            <div class="spec-group-add-item form-group">
                <label class="control-label form-require">规格值 </label>
                <input type="text" class="input-specValue tpl-form-input"
                       placeholder="请输入规格值">
            </div>
            <div class="spec-group-add-item margin-top">
                <button type="button" class="btn-addSpecName btn btn-xs btn-success"> 确定
                </button>
                <button type="button" class="btn-cancleAddSpecName btn btn-xs btn-default"> 取消
                </button>
            </div>
        </div>
        <!-- 商品多规格sku信息 -->
        <div class="goods-sku scrollable-horizontal">
            <!-- 分割线 -->
            <div class="goods-spec-line"></div>
            <!-- sku 批量设置 -->
            <div class="spec-batch form-inline">
                <div class="form-group">
                    <label class="control-label">批量设置</label>
                </div>
                <div class="form-group">
                    <input type="text" data-type="goods_no" placeholder="商家编码">
                </div>
                <div class="form-group">
                    <input type="number" data-type="goods_price" placeholder="销售价">
                </div>
                <div class="form-group">
                    <input type="number" data-type="line_price" placeholder="划线价">
                </div>
                <div class="form-group">
                    <input type="number" data-type="stock_num" placeholder="库存数量">
                </div>
                <!--<div class="form-group">
                    <input type="number" data-type="goods_weight" placeholder="重量">
                </div>-->
                <div class="form-group">
                    <button type="button" class="btn-specBatchBtn btn btn-sm btn-secondary
                     radius">确定
                    </button>
                </div>
            </div>
            <!-- sku table -->
            <table class="spec-sku-tabel table table-bordered table-centered margin-bottom-xs text-nowrap"></table>
        </div>
    </div>
</div>

<div class="goods-spec-single">
    <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-goods_no" class="form-control form-control" name="spec[goods_no]" type="text" value="">
        </div>
    </div>
    <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-goods_price" data-rule="required" class="form-control form-control" name="spec[goods_price]" type="number" value="0">
        </div>
    </div>
    <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-line_price" class="form-control form-control" name="spec[line_price]" type="number" value="">
        </div>
    </div>
    <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-stock_num" class="form-control form-control" name="spec[stock_num]" type="number" value="100">
        </div>
    </div>
    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">商品重量(Kg):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_weight" class="form-control form-control" name="spec[goods_weight]" type="number" value="1">
        </div>
    </div>-->
</div>
<!-- 商品规格属性 end -->

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Deduct_stock_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-deduct_stock_type" data-rule="required" class="form-control selectpicker" name="row[deduct_stock_type]">
                {foreach name="deductStockTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="20"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <textarea id="c-content" data-rule="required" class="form-control editor form-control" rows="5" name="row[content]" cols="50"></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" data-rule="required" class="form-control form-control" name="row[sales_initial]" type="number" value="0">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Sales_actual')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-sales_actual" data-rule="required" class="form-control form-control" name="row[sales_actual]" type="number" value="0">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_sort')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-goods_sort" data-rule="required" class="form-control form-control" name="row[goods_sort]" type="number" value="100">-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Delivery_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-delivery_id" data-rule="required" data-source="litestore/litestorefreight/index" class="form-control selectpage form-control" name="row[delivery_id]" type="text" value="">-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price_description')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-price_description" data-rule="required" class="form-control" name="row[price_description]"></textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Brand')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-brand" data-rule="required" class="form-control form-control" name="row[brand]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Makefor')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                {foreach name="makeforList" item="vo"}
                <label for="row[makefor]-{$key}"><input id="row[makefor]-{$key}" name="row[makefor]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Packing')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-packing" data-rule="required" class="form-control form-control" name="row[packing]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Keep')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-keep" data-rule="required" class="form-control form-control" name="row[keep]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" data-rule="required" class="form-control form-control" name="row[number]" type="text" value="">
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Down_image')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-down_image" data-rule="required" class="form-control form-control" size="50" name="row[down_image]" type="text">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="plupload-down_image" class="btn btn-danger plupload" data-input-id="c-down_image" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="false" data-preview-id="p-down_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-down_image" class="btn btn-primary fachoose" data-input-id="c-down_image" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-down_image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline plupload-preview" id="p-down_image"></ul>-->
<!--            <span class="help-block">建议尺寸:宽375,高267</span>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Four_images')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-four_images" data-rule="required" class="form-control form-control" size="50" name="row[four_images]" type="text">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="plupload-four_images" class="btn btn-danger plupload" data-input-id="c-four_images" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="true" data-preview-id="p-four_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-four_images" class="btn btn-primary fachoose" data-input-id="c-four_images" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-four_images"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline plupload-preview" id="p-four_images"></ul>-->
<!--            <span class="help-block">建议尺寸:宽185,高185</span>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Detail_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-detail_images" data-rule="required"  class="form-control form-control" size="50" name="row[detail_images]" placeholder="图片最多添加十张" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-detail_images"  data-maxcount="10" class="btn btn-danger plupload" data-input-id="c-detail_images" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="true" data-preview-id="p-detail_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-detail_images"  data-maxcount="10" class="btn btn-primary fachoose" data-input-id="c-detail_images" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-detail_images"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-detail_images"></ul>
            <span class="help-block">建议尺寸:宽185,高185</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="goodsStatusList" item="vo"}
            <label for="row[goods_status]-{$key}"><input id="row[goods_status]-{$key}" name="row[goods_status]" type="radio" value="{$key}" {in name="key" value="10"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_delete')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-is_delete" data-rule="required" class="form-control selectpicker" name="row[is_delete]">
                {foreach name="isDeleteList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_index')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-is_index" data-rule="required" class="form-control selectpicker" name="row[is_index]">
                {foreach name="isIndexList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </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>
{include file="litestore/litestoregoods/spec_many_template" /}

<link rel="stylesheet" href="__CDN__/assets/addons/litestore/css/litestoregoods.css">