| | |
| | | */ |
| | | var language=1; |
| | | var TCarInfoDlg = { |
| | | goodsPicArray: [], |
| | | tCarInfoData : {}, |
| | | validateFields: { |
| | | } |
| | |
| | | .set('registerDate') |
| | | .set('commercialType'); |
| | | } |
| | | |
| | | TCarInfoDlg.addSubmit3 = function() { |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/addDevice", function(data){ |
| | | console.log("调用方法") |
| | | TCarInfoDlg.close(); |
| | | }); |
| | | ajax.set("id",$("#id")); |
| | | ajax.set("device",$("#device")); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange9 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var operatorId = $("#account").val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode1").empty().append(content); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("province",oneId); |
| | | ajax.set("operatorId",operatorId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChangeNext = function (e) { |
| | |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/saveImg", function(data){ |
| | | if(data.code == 200){ |
| | | Feng.success("保存成功") |
| | | TCarInfoDlg.close(); |
| | | |
| | | } |
| | | }); |
| | | ajax.set("id",id); |
| | |
| | | */ |
| | | TCarInfoDlg.addSubmit = function() { |
| | | |
| | | const textarea = document.getElementById('introduce'); |
| | | const text = textarea.value; |
| | | |
| | | if (text.length > 1000) { |
| | | console.log('The text is longer than 1000 characters.'); |
| | | Feng.error("门店介绍要求小于1000字") |
| | | return |
| | | } else { |
| | | console.log('The text is not longer than 1000 characters.'); |
| | | } |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | | if(!this.validate()){ |
| | | return ; |
| | | } |
| | | |
| | | var OBJradio= $("input[name='type']:checked").val(); |
| | | if(OBJradio==2){ |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属运营商") |
| | | return; |
| | | } |
| | | } |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | } |
| | | let pCode1 = $("#pCode1").val() |
| | | let cCode1 = $("#cCode1").val() |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | var elementById = document.getElementById("radio1"); |
| | | if (elementById != null){ |
| | | if (elementById.checked) { |
| | | if (pCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if (cCode == '' && $("#role").val() == "1") { |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | if (!elementById.checked){ |
| | | if(pCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role").val()=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | |
| | | var phonePattern = /^1[3-9]\d{9}$/; |
| | | if (!phonePattern.test(phone)) { |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | let introduce = $("#introduce").val() |
| | | |
| | | if(intro==''){ |
| | | if(introduce==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | |
| | | Feng.info("请输入店长姓名") |
| | | return; |
| | | } |
| | | |
| | | |
| | | let userPhone = $("#userPhone").val() |
| | | if (!phonePattern.test(userPhone)) { |
| | | |
| | | Feng.info("请输入正确手机号") |
| | | return false; |
| | | } |
| | | |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | |
| | | Feng.info("请上传门店封面") |
| | | return; |
| | | } |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | |
| | | } |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/add", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("添加成功!"); |
| | | }else if(language==2){ |
| | | Feng.success("Successfully added!"); |
| | | }else { |
| | | Feng.success("Sangat berhasil ditambah!"); |
| | | } |
| | | }else{ |
| | | Feng.success("添加成功!"); |
| | | window.parent.TCompetition.table.refresh(); |
| | | TCarInfoDlg.close(); |
| | | }else{ |
| | | Feng.error(data.msg); |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | | ajax.set("phone",phone); |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("cityManagerId",null); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("introduce",introduce); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.set("lat",$("#latitude").val()); |
| | | ajax.set("lon",$("#longitude").val()); |
| | | ajax.set("ids",$("#ids").val()); |
| | | ajax.set("type",OBJradio); |
| | | ajax.set("yyId",$("#account").val()); |
| | | ajax.set("pCode1",pCode1); |
| | | ajax.set("cCode1",cCode1); |
| | | ajax.start(); |
| | | } |
| | | var map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | var marker; |
| | | //搜索地图 |
| | | TCarInfoDlg.searchByStationName = function(e,type){ |
| | | console.log("调用") |
| | | var keyword=""; |
| | | if(type==2){ |
| | | keyword = $(e).parent().prev().find("input").val(); |
| | | }else { |
| | | if($("#address").val()!=null && $("#address").val()!=''){ |
| | | keyword = $("#address").val(); |
| | | } |
| | | } |
| | | type=1; |
| | | AMap.plugin('AMap.Geocoder', function() { |
| | | var geocoder = new AMap.Geocoder(); |
| | | console.log(geocoder) |
| | | console.log(keyword) |
| | | geocoder.getLocation(keyword, function(status, result) { |
| | | console.log(status,result) |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | // 经纬度 |
| | | var lng = result.geocodes[0].location.lng; |
| | | var lat = result.geocodes[0].location.lat; |
| | | $("#longitude").val(lng) |
| | | $("#latitude").val(lat) |
| | | // 地图实例 |
| | | map = new AMap.Map('container', { |
| | | resizeEnable: true, // 允许缩放 |
| | | center: [lng, lat], // 设置地图的中心点 |
| | | zoom: 15 // 设置地图的缩放级别,0 - 20 |
| | | }); |
| | | //地图画点 |
| | | //addMarker(lng,lat); |
| | | if(type==1 || type==2){ |
| | | showInfoClick(); |
| | | if(lng == null){ |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | }else{ |
| | | addMarker(lng,lat); |
| | | } |
| | | } else { |
| | | console.log('定位失败!'); |
| | | } |
| | | }); |
| | | }); |
| | | }; |
| | | //地图点击事件 |
| | | function showInfoClick(){ |
| | | map.on('click', function (e) { |
| | | addMarker(e.lnglat.getLng(),e.lnglat.getLat()); |
| | | }); |
| | | } |
| | | //删除点 |
| | | function removeMarkers(){ |
| | | if(marker!=null){ |
| | | map.remove(marker); |
| | | } |
| | | |
| | | } |
| | | // 实例化点标记 |
| | | function addMarker(lon,lat) { |
| | | removeMarkers(); |
| | | marker = new AMap.Marker({ |
| | | map: map, |
| | | position: new AMap.LngLat(lon, lat), // 经纬度 |
| | | }); |
| | | //加经纬度 |
| | | $("#lon").val(lon); |
| | | $("#lat").val(lat); |
| | | var lnglatXY = [lon, lat];//地图上所标点的坐标 |
| | | AMap.service('AMap.Geocoder',function() {//回调函数 |
| | | geocoder = new AMap.Geocoder({ |
| | | }); |
| | | geocoder.getAddress(lnglatXY, function (status, result) { |
| | | if (status === 'complete' && result.info === 'OK') { |
| | | //获得了有效的地址信息: |
| | | //即,result.regeocode.formattedAddress |
| | | // alert(result.regeocode.formattedAddress) |
| | | //document.getElementById("address").value=result.regeocode.formattedAddress;//将获取到的地址信息赋值给文本框,保存进数据库 |
| | | |
| | | var address = result.regeocode.formattedAddress; |
| | | var city = result.regeocode.addressComponent.city; |
| | | var province = result.regeocode.addressComponent.province; |
| | | var district = result.regeocode.addressComponent.district; |
| | | $("#address").val(address); |
| | | } else { |
| | | //获取地址失败 |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | /** |
| | | * 提交修改 |
| | | */ |
| | | TCarInfoDlg.editSubmit = function() { |
| | | |
| | | const textarea = document.getElementById('introduce'); |
| | | const text = textarea.value; |
| | | |
| | | if (text.length > 1000) { |
| | | console.log('The text is longer than 1000 characters.'); |
| | | Feng.error("门店介绍要求小于1000字") |
| | | return |
| | | } else { |
| | | console.log('The text is not longer than 1000 characters.'); |
| | | } |
| | | |
| | | this.clearData(); |
| | | this.collectData(); |
| | |
| | | |
| | | let pCode = $("#pCode").val() |
| | | let cCode = $("#cCode").val() |
| | | let cCode1 = $("#cCode1").val() |
| | | let pCode1 = $("#pCode1").val() |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属账号") |
| | | return; |
| | | var OBJradio= $("input[name='type']:checked").val(); |
| | | if(OBJradio==2){ |
| | | let account = $("#account").val() |
| | | if(account==''){ |
| | | Feng.info("请选择所属运营商") |
| | | return; |
| | | } |
| | | } |
| | | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1"){ |
| | | if(pCode=='' && $("#role").val()=="1" && OBJradio==2){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1"){ |
| | | if(cCode=='' && $("#role").val()=="1" && OBJradio==2){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(pCode1=='' && $("#role").val()=="1" && OBJradio==1){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role").val()=="1" && OBJradio==12) { |
| | | Feng.info("请选择市") |
| | | } |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | | } |
| | | |
| | | var phonePattern = /^1[3-9]\d{9}$/; |
| | | if (!phonePattern.test(phone)) { |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | |
| | | if(phone==''){ |
| | | Feng.info("联系电话不能为空") |
| | | return; |
| | |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | let introduce = $("#introduce").val() |
| | | |
| | | if(intro==''){ |
| | | if(introduce==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | |
| | | } |
| | | let userPhone = $("#userPhone").val() |
| | | |
| | | if (!phonePattern.test(userPhone)) { |
| | | Feng.info("请输入合法手机号") |
| | | return ; |
| | | } |
| | | |
| | | if(userPhone==''){ |
| | | Feng.info("请输入店长手机号") |
| | | return; |
| | |
| | | let img = $("#img").val() |
| | | |
| | | |
| | | let imgOne = $("#imgOne").val() |
| | | |
| | | if(imgOne==''){ |
| | | var goodImgs = this.goodsPicArray; |
| | | if(goodImgs.length==0){ |
| | | Feng.info("请上传实景图") |
| | | return; |
| | | } |
| | | var imgOne =""; |
| | | for (let i = 0; i <goodImgs.length; i++) { |
| | | if(i==goodImgs.length-1){ |
| | | imgOne += (goodImgs[i].response) |
| | | }else { |
| | | imgOne+=(goodImgs[i].response+",") |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | | Feng.error("该店长手机号已经存在!") |
| | | }else |
| | | if(data.code == 200){ |
| | | }else if(data.code == 200){ |
| | | if(language==1){ |
| | | Feng.success("修改成功!"); |
| | | }else if(language==2){ |
| | |
| | | },function(data){ |
| | | Feng.error("修改失败!" + data.responseJSON.message + "!"); |
| | | }); |
| | | |
| | | ajax.set("provinceCode",pCode); |
| | | ajax.set("cityCode",cCode); |
| | | ajax.set("name",name); |
| | |
| | | ajax.set("cityManagerId",account); |
| | | ajax.set("address",address); |
| | | ajax.set("time",time); |
| | | ajax.set("introduce",intro); |
| | | ajax.set("introduce",introduce); |
| | | ajax.set("userName",userName); |
| | | ajax.set("userPhone",userPhone); |
| | | ajax.set("coverDrawing",img); |
| | | ajax.set("realPicture",imgOne); |
| | | ajax.set("lat",$("#latitude").val()); |
| | | ajax.set("lon",$("#longitude").val()); |
| | | ajax.set("id",$("#id").val()); |
| | | ajax.set("ids",$("#ids").val()); |
| | | ajax.set("type",OBJradio); |
| | | ajax.set("yyId",$("#account").val()); |
| | | ajax.set("pCode1",pCode1); |
| | | ajax.set("cCode1",cCode1); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | var carPhoto = new $WebUpload("img"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var carPhoto = new $WebUpload("welfarePicture"); |
| | | carPhoto.setUploadBarId("progressBar"); |
| | | carPhoto.init(); |
| | | var drivingLicensePhoto = new $WebUpload("drivingLicensePhoto"); |
| | | drivingLicensePhoto.setUploadBarId("progressBar"); |
| | | drivingLicensePhoto.init(); |
| | | |
| | | //地图搜索 |
| | | TCarInfoDlg.searchByStationName(); |
| | | }); |
| | | |
| | | /** |
| | | * 选择分公司后执行 |
| | | */ |
| | | TCarInfoDlg.oneChange = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | if ($("#objectType").val()==2){ |
| | | |
| | | }else{ |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCity/onChange", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode1").empty().append(content); |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | $("#kcModelDiv").hide(); |
| | | } |
| | | } |
| | | |
| | | |
| | | TCarInfoDlg.oneChange1 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/onChange1", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择省</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange1Next = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/onChange1", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择省</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",e); |
| | | ajax.start(); |
| | | } |
| | | TCarInfoDlg.oneChange2 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | var elementById = document.getElementById("radio1"); |
| | | // 如果选中了运营商门店 那就查询这个运营商下的市 |
| | | if (elementById.checked){ |
| | | var operatorId = $("#account").val(); |
| | | console.log("我看看运营商id") |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getCityYys", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode1").empty().append(content); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("province",oneId); |
| | | ajax.set("operatorId",operatorId); |
| | | ajax.start(); |
| | | }else{ |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/onChange2", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择市</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | } |
| | | TCarInfoDlg.oneChange3 = function (e) { |
| | | var operatorId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/getProvinceYys", function(data){ |
| | | if(data!=null){ |
| | | var content='<option value="">选择市</option>'; |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("operatorId",operatorId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | TCarInfoDlg.oneChangeNext1 = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择门店</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#shopId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |
| | | |
| | | |
| | | TCarInfoDlg.oneChangeNext3 = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", function(data){ |
| | | if(data!=null){ |
| | | if(language==1){ |
| | | var content='<option value="">选择门店</option>'; |
| | | }else if(language==2){ |
| | | var content='<option value="">Choose your franchisee</option>'; |
| | | }else { |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#shopId").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.start(); |
| | | } |