| | |
| | | TCoupon.initColumn = function () { |
| | | return [ |
| | | {field: 'selectItem', radio: true}, |
| | | {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, |
| | | {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '优惠券名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '适用范围', field: 'useScope', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | |
| | | {title: '发放数量', field: 'quantityIssued', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '限领数量', field: 'pickUpQuantity', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '已领数量', field: 'hasPickQty', visible: true, align: 'center', valign: 'middle'}, |
| | | {title: '活动状态', field: 'status', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "未开始", 2: "已开始", 3: "已结束"}[value] |
| | | }}, |
| | | {title: '可售状态', field: 'state', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "上架", 2: "下架"}[value] |
| | | }}, |
| | | |
| | | {title: '发布类型', field: 'publisherType', visible: true, align: 'center', valign: 'middle', |
| | | formatter: function (value, row, index) { |
| | | return {1: "运营商", 2: "平台",3: "门店"}[value] |
| | | } |
| | | }, |
| | | ]; |
| | | }; |
| | | |
| | |
| | | */ |
| | | TCoupon.openChange = function () { |
| | | if (this.check()){ |
| | | let size = TCoupon.seItem.size |
| | | |
| | | if(size>0){ |
| | | Feng.info("没有该权限"); |
| | | return; |
| | | } |
| | | let publisherType = TCoupon.seItem.publisherType; |
| | | if ($("#objectType").val()==2){ |
| | | if(publisherType != 1){ |
| | | Feng.info("不能操作平台添加的优惠券"); |
| | | return; |
| | | } |
| | | } |
| | | let id = TCoupon.seItem.id |
| | | let name = TCoupon.seItem.name |
| | | let quantityIssued = TCoupon.seItem.quantityIssued |
| | |
| | | }; |
| | | TCoupon.onShelf = function (e) { |
| | | if (this.check()) { |
| | | let size = TCoupon.seItem.size |
| | | if(size>0){ |
| | | Feng.info("没有该权限"); |
| | | return; |
| | | } |
| | | var ajax = new $ax(Feng.ctxPath + "/tCouponManage/onShelf", function(data){ |
| | | if(data.code==200){ |
| | | Feng.success("操作成功!") |