Authored by xuhongyun

build

... ... @@ -742,6 +742,27 @@ webpackJsonp([28],[
}
]
},
LoopCashReduce:{
enName:'LoopCashReduce',
cnName : '每满减',
param_list : [
{
name:'maxLoopNumber' ,
display_name : '循环上限',
type : 'text',
default_value : '10000',
post_label: '倍',
required: true
},
{
name:'reduce' ,
display_name : '满减',
type : 'text',
default_value : '',
required: true
}
]
},
Gift:{
enName:'Gift',
cnName:'赠品',
... ... @@ -891,7 +912,10 @@ webpackJsonp([28],[
for(var _index in _data.param_list){
_param=_data.param_list[_index];
var _html=_htmlObj.clone();
_html.children("label").html(_param.display_name);
var $label = _html.children("label").html(_param.display_name);
if(_param.required) {
$label.append($("<span class=\" red \" style=\"padding-left: 5px\">*</span>"));
}
var _input;
switch(_param.type){
case "text":
... ... @@ -914,7 +938,11 @@ webpackJsonp([28],[
}
_input.attr("id",_param.name);
_input.attr("name",_param.name);
_html.children("div").html(_input);
var $inputParent = _html.children("div").html(_input);
if(_param.post_label) {
$inputParent.css({'display': 'flex', 'align-items': 'center'});
$inputParent.append($('<span>倍</span>').css('padding-left', '10px'))
}
if(_param.remark){
var _remark=$("<label class=\"control-label red\"></label>");
_remark.html(_param.remark);
... ... @@ -961,10 +989,14 @@ webpackJsonp([28],[
break;
case this.config.SpecifiedAmount.enName:
_selectObj=this.config.SpecifiedAmount;
break;
case this.config.LoopCashReduce.enName:
_selectObj=this.config.LoopCashReduce
break;
}
this.template(firstGroup,_selectObj);
},
LoopCashReduce: function() {},
bindEvent:function(){
var _g=this;
$('#save_operation').off();
... ... @@ -1013,6 +1045,18 @@ webpackJsonp([28],[
common.util.__tip("数据格式不对,请根据提示输入", "warning");
return false;
}
if(reqData["promotionType"] === 'LoopCashReduce') {
if(!(/^[1-9]\d*(\.\d{1})?$/.test(_temp.reduce))) {
common.util.__tip("满减金额为大于0且最多精确到小数点后1位", "warning");
return false;
}
if(!(/^[1-9]\d*(\.{0})$/.test(_temp.maxLoopNumber))) {
common.util.__tip("循环上限填写倍数为大于1的整数", "warning");
return false;
}
}
_actionParam = JSON.stringify(_temp);
reqData["actionParam"]=_actionParam;
... ...
... ... @@ -16,7 +16,8 @@
<option value="Needpaygift">加价购</option>
<option value="Degressdiscount">分件折扣</option>
<option value="Cheapestfree">满X免1</option>
<option value="SpecifiedAmount">X件X元</option>
<option value="SpecifiedAmount">X件X元</option>
<option value="LoopCashReduce">每满减</option>
</select>
</div>
</div>
... ...
... ... @@ -71,6 +71,7 @@
<option value="1">经销</option>
<option value="2">代销</option>
<option value="3">JIT</option>
<option value="10">经销保税</option>
<option value="0">未设置</option>
</select>
</div>
... ...
... ... @@ -92,6 +92,14 @@
顶部Banner图(非必填),尺寸:640*200
</div>
</div>
<div class="form-group" id="productEditCouponTokens">
<label for="" class="col-sm-3 control-label">优惠券Token</label>
<div class="col-sm-9">
<input type="text" id="couponTokens" name="couponTokens" value="[[tokens]]" class="form-control">
</div>
</div>
<div class="form-group" id="productEditBackImage">
<label for="backImageUrl" class="col-sm-3 control-label">活动价背景图:</label>
<div class="col-sm-9">
... ...