|
|
@ -584,7 +584,7 @@
|
|
|
|
if (companyId == 0) {
|
|
|
|
if (companyId == 0) {
|
|
|
|
$("#form-company-name").attr("readonly",false)
|
|
|
|
$("#form-company-name").attr("readonly",false)
|
|
|
|
$("#form-company-name").val('');
|
|
|
|
$("#form-company-name").val('');
|
|
|
|
} else if (companyType == 1) { // 上游公司没有下级会长
|
|
|
|
} else if (companyType == 1 || companyType == 3) { // 上游公司没有下级会长
|
|
|
|
var promoteData = "<option value='0' selected>其他</option>";
|
|
|
|
var promoteData = "<option value='0' selected>其他</option>";
|
|
|
|
$("#form-promote-account").empty();
|
|
|
|
$("#form-promote-account").empty();
|
|
|
|
$('#form-promote-account').html(promoteData);
|
|
|
|
$('#form-promote-account').html(promoteData);
|
|
|
@ -617,19 +617,23 @@
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var companyType = $('#form-company-type').val();
|
|
|
|
var companyType = $('#form-company-type').val();
|
|
|
|
// 如果公司类型为内部的时候,公司部门仅其他
|
|
|
|
// 如果公司类型为内部的时候,公司部门仅其他
|
|
|
|
if (companyType == 3) {
|
|
|
|
// if (companyType == 3) {
|
|
|
|
var companyData = "<option value='0' selected>其他</option>";
|
|
|
|
// var companyData = "<option value='0' selected>其他</option>";
|
|
|
|
$("#form-company-id").empty();
|
|
|
|
// $("#form-company-id").empty();
|
|
|
|
$('#form-company-id').html(companyData);
|
|
|
|
// $('#form-company-id').html(companyData);
|
|
|
|
$("#form-company-id").select2();
|
|
|
|
// $("#form-company-id").select2();
|
|
|
|
$("#form-company-name").attr("readonly",false)
|
|
|
|
// $("#form-company-name").attr("readonly",false)
|
|
|
|
} else {
|
|
|
|
// } else {
|
|
|
|
$.ajax({
|
|
|
|
$.ajax({
|
|
|
|
url:"{:U('StatementMangement/getCompanys')}",
|
|
|
|
url:"{:U('StatementMangement/getCompanys')}",
|
|
|
|
dataType:'JSON',
|
|
|
|
dataType:'JSON',
|
|
|
|
data: {'type':companyType},
|
|
|
|
data: {'type':companyType},
|
|
|
|
success:function(response){
|
|
|
|
success:function(response){
|
|
|
|
var companyData = "<option value='0'>其他</option>";
|
|
|
|
if(companyType == 3){
|
|
|
|
|
|
|
|
var companyData = "";
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
var companyData = "<option value='0'>其他</option>";
|
|
|
|
|
|
|
|
}
|
|
|
|
$.each(response.info, function(index, item){
|
|
|
|
$.each(response.info, function(index, item){
|
|
|
|
companyData += "<option value='"+item.id+"' >"+item.name+"</option>";
|
|
|
|
companyData += "<option value='"+item.id+"' >"+item.name+"</option>";
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -641,7 +645,7 @@
|
|
|
|
promoteChange();
|
|
|
|
promoteChange();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
companyTypeChange();
|
|
|
|
companyTypeChange();
|
|
|
|