From d0204d5a1f99851880d945e8a46c5d0801dd512b Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 09 六月 2025 16:52:13 +0800
Subject: [PATCH] bug修改

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

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/TCoupon.js b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/TCoupon.js
index 962bc3d..c9df0c0 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/TCoupon.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/coursePackage/TCoupon.js
@@ -26,35 +26,12 @@
                 }}},
         {title: 'id', field: 'id', visible: false, 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) {
-                return {1: "全国", 2: "指定城市", 3: "指定门店"}[value]
-            }
-        },
+
         {title: '优惠券类型', field: 'type', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row, index) {
                 return {1: "满减券", 2: "代金券", 3: "体验券"}[value]
             }},
-        {title: '发放方式', field: 'distributionMethod', visible: true, align: 'center', valign: 'middle',
-            formatter: function (value, row, index) {
-                return {1: "积分购买", 2: "注册赠送", 3: "自动发券"}[value]
-            }},
-        {title: '有效期', field: 'timeValue', visible: true, align: 'center', valign: 'middle'},
-        {title: '用户人群', field: 'userPopulation', visible: true, align: 'center', valign: 'middle',
-            formatter: function (value, row, index) {
-                return {1: "全部用户", 2: "年度会员", 3: "已有学员用户"}[value]
-            }},
-        {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: 'illustrate', visible: true, align: 'center', valign: 'middle'},
     ];
 };
 
@@ -93,7 +70,19 @@
 
 TCoupon.backids = function (i) {
     console.log("aaaaaa"+i)
-    if (this.check()) {
+
+    var selected = $('#' + this.id).bootstrapTable('getSelections');
+    // if(selected.length == 0){
+    //     Feng.info("请先选中表格中的某一记录!");
+    //     return false;
+    // }else{
+
+
+    //     return true;
+    // }
+    if (selected.length != 0) {
+        TCoupon.seItem = selected[0];
+        TCoupon.seItem1 = selected;
 
         var ids = TCoupon.seItem1.map(function(item) {
             return item.id;
@@ -110,6 +99,10 @@
         //
         // }
         window.parent.layer.closeAll();
+    }else {
+        window.parent.document.getElementById("counpons"+i).value = "";
+        window.parent.layer.closeAll();
+
     }
 
 };
@@ -320,7 +313,6 @@
 
 $(function () {
     // console.log("父级"+window.parent.document.getElementById("cityCode").val())
-    console.log("父级" + window.parent.document.getElementById("cityCode").value);
     var defaultColunms = TCoupon.initColumn();
     var table = new BSTable(TCoupon.id, "/tCouponManage/list1", defaultColunms);
     table.setPaginationType("client");
@@ -330,8 +322,14 @@
     //     params.customParam2 = window.parent.document.getElementById("cityCode").value;
     //     return params;
     // };
-
-    table.queryParams = {'cityCode': window.parent.document.getElementById("cityCode").value,'storeId': window.parent.document.getElementById("storeId").value}
-    table.height=400
+    var cityCode = ""
+    console.log("看看市")
+    console.log(window.parent.document.getElementById("cityCode"))
+    if (!window.parent.document.getElementById("cityCode")== null){
+        cityCode = window.parent.document.getElementById("cityCode").value;
+    }
+    table.queryParams = {'cityCode': window.parent.document.getElementById("cityCode").value,
+        'storeId': window.parent.document.getElementById("storeId").value}
+    table.height=600
     TCoupon.table = table.init();
 });

--
Gitblit v1.7.1