Change.html 12.4 KB
<%include '../../../common/views/__ui/header'%>
<%include '../../../common/views/__partail/ListHeader'%>

<div class="contentpanel">
    <div class="panel panel-default" id="priceChangeSearch" style="margin-bottom:10px;">
        <div class="panel-body">
            <div class="row">
                <div class="panel-col">
                    <input id="skn" class="form-control panel-input height40" type="text" placeholder="请输入SKN" onkeyup="this.value=this.value.replace(/\D/gi,'')">
                </div>

               <!--  <div class="panel-col">
                    <select name="shop" id="shop"  tabindex="-1" title="" class="form-control">
                        <option value="-1">请选择店铺</option>
                    </select>
                </div> -->

                <div class="panel-col">
                    <select name="brand" id="brand"  tabindex="-1" title="" class="form-control">
                        <option value="-1">请选择品牌</option>
                    </select>
                </div>

                <div class="panel-col">
                    <select name="supplier" id="supplier"  tabindex="-1" title="" class="form-control">
                        <option value="-1">请选择供应商</option>
                    </select>
                </div>

                <div class="panel-col">
                    <select name="jit" id="jit"  tabindex="-1" title="" class="form-control">
                        <option value="-1">是否JIT商品</option>
                        <option value="Y"></option>
                        <option value="N"></option>
                    </select>
                </div>

                <div class="panel-col">
                    <select name="status" id="status"  tabindex="-1" title="" class="form-control">
                        <option value="-1">上架状态</option>
                        <option value="200">上架</option>
                        <option value="0">下架</option>
                    </select>
                </div>

                <div class="panel-col">
                    <select name="stock" id="stock"  tabindex="-1" title="" class="form-control">
                        <option value="-1">库存情况</option>
                        <option value="1">有库存</option>
                        <option value="0">无库存</option>
                    </select>
                </div>

                <div class="panel-col">
                    <select name="sex" id="sex"  tabindex="-1" title="" class="form-control">
                        <option value="-1">选择性别</option>
                        <option value="1"></option>
                        <option value="2"></option>
                        <option value="3">通用</option>
                    </select>
                </div>

                <div class="panel-col2">
                    <div id="sortTree"></div>
                </div>

                <div class="panel-col">
                    <a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
                    <a id="all-btn" href="javascript:;" class="btn btn-info">全部</a>
                </div>

                <div class="panel-col" style="margin: 0 0 0 -5px;">
                    <a id="import-btn" href="javascript:;" class="btn btn-primary">批量导入</a>
                </div>
            </div>
        </div>
    </div>
    <div class="panel">
        <div class="dataTables_wrapper no-footer" id="basicTable"></div>
        <div class="panel bulk-import" id="priceChange_import" style="padding: 20px;">
            <a id="return-btn" href="javascript:;" class="btn btn-info">返回列表</a>
            <a id="download-btn" href="javascript:;" class="btn btn-success" style="display: none">
                <span class="glyphicon glyphicon-arrow-down"></span> 下载导入结果
            </a>

            <table class="table table-bordered" style="border:1px solid #ddd; margin-top: 10px">
                <tr>
                    <td width="120px" style="line-height: 37px"><b>上传EXCEL:</b></td>
                    <td style="position: relative;">
                        <input id="priceChangeUpload" name="file" type="file" style="cursor: pointer; height: 37px; top: 8px;">
                        <div class="file-name btn btn-primary">请选择文件</div>
                    </td>
                </tr>
                <tr>
                    <td width="120px"><b>说明:</b></td>
                    <td>
                        1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
                        2、Excel表头为:<span style="color: #67D267;">SKN、吊牌价、销售价、VIP折扣类型、VIP价、白金价、金卡价、银卡价</span><br>
                        3、第一行为表头内容,第二行开始为正式内容<br>
                        4、每个文件控制在2500行以内<br>
                        5、<a href="/ajax/link/batchUpdatePrice" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
                    </td>
                </tr>
            </table>

            <div id="priceChangeImportMessage">
                <b>批量上传结果:</b>
                <span id="detailMassage"></span>
                <div class="clearfix"></div>
            </div>

            <div id="priceChangeImportResultSet">
                <div class="title">
                    <span>生效时间设置:</span>
                    <div class="clearfix"></div>
                </div>
                <div class="form-inline">
                    <label>价格生效时间:</label>
                    <div class="form-group">
                        <input id="importStartDate" jsaction="date:end:importEndDate" type="text" class="form-control" placeholder="开始日期" style="width: 150px">
                        &nbsp;~&nbsp;
                        <input id="importEndDate" jsaction="date:start:importStartDate" type="text" class="form-control" placeholder="结束日期" style="width: 150px">
                    </div>
                    <div class="form-group">
                        <a href="javascript:;" class="btn btn-success btn-submit-priceChange">确定提交</a>
                    </div>
                </div>
            </div>

            <div id="priceChangeImportResult">
                <div class="title">
                    <span>批量变价列表:(成功导入的变价)</span>
                    <a id="deleteAllImport" href="javascript:;" class="btn btn-xs btn-danger" style="float: right;padding-right: 10px">全部删除</a>
                    <div class="clearfix"></div>
                </div>
                <div id="importResultTable"></div>
            </div>
        </div>
    </div>
</div>

<script id="template" type="text/template">
    <td colspan="15" style="padding: 0">
        <table class="table table-striped table-bordered" style="margin: 0;border: 0">
            <tr>
                <th style="border-top: 0; border-left: 0">销售价</th>
                <th style="border-top: 0">VIP折扣类型</th>
                <th style="border-top: 0">VIP</th>
                <th style="border-top: 0">白金价</th>
                <th style="border-top: 0">金卡价</th>
                <th style="border-top: 0">银卡价</th>
                <th style="border-top: 0">价格生效时间</th>
                <th style="border-top: 0">进货价</th>
                <th style="border-top: 0">进货折扣</th>
                <th style="border-top: 0">成本</th>
                <th style="border-top: 0">操作</th>
            </tr>
            <tr>
                <td style="border-bottom: 0; border-left: 0">
                    <input class="sale-price form-control" type="text" value="{sales_price}" onkeyup="this.value=this.value.replace(/[^\d\.]|^\./gi,'')">
                </td>
                <td style="border-bottom: 0">
                    <select class="discount-select form-control" style="width: 110px">
                        <option value="1">正常折扣</option>
                        <option value="2">统一折扣</option>
                        <option value="3">无折扣</option>
                        <option value="4">固定折扣</option>
                        <option value="5">自定义折扣</option>
                    </select>
                </td>
                <td style="border-bottom: 0">
                    <input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/[^\d\.]|^\./gi,'')">
                </td>
                <td style="border-bottom: 0">
                    <input class="vip3-price form-control" type="text" value="{vip3_price}" onkeyup="this.value=this.value.replace(/[^\d\.]|^\./gi,'')"  disabled>
                </td>
                <td style="border-bottom: 0">
                    <input class="vip2-price form-control" type="text" value="{vip2_price}" onkeyup="this.value=this.value.replace(/[^\d\.]|^\./gi,'')" disabled>
                </td>
                <td style="border-bottom: 0">
                    <input class="vip1-price form-control" type="text" value="{vip1_price}" onkeyup="this.value=this.value.replace(/[^\d\.]|^\./gi,'')" disabled>
                </td>
                <td class="form-inline" style="border-bottom: 0">
                    <input id="start_{product_skn}" jsaction="date:end:end_{product_skn}" class="startDate form-control" type="text" value="{cgpriceStartTime}" placeholder="开始日期" style='background-color:#fff'>
                    <label>&nbsp;~&nbsp;</label>
                    <input id="end_{product_skn}" jsaction="date:start:start_{product_skn}" class="endDate form-control" type="text" value="{cgpriceEndTime}" placeholder="结束日期" style='background-color:#fff'>
                </td>
                <td style="border-bottom: 0">{purchase_price}</td>
                <td style="border-bottom: 0">{purchase_discount}</td>
                <td style="border-bottom: 0">{cost_price}</td>
                <td style="border-bottom: 0">
                    <a href="javascript:;" class="btn btn-success btn-xs sure-modify">保存</a>
                </td>
            </tr>
        </table>
    </td>
</script>
<script id="template2" type="text/template">
    <div class="productInfo">
        <table class="table table-striped table-bordered">
            <thead>
            <tr align="center">
                <th>SKN</th>
                <th>商品名称</th>
                <th>品牌</th>
                <th>类目</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>[[productSkn]]</td>
                <td>[[goodsName]]</td>
                <td>[[brandName]]</td>
                <td>
                    [[maxSortName]]
                    [[if midleSortName]]&nbsp;>&nbsp;[[midleSortName]][[/if]]
                    [[if smallSortName]]&nbsp;>&nbsp;[[smallSortName]][[/if]]
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 变价记录表 ——</h2>
    <div class="historyList">
        <table class="table table-striped table-bordered">
            <thead>
            <tr>
                <th>吊牌价</th>
                <th>销售价</th>
                <th>价格生效-<font color="green">开始时间</font></th>
                <th>价格生效-<font color="red">结束时间</font></th>
                <th>变价时间</th>
                <th>变价人</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            [[if list.length > 0]]
            [[each list as item index]]
            <tr>
                <td>[[item.retailPrice]]</td>
                <td>[[item.salesPrice]]</td>
                <td>[[item.effectiveTime]]</td>
                <td>[[item.changePriceEndTime]]</td>
                <td>[[item.createTime]]</td>
                <td>[[item.founderName]]</td>
                <td>
                    [[if item.flag && item.flag == 1]]
                    <a data-planid="[[item.planId]]" data-skn="[[productSkn]]" href="javascript:;" class="btn btn-danger btn-xs deleteHistory">删除</a>
                    [[/if]]
                </td>
            </tr>
            [[/each]]
            [[else]]
            <tr><td colspan="7">没有变价记录!</td></tr>
            [[/if]]
            </tbody>
        </table>
    </div>
</script>

<%include '../../../common/views/__ui/footer'%>