Authored by 马力

Merge branch 'test5.8.1' into gray

... ... @@ -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,43 @@
<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">
[[if status==1&&feeSharingType==0]]
<input type="radio" name="feeSharingType" value="1" disabled>我司承担</label>
[[else]]
<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]] [[if status==1]]disabled[[/if]]>我司承担</label>
[[/if]]
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="2" [[if couponType==4||couponType==5||couponType==7||status==1]]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||status==1]] disabled [[/if]]>分摊(合同结算)</label>
<label class="radio-inline">
<input type="radio" name="feeSharingType" value="4" [[if couponType==4||couponType==5||couponType==6||couponType==7||status==1]] 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||status==1]] 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>
... ... @@ -225,8 +234,31 @@
</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-8">
[[if feeSharingType == 1]]
<p>我司承担</p>
[[else if feeSharingType == 2]]
<p>供应商承担</p>
[[else if feeSharingType == 3]]
<p>分摊(合同结算)</p>
[[else if feeSharingType == 4]]
<p>分摊-我司承担比例:[[feeSharingRatio]]</p>
[[/if]]
</div>
</div>
</div>
</div>
</div>
</script>
<script type="text/template" id="operation-record-template">
<div class="historyList">
... ...
... ... @@ -191,7 +191,7 @@ var Bll = {
/**
* 根据type判断界面
*/
console.log(type);
console.log("type====="+type);
if (type == 'add') {
Bll.__render(couponBean, type);
} else {
... ... @@ -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,13 @@ $(document).on("keyup", ".number", function () {
* 保存
*/
$(document).on("click", "#save_brand", function () {
//新增时如果,如果没有选定,赋予1(我司承担)
if(type=='add'&&$("#feeSharingType").val()=='0'){
couponBean.feeSharingType = 1;
}else{
couponBean.feeSharingType = $("#feeSharingType").val();
}
couponBean.feeSharingRatio = $("#feeSharingRatio").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 = ["新客户", "银卡会员", "金卡会员", "白金卡会员", "普通用户(不含新客)"];
... ... @@ -64,29 +67,29 @@ var t = new common.tab({
el: "#basicTab",
click: function () {
columnname = $(this).find('a').attr('columnname');
g.options.columns[5].hidden = true;
g.options.columns[6].hidden = true;
g.options.columns[7].hidden = true;
switch (columnname) {
case "1":
{
g.options.columns[7].hidden = true;
g.options.columns[8].hidden = true;
}
break;
case "2":
{
g.options.columns[5].hidden = false;
g.options.columns[7].hidden = true;
g.options.columns[6].hidden = false;
g.options.columns[8].hidden = true;
}
break;
case "3":
{
g.options.columns[6].hidden = false;
g.options.columns[7].hidden = true;
g.options.columns[7].hidden = false;
g.options.columns[8].hidden = true;
}
break;
case "all":
{
g.options.columns[7].hidden = false;
g.options.columns[8].hidden = false;
}
break;
}
... ... @@ -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
... ...