Authored by shuaiguo

Merge branch 'develop' into gray

... ... @@ -44,6 +44,16 @@ var operationEdit={
cnName : '每满减',
param_list : [
{
name: 'parallel',
display_name : '是否平行',
type: 'radio',
default_value: 'N',
values: ['N','Y'],
remark: `设置为平行:<br/>
用户结算:与店铺券、红包平行计算、与平台券不平行<br/>
财务结算:此促销优惠部分,代销供应商承担、经销平台承担`
},
{
name:'maxLoopNumber' ,
display_name : '循环上限',
type : 'text',
... ... @@ -224,18 +234,29 @@ var operationEdit={
}
break;
case "textarea":
_input=$("<textarea style=\"width: 400px; height: 90px;\"></textarea>");
_input=$("<textarea style=\"width: 400px; height: 90px;border: 1px solid #ccc\"></textarea>");
if(this.actionParam&&this.actionParam[_param.name]){
_input.text(this.actionParam[_param.name]);
}else{
_input.text(_param.default_value);
}
break;
}
_input.attr("id",_param.name);
_input.attr("name",_param.name);
var $inputParent = _html.children("div").html(_input);
var $inputParent = _html.children("div");
if(_param.type === 'radio') {
$inputParent.html('');
_param.values.forEach(value=> {
$inputParent.append($(`<label style="${value === 'N' ? 'margin-right: 50px' : ''}"><input type="radio" id="${_param.name}"
name="${_param.name}"
value="${value}"
${(this.actionParam&&this.actionParam[_param.name] || 'N') === value ? 'checked' : ''} />${value === 'N' ? '否': '是'}</label>`))
})
}else{
_input.attr("id",_param.name);
_input.attr("name",_param.name);
$inputParent.html(_input);
}
if(_param.post_label) {
$inputParent.css({'display': 'flex', 'align-items': 'center'});
$inputParent.append($('<span>倍</span>').css('padding-left', '10px'))
... ...
... ... @@ -757,9 +757,9 @@ $(document).on("change", ".change-toggle-show", function () {
var $toggleRoot = $this.closest('.change-toggle-root');
var toggle = $this.data('toggle') || '';
var toggleClass;
$('.queryParam').val('');
$('.recommend-product').val('')
$('.recommend-param').val('')
$this.parent().parent().parent().find('.queryParam').val('');
$this.parent().parent().parent().find('.recommend-product').val('')
$this.parent().parent().parent().find('.recommend-param').val('')
toggle = toggle.split('|');
toggle.forEach(function(val) {
var list = val.split('::');
... ...
... ... @@ -762,7 +762,7 @@ webpackJsonp([151],{
var $toggleRoot = $this.closest('.change-toggle-root');
var toggle = $this.data('toggle') || '';
var toggleClass;
$('.queryParam').val('');
$this.parent().parent().parent().find('.queryParam').val('');
$('.recommend-product').val('')
$('.recommend-param').val('')
toggle = toggle.split('|');
... ...