Authored by ZhongW

页面修改

@@ -158,22 +158,26 @@ @@ -158,22 +158,26 @@
158 </div> 158 </div>
159 159
160 <script id="template" type="text/template"> 160 <script id="template" type="text/template">
161 - <td colspan="15" style="padding: 0"> 161 + <td colspan="16" style="padding: 0">
162 <table class="table table-striped table-bordered" style="margin: 0;border: 0"> 162 <table class="table table-striped table-bordered" style="margin: 0;border: 0">
163 <tr> 163 <tr>
164 - <th style="border-top: 0; border-left: 0">销售价</th> 164 + <th style="border-top: 0; border-left: 0">SKN</th>
165 <th style="border-top: 0">VIP折扣类型</th> 165 <th style="border-top: 0">VIP折扣类型</th>
166 - <th style="border-top: 0">会员价</th> 166 + <th style="border-top: 0">VIP</th>
  167 + <th style="border-top: 0">白金</th>
  168 + <th style="border-top: 0">金卡</th>
  169 + <th style="border-top: 0">银卡</th>
167 <th style="border-top: 0">学生价</th> 170 <th style="border-top: 0">学生价</th>
  171 + <th style="border-top: 0">建议销售价</th>
  172 + <th style="border-top: 0">销售价</th>
168 <th style="border-top: 0">价格生效时间</th> 173 <th style="border-top: 0">价格生效时间</th>
169 - <th style="border-top: 0">进货价</th>  
170 - <th style="border-top: 0">进货折扣</th>  
171 - <th style="border-top: 0">成本</th> 174 + <th style="border-top: 0">预估毛利率</th>
  175 + <th style="border-top: 0">库存成本</th>
172 <th style="border-top: 0; border-right: 0">操作</th> 176 <th style="border-top: 0; border-right: 0">操作</th>
173 </tr> 177 </tr>
174 <tr> 178 <tr>
175 <td style="border-bottom: 0; border-left: 0"> 179 <td style="border-bottom: 0; border-left: 0">
176 - <input class="sale-price form-control" type="text" value="{sales_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')"> 180 + {product_skn}
177 </td> 181 </td>
178 <td style="border-bottom: 0"> 182 <td style="border-bottom: 0">
179 <select class="discount-select form-control" style="width: 110px"> 183 <select class="discount-select form-control" style="width: 110px">
@@ -184,45 +188,46 @@ @@ -184,45 +188,46 @@
184 <option value="5">自定义折扣</option> 188 <option value="5">自定义折扣</option>
185 </select> 189 </select>
186 </td> 190 </td>
  191 +
  192 + <td style="border-bottom: 0">
  193 + <input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
  194 + </td>
  195 +
  196 + <td style="border-bottom: 0">
  197 + <input class="vip3-price form-control" type="text" value="{vip3_price}" disabled>
  198 + </td>
  199 + <td style="border-bottom: 0">
  200 + <input class="vip2-price form-control" type="text" value="{vip2_price}" disabled>
  201 + </td>
  202 + <td style="border-bottom: 0">
  203 + <input class="vip1-price form-control" type="text" value="{vip1_price}" disabled>
  204 + </td>
  205 +
187 <td style="border-bottom: 0"> 206 <td style="border-bottom: 0">
188 <div class="form-inline" style="margin-bottom: 5px"> 207 <div class="form-inline" style="margin-bottom: 5px">
189 <div class="form-group"> 208 <div class="form-group">
190 - <label style="width: 60px; text-align: right">VIP价:</label>  
191 - <input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">  
192 - </div>  
193 - </div>  
194 - <div class="form-inline" style="margin-bottom: 5px">  
195 - <div class="form-group">  
196 - <label style="width: 60px; text-align: right">白金价:</label>  
197 - <input class="vip3-price form-control" type="text" value="{vip3_price}" disabled>  
198 - </div>  
199 - </div>  
200 - <div class="form-inline" style="margin-bottom: 5px">  
201 - <div class="form-group">  
202 - <label style="width: 60px; text-align: right">金卡价:</label>  
203 - <input class="vip2-price form-control" type="text" value="{vip2_price}" disabled>  
204 - </div>  
205 - </div>  
206 - <div class="form-inline">  
207 - <div class="form-group">  
208 - <label style="width: 60px; text-align: right">银卡价:</label>  
209 - <input class="vip1-price form-control" type="text" value="{vip1_price}" disabled> 209 + <input type="radio"style="margin-left: 35%">关闭<br>
  210 + <input class="student_price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
210 </div> 211 </div>
211 - </div> 212 + </div>
212 </td> 213 </td>
213 <td style="border-bottom: 0"> 214 <td style="border-bottom: 0">
214 - <input class="student_price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')"> 215 +
  216 + </td>
  217 + <td style="border-bottom: 0">
  218 + <input class="sale-price form-control" type="text" value="{sales_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
215 </td> 219 </td>
  220 +
216 <td class="form-inline" style="border-bottom: 0"> 221 <td class="form-inline" style="border-bottom: 0">
217 - <input id="start_{product_skn}" jsaction="date:end:end_{product_skn}" class="startDate form-control" type="text" value="{cgpriceStartTime}" placeholder="开始日期" style='background-color:#fff'> 222 + <input id="start_{product_skn}" jsaction="date:end:end_{product_skn}" class="startDate form-control" type="text" value="{cgpriceStartTime}" placeholder="开始日期" style='background-color:#fff;'>
218 <label>&nbsp;~&nbsp;</label> 223 <label>&nbsp;~&nbsp;</label>
219 <input id="end_{product_skn}" jsaction="date:start:start_{product_skn}" class="endDate form-control" type="text" value="{cgpriceEndTime}" placeholder="结束日期" style='background-color:#fff'> 224 <input id="end_{product_skn}" jsaction="date:start:start_{product_skn}" class="endDate form-control" type="text" value="{cgpriceEndTime}" placeholder="结束日期" style='background-color:#fff'>
220 </td> 225 </td>
221 - <td style="border-bottom: 0">{purchase_price}</td>  
222 - <td style="border-bottom: 0">{purchase_discount}</td>  
223 - <td style="border-bottom: 0">{cost_price}</td>  
224 - <td style="border-bottom: 0; border-right: 0">  
225 - <a href="javascript:;" class="btn btn-success btn-xs sure-modify">保存</a> 226 + <td style="border-bottom: 0"></td>
  227 + <td style="border-bottom: 0"></td>
  228 + <td style="border-bottom: 0; border-right: 0;width:5%">
  229 + <a href="javascript:;" class="btn btn-success btn-xs sure-modify" style="margin-bottom:10px;">提交</a>
  230 + <a href="javascript:;" class="btn btn-success btn-xs sure-modify">取消</a>
226 </td> 231 </td>
227 </tr> 232 </tr>
228 </table> 233 </table>
@@ -307,20 +307,16 @@ function getHistoryList(skn) { @@ -307,20 +307,16 @@ function getHistoryList(skn) {
307 307
308 //单个变价修改 308 //单个变价修改
309 $(document).on('click', '.modify-btn', function() { 309 $(document).on('click', '.modify-btn', function() {
  310 +
  311 + if($(this).hasClass('open')){
  312 + return false;
  313 + }
  314 +
310 var skn = $(this).data('skn'), 315 var skn = $(this).data('skn'),
311 parentTr = $(this).parent().parent(), 316 parentTr = $(this).parent().parent(),
312 sknTd = parentTr.find('td').eq(0); 317 sknTd = parentTr.find('td').eq(0);
313 -  
314 - if($(this).hasClass('open')){  
315 - $(this).removeClass('open');  
316 - $(this).text('修改');  
317 - sknTd.removeAttr('rowspan','2');  
318 - parentTr.next('.product-detail').remove();  
319 - parentTr.next('.extraTr').remove();  
320 - }else{  
321 $(this).addClass('open'); 318 $(this).addClass('open');
322 - $(this).text('收起');  
323 - sknTd.attr('rowspan','2'); 319 + $(this).text('修改');
324 parentTr.after('<tr class="product-detail"><td colspan="15">加载中...若长时间加载不出来,请重新刷新页面!</td>' + 320 parentTr.after('<tr class="product-detail"><td colspan="15">加载中...若长时间加载不出来,请重新刷新页面!</td>' +
325 '</tr><tr class="extraTr"></tr>'); 321 '</tr><tr class="extraTr"></tr>');
326 322