From c95a8c60fdfa5a881de45b326a1121f9ef045401 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Thu, 4 Apr 2019 16:47:39 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 3 ++- app/views/managements/_customer_addUnit.html.erb | 2 +- app/views/managements/_partner_addManage.html.erb | 2 +- app/views/managements/_partner_addUnit.html.erb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 8ff3e358..56d0fc72 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1293,13 +1293,14 @@ end if school_ids.length > 0 school_ids.each do |s| school = School.where("id = ?",s).first - if school.present? + if school.present? && school.partner_id.nil? partner = Partner.new(name: school.name) partner.save school.update_attributes(:partner_id => partner.id) end end end + render :json => {status: 1, message: "εε»Ίζε!"} end diff --git a/app/views/managements/_customer_addUnit.html.erb b/app/views/managements/_customer_addUnit.html.erb index 28ff3f36..82f880f4 100644 --- a/app/views/managements/_customer_addUnit.html.erb +++ b/app/views/managements/_customer_addUnit.html.erb @@ -61,7 +61,7 @@ s_html = s_html+ "
" + " " + " " + - " " + + " " + " " + " \n" + " \n" + diff --git a/app/views/managements/_partner_addManage.html.erb b/app/views/managements/_partner_addManage.html.erb index 54a141a4..91eb6898 100644 --- a/app/views/managements/_partner_addManage.html.erb +++ b/app/views/managements/_partner_addManage.html.erb @@ -60,7 +60,7 @@ $.each(members,function (index,array) { s_html = s_html+ "
" + " " + - " " + + " " + " " + " \n" + ""+array["identity"]+"" + diff --git a/app/views/managements/_partner_addUnit.html.erb b/app/views/managements/_partner_addUnit.html.erb index 0d80e5a7..cb1ac7c5 100644 --- a/app/views/managements/_partner_addUnit.html.erb +++ b/app/views/managements/_partner_addUnit.html.erb @@ -59,7 +59,7 @@ s_html = s_html+ "
" + " " + " " + - " " + + " " + " " + " \n" + " \n" +