From 0171c494e60547d9386d6bc8acd3676ef4a89336 Mon Sep 17 00:00:00 2001
From: 44323 <443237572@qq.com>
Date: 星期一, 16 十月 2023 11:40:43 +0800
Subject: [PATCH] 门票管理bug修改

---
 cloud-server-management/src/main/webapp/WEB-INF/view/system/ticket/ticket_add.html  |    2 +-
 cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js |   26 +++++++++++++++++++++++---
 2 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ticket/ticket_add.html b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ticket/ticket_add.html
index e6ac85a..850f5bd 100644
--- a/cloud-server-management/src/main/webapp/WEB-INF/view/system/ticket/ticket_add.html
+++ b/cloud-server-management/src/main/webapp/WEB-INF/view/system/ticket/ticket_add.html
@@ -164,7 +164,7 @@
                                 <option value="">请选择</option>
                             </select>
                             <label class="col-sm-1" style="width: 7%;margin-top: 7px">市</label>
-                            <label name="addBranch" class="col-sm-1" onclick="TCarInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label>
+                            <label name="addBranch" class="col-sm-1" onclick="TGoodsInfoDlg.addBranch()" style="border: 0px;cursor: pointer;margin-top: 1%"><i class="fa fa-plus-circle"></i></label>
                         </div>
                         <div id="cityDemo"></div>
                     </div>
diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
index 1878d56..1aaf193 100644
--- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
+++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/tGoods_info.js
@@ -594,7 +594,28 @@
     if(!this.validate()){
         return ;
     }
-
+    var cityIds = [];
+    var cts = "";
+    if (company === '2'){
+        var myselect=document.getElementById('cityData');
+        var seCity = myselect.options[myselect.selectedIndex].value;
+        if (seCity === null || seCity === undefined || seCity === ''){
+            return Feng.error('请选中一个省市');
+        }
+        cityIds.push(seCity);
+        if (num > 0){
+            for (let i = 1; i <= num; i++) {
+                var insSelect=document.getElementById('cityData'+i);
+                var inData = insSelect.options[insSelect.selectedIndex].value;
+                if (inData !== undefined || inData !== null ||  inData !== ''){
+                    cityIds.push(inData);
+                }
+            }
+            cts = cityIds.join(',');
+        }else {
+            cts = cityIds
+        }
+    }
         let type = document.querySelector('input[name="redemptionMethod"]:checked').value;
         let name = $("#name").val()
         if(name==''){
@@ -676,8 +697,7 @@
             return;
         }
 
-        var cityIds = [];
-        var cts = "";
+
             // var myselect=document.getElementById('cityData');
             // var seCity = myselect.options[myselect.selectedIndex].value;
             // if (seCity === null || seCity === undefined || seCity === ''){

--
Gitblit v1.7.1