Authored by xuhongyun

build

@@ -703,7 +703,9 @@ webpackJsonp([28],[ @@ -703,7 +703,9 @@ webpackJsonp([28],[
703 var jsonUtils=__webpack_require__(44); 703 var jsonUtils=__webpack_require__(44);
704 var promotionInfoRefresh=__webpack_require__(40); 704 var promotionInfoRefresh=__webpack_require__(40);
705 console.log("operationEdit in"); 705 console.log("operationEdit in");
706 - 706 + var regrex_special_prds = new RegExp(/^\d{1,9}(,\d{1,9})*$/);
  707 + var regrex_double =new RegExp(/\d+(\.\d+)?/);
  708 + var regrex_small_digit =new RegExp(/[0]\.\d{1,2}/);
707 var operationEdit={ 709 var operationEdit={
708 tabLoader:null, 710 tabLoader:null,
709 columnName:null, 711 columnName:null,
@@ -1041,13 +1043,60 @@ webpackJsonp([28],[ @@ -1041,13 +1043,60 @@ webpackJsonp([28],[
1041 var _g=this; 1043 var _g=this;
1042 var result=true; 1044 var result=true;
1043 switch(_reqData["promotionType"]){ 1045 switch(_reqData["promotionType"]){
  1046 + //打折 请使用小数,例如:0.85,表示85折
  1047 + case _g.config.Discount.enName:
  1048 + var discount = _reqData["data"]["discount"];
  1049 + result = regrex_small_digit.test(discount);
  1050 + break;
  1051 + //满减 double
  1052 + case _g.config.Cashreduce.enName:
  1053 + var reduce = _reqData["data"]["reduce"];
  1054 + result = regrex_double.test(reduce);
  1055 + break;
  1056 + //赠品 多个使用英文逗号(,)分割,例如:"50017804,50019370"
  1057 + case _g.config.Gift.enName:
  1058 + var gift_list = _reqData["data"]["gift_list"];
  1059 + result = regrex_special_prds.test(gift_list);
  1060 + break;
  1061 + /*
  1062 + case _g.config.Changeshippingfee.enName:
  1063 +
  1064 + break; //调整运费
  1065 +
  1066 + //VIP固定折扣
  1067 + case _g.config.Vipfixeddiscount.enName:
  1068 +
  1069 + break;
  1070 +
  1071 + //送优惠券
  1072 + case _g.config.Givecoupon.enName:
  1073 +
  1074 + break;
  1075 + */
  1076 + //加价购
  1077 + // goods_list 商品列表 多个使用英文逗号(,)分割,例如:"50017804,50019370"
  1078 + //add_cost 支付金额 double
  1079 + case _g.config.Needpaygift.enName:
  1080 + var goods_list = _reqData["data"]["goods_list"];
  1081 + var add_cost = _reqData["data"]["add_cost"];
  1082 + result = regrex_double.test(add_cost) && regrex_special_prds.test(goods_list);
  1083 + break;
  1084 + //满X免1
  1085 + case _g.config.Cheapestfree.enName:
  1086 +
  1087 + break;
  1088 + //分件折扣
1044 case _g.config.Degressdiscount.enName: 1089 case _g.config.Degressdiscount.enName:
1045 - var regrex=new RegExp(/(\d+:\d+(\.\d+)?)(;\d+:\d+(\.\d+)?)*/,'g'); 1090 + //new RegExp(/^(\d+:\d+(\.\d+);)*(\d+:\d+(\.\d+)?)/)
  1091 + //var regrex=new RegExp(/(\d+:\d+(\.\d+)?)(;\d+:\d+(\.\d+)?)*/);
  1092 + //^\s*(\d+:\d+\.?\d*;)*(\d+:\d+\.?\d*)\s*$
  1093 + var _regexp = new RegExp(/^(\d+:\d+(\.\d+)?;)*(\d+:\d+(\.\d+)?)$/);
1046 var degress_discount_list=_reqData["data"]["degress_discount_list"]; 1094 var degress_discount_list=_reqData["data"]["degress_discount_list"];
1047 - result = regrex.test(degress_discount_list); 1095 + result = _regexp.test(degress_discount_list);
1048 break; 1096 break;
  1097 + //X件X元
1049 case _g.config.SpecifiedAmount.enName: 1098 case _g.config.SpecifiedAmount.enName:
1050 - var regrex=new RegExp(/^\d+:\d+(\.\d+)?$/,'g'); 1099 + var regrex=new RegExp(/^\d+:\d+(\.\d+)?$/);
1051 var specified_amount_list=_reqData["data"]["specified_amount_list"]; 1100 var specified_amount_list=_reqData["data"]["specified_amount_list"];
1052 result = regrex.test(specified_amount_list); 1101 result = regrex.test(specified_amount_list);
1053 break; 1102 break;
@@ -1960,7 +2009,7 @@ webpackJsonp([28],[ @@ -1960,7 +2009,7 @@ webpackJsonp([28],[
1960 var value_l2,value_l3; 2009 var value_l2,value_l3;
1961 var regrex_int = new RegExp(/^\d+$/); 2010 var regrex_int = new RegExp(/^\d+$/);
1962 var regrex_float_2b = new RegExp(/^\d+(\.\d{1,2})?$/); 2011 var regrex_float_2b = new RegExp(/^\d+(\.\d{1,2})?$/);
1963 - var regrex_special_prds = new RegExp(/^\d+(,\d+)*$/); 2012 + var regrex_special_prds = new RegExp(/^\d{1,9}(,\d{1,9})*$/);
1964 var errorMsg={}; 2013 var errorMsg={};
1965 var int_22 = Number("22"), int_1 = Number("1"), int_2 = Number("2"); 2014 var int_22 = Number("22"), int_1 = Number("1"), int_2 = Number("2");
1966 for(var key2 in conditions_l1){ 2015 for(var key2 in conditions_l1){
@@ -76,6 +76,12 @@ webpackJsonp([29],{ @@ -76,6 +76,12 @@ webpackJsonp([29],{
76 display: '操作', 76 display: '操作',
77 name: "status", 77 name: "status",
78 render: function(items) { 78 render: function(items) {
  79 + //支付类型的促销不允许修改
  80 + if(items.promotionParams
  81 + && items.promotionParams.promotionType
  82 + && items.promotionParams.promotionType=="Payment"){
  83 + return "";
  84 + }
79 var HtmArr = []; 85 var HtmArr = [];
80 HtmArr.push('<a href="/promotionInfo/edit/' + items.id + '"" class="btn btn-info btn-xs">编辑</a>'); 86 HtmArr.push('<a href="/promotionInfo/edit/' + items.id + '"" class="btn btn-info btn-xs">编辑</a>');
81 if(items.isDel==="N"){ 87 if(items.isDel==="N"){