Edit.html 17.8 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>

<div class="contentpanel">
    
    <form id="limit-add-form" class="form-horizontal form-bordered" type="<%type%>" action="<%action%>">
        <div class="panel-group">
            <div class="panel-group">
                <div id="editor-group">
                    <input type="hidden" id="id" value="<%data.id%>">
                    <input type="hidden" id="showFlag" value="<%data.showFlag%>">
                    <input type="hidden" id="status" value="<%data.status%>">
                    <div class="pannel">
                        <div class="panel-heading">
                            <h4>限购商品基本信息</h4>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="form-group" style="display: none">
                                    <label class="col-sm-2 control-label">渠道类型<span class="red">*</span></label>
                                    <div class="col-sm-8">
                                        <label class="radio-inline"><input type="radio" name="channelType" value="0" checked="checked">有货</label>
                                        <label class="radio-inline"><input type="radio" name="channelType" value="1">小程序</label>
                                        <input type="hidden" value="<%data.channelType%>" id="channelType" for="radio">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">限量商品类型<span class="red">*</span></label>
                                    <div class="col-sm-8">
                                        <label class="radio-inline"><input type="radio" name="productType" value="0" checked="checked">限购</label>
                                        <label class="radio-inline"><input type="radio" name="productType" value="1">全球购</label>
                                        <label class="radio-inline"><input type="radio" name="productType" value="2">普通</label>
                                        <input type="hidden" value="<%data.productType%>" id="productType" for="radio">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">商品名称<span class="red">*</span></label>
                                    <div class="col-sm-8">
                                        <input type="text"  id="productName" placeholder="商品名称"  class="form-control" required value="<%data.productName%>">
                                        <!-- 将limitProductCode传入,用于 发放限购码 接口 -->
                                        <input type="hidden" id="limitProductCode" value="<%data.limitProductCode%>">
                                    </div>
                                </div>
                                <div class="form-group product_normal">
                                        <label class="col-sm-2 control-label"></label>
                                        <div class="col-sm-8">
                                            <label class="radio-inline"><input type="radio" name="limitProductType" value="1" checked="checked">分享得限购码</label>
                                            <label class="radio-inline"><input type="radio" name="limitProductType" value="2">排队得限购码</label>
                                            <label class="radio-inline"><input type="radio" name="limitProductType" value="3">指定UID得限购码</label>
                                            <label class="radio-inline" name="smallapp"><input type="radio" name="limitProductType" value="4">助力分享得限购码</label>
                                            <label class="radio-inline" name="smallapp"><input type="radio" name="limitProductType" value="5">助力排队得限购码</label>
                                            <input type="hidden" value="<%data.limitProductType%>" id="limitProductType" for="radio">
                                        </div>
                                    </div>
                                
                                <div class="form-group limitProductType product_normal" name="smallapp" id="limitProductType_4" style="display: none;">
                                    <label class="col-sm-2 control-label">助力人数上限:<span class="red">*</span></label>
                                    <div class="col-sm-8">
                                        <input id="helpLimit" type="text" class="form-control" value="<%data.helpLimit%>" placeholder="助力人数上限" />
                                    </div>
                                </div>
                                <div class="form-group limitProductType product_normal" id="limitProductType_2" style="display: none;">
                                    <label class="col-sm-2 control-label">排队限购ID:<span class="red">*</span></label>
                                    <div class="col-sm-8">
                                        <input id="activityId" type="text" class="form-control" value="<%data.activityId%>" placeholder="排队限购ID" />
                                    </div>
                                </div>
                                <div class="form-group limitProductType product_normal" id="limitProductType_1">
                                    <label class="col-sm-2 control-label">限购码批次:</label>
                                    <div class="col-sm-8">
                                        <%if data.batchNo %>
                                        <input disabled="true" type="text" id="batchNo" placeholder="限购码批次"  class="form-control" maxlength="30" value="<%data.batchNo%>">
                                        <%else%>
                                        <input type="text" id="batchNo" placeholder="限购码批次"  class="form-control" maxlength="30" value="<%data.batchNo%>">
                                        <%/if%>
                                    </div>
                                </div>
                                <div class="form-group" style="display: none;color:red" id="sknInfo">
                                    <label class="col-sm-2 control-label"></label>
                                    <div class="col-sm-8" id="sknMessage"></div>
                                </div>
                                <div class="form-group product_global">
                                    <label class="col-sm-2 control-label">商品 SKN:</label>
                                    <div class="col-sm-3">
                                        <input type="text"  id="productSkn" placeholder="商品 SKN"  class="form-control small" value="<%data.productSkn%>">
                                    </div>
                                    <div class="col-sm-3" style="display: none;color: red" id="sknName"></div>
                                </div>
                                
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">发售日期<span class="red">*</span></label>
                                    <div class="col-sm-4">
                                        <input id="saleTimeStr" data-time="" value="<%data.saleTimeStr%>" type="text" class="form-control" jsaction="time" placeholder="发售日期" readonly required>
                                    </div>
                                    <div class="col-md-3">
                                        <label>是否显示日期:</label>
                                        <label class="radio-inline"><input type="radio" name="dayFlag" value="1"></label>
                                        <label class="radio-inline"><input type="radio" name="dayFlag" value="0"></label>
                                        <input type="hidden" value="<%data.dayFlag%>" id="dayFlag" for="radio">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">展示时间<span class="red">*</span></label>
                                    <div class="col-sm-4">
                                        <input id="showTimeStr" data-time="" value="<%data.showTimeStr%>" type="text" class="form-control" jsaction="time" placeholder="展示时间" readonly required>
                                    </div>

                                </div>
                                <div class="form-group product_global" id="price_div">
                                    <label class="col-sm-2 control-label">价格:</label>
                                    <div class="col-sm-3">
                                        <input type="text"  id="price" placeholder="价格(示例:$1200.00)"  class="form-control small" value="<%data.price%>">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label"></label>
                                    <div class="col-sm-4">
                                        <label>是否APP专享:</label>
                                        <label class="radio-inline"><input type="radio" name="isApp" value="Y"></label>
                                        <label class="radio-inline"><input type="radio" name="isApp" value="N"></label>
                                        <input type="hidden" value="<%data.isApp%>" id="isApp" for="radio">
                                    </div>
                                    <div class="col-sm-4">
                                        <label>是否新客:</label>
                                        <label class="radio-inline"><input type="radio" name="isNew" value="Y"></label>
                                        <label class="radio-inline"><input type="radio" name="isNew" value="N"></label>
                                        <input type="hidden" value="<%data.isNew%>" id="isNew" for="radio">
                                    </div>
                                </div>



                            </div>
                        </div>
                    </div>

                    <div class="pannel">
                        <div class="panel-heading">
                            <h4>限购商品排序</h4>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <div class="col-md-3">
                                    <label>是否热门:</label>
                                    <label class="radio-inline"><input type="radio" name="hotFlag" value="1"></label>
                                    <label class="radio-inline"><input type="radio" name="hotFlag" value="0"></label>
                                    <input type="hidden" value="<%data.hotFlag%>" id="hotFlag" for="radio">
                                </div>

                                <div class="col-md-3 height60 order-by">
                                    <label>排序<span class="red" style="display: none;">*</span></label>
                                    <label><input id="orderBy" value="<%data.orderBy%>" type="text" class="form-control" placeholder="排序"></label>
                                    <p>(提示:数字越大越靠前)</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="pannel product_normal" id="limitProductToolTips" style="display: none;">
                        <div class="panel-heading">
                            <h4>设置点击底部按钮后的提示内容</h4>
                        </div>
                        <div class="panel-body">
                            <div class="row">
                                <input id="limitProductTips" type="text" class="form-control" value="<%data.limitProductTips%>" placeholder="建议不超过30个字">
                            </div>
                        </div>
                    </div>
                </div>            
            </div>

            <div class="pannel product_normal" id="limitProductType_3" style="display: none;">
                <div class="panel-heading">
                    <h4>导入UID获得限购码</h4>
                </div>
                <div class="panel-body">
                    <div id="uploadOperator">
                        <input id="uploadBox" name="file" type="file" style="position: absolute; top: 0;left: 0;z-index: -999">
                        <div id="chooseFile" class="file-name btn btn-info">上传指定UID的表格</div>
                    </div>

                    <!-- 上传成功之后的操作列表 -->
                    <div id="postUploadOperator" style="display: none;">
                        <div>
                            <a href="javascript:;" class="uploaded-uid-xls">UID表格已上传</a>
                        </div>
                        <!-- 已上传成功的操作码,用于后续的发放和删除动作 -->
                        <input type="text" hidden name="operationCode" id="uploadedOperationCode">
                        <a href="javascript:;" class="btn btn-success" id="sendLimitCode">发放限购码</a>
                        <a href="javascript:;" class="btn btn-danger" id="deleteUploadedUid">删除表格</a>
                        <label class="alert alert-info send-limitcode-tips" style="display:none; height: 37px; padding-top: 8px;">正在发放限购码,请稍候...</label>
                    </div>

                    <div id="limitUidHistory" style="display: none; margin: 16px 0">
                    </div>
                </div>
            </div>

            <div class="pannel">
                <div class="panel-heading">
                    <h4>限量详情内容</h4>
                </div>
                <div id="baseTable"></div>
                <input type="hidden" value="<%data.attachmentContent%>" id="attachmentContent" />
                 <div class="row">
                        <div class="col-md-12">
                            <button class="btn btn-info  mr5" id="textDialog">文本</button>
                            <button class="btn btn-info  mr5" id="picDialog">图片</button>
                            <button class="btn btn-info  mr5" id="videoDialog">视频</button>
                            <button class="btn btn-info  mr5" id="blankDialog">新图片</button>
                        </div>
                    </div>
            </div>
            <div class="pannel">
            <div class="col-md-10"></div>
            <div class="col-md-2">
                 <input id="limit-add-btn" class="btn btn-success limit-add-btn" type="button" value="保存"></input>
            </div>
            </div>
        </div>
    </form>
</div>


<script type="text/template" id="picDialogTemp">
    <div class="row">
        <div id="upload-wrapper" class="col-md-3">
            <input id="imgfile" name="imgfile" type="file" class="btn btn-primary ml10" value="{attachUrl}">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">图片链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" id="imgText"  type="text" placeholder="图片链接" value="{attachUrl}" required>
                </div>
                
            </div>
            <div class="row">
                <label class="pull-left control-label height40">图片描述</label>
                <div class="pull-left ml10">
                    <input class="form-control" type="text" id="attachName" value="{attachName}" placeholder="图片描述">
                </div>
            </div>
        </div>
    </div>
</script>

<script type="text/template" id="vidioDialogTemp">

<!-- Mov avi rmvb mp4  -->
    <div class="row">
        <div id="upload-wrapper1" class="col-md-3">
            <input id="videofile" name="videofile" type="file" bucket="goodsvideo" extend="mp4,rmvb,avi,mov" class="btn btn-primary ml10" value="{attachUrl}">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">视频链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" id="videoText"  type="text" placeholder="视频链接" value="{attachUrl}" required>
                </div>
                
            </div>
            <div class="row">
                <label class="pull-left control-label height40">视频描述</label>
                <div class="pull-left ml10">
                    <input class="form-control" type="text" id="attachName" value="{attachName}" placeholder="视频描述">
                </div>
            </div>
        </div>
    </div>
    <div class="row">
        <div id="upload-wrapper2" class="col-md-3">
            <input id="imgfile" name="imgfile" type="file" class="btn btn-primary ml10" value="{intro}">
        </div>
        <div class="col-md-9">
            <div class="row">
                <label class="pull-left control-label height40">图片链接</label>
                <div class="pull-left ml10">
                    <input class="form-control" id="imgText"  type="text" placeholder="图片链接" value="{intro}" required>
                </div>
                
            </div>
        </div>
    </div>
</script>