Authored by xuhongyun

build

@@ -488,8 +488,10 @@ webpackJsonp([51],[ @@ -488,8 +488,10 @@ webpackJsonp([51],[
488 if (item.currentPrice) {html += '<p>当前价:'+item.currentPrice +'</p>';} 488 if (item.currentPrice) {html += '<p>当前价:'+item.currentPrice +'</p>';}
489 return html; 489 return html;
490 }}, 490 }},
491 - {display: 'VIP折扣类型', render: function(item) {  
492 - return ENUM.vipType[item.vip_discount_type]; 491 + {display: 'VIP折扣类型', render: function(item) {
  492 + var html = '<p>商品折扣类型:'+ENUM.vipType[item.vip_discount_type];
  493 + html += '<p>当前折扣类型:'+ENUM.vipType[item.currentVipDiscountType];
  494 + return html;
493 }}, 495 }},
494 {display: '会员价', render: function(item) { 496 {display: '会员价', render: function(item) {
495 var html = '<p>VIP价:'; 497 var html = '<p>VIP价:';
@@ -579,9 +581,11 @@ webpackJsonp([51],[ @@ -579,9 +581,11 @@ webpackJsonp([51],[
579 } else if (item.checkState == '300') { 581 } else if (item.checkState == '300') {
580 html += '<a data-index="' + item.__index + '" href="javascript:;" data-planid="' + item.planId + '" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>'; 582 html += '<a data-index="' + item.__index + '" href="javascript:;" data-planid="' + item.planId + '" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>';
581 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>'; 583 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>';
  584 + html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn-new" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录(新)</a>';
582 } else{ 585 } else{
583 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>'; 586 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-info btn-xs modify-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">修改</a><br>';
584 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>'; 587 html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录</a>';
  588 + html += '<a data-index="' + item.__index + '" href="javascript:;" class="btn btn-primary btn-xs history-btn-new" data-skn="' + item.product_skn + '" style="margin-top: 10px">变价记录(新)</a>';
585 } 589 }
586 return html; 590 return html;
587 } 591 }
@@ -644,6 +648,27 @@ webpackJsonp([51],[ @@ -644,6 +648,27 @@ webpackJsonp([51],[
644 } 648 }
645 }); 649 });
646 } 650 }
  651 +
  652 + //获取变价记录列表并渲染
  653 + function getNewHistoryList(skn) {
  654 + $.ajax({
  655 + type: 'POST',
  656 + dataType: 'json',
  657 + url: '/goods/queryNewProductPriceListBySkn',
  658 + data: {param: skn},
  659 + success: function (rs) {
  660 + var data = rs;
  661 + $('.historyDetail').html($(common.util.__template2($("#template2_new").html(), data.data)));
  662 + if(data.code != 200){
  663 + common.util.__tip(rs.message);
  664 + }
  665 + },
  666 + error: function (rs) {
  667 + $('.historyDetail').html($(common.util.__template2($("#template2_new").html(), {})));
  668 + common.util.__tip(rs.message);
  669 + }
  670 + });
  671 + }
647 672
648 //修改变价时自动生成预估毛利率 673 //修改变价时自动生成预估毛利率
649 $(document).on('blur', '.sale-price', function() { 674 $(document).on('blur', '.sale-price', function() {
@@ -799,6 +824,21 @@ webpackJsonp([51],[ @@ -799,6 +824,21 @@ webpackJsonp([51],[
799 getHistoryList(skn); 824 getHistoryList(skn);
800 }); 825 });
801 826
  827 + //新变价记录
  828 + $(document).on('click', '.history-btn-new', function () {
  829 + var skn = $(this).data('skn');
  830 + var option = {
  831 + title:'变价记录详情',
  832 + content:"<div class='historyDetail'>加载变价记录...</div>",
  833 + width:'70%',
  834 + button:[{value:"关闭", css:"btn-primary", callback: function () {
  835 + loadTab();
  836 + }}]
  837 + };
  838 + new common.dialog(option);
  839 + getNewHistoryList(skn);
  840 + });
  841 +
802 //删除变价记录 842 //删除变价记录
803 $(document).on('click', '.deleteHistory', function () { 843 $(document).on('click', '.deleteHistory', function () {
804 var skn = $(this).data('skn'); 844 var skn = $(this).data('skn');
@@ -18,6 +18,9 @@ module.exports=function(app) { @@ -18,6 +18,9 @@ module.exports=function(app) {
18 18
19 /*变价记录*/ 19 /*变价记录*/
20 app.post("/goods/queryProductPriceListBySkn","price_queryProductPriceListBySkn"); 20 app.post("/goods/queryProductPriceListBySkn","price_queryProductPriceListBySkn");
  21 +
  22 + /*变价记录(新)*/
  23 + app.post("/goods/queryNewProductPriceListBySkn","price_queryNewProductPriceListBySkn");
21 24
22 /*删除变价记录*/ 25 /*删除变价记录*/
23 app.post("/goods/deletePricePlan","price_deletePricePlan"); 26 app.post("/goods/deletePricePlan","price_deletePricePlan");
@@ -62,6 +62,13 @@ module.exports={ @@ -62,6 +62,13 @@ module.exports={
62 {name: 'param', type: 'Number'} 62 {name: 'param', type: 'Number'}
63 ] 63 ]
64 }, 64 },
  65 + queryNewProductPriceListBySkn:{
  66 + title:'变价记录',
  67 + url: '/product/queryNewProductPriceListBySkn',
  68 + params: [
  69 + {name: 'param', type: 'Number'}
  70 + ]
  71 + },
65 deletePricePlan:{ 72 deletePricePlan:{
66 title:'删除变价记录', 73 title:'删除变价记录',
67 url: '/product/deletePricePlan', 74 url: '/product/deletePricePlan',
@@ -422,6 +422,211 @@ @@ -422,6 +422,211 @@
422 </table> 422 </table>
423 </div> 423 </div>
424 </script> 424 </script>
  425 +<script id="template2_new" type="text/template">
  426 + <div class="productInfo">
  427 + <table class="table table-striped table-bordered">
  428 + <thead>
  429 + <tr align="center">
  430 + <th>SKN</th>
  431 + <th>商品名称</th>
  432 + <th>品牌</th>
  433 + <th>类目</th>
  434 + <th>当前价</th>
  435 + </tr>
  436 + </thead>
  437 + <tbody>
  438 + <tr>
  439 + <td>[[productSkn]]</td>
  440 + <td>[[goodsName]]</td>
  441 + <td>[[brandName]]</td>
  442 + <td>
  443 + [[maxSortName]]
  444 + [[if midleSortName]]&nbsp;>&nbsp;[[midleSortName]][[/if]]
  445 + [[if smallSortName]]&nbsp;>&nbsp;[[smallSortName]][[/if]]
  446 + </td>
  447 + <td>[[currentPrice]]</td>
  448 + </tr>
  449 + </tbody>
  450 + </table>
  451 + </div>
  452 + <h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 商品变价记录表 ——</h2>
  453 + <div class="historyList">
  454 + <table class="table table-striped table-bordered">
  455 + <thead>
  456 + <tr>
  457 + <th>吊牌价</th>
  458 + <th>销售价</th>
  459 + <th>价格生效-<font color="green">开始时间</font></th>
  460 + <th>价格生效-<font color="red">结束时间</font></th>
  461 + <th>状态</th>
  462 + <th>变价申请时间</th>
  463 + <th>变价人</th>
  464 + <th>变价类型</th>
  465 + </tr>
  466 + </thead>
  467 + <tbody>
  468 + [[if logList.length > 0]]
  469 + [[each logList as item index]]
  470 + <tr>
  471 + <td>[[item.retailPrice]]</td>
  472 + <td>[[item.salesPrice]]</td>
  473 + <td>[[item.effectiveTime]]</td>
  474 + <td>[[item.changePriceEndTime]]</td>
  475 + <td>
  476 + [[if item.checkState == '101' ]] 待一审 [[/if]]
  477 + [[if item.checkState == '102' ]] 待二审 [[/if]]
  478 + [[if item.checkState == '103' ]] 待三审 [[/if]]
  479 + [[if item.checkState == '200' ]] 待生效 [[/if]]
  480 + [[if item.checkState == '201' ]] <font color="red">生效 [[/if]]
  481 + [[if item.checkState == '202' ]] 已失效 [[/if]]
  482 + [[if item.checkState == '300' ]] 驳回 [[/if]]
  483 + </td>
  484 + <td>[[item.applyTime]]</td>
  485 + <td>[[item.founderName]]</td>
  486 + <td>[[item.changePriceType]]</td>
  487 + </tr>
  488 + [[/each]]
  489 + [[else]]
  490 + <tr><td colspan="9">没有商品变价记录!</td></tr>
  491 + [[/if]]
  492 + </tbody>
  493 + </table>
  494 + </div>
  495 +
  496 +<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 活动变价记录表 ——</h2>
  497 + <div class="historyList">
  498 + <table class="table table-striped table-bordered">
  499 + <thead>
  500 + <tr>
  501 + <th>吊牌价</th>
  502 + <th>活动价</th>
  503 + <th>价格生效-<font color="green">开始时间</font></th>
  504 + <th>价格生效-<font color="red">结束时间</font></th>
  505 + <th>状态</th>
  506 + <th>变价申请时间</th>
  507 + <th>变价人</th>
  508 + <th>变价类型</th>
  509 + </tr>
  510 + </thead>
  511 + <tbody>
  512 + [[if list.length > 0]]
  513 + [[each list as item index]]
  514 + <tr>
  515 + <td>[[item.retailPrice]]</td>
  516 + <td>[[item.currentPrice]]</td>
  517 + <td>[[item.effectiveTime]]</td>
  518 + <td>[[item.changePriceEndTime]]</td>
  519 + <td>
  520 + [[if item.checkState == '101' ]] 待一审 [[/if]]
  521 + [[if item.checkState == '102' ]] 待二审 [[/if]]
  522 + [[if item.checkState == '103' ]] 待三审 [[/if]]
  523 + [[if item.checkState == '200' ]] 待生效 [[/if]]
  524 + [[if item.checkState == '201' ]] <font color="red">生效 [[/if]]
  525 + [[if item.checkState == '202' ]] 已失效 [[/if]]
  526 + [[if item.checkState == '300' ]] 驳回 [[/if]]
  527 + </td>
  528 + <td>[[item.applyTime]]</td>
  529 + <td>[[item.founderName]]</td>
  530 + <td>[[item.changePriceType]]</td>
  531 + </tr>
  532 + [[/each]]
  533 + [[else]]
  534 + <tr><td colspan="9">没有活动变价记录!</td></tr>
  535 + [[/if]]
  536 + </tbody>
  537 + </table>
  538 + </div>
  539 +
  540 +<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 商品变价计划表 ——</h2>
  541 + <div class="historyList">
  542 + <table class="table table-striped table-bordered">
  543 + <thead>
  544 + <tr>
  545 + <th>吊牌价</th>
  546 + <th>销售价</th>
  547 + <th>价格生效-<font color="green">开始时间</font></th>
  548 + <th>价格生效-<font color="red">结束时间</font></th>
  549 + <th>状态</th>
  550 + <th>变价申请时间</th>
  551 + <th>变价人</th>
  552 + <th>操作</th>
  553 + </tr>
  554 + </thead>
  555 + <tbody>
  556 + [[if planList.length > 0]]
  557 + [[each planList as item index]]
  558 + <tr>
  559 + <td>[[item.retailPrice]]</td>
  560 + <td>[[item.salesPrice]]</td>
  561 + <td>[[item.effectiveTime]]</td>
  562 + <td>[[item.changePriceEndTime]]</td>
  563 + <td>
  564 + [[if item.checkState == '101' ]] 待一审 [[/if]]
  565 + [[if item.checkState == '102' ]] 待二审 [[/if]]
  566 + [[if item.checkState == '103' ]] 待三审 [[/if]]
  567 + [[if item.checkState == '200' ]] 待生效 [[/if]]
  568 + [[if item.checkState == '201' ]] 生效 [[/if]]
  569 + [[if item.checkState == '202' ]] 已失效 [[/if]]
  570 + [[if item.checkState == '300' ]] 驳回 [[/if]]
  571 + </td>
  572 + <td>[[item.createTime]]</td>
  573 + <td>[[item.founderName]]</td>
  574 + <td>
  575 + [[if item.flag && item.flag == 1]]
  576 + <a data-planid="[[item.planId]]" data-skn="[[productSkn]]" href="javascript:;" class="btn btn-danger btn-xs deleteHistory">删除</a>
  577 + [[/if]]
  578 + </td>
  579 + </tr>
  580 + [[/each]]
  581 + [[else]]
  582 + <tr><td colspan="9">没有商品变价计划!</td></tr>
  583 + [[/if]]
  584 + </tbody>
  585 + </table>
  586 + </div>
  587 +
  588 +<h2 style="color: #999; font-family: 'Microsoft YaHei'; font-size: 14px;">—— 活动变价计划表 ——</h2>
  589 + <div class="historyList">
  590 + <table class="table table-striped table-bordered">
  591 + <thead>
  592 + <tr>
  593 + <th>吊牌价</th>
  594 + <th>活动价</th>
  595 + <th>价格生效-<font color="green">开始时间</font></th>
  596 + <th>价格生效-<font color="red">结束时间</font></th>
  597 + <th>状态</th>
  598 + <th>变价申请时间</th>
  599 + <th>变价人</th>
  600 + </tr>
  601 + </thead>
  602 + <tbody>
  603 + [[if makePriceList.length > 0]]
  604 + [[each makePriceList as item index]]
  605 + <tr>
  606 + <td>[[item.retailPrice]]</td>
  607 + <td>[[item.salesPrice]]</td>
  608 + <td>[[item.effectiveTime]]</td>
  609 + <td>[[item.changePriceEndTime]]</td>
  610 + <td>
  611 + [[if item.checkState == '101' ]] 待一审 [[/if]]
  612 + [[if item.checkState == '102' ]] 待二审 [[/if]]
  613 + [[if item.checkState == '103' ]] 待三审 [[/if]]
  614 + [[if item.checkState == '200' ]] 待生效 [[/if]]
  615 + [[if item.checkState == '201' ]] 生效 [[/if]]
  616 + [[if item.checkState == '202' ]] 已失效 [[/if]]
  617 + [[if item.checkState == '300' ]] 驳回 [[/if]]
  618 + </td>
  619 + <td>[[item.createTime]]</td>
  620 + <td>[[item.founderName]]</td>
  621 + </tr>
  622 + [[/each]]
  623 + [[else]]
  624 + <tr><td colspan="9">没有活动变价计划!</td></tr>
  625 + [[/if]]
  626 + </tbody>
  627 + </table>
  628 + </div>
  629 +</script>
425 630
426 <script type="text/template" id="template3"> 631 <script type="text/template" id="template3">
427 <div class="rows" style="height: 100px;"> 632 <div class="rows" style="height: 100px;">