| | |
| | | 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(); |
| | |
| | | } |
| | | |
| | | },function(data){ |
| | | Feng.error("添加失败!" + data.responseJSON.message + "!"); |
| | | |
| | | }); |
| | | ajax.set(this.tCarInfoData); |
| | | ajax.set("provinceCode",pCode); |
| | |
| | | */ |
| | | 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(); |
| | | if(!this.validate()){ |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | //提交信息 |
| | | var ajax = new $ax(Feng.ctxPath + "/tShop/update", function(data){ |
| | | if(data=="5001"){ |
| | |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#pCode").empty().append(content); |
| | | } |
| | |
| | | var content='<option value="">Pilih franchisee Anda</option>'; |
| | | } |
| | | $.each(data, function(k,v) { |
| | | content += "<option value='"+v.id+"'>"+v.name+"</option>"; |
| | | content += "<option value='"+v.code+"'>"+v.name+"</option>"; |
| | | }); |
| | | $("#cCode").empty().append(content); |
| | | } |