From f88cfa02e36752e4acad7adc4b045155e8e50f21 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 08 十二月 2023 09:16:29 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/PlayPai --- cloud-server-management/src/main/webapp/static/modular/system/tGoods/TStoreInfo.js | 59 ++++++++++++++++++++++++++--------------------------------- 1 files changed, 26 insertions(+), 33 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 329797c..f72e818 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 @@ -15,9 +15,7 @@ TStoreProvince.initColumn = function () { return [ {field: 'selectItem', checkbox: true}, - {title: '选择', field: '', visible: true, align: 'center', valign: 'middle'}, - {title: 'id', field: 'id', visible: false, align: 'center', valign: 'middle'}, - {title: '所属账号', field: 'accountName', visible: true, align: 'center', valign: 'middle'}, + {title: '序号', field: 'id', visible: true, align: 'center', valign: 'middle'}, {title: '所在省市', field: 'provinceCity', visible: true, align: 'center', valign: 'middle'}, {title: '门店名称', field: 'name', visible: true, align: 'center', valign: 'middle'}, ]; @@ -49,20 +47,26 @@ 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 : "", }) } } - window.parent.TCarInfoDlg.selecUserOpt(arr); + window.parent.TGoodsInfoDlg.selecUserOpt(arr); TStoreProvince.storeOfClosePage(); - } @@ -72,16 +76,9 @@ */ TStoreProvince.search = function () { var queryData = {}; - - var provinceElement = document.getElementById("province"); - var provinceId = provinceElement.value; - - var cityElement = document.getElementById("city"); - var cityElementId = cityElement.value; - - queryData['provinceId'] = provinceId; - queryData['cityId'] = cityElementId; - queryData['cityManagerId'] = $("#userPopulation").val(); + queryData['provinceId'] = $("#province").val(); + queryData['cityId'] = $("#city").val(); + queryData['operatorId'] = $("#account").val(); queryData['storeName'] = $("#storeName").val(); TStoreProvince.table.refresh({query: queryData}); }; @@ -91,16 +88,9 @@ * 重置搜索 */ TStoreProvince.resetSearch = function () { - var provinceSelect = document.getElementById("province"); - provinceSelect.innerHTML = '<option value="">全部</option>'; - - var citySelect = document.getElementById("city"); - citySelect.innerHTML = '<option value="">全部</option>'; - - queryProvince(); - - $("#userPopulation").val(''); - $("#storeName").val(''); + $("#province").val('') + $("#city").val('') + $("#storeName").val('') TStoreProvince.search(); }; @@ -112,7 +102,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); }); @@ -132,12 +122,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) -- Gitblit v1.7.1