| | |
| | | .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(); |
| | |
| | | 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){ |
| | |
| | | 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) { |
| | |
| | | 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" && OBJradio==2){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(pCode1=='' && $("#role")=="1" && OBJradio==1){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role")=="1" && OBJradio==12){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | |
| | | if(name==''){ |
| | | Feng.info("门店名称不能为空") |
| | | return; |
| | |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | let introduce = $("#introduce").val() |
| | | |
| | | if(intro==''){ |
| | | if(introduce==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | |
| | | 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){ |
| | | |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | |
| | | 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); |
| | |
| | | var marker; |
| | | //搜索地图 |
| | | TCarInfoDlg.searchByStationName = function(e,type){ |
| | | var keyword="成都"; |
| | | console.log("调用") |
| | | var keyword=""; |
| | | if(type==2){ |
| | | keyword = $(e).parent().prev().find("input").val(); |
| | | }else { |
| | |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | } |
| | | }; |
| | | //地图点击事件 |
| | | function showInfoClick(){ |
| | | map.on('click', function (e) { |
| | |
| | | let name = $("#name").val() |
| | | let phone = $("#phone").val() |
| | | |
| | | if(pCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | if(pCode=='' && $("#role").val()=="1" && OBJradio==2){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode=='' && $("#role")=="1" && OBJradio==2){ |
| | | if(cCode=='' && $("#role").val()=="1" && OBJradio==2){ |
| | | Feng.info("请选择市") |
| | | return; |
| | | } |
| | | if(pCode1=='' && $("#role")=="1" && OBJradio==1){ |
| | | if(pCode1=='' && $("#role").val()=="1" && OBJradio==1){ |
| | | Feng.info("请选择省") |
| | | return; |
| | | } |
| | | if(cCode1=='' && $("#role")=="1" && OBJradio==12) { |
| | | if(cCode1=='' && $("#role").val()=="1" && OBJradio==12) { |
| | | Feng.info("请选择市") |
| | | } |
| | | if(name==''){ |
| | |
| | | Feng.info("请填写营业时间") |
| | | return; |
| | | } |
| | | let intro = $("#intro").val() |
| | | let introduce = $("#introduce").val() |
| | | |
| | | if(intro==''){ |
| | | if(introduce==''){ |
| | | Feng.info("请填写门店介绍") |
| | | return; |
| | | } |
| | |
| | | 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); |
| | |
| | | TCarInfoDlg.oneChange2 = function (e) { |
| | | console.log(111) |
| | | var oneId=$(e).val(); |
| | | 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>'; |
| | | 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>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | | }); |
| | | ajax.set("oneId",oneId); |
| | | ajax.set("operatorId",operatorId); |
| | | ajax.start(); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | TCarInfoDlg.oneChangeNext1 = function (e) { |
| | | var oneId=$(e).val(); |
| | | var ajax = new $ax(Feng.ctxPath + "/tCompetition/oneChangeNext", function(data){ |