|
@@ -67,13 +67,16 @@ $(function() {
|
|
|
//页面初始化
|
|
|
contact_number_list.forEach(item => {
|
|
|
var li = $("<option>" + item + "</option>")
|
|
|
- $(".showqulist").append(li)
|
|
|
+ $(".showqulist").append(li) //联系电话-区号
|
|
|
})
|
|
|
+ let selHtml=[];
|
|
|
location.forEach(item => {
|
|
|
- var li = $("<option>" + item.icon + ' ' + item.name + "</li>")
|
|
|
- $(".showlistLocation1").append(li)
|
|
|
+ selHtml.push("<option>" + item.icon + ' ' + item.name + "</li>");
|
|
|
})
|
|
|
- province.forEach(item => {
|
|
|
+ $(".region-select").append(selHtml.join(""));
|
|
|
+
|
|
|
+ //省,市已改为文本框不需要下拉初始化了
|
|
|
+ /* province.forEach(item => {
|
|
|
//var li=$("<li class='contact_location2_li' txt="+item+"><a >"+item+"</a></li>")
|
|
|
var li = $("<option>" + item + "</option>")
|
|
|
$(".showlistLocation2").append(li)
|
|
@@ -82,40 +85,31 @@ $(function() {
|
|
|
//var li=$("<li class='contact_location3_li' txt="+item+"><a >"+item+"</a></li>")
|
|
|
var li = $("<option>" + item + "</option>")
|
|
|
$(".showlistLocation3").append(li)
|
|
|
- })
|
|
|
-
|
|
|
+ }) */
|
|
|
|
|
|
|
|
|
|
|
|
+ //联系人增加
|
|
|
$("#contact_number_add").click(function() {
|
|
|
|
|
|
- $("#contact_number").append(html_contact_number)
|
|
|
+ $($(".contact-list > .contact-box").prop("outerHTML")).insertBefore(".contact-tool");
|
|
|
|
|
|
- $("#contact_number_remove").show()
|
|
|
+ $("#contact_number_remove").show()
|
|
|
+
|
|
|
inithtml()
|
|
|
})
|
|
|
+ //联系人移除
|
|
|
$("#contact_number_remove").click(function() {
|
|
|
- $("#contact_number .row-fluid").eq(-1).remove();
|
|
|
- if ($("#contact_number .row-fluid").length == 1) {
|
|
|
- $("#contact_number_remove").hide()
|
|
|
- }
|
|
|
- })
|
|
|
-
|
|
|
- $("#contact_email_add").click(function() {
|
|
|
+ $(".contact-list > .contact-box").eq(-1).remove();
|
|
|
|
|
|
- $("#contact_email").append(html_contact_email)
|
|
|
-
|
|
|
- $("#contact_email_remove").show()
|
|
|
- inithtml()
|
|
|
- })
|
|
|
- $("#contact_email_remove").click(function() {
|
|
|
- $("#contact_email input").eq(-1).remove();
|
|
|
- if ($("#contact_email input").length == 1) {
|
|
|
- $("#contact_email_remove").hide()
|
|
|
+ if ($(".contact-list > .contact-box").length <= 1) {
|
|
|
+ $("#contact_number_remove").hide()
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
|
|
|
+ //公司地址增加
|
|
|
$("#contact_location_add").click(function() {
|
|
|
|
|
|
$("#contact_location").append(html_contact_location)
|
|
@@ -123,6 +117,7 @@ $(function() {
|
|
|
$("#contact_location_remove").show()
|
|
|
inithtml()
|
|
|
})
|
|
|
+ //公司地址移除
|
|
|
$("#contact_location_remove").click(function() {
|
|
|
$("#contact_location .row-fluid").eq(-1).remove();
|
|
|
if ($("#contact_location .row-fluid").length == 1) {
|
|
@@ -209,6 +204,10 @@ $(function() {
|
|
|
var key = $(this).attr("name")
|
|
|
obj[key] = $(this).val()
|
|
|
})
|
|
|
+
|
|
|
+ obj['Disciplines']=$("#Discipline").val(); //Discipline 改为下拉框后单独取值
|
|
|
+
|
|
|
+
|
|
|
var i = 0;
|
|
|
var sz1 = [];
|
|
|
$(".showlistLocation1").each(function() {
|
|
@@ -222,7 +221,7 @@ $(function() {
|
|
|
})
|
|
|
obj.locationList = sz1;
|
|
|
|
|
|
-
|
|
|
+ /*
|
|
|
i = 0;
|
|
|
var sz2 = [];
|
|
|
$(".showqulist").each(function() {
|
|
@@ -243,6 +242,16 @@ $(function() {
|
|
|
i++;
|
|
|
})
|
|
|
obj.contactEmailList = sz3;
|
|
|
+ */
|
|
|
+ var contacters=[],contacter=null;
|
|
|
+ $(".contact-box").each(function(idx,itm) {
|
|
|
+ contacter={};
|
|
|
+ $(itm).find("input[name],select[name]").each(function(el){
|
|
|
+ contacter[el.name]=$(el).val();
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ obj.contacters=contacters;
|
|
|
|
|
|
window.localStorage.setItem("loginCompany", JSON.stringify(obj));
|
|
|
}
|
|
@@ -252,10 +261,11 @@ $(function() {
|
|
|
submitCompany()
|
|
|
})
|
|
|
|
|
|
+ initDisciplinesSelect();
|
|
|
//页面初始化end
|
|
|
})
|
|
|
-var html_contact_number = $("#contact_number").html();
|
|
|
-var html_contact_email = $("#contact_email").html();
|
|
|
+//var html_contact_number = $("#contact_number").html();
|
|
|
+//var html_contact_email = $("#contact_email").html();
|
|
|
var html_contact_location = $("#contact_location").html();
|
|
|
|
|
|
function getItemloginCompany() {
|
|
@@ -341,4 +351,26 @@ function inithtml() {
|
|
|
}catch(e){
|
|
|
console.log(e)
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+function initDisciplinesSelect(){
|
|
|
+
|
|
|
+ var opts = [" Masterplanning"," Architecture"," Interiors", "Lighting"," Landscape"," AV & Acoustics"," MEP"," Art work & Accessories"," Graphics & Signage"," Branding"," Furniture, Lighting"];
|
|
|
+ $("#selectDisciplines").empty();
|
|
|
+ let html=[];
|
|
|
+ opts.forEach(function(item) {
|
|
|
+ html.push(`<option>${item}</option>`);
|
|
|
+ })
|
|
|
+ $("#selectDisciplines").append(html.join(""));
|
|
|
+
|
|
|
+ $('#selectDisciplines').selectpicker({
|
|
|
+ template: {
|
|
|
+ caret: '<span class="sel-icon glyphicon glyphicon-menu-down"></span>'
|
|
|
+ }
|
|
|
+ });
|
|
|
+ $('#selectDisciplines').on('changed.bs.select', function (e, clickedIndex, isSelected, prestate,currentVal) {
|
|
|
+ console.log(currentVal);
|
|
|
+ $("#Discipline").val(currentVal);
|
|
|
+ });
|
|
|
+
|
|
|
}
|