记得上下班打卡 | git大法好,push需谨慎

Commit c53e0936 authored by liuran's avatar liuran

修改创建编辑积分商品

parent 88f5dda7
...@@ -58,6 +58,19 @@ ...@@ -58,6 +58,19 @@
var prefix = ctx + "stone/item"; var prefix = ctx + "stone/item";
var prefix2 = ctx; var prefix2 = ctx;
var couType = [[${couType}]]; var couType = [[${couType}]];
var simpleTypeDataList = [{
id: 1,
simpleName: '5元'
}, {
id: 2,
simpleName: '10元'
}, {
id: 3,
simpleName: '25元'
}, {
id: 4,
simpleName: '35元'
}]
$(function () { $(function () {
var options = { var options = {
url: prefix2 + "stone/item/list", url: prefix2 + "stone/item/list",
...@@ -94,6 +107,21 @@ ...@@ -94,6 +107,21 @@
} }
} }
}, },
{
field: 'simpleType',
title: '优惠券分类',
formatter: function(value, row, index) {
if (value == 0) {
return '无条件';
} else {
for (var i in simpleTypeDataList) {
if (simpleTypeDataList[i].id == value) {
return simpleTypeDataList[i].simpleName;
}
}
}
}
},
{ {
field: 'busiType', field: 'busiType',
title: '类型', title: '类型',
......
...@@ -381,7 +381,7 @@ ...@@ -381,7 +381,7 @@
$("#labelSelectType").find("option[value='0']").attr("selected",true); $("#labelSelectType").find("option[value='0']").attr("selected",true);
} else { } else {
var simpleTypeData = data.simpleType.toString(); var simpleTypeData = data.simpleType.toString();
$("#labelSelectType").find("option[value=simpleTypeData]").attr("selected",true); $("#labelSelectType").find("option[value=" + simpleTypeData + "]").attr("selected",true);
} }
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment