From db7fa6a91b9534ac90e219b6f554c54c43c83a5a Mon Sep 17 00:00:00 2001 From: liujie <liujie> Date: 星期三, 16 八月 2023 09:28:15 +0800 Subject: [PATCH] update --- management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 42 insertions(+), 2 deletions(-) diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js index 3b17e48..3d48823 100644 --- a/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js +++ b/management/guns-admin/src/main/webapp/static/modular/system/tCoupon/tCoupon.js @@ -49,7 +49,15 @@ }, {title: '条件金额', field: 'couponConditionalAmount', visible: true, align: 'center', valign: 'middle'}, {title: '优惠金额', field: 'couponPreferentialAmount', visible: true, align: 'center', valign: 'middle'}, - {title: '数量', field: 'couponCount', visible: true, align: 'center', valign: 'middle'}, + {title: '数量', field: 'couponCount', visible: true, align: 'center', valign: 'middle', + formatter: function (value, row) { + if (row.couponCount === 0){ + return '<span>无限制</span>' + }else{ + return row.couponCount + } + } + }, {title: '有效期', field: 'couponValidity', visible: true, align: 'center', valign: 'middle'}, {title: '状态', field: 'couponState', visible: true, align: 'center', valign: 'middle', formatter: function (value, row) { @@ -96,7 +104,7 @@ var index = layer.open({ type: 2, title: '添加', - area: ['800px', '420px'], //宽高 + area: ['100%', '100%'], //宽高 fix: false, //不固定 maxmin: true, content: Feng.ctxPath + '/tCoupon/tCoupon_add' @@ -154,6 +162,28 @@ }; /** + * 选择新人券或者活动券时 + */ +TCoupon.changeCouponType = function (id,couponState) { + + //监听下拉菜单的变动操作 + $("#couponType").change(function(){ + // 如果选择活动券,将赠送数量隐藏 + if(this.value == 1){ + $("#changeCouponSendQuantity").hide() + } + if(this.value == ""){ + $("#changeCouponSendQuantity").hide() + } + if(this.value == 2){ + $("#changeCouponSendQuantity").show() + } + + }) + +}; + +/** * 查询列表 */ TCoupon.search = function () { @@ -164,6 +194,16 @@ TCoupon.table.refresh({query: queryData}); }; +/** + * 重置 + */ +TCoupon.resetSearch = function (){ + $("#couponType").val(''); + $("#couponServiceType").val(''); + $("#createTime").val(''); + TCoupon.search(); +} + $(function () { var defaultColunms = TCoupon.initColumn(); var table = new BSTable(TCoupon.id, "/tCoupon/list", defaultColunms); -- Gitblit v1.7.1