Authored by wangwei

Merge branch 'dev5.8.1_优惠券' into test5.8.1

... ... @@ -17,7 +17,9 @@ module.exports = {
department: {type: Number},
couponName: {type: String},
status: {type: Number},
couponType:{type:Number}
couponType:{type:Number},
feeSharingType:{type:Number}
}
},
getCouponDetailById:{
... ... @@ -51,7 +53,9 @@ module.exports = {
multipleNum: {type: Number},
shopPriceLimits: {type: String},
sknExclude: {type: String},
shopLimit:{type:String}
shopLimit:{type:String},
feeSharingType:{type:Number},
feeSharingRatio:{type:Number}
}
},
reject: {
... ...
... ... @@ -249,7 +249,39 @@
<div>
</div>
<div class="panel-heading">
<h4 class="panel-title">费用承担</h4>
</div>
<div class="panel-body">
<div class="row">
<div class="form-group">
<label class="col-sm-2 control-label"></label>
<div class="col-sm-10">
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="1" [[if couponType==1||couponType==3||couponType==4||couponType==5||couponType==7]]checked [[else if couponType==6]]disabled[[/if]]>我司承担</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="2" [[if couponType==4||couponType==5||couponType==7]]disabled[[else if couponType==6]]checked[[/if]]>供应商承担</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="3" [[if couponType==4||couponType==5||couponType==6||couponType==7]] disabled [[/if]]>分摊(合同结算)</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="4" [[if couponType==4||couponType==5||couponType==6||couponType==7]] disabled [[/if]]>分摊-我司承担比例&nbsp;&nbsp;</label>
<input type="hidden" value="[[feeSharingType]]" id="feeSharingType" for="radio"
placeholder="费用分摊">
<select id="feeSharingRatio" name="feeSharingRatio" value="[[feeSharingRatio]]" data-field="feeSharingRatio" class="select-inline" [[if couponType==4||couponType==5||couponType==6||couponType==7]] disabled [[/if]]>
<option value="0.1" selected="selected">0.1</option>
<option value="0.2">0.2</option>
<option value="0.3">0.3</option>
<option value="0.4">0.4</option>
<option value="0.5">0.5</option>
<option value="0.6">0.6</option>
<option value="0.7">0.7</option>
<option value="0.8">0.8</option>
<option value="0.9">0.9</option>
</select>
</div>
</div>
</div>
</div>
<div class="panel-heading">
<h4 class="panel-title">领券条件</h4>
</div>
... ...
... ... @@ -25,6 +25,15 @@
</select>
</div>
<div class="panel-col">
<select id="filter-feeSharingType" tabindex="-1" class="select2-offscreen brandBtn-group observe">
<option value="-1">费用承担</option>
<option value="1">我司承担</option>
<option value="2">供应商承担</option>
<option value="3">分摊(合同结算)</option>
<option value="4">分摊-我司承担比例</option>
</select>
</div>
<div class="panel-col">
<a id="filter-btn" href="javascript:;" class="btn btn-info">筛选</a>
<a id="all-btn" href="/market/couponList/index" class="btn btn-info">全部</a>
</div>
... ...
... ... @@ -254,7 +254,14 @@ $(document).on("change", "#useRange", function () {
});
$(document).on("change","#filter-couponType",function(){
var couponTypeVal = $(this).val();
couponBean.couponType = $(this).val();
if(couponTypeVal==4||couponTypeVal==5||couponTypeVal==7){
couponBean.feeSharingType = 1;
}else if(couponTypeVal==6){
couponBean.feeSharingType = 2;
}
Bll.__render(couponBean, type);
});
/**
... ... @@ -299,6 +306,8 @@ $(document).on("keyup", ".number", function () {
* 保存
*/
$(document).on("click", "#save_brand", function () {
couponBean.feeSharingRatio = $("#feeSharingRatio").val();
couponBean.feeSharingType = $("#feeSharingType").val();
if(couponBean.couponType=='6'){
if(couponBean.shopList==''){
common.util.__tip('店铺券需要设置店铺限制!', 'warning');
... ...
... ... @@ -15,6 +15,9 @@ var artTemplate = common.artTemplate;
//下拉框
new common.dropDown({el: '#filter-couponType'});
//下拉框
new common.dropDown({el: '#filter-feeSharingType'});
var couponTypes = ["平台券", "B券", "券码", "生日券", "免邮券","店铺券","分享券"];
var useLimitTypes = ["无限制", "货物件数限制", "订单金额限制"];
// var customTypes = ["新客户", "银卡会员", "金卡会员", "白金卡会员", "普通用户(不含新客)"];
... ... @@ -113,6 +116,7 @@ var g = new common.grid({
couponName: common.util.__input("filter-couponName"),
department: common.util.__input("choose-department"),
couponType:common.util.__input("filter-couponType"),
feeSharingType:common.util.__input("filter-feeSharingType"),
status: t.active
};
},
... ... @@ -151,6 +155,19 @@ var g = new common.grid({
}
},
{display: "优惠券说明", name: "explains"},
{display: "费用承担", render:function(item){
var feeType;
if(item.feeSharingType == 1){
feeType = "我司承担";
}else if(item.feeSharingType ==2){
feeType = "供应商承担"
}else if(item.feeSharingType ==3){
feeType = "分摊(合同结算)";
}else if(item.feeSharingType ==4){
feeType = "分摊-我司承担比例:"+item.feeSharingRatio;
}
return feeType;
}},
{
display: "驳回理由", hidden: true, name: "rejectReason", render: function (item) {
return "<p style='color: red'>" + item.rejectReason + "</p>"
... ...
... ... @@ -24,7 +24,9 @@ var couponBean = {
sknExclude:"",
useRange:0,
shopList:"",
shopIds:""
shopIds:"",
feeSharingType:"0",
feeSharingRatio:""
};
module.exports = couponBean;
\ No newline at end of file
... ...