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/tGoods/TStoreInfo.js | 39 +++++++++++++++++++++++---------------- 1 files changed, 23 insertions(+), 16 deletions(-) diff --git a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js index 20c0eee..90e7cb9 100644 --- a/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js +++ b/cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js @@ -17,9 +17,8 @@ {field: 'selectItem', checkbox: true}, {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, {title: '所在省市', field: 'provinceCity', visible: true, align: 'center', valign: 'middle'}, - {title: '所属运营商', field: 'accountName', visible: true, align: 'center', valign: 'middle'}, {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, - {title: '闸机id', field: 'ids', visible: true, align: 'center', valign: 'middle'}, + ]; }; @@ -49,14 +48,21 @@ return false; } var arr = []; - console.log('selected--->',selected) + var name =''; for(var i in selected){ if(typeof selected[i].id != "undefined"){ + console.log( selected[i].ids,55555) + name = selected[0].accountName + if(name!=selected[i].accountName){ + Feng.info("请选择相同运营商门店") + return ; + } arr.push({ id: selected[i].id, provinceCity: typeof selected[i].provinceCity != "undefined" ? selected[i].provinceCity : "", accountName: typeof selected[i].accountName != "undefined" ? selected[i].accountName : "", - name: typeof selected[i].name != "undefined" ? selected[i].name : "" + name: typeof selected[i].name != "undefined" ? selected[i].name : "", + ids:typeof selected[i].ids != "undefined" ? selected[i].ids : "", }) } } @@ -71,8 +77,8 @@ */ TStoreProvince.search = function () { var queryData = {}; - queryData['provinceId'] = $("#pCode").val(); - queryData['cityId'] = $("#cCode").val(); + queryData['provinceId'] = $("#province").val(); + queryData['cityId'] = $("#city").val(); queryData['operatorId'] = $("#account").val(); queryData['storeName'] = $("#storeName").val(); TStoreProvince.table.refresh({query: queryData}); @@ -83,9 +89,8 @@ * 重置搜索 */ TStoreProvince.resetSearch = function () { - $("#pCode").val('') - $("#cCode").val('') - $("#account").val('') + $("#province").val('') + $("#city").val('') $("#storeName").val('') TStoreProvince.search(); }; @@ -98,7 +103,7 @@ var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getProvince", function(data){ data.forEach(province => { var option = document.createElement("option"); - option.value = province.id; // 根据你的数据结构确定省份的id字段 + option.value = province.code; // 根据你的数据结构确定省份的id字段 option.text = province.name; // 根据你的数据结构确定省份的name字段 provinceSelect.appendChild(option); }); @@ -118,12 +123,15 @@ var citySelect = document.getElementById("city"); citySelect.innerHTML = ""; - var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity", function(data){ + var ajax = new $ax(Feng.ctxPath + "/tCouponManage/getCity1", function(data){ + data.forEach(province => { - var option = document.createElement("option"); - option.value = province.id; // 根据你的数据结构确定省份的id字段 - option.text = province.name; // 根据你的数据结构确定省份的name字段 - citySelect.appendChild(option); + var content='<option value="">选择市</option>'; + $.each(data, function(k,v) { + content += "<option value='"+v.code+"'>"+v.name+"</option>"; + }); + $("#city").empty().append(content); + }); },function(data){ console.log('data:',data) @@ -138,6 +146,5 @@ var table = new BSTable(TStoreProvince.id, "/tCouponManage/storeDetailsOfSearch", defaultColunms); table.setPaginationType("client"); TStoreProvince.table = table.init(); - queryProvince(); }); -- Gitblit v1.7.1