Authored by dongjunjie

代销变价新增学生价

@@ -27,9 +27,9 @@ module.exports={ @@ -27,9 +27,9 @@ module.exports={
27 {name: 'param', type: 'Number'} 27 {name: 'param', type: 'Number'}
28 ] 28 ]
29 }, 29 },
30 - updatePrice:{ 30 + updateProductPrice:{
31 title:'单个变价接口', 31 title:'单个变价接口',
32 - url: '/product/getProductPrice', 32 + url: '/product/updateProductPrice',
33 params: [ 33 params: [
34 {name: 'product_skn', type: 'number'}, 34 {name: 'product_skn', type: 'number'},
35 {name: 'sales_price', type: 'number'}, 35 {name: 'sales_price', type: 'number'},
@@ -38,7 +38,10 @@ module.exports={ @@ -38,7 +38,10 @@ module.exports={
38 {name: 'vip_price', type: 'number'}, 38 {name: 'vip_price', type: 'number'},
39 {name: 'vip1_price', type: 'number'}, 39 {name: 'vip1_price', type: 'number'},
40 {name: 'vip2_price', type: 'number'}, 40 {name: 'vip2_price', type: 'number'},
41 - {name: 'vip3_price', type: 'number'} 41 + {name: 'vip3_price', type: 'number'},
  42 + {name: 'student_price', type: 'number'},
  43 + {name: 'cgpriceStartTime', type: 'String'},
  44 + {name: 'cgpriceEndTime', type: 'String'}
42 ] 45 ]
43 }, 46 },
44 queryProductPriceListBySkn:{ 47 queryProductPriceListBySkn:{
@@ -64,22 +67,6 @@ module.exports={ @@ -64,22 +67,6 @@ module.exports={
64 {name: 'cgpriceEndTime', type: 'String'} 67 {name: 'cgpriceEndTime', type: 'String'}
65 ] 68 ]
66 }, 69 },
67 - updateProductPrice:{  
68 - title:'单个变价接口',  
69 - url: '/product/updateProductPrice',  
70 - params: [  
71 - {name: 'product_skn', type: 'number'},  
72 - {name: 'sales_price', type: 'number'},  
73 - {name: 'vip_discount_type', type: 'number'},  
74 - {name: 'return_coin', type: 'number'},  
75 - {name: 'vip_price', type: 'number'},  
76 - {name: 'vip1_price', type: 'number'},  
77 - {name: 'vip2_price', type: 'number'},  
78 - {name: 'vip3_price', type: 'number'},  
79 - {name: 'cgpriceStartTime', type: 'String'},  
80 - {name: 'cgpriceEndTime', type: 'String'}  
81 - ]  
82 - },  
83 queryBrandCooperationList:{ 70 queryBrandCooperationList:{
84 title:'品牌合作模式设置列表数据', 71 title:'品牌合作模式设置列表数据',
85 url: '/brandCooperation/queryBrandCooperationList', 72 url: '/brandCooperation/queryBrandCooperationList',
@@ -95,7 +95,7 @@ @@ -95,7 +95,7 @@
95 <td width="120px"><b>说明:</b></td> 95 <td width="120px"><b>说明:</b></td>
96 <td> 96 <td>
97 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br> 97 1、上传文件必须是<span style="color:red;">.xlsx</span>文件<br>
98 - 2、Excel表头为:<span style="color: #67D267;">SKN、吊牌价、销售价、VIP折扣类型、VIP价、白金价、金卡价、银卡价</span><br> 98 + 2、Excel表头为:<span style="color: #67D267;">SKN、吊牌价、销售价、学生价、VIP折扣类型、VIP价、白金价、金卡价、银卡价</span><br>
99 3、第一行为表头内容,第二行开始为正式内容<br> 99 3、第一行为表头内容,第二行开始为正式内容<br>
100 4、每个文件控制在2500行以内<br> 100 4、每个文件控制在2500行以内<br>
101 5、<a href="/ajax/link/batchUpdatePrice" style="margin: 0; text-decoration: underline">下载样例.xlsx</a> 101 5、<a href="/ajax/link/batchUpdatePrice" style="margin: 0; text-decoration: underline">下载样例.xlsx</a>
@@ -145,10 +145,8 @@ @@ -145,10 +145,8 @@
145 <tr> 145 <tr>
146 <th style="border-top: 0; border-left: 0">销售价</th> 146 <th style="border-top: 0; border-left: 0">销售价</th>
147 <th style="border-top: 0">VIP折扣类型</th> 147 <th style="border-top: 0">VIP折扣类型</th>
148 - <th style="border-top: 0">VIP</th>  
149 - <th style="border-top: 0">白金价</th>  
150 - <th style="border-top: 0">金卡价</th>  
151 - <th style="border-top: 0">银卡价</th> 148 + <th style="border-top: 0">会员价</th>
  149 + <th style="border-top: 0">学生价</th>
152 <th style="border-top: 0">价格生效时间</th> 150 <th style="border-top: 0">价格生效时间</th>
153 <th style="border-top: 0">进货价</th> 151 <th style="border-top: 0">进货价</th>
154 <th style="border-top: 0">进货折扣</th> 152 <th style="border-top: 0">进货折扣</th>
@@ -169,16 +167,33 @@ @@ -169,16 +167,33 @@
169 </select> 167 </select>
170 </td> 168 </td>
171 <td style="border-bottom: 0"> 169 <td style="border-bottom: 0">
  170 + <div class="form-inline" style="margin-bottom: 5px">
  171 + <div class="form-group">
  172 + <label style="width: 60px; text-align: right">VIP价:</label>
172 <input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')"> 173 <input class="vip-price form-control" type="text" value="{vip_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
173 - </td>  
174 - <td style="border-bottom: 0"> 174 + </div>
  175 + </div>
  176 + <div class="form-inline" style="margin-bottom: 5px">
  177 + <div class="form-group">
  178 + <label style="width: 60px; text-align: right">白金价:</label>
175 <input class="vip3-price form-control" type="text" value="{vip3_price}" disabled> 179 <input class="vip3-price form-control" type="text" value="{vip3_price}" disabled>
176 - </td>  
177 - <td style="border-bottom: 0"> 180 + </div>
  181 + </div>
  182 + <div class="form-inline" style="margin-bottom: 5px">
  183 + <div class="form-group">
  184 + <label style="width: 60px; text-align: right">金卡价:</label>
178 <input class="vip2-price form-control" type="text" value="{vip2_price}" disabled> 185 <input class="vip2-price form-control" type="text" value="{vip2_price}" disabled>
  186 + </div>
  187 + </div>
  188 + <div class="form-inline">
  189 + <div class="form-group">
  190 + <label style="width: 60px; text-align: right">银卡价:</label>
  191 + <input class="vip1-price form-control" type="text" value="{vip1_price}" disabled>
  192 + </div>
  193 + </div>
179 </td> 194 </td>
180 <td style="border-bottom: 0"> 195 <td style="border-bottom: 0">
181 - <input class="vip1-price form-control" type="text" value="{vip1_price}" disabled> 196 + <input class="student_price form-control" type="text" value="{student_price}" onkeyup="this.value=this.value.replace(/\D/gi,'')">
182 </td> 197 </td>
183 <td class="form-inline" style="border-bottom: 0"> 198 <td class="form-inline" style="border-bottom: 0">
184 <input id="start_{product_skn}" jsaction="date:end:end_{product_skn}" class="startDate form-control" type="text" value="{cgpriceStartTime}" placeholder="开始日期" style='background-color:#fff'> 199 <input id="start_{product_skn}" jsaction="date:end:end_{product_skn}" class="startDate form-control" type="text" value="{cgpriceStartTime}" placeholder="开始日期" style='background-color:#fff'>
@@ -227,6 +242,7 @@ @@ -227,6 +242,7 @@
227 <tr> 242 <tr>
228 <th>吊牌价</th> 243 <th>吊牌价</th>
229 <th>销售价</th> 244 <th>销售价</th>
  245 + <th>学生价</th>
230 <th>价格生效-<font color="green">开始时间</font></th> 246 <th>价格生效-<font color="green">开始时间</font></th>
231 <th>价格生效-<font color="red">结束时间</font></th> 247 <th>价格生效-<font color="red">结束时间</font></th>
232 <th>变价时间</th> 248 <th>变价时间</th>
@@ -240,6 +256,7 @@ @@ -240,6 +256,7 @@
240 <tr> 256 <tr>
241 <td>[[item.retailPrice]]</td> 257 <td>[[item.retailPrice]]</td>
242 <td>[[item.salesPrice]]</td> 258 <td>[[item.salesPrice]]</td>
  259 + <td>[[item.studentPrice]]</td>
243 <td>[[item.effectiveTime]]</td> 260 <td>[[item.effectiveTime]]</td>
244 <td>[[item.changePriceEndTime]]</td> 261 <td>[[item.changePriceEndTime]]</td>
245 <td>[[item.createTime]]</td> 262 <td>[[item.createTime]]</td>
@@ -96,6 +96,7 @@ var g = new common.grid({ @@ -96,6 +96,7 @@ var g = new common.grid({
96 }}, 96 }},
97 {display: '吊牌价', name: 'retail_price'}, 97 {display: '吊牌价', name: 'retail_price'},
98 {display: '销售价', name: 'sales_price'}, 98 {display: '销售价', name: 'sales_price'},
  99 + {display: '学生价', name: 'student_price'},
99 {display: 'VIP折扣类型', render: function(item) { 100 {display: 'VIP折扣类型', render: function(item) {
100 return ENUM.vipType[item.vip_discount_type]; 101 return ENUM.vipType[item.vip_discount_type];
101 }}, 102 }},
@@ -173,6 +174,7 @@ $(document).on('click', '.modify-btn', function() { @@ -173,6 +174,7 @@ $(document).on('click', '.modify-btn', function() {
173 $vip3Price = $wrap.find('.vip3-price'), 174 $vip3Price = $wrap.find('.vip3-price'),
174 $vip2Price = $wrap.find('.vip2-price'), 175 $vip2Price = $wrap.find('.vip2-price'),
175 $vip1Price = $wrap.find('.vip1-price'), 176 $vip1Price = $wrap.find('.vip1-price'),
  177 + $student_price = $wrap.find('.student_price'),
176 $startDate = $wrap.find('.startDate'), 178 $startDate = $wrap.find('.startDate'),
177 $endDate = $wrap.find('.endDate'), 179 $endDate = $wrap.find('.endDate'),
178 $submitBtn = $wrap.find('.sure-modify'); 180 $submitBtn = $wrap.find('.sure-modify');
@@ -200,6 +202,7 @@ $(document).on('click', '.modify-btn', function() { @@ -200,6 +202,7 @@ $(document).on('click', '.modify-btn', function() {
200 vip1_price: $vip1Price.val(), 202 vip1_price: $vip1Price.val(),
201 vip2_price: $vip2Price.val(), 203 vip2_price: $vip2Price.val(),
202 vip3_price: $vip3Price.val(), 204 vip3_price: $vip3Price.val(),
  205 + student_price: $student_price.val(),
203 cgpriceStartTime:$startDate.val(), 206 cgpriceStartTime:$startDate.val(),
204 cgpriceEndTime:$endDate.val() 207 cgpriceEndTime:$endDate.val()
205 } 208 }
@@ -319,6 +322,25 @@ var p = new common.grid({ @@ -319,6 +322,25 @@ var p = new common.grid({
319 } 322 }
320 return newPriceHtml + '<div style="color: #999;">' + item.oldProductPriceBo.sales_price + '</div>'; 323 return newPriceHtml + '<div style="color: #999;">' + item.oldProductPriceBo.sales_price + '</div>';
321 }}, 324 }},
  325 + {display: '学生价', render: function(item) {
  326 + var newPrice = item.newProductPriceBo,
  327 + newPriceHtml = '';
  328 + if (newPrice.student_price) {
  329 + if (newPrice.student_price < (newPrice.retail_price / 2)) {
  330 + newPriceHtml = '<p style="color: red">' + newPrice.student_price + '</p>';
  331 + }else{
  332 + newPriceHtml = '<p>'+newPrice.student_price+'</p>';
  333 + }
  334 + } else {
  335 + newPriceHtml = '<p>-</p>'
  336 + }
  337 + if(item.oldProductPriceBo.student_price){
  338 + newPriceHtml += '<div style="color: #999;">' + item.oldProductPriceBo.student_price + '</div>';
  339 + }else{
  340 + newPriceHtml += '<div>-</div>';
  341 + }
  342 + return newPriceHtml;
  343 + }},
322 {display: 'VIP折扣类型', render: function(item) { 344 {display: 'VIP折扣类型', render: function(item) {
323 return '<p>'+ENUM.vipType[item.newProductPriceBo.vip_discount_type] + '</p>'+ 345 return '<p>'+ENUM.vipType[item.newProductPriceBo.vip_discount_type] + '</p>'+
324 '<div style="color: #999;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</div>'; 346 '<div style="color: #999;">' + ENUM.vipType[item.oldProductPriceBo.vip_discount_type] + '</div>';