|
@@ -461,17 +461,29 @@
|
|
|
<div class="row cl" id="TDScollect" style="display: none;">
|
|
|
<label class="form-label col-1 col-sm-1">TDS收集:</label>
|
|
|
<div class="formControls col-2 col-sm-2" style="position: relative;">
|
|
|
- <input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
|
|
|
+ <#--<input type="hidden" name="arrcity_3word" id="arrcity_3word" value="" />
|
|
|
<input style="width: 190px;" placeholder="" class="input-text my-search-input" placeholder="请输入城市名称搜索" type="text" name="arrcity" id="arrcity" />
|
|
|
- <div id="suggest" class="ac_results"></div>
|
|
|
+ <div id="suggest" class="ac_results"></div>-->
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="initProvinceCode" class="select" id="initProvince">
|
|
|
+ <option value="">请选择省份</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
|
- <span class="select-box">
|
|
|
- <select name="" class="select" id="TDSArea" name="TDSArea">
|
|
|
- <option value="">请搜索城市</option>
|
|
|
- </select>
|
|
|
- </span>
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="initCityCode" class="select" id="initCity<#--TDSArea-->" <#--name="TDSArea"-->>
|
|
|
+ <option value="">请选择城市<#--请搜索城市--></option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
</div>
|
|
|
+ <div class="formControls col-2 col-sm-2" style="position: relative;">
|
|
|
+ <span class="select-box">
|
|
|
+ <select name="initDistrictCode" class="select" id="initCountry">
|
|
|
+ <option value="">请选择区/县</option>
|
|
|
+ </select>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
<input type="hidden" name="customerArea" id="customerArea">
|
|
|
<div class="formControls col-2 col-sm-2">
|
|
|
<input type="text" class="input-text" value="" placeholder="进水TDS数值,最大999" id="customerInTDS" name="customerInTDS" onkeyup="TDSLinkage($(this),999)" onpaste="TDSLinkage($(this),999)">
|
|
@@ -687,7 +699,110 @@
|
|
|
<script>
|
|
|
|
|
|
$(function(){
|
|
|
+ /*初始化省份*/
|
|
|
+ initProvince();
|
|
|
+ /*监听省份*/
|
|
|
+ $("[name='initProvinceCode']").change(function (){
|
|
|
+ initCity($(this).val());
|
|
|
+ })
|
|
|
+ /*监听城市*/
|
|
|
+ $("[name='initCityCode']").change(function (){
|
|
|
+ initDistrict($(this).val());
|
|
|
+ })
|
|
|
})
|
|
|
+ /*初始化省份*/
|
|
|
+ function initProvince() {
|
|
|
+ //默认查询参数为空
|
|
|
+ var provinceListInfo = null;
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ provinceId : provinceListInfo
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customerBasic/query_provinceList",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = '<option value="">请选择省份</option>';
|
|
|
+ var id;
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.provinceList.length;i++){
|
|
|
+ provinceListInfo = data.returnMsg.provinceList[i];
|
|
|
+ if(i == 0 ){
|
|
|
+ id = provinceListInfo.provinceId;
|
|
|
+ }
|
|
|
+ html += '<option value="'+ provinceListInfo.provinceId +'">'+ provinceListInfo.province +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("[name='initProvinceCode']").html(html);
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ /*根据省份代号初始化城市*/
|
|
|
+ function initCity(customerProvinceId){
|
|
|
+ var cityListInfo = null;
|
|
|
+ if(customerProvinceId == null || customerProvinceId == ""){
|
|
|
+ var html = '<option value="">请选择城市</option>';
|
|
|
+ $("[name='initCityCode']").html(html);
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ provinceId : customerProvinceId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customerBasic/query_cityList",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = '<option value="">请选择城市</option>';
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.cityList.length;i++){
|
|
|
+ cityListInfo = data.returnMsg.cityList[i];
|
|
|
+ html += '<option value="'+ cityListInfo.cityId +'">'+ cityListInfo.city +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("[name='initCityCode']").html(html);
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ /*根据省份代号初始化区/县*/
|
|
|
+ function initDistrict(customerCityId){
|
|
|
+ var districtListInfo = null;
|
|
|
+ if(customerCityId == null || customerCityId == ""){
|
|
|
+ var html = '<option value="">请选择区/县</option>';
|
|
|
+ $("[name='initDistrictCode']").html(html);
|
|
|
+ }else{
|
|
|
+ $.ajax({
|
|
|
+ type: "POST",
|
|
|
+ data: {
|
|
|
+ cityId : customerCityId
|
|
|
+ },
|
|
|
+ url: "${path}/admin/customerBasic/query_districtList",
|
|
|
+ async: true,
|
|
|
+ success: function(data){
|
|
|
+ var html = '<option value="">请选择区/县</option>';
|
|
|
+ if (data.returnCode == 200) {
|
|
|
+ for(var i=0;i<data.returnMsg.districtList.length;i++){
|
|
|
+ districtListInfo = data.returnMsg.districtList[i];
|
|
|
+ html += '<option value="'+ districtListInfo.districtId +'">'+ districtListInfo.district +'</option>';
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ html = '';
|
|
|
+ }
|
|
|
+ $("[name='initDistrictCode']").html(html);
|
|
|
+ },
|
|
|
+ error: function(XmlHttpRequest, textStatus, errorThrown){
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/*是否是修改页面*/
|
|
|
var isUpdate = false;
|