Authored by ZhongW

页面修改

... ... @@ -158,22 +158,26 @@
</div>
<script id="template" type="text/template">
<td colspan="15" style="padding: 0">
<td colspan="16" 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; border-left: 0">SKN</th>
<th style="border-top: 0">VIP折扣类型</th>
<th style="border-top: 0">会员价</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>
<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; border-right: 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,'')">
{product_skn}
</td>
<td style="border-bottom: 0">
<select class="discount-select form-control" style="width: 110px">
... ... @@ -184,45 +188,46 @@
<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}" disabled>
</td>
<td style="border-bottom: 0">
<input class="vip2-price form-control" type="text" value="{vip2_price}" disabled>
</td>
<td style="border-bottom: 0">
<input class="vip1-price form-control" type="text" value="{vip1_price}" disabled>
</td>
<td style="border-bottom: 0">
<div class="form-inline" style="margin-bottom: 5px">
<div class="form-group">
<label style="width: 60px; text-align: right">VIP价:</label>
<input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
</div>
<div class="form-inline" style="margin-bottom: 5px">
<div class="form-group">
<label style="width: 60px; text-align: right">白金价:</label>
<input class="vip3-price form-control" type="text" value="{vip3_price}" disabled>
</div>
</div>
<div class="form-inline" style="margin-bottom: 5px">
<div class="form-group">
<label style="width: 60px; text-align: right">金卡价:</label>
<input class="vip2-price form-control" type="text" value="{vip2_price}" disabled>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label style="width: 60px; text-align: right">银卡价:</label>
<input class="vip1-price form-control" type="text" value="{vip1_price}" disabled>
<input type="radio"style="margin-left: 35%">关闭<br>
<input class="student_price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</div>
</div>
</div>
</td>
<td style="border-bottom: 0">
<input class="student_price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</td>
<td style="border-bottom: 0">
<input class="sale-price form-control" type="text" value="{sales_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
</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'>
<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; border-right: 0">
<a href="javascript:;" class="btn btn-success btn-xs sure-modify">保存</a>
<td style="border-bottom: 0"></td>
<td style="border-bottom: 0"></td>
<td style="border-bottom: 0; border-right: 0;width:5%">
<a href="javascript:;" class="btn btn-success btn-xs sure-modify" style="margin-bottom:10px;">提交</a>
<a href="javascript:;" class="btn btn-success btn-xs sure-modify">取消</a>
</td>
</tr>
</table>
... ...
... ... @@ -307,20 +307,16 @@ function getHistoryList(skn) {
//单个变价修改
$(document).on('click', '.modify-btn', function() {
if($(this).hasClass('open')){
return false;
}
var skn = $(this).data('skn'),
parentTr = $(this).parent().parent(),
sknTd = parentTr.find('td').eq(0);
if($(this).hasClass('open')){
$(this).removeClass('open');
$(this).text('修改');
sknTd.removeAttr('rowspan','2');
parentTr.next('.product-detail').remove();
parentTr.next('.extraTr').remove();
}else{
$(this).addClass('open');
$(this).text('收起');
sknTd.attr('rowspan','2');
$(this).text('修改');
parentTr.after('<tr class="product-detail"><td colspan="15">加载中...若长时间加载不出来,请重新刷新页面!</td>' +
'</tr><tr class="extraTr"></tr>');
... ...