|
|
@ -174,7 +174,7 @@
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td class="l"><i class="mustmark">*</i>结算周期:</td>
|
|
|
|
<td class="l"><i class="mustmark">*</i>结算周期:</td>
|
|
|
|
<td class="r">
|
|
|
|
<td class="r">
|
|
|
|
<select name="settlement_type" id="settlement_type" class="select_gallery" disabled>
|
|
|
|
<select name="settlement_type" id="settlement_type" class="select_gallery" >
|
|
|
|
<option value="0">无</option>
|
|
|
|
<option value="0">无</option>
|
|
|
|
<option value="1" selected>周结</option>
|
|
|
|
<option value="1" selected>周结</option>
|
|
|
|
<option value="2">月结</option>
|
|
|
|
<option value="2">月结</option>
|
|
|
@ -197,7 +197,7 @@
|
|
|
|
<tr>
|
|
|
|
<tr>
|
|
|
|
<td class="l">开票内容:</td>
|
|
|
|
<td class="l">开票内容:</td>
|
|
|
|
<td class="r table_radio">
|
|
|
|
<td class="r table_radio">
|
|
|
|
<input type="text" id="invoice_content" class="input" value="信息服务费" disabled >
|
|
|
|
<input type="text" id="invoice_content" class="input" value="信息服务费" >
|
|
|
|
<input type="hidden" name="invoice_content" id="invoice_content_other" class="input invoice_content" value="信息服务费" >
|
|
|
|
<input type="hidden" name="invoice_content" id="invoice_content_other" class="input invoice_content" value="信息服务费" >
|
|
|
|
</td>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tr>
|
|
|
@ -345,7 +345,7 @@ $(function(){
|
|
|
|
})
|
|
|
|
})
|
|
|
|
console.log(companyinfo)
|
|
|
|
console.log(companyinfo)
|
|
|
|
if (companyinfo.type) {
|
|
|
|
if (companyinfo.type) {
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type);
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#first_company_name").val(companyinfo.company_name);
|
|
|
|
$("#first_company_name").val(companyinfo.company_name);
|
|
|
@ -382,41 +382,68 @@ $(function(){
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
if (companyinfo.type) {
|
|
|
|
if (companyinfo.type) {
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type);
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$("#second_company_name").val(companyinfo.company_name);
|
|
|
|
$("#second_company_name").val(companyinfo.company_name);
|
|
|
|
$("#second_company_info").html(setCompanyInfo(companyinfo));
|
|
|
|
$("#second_company_info").html(setCompanyInfo(companyinfo));
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
function setAggregateInfo(invoice_content,settlement_type,invoice_type) {
|
|
|
|
$("#collection").on("change",function() {
|
|
|
|
if (invoice_content) {
|
|
|
|
var get_collection = $(this).find("option:selected").val();
|
|
|
|
|
|
|
|
var companyinfo;
|
|
|
|
|
|
|
|
var id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (get_collection == 1) {
|
|
|
|
|
|
|
|
id = $("#first_company_id").find("option:selected").val();
|
|
|
|
|
|
|
|
companyinfo = first_company.find(function(x){
|
|
|
|
|
|
|
|
return x.id == id;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
} else if (get_collection == 2) {
|
|
|
|
|
|
|
|
id = $("#second_company_id").find("option:selected").val();
|
|
|
|
|
|
|
|
companyinfo = second_company.find(function(x){
|
|
|
|
|
|
|
|
return x.id == id;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,get_collection);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#invoice_content').on("change",function() {
|
|
|
|
|
|
|
|
$('#invoice_content').val($(this).val());
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setAggregateInfo(invoice_content,settlement_type,invoice_type,collection) {
|
|
|
|
|
|
|
|
var get_collection = $("#collection").find("option:selected").val();
|
|
|
|
|
|
|
|
if (collection == get_collection) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('.invoice_content').val(invoice_content);
|
|
|
|
$('.invoice_content').val(invoice_content);
|
|
|
|
$('#invoice_content').val(invoice_content);
|
|
|
|
$('#invoice_content').val(invoice_content);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#settlement_type').find("option").each(function() {
|
|
|
|
|
|
|
|
$(this).removeAttr("selected");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
// if (!settlement_type) {
|
|
|
|
|
|
|
|
// $('#settlement_type').removeAttr("disabled");
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
// $('#settlement_type').prop("disabled",true);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
$('#invoice_type').find("option").each(function() {
|
|
|
|
|
|
|
|
$(this).removeAttr("selected");
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
$('#settlement_type').find("option").each(function() {
|
|
|
|
// if (!invoice_type) {
|
|
|
|
$(this).removeAttr("selected");
|
|
|
|
// $('#invoice_type').removeAttr("disabled");
|
|
|
|
});
|
|
|
|
// } else {
|
|
|
|
// if (!settlement_type) {
|
|
|
|
// $('#invoice_type').prop("disabled",true);
|
|
|
|
// $('#settlement_type').removeAttr("disabled");
|
|
|
|
// }
|
|
|
|
// } else {
|
|
|
|
$("#settlement_type").find("option[value="+settlement_type+"]").prop("selected",true);
|
|
|
|
$('#settlement_type').prop("disabled",true);
|
|
|
|
|
|
|
|
// }
|
|
|
|
$("#invoice_type").find("option[value="+invoice_type+"]").prop("selected",true);
|
|
|
|
$('#invoice_type').find("option").each(function() {
|
|
|
|
$("#settlement_type").change();
|
|
|
|
$(this).removeAttr("selected");
|
|
|
|
$("#invoice_type").change();
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// if (!invoice_type) {
|
|
|
|
}
|
|
|
|
// $('#invoice_type').removeAttr("disabled");
|
|
|
|
|
|
|
|
// } else {
|
|
|
|
|
|
|
|
$('#invoice_type').prop("disabled",true);
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
$("#settlement_type").find("option[value="+settlement_type+"]").prop("selected",true);
|
|
|
|
|
|
|
|
$("#invoice_type").find("option[value="+invoice_type+"]").prop("selected",true);
|
|
|
|
|
|
|
|
$("#settlement_type").change();
|
|
|
|
|
|
|
|
$("#invoice_type").change();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|