From 640ff18d2d7f4be02ddb7f8f75e899f05545eb98 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期一, 05 二月 2024 11:56:52 +0800
Subject: [PATCH] 更新bug修改

---
 cloud-server-management/src/main/webapp/static/modular/system/tGoods/tPay_info.js |   60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++------
 1 files changed, 54 insertions(+), 6 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tPay_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tPay_info.js
index 8045689..4341dc6 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tPay_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tPay_info.js
@@ -7,25 +7,70 @@
     table: null,
     layerIndex: -1,
 };
-
 /**
  * 初始化表格的列
  */
 TPayInfo.initColumn = function () {
     return [
         {field: 'selectItem', radio: true},
-        {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'},
-        {title: '选择', field: '', visible: true, align: 'center', valign: 'middle'},
+        {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'},
         {title: '姓名', field: 'name', visible: true, align: 'center', valign: 'middle'},
         {title: '联系方式', field: 'phone', visible: true, align: 'center', valign: 'middle'},
         {title: '使用状态', field: 'status', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row, index) {
-                return {1: "未使用", 2: "待核销"}[value]
+                return {1: "未使用", 2: "已核销"}[value]
             }
         },
     ];
 };
+TPayInfo.openAddTSite = function () {
+    if (TPayInfo.check()) {
+        if (TPayInfo.seItem.status === 2) {
+            return Feng.error("该门票已核销!");
+        }
+        var index = layer.load(1, {
+            type: 1
+            , title: '入园方式'
+            , area: ['50%', '50%']
+            , offset: 'auto' //具体配置参考:http://www.layui.com/doc/modules/layer.html#offset
+            , id: 'layerDemo' //防止重复弹出cge
+            , content: '<div class="form-horizontal">' +
+                '                    <div class="col-sm-11" >' +
+                '                    <div class="col-sm-11">' +
+                '                        <div class="form-group">\n' +
+                '                            <label class="col-sm-3 control-label">请选择:</label>\n' +
+                '                         <div class="col-sm-9" style="margin-top: 5px;">\n' +
+                '                                  <input type="radio" id="areaType1" value="1" name="areaType"> ' +
+                '                            <label for="areaType1"> 手环 </label>\n' +
+                '                            </div>\n' +
+                '                        </div>\n' +
+                '                       </div>' +
+                '                   </div>' +
+                '</div>'
 
+            , btn: ['确认', '关闭']
+            , btnAlign: 'c' //按钮居中
+            , shade: 0.5 //不显示遮罩
+            , load: 1
+            , btn2: function () {
+                layer.closeAll();
+            },
+            yes: function () {
+                console.log("看看id")
+                console.log(TPayInfo.seItem.id)
+                var ajax = new $ax(Feng.ctxPath + "/ticket/writeOff", function (data) {
+                    TPayInfo.search();
+                    Feng.error("核销成功!")
+                }, function (data) {
+                });
+                ajax.set("id", TPayInfo.seItem.id);
+                ajax.start();
+                layer.closeAll();
+            }
+        });
+        this.layerIndex = index;
+    }
+};
 /**
  * 检查是否选中
  */
@@ -46,14 +91,17 @@
  * @constructor
  */
 TPayInfo.WriteOff = function (){
-    if (this.check()) {
+    if (TPayInfo.check()) {
+        if (TPayInfo.seItem.status === 2){
+            return Feng.error("重复核销!");
+        }
         var ajax = new $ax(Feng.ctxPath + "/tGoods/write_off", function (data) {
             Feng.success("核销成功!");
             TPayInfo.table.refresh();
         }, function (data) {
             Feng.error("核销失败!" + data.responseJSON.message + "!");
         });
-        ajax.set("id",this.seItem.id);
+        ajax.set("id",TPayInfo.seItem.id);
         ajax.start();
     }
 }

--
Gitblit v1.7.1