|
|
|
@ -296,6 +296,52 @@ $(function(){
|
|
|
|
|
}
|
|
|
|
|
return companyinfostr;
|
|
|
|
|
}
|
|
|
|
|
$("#collection").on("change",function() {
|
|
|
|
|
var get_collection = $(this).find("option:selected").val();
|
|
|
|
|
var companyinfo;
|
|
|
|
|
|
|
|
|
|
if (get_collection == 1) {
|
|
|
|
|
companyinfo = first_company;
|
|
|
|
|
} else if (get_collection == 2) {
|
|
|
|
|
companyinfo = second_company;
|
|
|
|
|
}
|
|
|
|
|
setAggregateInfo(companyinfo.invoice_item,companyinfo.withdraw_type,companyinfo.invoice_type,get_collection);
|
|
|
|
|
});
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
$('#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");
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// 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();
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</block>
|
|
|
|
|