标签:
// //////////////////////////优惠券开始////////////////////////////
// 给附加条件选择框添加事件
function inputFuJia() {
hideLable();
$.each($("input[id^=‘fujia_‘]"), function(i, lable) {
$(lable).click(function() {
if (this.name == ‘mian‘) {
$("#fujialab_FF").hide();
$("#fujialab_FQ").hide();
}
if (this.checked == true) {
$("#fujialab_" + this.value).show();
} else {
$("#fujialab_" + this.value).hide();
}
});
});
}
// 隐藏所有的设值
function hideLable() {
$.each($("label[id^=‘fujialab_‘]"), function(i, lable) {
$(lable).hide();
});
}
//拼接标签
function addFQ() {
// 查询已经添加的优惠劵
var obj = new Object();
obj.additionalValues = $("#fujialab_FQ_value").val();
obj.additionalCounts = $("#fujialab_FQ_count").val();
if (obj.additionalValues != ‘‘ && obj.additionalCounts != ‘‘) {
clearTable();
doAjax({
url : appPath
+ ‘/page/ecPromoteRuleGoodsGNewAct/getCouponTypeListByIds‘,
type : ‘post‘,
data : obj,
success : function(data) {
if (data != null) {
var html = "";
$
.each(
data,
function(i, coup) {
html += "<tr class=\"selectedArea\">"
+ "<td><a class=\"easyui-linkbutton deleteArea\" href=\"javascript:void(0)\" iconCls=\"icon-cancel\" >删除</a></td>"
+ "<td>"
+ coup.COUPON_TYPE_NO
+ " <input type= \"hidden\" name=\"FQ_couponTypeId\" value=\""
+ coup.COUPON_TYPE_ID
+ "\"> </td>"
+ "<td>"
+ coup.COUPON_TYPE_NAME
+ "</td>"
+ "<td>"
+ coup.COUPON_FEE
+ "<input type = \"hidden\" name = \"FQ_couponFee\" value = \""
+ coup.COUPON_FEE
+ "\"></td>"
+ "<td><input type=\"text\" maxlength = \"4\" name=\"FQ_amount\" value=\""
+ coup.NUMBER
+ "\" style=\"width:50px;\" /></td>"
+ "</tr>";
});
$("#selectConputTbl").append(html);
}
}
});
}
$(‘#addFQ‘).window({
title : "返优惠券",
iconCls : ‘icon-add‘,
width : 500,
height : 350,
left : 100,
modal : true,
shadow : true,
collapsible : false,
minimizable : false,
maximizable : false
});
$(‘#addFQ‘).window(‘move‘, {
top : 150
});
$(‘#addFQ‘).window(‘open‘);
}
标签:
原文地址:http://www.cnblogs.com/wangchuanfu/p/5852275.html