master
yulingwei 5 years ago
parent e5996b47cc
commit b995ba34d9

@ -67,6 +67,8 @@
<script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script> <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script> <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js"charset="UTF-8"></script>
<script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script> <script type="text/javascript" src="__STATIC__/laydate/laydate.js"></script>
<link rel="stylesheet" href="__CSS__/select2.min.css" type="text/css" />
<script type="text/javascript" src="__JS__/select2.min.js"></script>
<div class="tab-wrap" id='pop-form' hidden> <div class="tab-wrap" id='pop-form' hidden>
<div class="tab-content tabcon1711"> <div class="tab-content tabcon1711">
<!-- 表单 --> <!-- 表单 -->
@ -339,6 +341,8 @@
$(".user-account:last").after(a); $(".user-account:last").after(a);
}); });
$(".select_gallery").select2();
$(document).on('click', '.bnt_remove', function(){ $(document).on('click', '.bnt_remove', function(){
$(this).parents('li').remove(); $(this).parents('li').remove();
countAmount(); countAmount();
@ -371,6 +375,7 @@
title:"新增", title:"新增",
area:['30%','60%'], area:['30%','60%'],
content: $('#pop-form'), content: $('#pop-form'),
zIndex: 1,
end : function(){ end : function(){
$('#item-form')[0].reset() // 重置数据 $('#item-form')[0].reset() // 重置数据
$('#form-company-name').attr('readonly', false); $('#form-company-name').attr('readonly', false);
@ -531,7 +536,9 @@
$("#form-company-name").val(''); $("#form-company-name").val('');
} else if (companyType == 1) { // 上游公司没有下级会长 } else if (companyType == 1) { // 上游公司没有下级会长
var promoteData = "<option value='0' selected>其他</option>"; var promoteData = "<option value='0' selected>其他</option>";
$("#form-promote-account").empty();
$('#form-promote-account').html(promoteData); $('#form-promote-account').html(promoteData);
$("#form-promote-account").select2();
$("#form-promote-account-input").attr("readonly",false) $("#form-promote-account-input").attr("readonly",false)
$("#form-company-name").attr("readonly",true) $("#form-company-name").attr("readonly",true)
$("#form-company-name").val($('#form-company-id option:selected').text()); $("#form-company-name").val($('#form-company-id option:selected').text());
@ -545,7 +552,9 @@
$.each(response.data, function(index, item){ $.each(response.data, function(index, item){
promoteData += "<option value='"+item.account+"' >"+item.account+"</option>"; promoteData += "<option value='"+item.account+"' >"+item.account+"</option>";
}); });
$("#form-promote-account").empty();
$('#form-promote-account').html(promoteData); $('#form-promote-account').html(promoteData);
$("#form-promote-account").select2();
$("#form-promote-account-input").attr("readonly",false) $("#form-promote-account-input").attr("readonly",false)
$("#form-company-name").attr("readonly",true) $("#form-company-name").attr("readonly",true)
$("#form-company-name").val($('#form-company-id option:selected').text()); $("#form-company-name").val($('#form-company-id option:selected').text());
@ -560,7 +569,9 @@
// 如果公司类型为内部的时候,公司部门仅其他 // 如果公司类型为内部的时候,公司部门仅其他
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').html(companyData); $('#form-company-id').html(companyData);
$("#form-company-id").select2();
$("#form-company-name").attr("readonly",false) $("#form-company-name").attr("readonly",false)
} else { } else {
$.ajax({ $.ajax({
@ -572,7 +583,9 @@
$.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>";
}); });
$("#form-company-id").empty();
$('#form-company-id').html(companyData); $('#form-company-id').html(companyData);
$("#form-company-id").select2();
$("#form-company-name").attr("readonly",true) $("#form-company-name").attr("readonly",true)
//$('#company_id').html(companyData); //$('#company_id').html(companyData);
promoteChange(); promoteChange();

Loading…
Cancel
Save