From 0481353111afb43a2322e18530dde26f1d841ead Mon Sep 17 00:00:00 2001
From: yanghb <yanghb>
Date: 星期五, 21 四月 2023 11:15:34 +0800
Subject: [PATCH] 代码调整

---
 ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js |   78 ++++++++-------------------------------
 1 files changed, 16 insertions(+), 62 deletions(-)

diff --git a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js
index 0cce701..269c576 100644
--- a/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js
+++ b/ManagementTravel/guns-admin/src/main/webapp/static/modular/system/tInvoice/tInvoice.js
@@ -74,14 +74,17 @@
         {title: '更多信息', field: 'value', visible: true, align: 'center', valign: 'middle',
             formatter: function (value, row) {
                 var btn = "";
-                if('' != row.remark && typeof row.remark != "undefined"){
-                    btn + "备注说明:" + row.remark + "\n"
-                }
-                if('' != row.address && typeof row.address != "undefined"){
-                    btn + "地址和电话:" + row.address + "\n"
-                }
-                if('' != row.bank && typeof row.bank != "undefined"){
-                    btn + "开户行和账号:" + row.bank + "\n"
+                if(row.value != '' && row.value != null) {
+                    var labelStr = "";
+                    var labelStrs = "";
+                    var labelArray = row.value.split(",");
+                    for(var i=0;i<labelArray.length;i++){
+                        labelStr += labelArray[i] +"<br>";
+                        labelStrs += labelArray[i] + "&#10;";
+                    }
+                    labelStr = labelStr.substring(0,labelStr.length-4);
+                    labelStrs = labelStrs.substring(0,labelStrs.length-5);
+                    btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="' + labelStrs + '" onfocus="TUser.tooltip()">' + labelStr + '</p>']
                 }
                 return btn;
             }
@@ -102,9 +105,9 @@
                     if (row.state == 1){
                         btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="待开票" onfocus="TUser.tooltip()">待开票</p>']
                     } else if (row.state == 2){
-                        btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="已开票" onfocus="TUser.tooltip()">已开票</p>']
+                        btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="开票成功" onfocus="TUser.tooltip()">开票成功</p>']
                     } else if (row.state == 3){
-                        btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="拒绝" onfocus="TUser.tooltip()">拒绝</p>']
+                        btn = ['<p class="toolTip" style="overflow:hidden;white-space:nowrap;text-overflow:ellipsis;" title="开票失败" onfocus="TUser.tooltip()">开票失败</p>']
                     }
                 }
                 return btn;
@@ -173,70 +176,21 @@
         ajax.set("tInvoiceId",TInvoice.seItem.id);
         ajax.start();
     }
-};
-
-
-/**
- * 同意开票
- */
-TInvoice.agree = function(){
-    if (this.check()){
-        ///    批量选中
-        var ids = Feng.checkBoxIds("#"+this.id);  //(产生以逗号隔开的id字符串集)
-
-        var ajax = new $ax(Feng.ctxPath + "/tInvoice/updateState", function (data) {
-            Feng.success("操作成功!");
-            TInvoice.table.refresh();
-        }, function (data) {
-            Feng.error("操作失败!" + data.responseJSON.message + "!");
-        });
-        ajax.set("ids",ids);
-        ajax.set("state",2);
-        ajax.start();
-    }
-};
-
-
-/**
- * 拒绝开票
- */
-TInvoice.disagree = function(){
-    if (this.check()){
-        ///    批量选中
-        var ids = Feng.checkBoxIds("#"+this.id);  //(产生以逗号隔开的id字符串集)
-
-        var ajax = new $ax(Feng.ctxPath + "/tInvoice/updateState", function (data) {
-            Feng.success("操作成功!");
-            TInvoice.table.refresh();
-        }, function (data) {
-            Feng.error("操作失败!" + data.responseJSON.message + "!");
-        });
-        ajax.set("ids",ids);
-        ajax.set("state",3);
-        ajax.start();
-    }
-};
-
+}
 
 /**
  * 删除开发票列表
  */
 TInvoice.delete = function () {
     if (this.check()) {
-
-        // if (TInvoice.seItem.state == 1){
-        //     Feng.error("已开票,已拒绝的数据才能删除");
-        //     return false;
-        // }
-
         var nickname = TInvoice.seItem.name;
         if (nickname == "" || nickname == null || nickname == undefined) {
             nickname = "该发票";
         } else {
             nickname = "【" + nickname + "】";
         }
-        if (TInvoice.seItem.state == 1) {
-            swal("删除失败", "已开票,已拒绝的数据才能删除", "warning");
+        if (TInvoice.seItem.state != 3) {
+            swal("删除失败", "【开票失败】状态下才能执行此操作", "warning");
             return;
         }
         swal({

--
Gitblit v1.7.1