From 336cc1da02624db3d42ad09187b6b51b98ee35dc Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期二, 05 三月 2024 14:20:40 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai into 2.0

---
 cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
index 037d16f..05e9891 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tCoupon/TCoupon.js
@@ -37,14 +37,16 @@
         {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]
+            }
+        },
     ];
 };
 
@@ -83,6 +85,19 @@
  */
 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
@@ -238,6 +253,11 @@
 };
 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("操作成功!")

--
Gitblit v1.7.1