|
@@ -197,10 +197,13 @@
|
|
|
|
|
|
var electronicInvoiceArr = $("#reimbursementElectronicInvoiceVATTaxes tr:visible");
|
|
|
if(electronicInvoiceArr.length>0){
|
|
|
- var leng = $("#file_attachment_InvoiceReimbursement tr").length;
|
|
|
- if(leng != electronicInvoiceArr.length){
|
|
|
- parent.layer.msg("填写电子发票数据量与上传发票xml文件数量不符,请重新上传!", {icon: 5});
|
|
|
- flags= false;
|
|
|
+ for(var i = 0;i < electronicInvoiceArr.length;i++) {
|
|
|
+ var fileName = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("input").eq(9).val();
|
|
|
+ if(!fileName){
|
|
|
+ var row = i+1;
|
|
|
+ parent.layer.msg("第" + row + "行数电发票文件上传错误,请重新上传", {icon: 5});
|
|
|
+ flags= false;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -235,7 +238,7 @@
|
|
|
if(electronicInvoiceArr.length>0){
|
|
|
var numberArr = [];
|
|
|
for(var i = 0;i < electronicInvoiceArr.length;i++) {
|
|
|
- var number = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("input").eq(5).val();
|
|
|
+ var number = $("#reimbursementElectronicInvoiceVATTaxes" + i +"_invoiceNumber").val();
|
|
|
numberArr.push(number)
|
|
|
}
|
|
|
//判定数据是否已经被发起或已完成报销申请
|
|
@@ -244,7 +247,8 @@
|
|
|
async: false,
|
|
|
url:'${ctx}/workreimbursement/workReimbursement/decideInvoiceVATTaxesByNumbers',
|
|
|
data:{
|
|
|
- "invoiceVATTaxesNumber":numberArr.join(",")
|
|
|
+ "invoiceVATTaxesNumber":numberArr.join(","),
|
|
|
+ "reimbursementId": $("#wId").val()
|
|
|
},
|
|
|
success:function(data){
|
|
|
if(!data.success){
|
|
@@ -519,6 +523,45 @@
|
|
|
$(obj).html("×").attr("title", "删除");
|
|
|
$(obj).parent().parent().removeClass("error");
|
|
|
}
|
|
|
+
|
|
|
+ var invoiceVATTaxes = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesMoneys = "";
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesTaxAmount = "";
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesSumMoney = "";
|
|
|
+ for(var i = 0;i < invoiceVATTaxes;i++){
|
|
|
+ var invoiceVATTaxesDelFlag = $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val()
|
|
|
+ if("1" != invoiceVATTaxesDelFlag){
|
|
|
+
|
|
|
+ var moneys = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
|
|
|
+ var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
|
|
|
+ var rsumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
|
|
|
+
|
|
|
+ if (moneys!=undefined && isNumber(moneys)){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesMoneys==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesMoneys = parseFloat(moneys).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesMoneys = (parseFloat(reimbursementElectronicInvoiceVATTaxesMoneys) + parseFloat(moneys)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (taxAmount!=undefined && isNumber(taxAmount)){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesTaxAmount==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesTaxAmount = parseFloat(taxAmount).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesTaxAmount = (parseFloat(reimbursementElectronicInvoiceVATTaxesTaxAmount) + parseFloat(taxAmount)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (rsumMoney!=undefined && isNumber(rsumMoney)){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesSumMoney==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesSumMoney = parseFloat(rsumMoney).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesSumMoney = (parseFloat(reimbursementElectronicInvoiceVATTaxesSumMoney) + parseFloat(rsumMoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesMoneys").val(reimbursementElectronicInvoiceVATTaxesMoneys);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesTaxAmount").val(reimbursementElectronicInvoiceVATTaxesTaxAmount);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesSumMoney").val(reimbursementElectronicInvoiceVATTaxesSumMoney);
|
|
|
}
|
|
|
function urlRedict(file,attach){
|
|
|
parent.layer.confirm('确定删除吗?', {
|
|
@@ -557,169 +600,248 @@
|
|
|
multipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);}
|
|
|
}
|
|
|
|
|
|
- function insertTitleInvoiceReimbursement(tValue){
|
|
|
+ async function insertTitleInvoiceReimbursement(tValue) {
|
|
|
+ var id = "${workReimbursement.id}";
|
|
|
var list = "${workReimbursement.workAttachmentInvoiceReimbursements}";
|
|
|
- var size = (list.split('url')).length-1;
|
|
|
+ var size = (list.split('url')).length - 1;
|
|
|
var files = $("#attachment_InvoiceReimbursement_file")[0].files;
|
|
|
- //判断报销类型是否为电子报销
|
|
|
- for(var i = 0;i<files.length;i++) {
|
|
|
+
|
|
|
+ // 判断报销类型是否为电子报销
|
|
|
+ for (var i = 0; i < files.length; i++) {
|
|
|
var file = files[i];
|
|
|
- //如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
|
|
|
+
|
|
|
+ // 如果文件以xml文件结尾,则需要将该文件上传到后台进行数据处理后返回数据
|
|
|
const spliceLength2 = file.name.lastIndexOf(".");
|
|
|
var fileNameSuffix = file.name.slice(spliceLength2 + 1);
|
|
|
- if(fileNameSuffix === "xml" ) {
|
|
|
+ if (fileNameSuffix === "xml") {
|
|
|
var formdata = new FormData();
|
|
|
- formdata.append("multipartFile",file);
|
|
|
- $.ajax({
|
|
|
- type:'post',
|
|
|
- url:"${ctx}/workreimbursement/workReimbursement/disposeXmlFile",
|
|
|
- data:formdata,
|
|
|
- contentType: false,
|
|
|
- async: false,
|
|
|
- processData: false,
|
|
|
- success:function (data) {
|
|
|
- console.log(data)
|
|
|
- if(data.flag){
|
|
|
- top.layer.msg(data.message,{icon:2});
|
|
|
- }else{
|
|
|
- //获取专用发票信息 行数
|
|
|
- var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
|
|
|
- console.log("trlen:" , trlen)
|
|
|
- //创建判断值,若行信息存在相同的发票号,则进行数据检查调整,若不存在发票号,则新增行,并将信息写入
|
|
|
- var includeFlag = false;
|
|
|
- //xml文件处理
|
|
|
- //首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
|
|
|
- //获取专用发票信息 行数
|
|
|
- for(var i = 0;i < trlen;i++){
|
|
|
- var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val();
|
|
|
-
|
|
|
- if(invoiceNumber === data.InvoiceNumber && data.InvoiceNumber){
|
|
|
- includeFlag = true
|
|
|
- //数据处理
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val(data.BasicInformationTotalAmWithoutTax);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val(data.BasicInformationTotalTaxAm);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val(data.BasicInformationTotalTaxincludedAmount);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(9).find("input").eq(0).val("");
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes" + i + "_delFlag").val("0")
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).show();
|
|
|
- }
|
|
|
- }
|
|
|
- //若发票号不存在。则新增行将对应信息添加进去
|
|
|
- if(!includeFlag && data.InvoiceNumber){
|
|
|
- addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);
|
|
|
-
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(0).val("");
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(1).val(0);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(6).find("input").eq(0).val(data.BasicInformationTotalAmWithoutTax);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(7).find("input").eq(0).val(data.BasicInformationTotalTaxAm);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(8).find("input").eq(0).val(data.BasicInformationTotalTaxincludedAmount);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(9).find("input").eq(0).val("");
|
|
|
-
|
|
|
- reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;
|
|
|
- }
|
|
|
- var attachmentFileLength = $("#file_attachment_InvoiceReimbursement tr").length;
|
|
|
- var attachmentFile = $("#file_attachment_InvoiceReimbursement tr");
|
|
|
- var fileName = "";
|
|
|
- var fileNameFlag = true;
|
|
|
- for(var i = 0 ; i<attachmentFileLength; i++){
|
|
|
- // 获取当前行中的第一个<td>元素
|
|
|
- var firstTd = attachmentFile[i].getElementsByTagName("td")[0];
|
|
|
- // 检查第一个<td>元素是否存在
|
|
|
- if (firstTd) {
|
|
|
- // 获取第一个<td>元素中的第一个<a>标签
|
|
|
- var firstA = firstTd.getElementsByTagName("a")[0];
|
|
|
- // 检查第一个<a>标签是否存在
|
|
|
- if (firstA) {
|
|
|
- // 获取<a>标签中的文本信息
|
|
|
- fileName = firstA.textContent || firstA.innerText;
|
|
|
- } else {
|
|
|
- console.log("在当前行中的第一个<td>元素中未找到<a>标签");
|
|
|
- }
|
|
|
- } else {
|
|
|
- console.log("在当前行中未找到<td>元素");
|
|
|
- }
|
|
|
-
|
|
|
- if(fileName == file.name){
|
|
|
- fileNameFlag = false;
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- if(fileNameFlag){
|
|
|
- var attachmentId = "";
|
|
|
- var attachmentFlag = "workInvoiceReimbursement";
|
|
|
- var timestamp=new Date().getTime();
|
|
|
-
|
|
|
- var storeAs = "workInvoiceReimbursement";
|
|
|
- var uploadPath="http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/"+storeAs;/*将这段字符串存到数据库即可*/
|
|
|
- var divId = "_attachment_InvoiceReimbursement";
|
|
|
- $("#addFile"+divId).show();
|
|
|
- console.log(file)
|
|
|
- invoiceReimbursementMultipartUploadWithSts(storeAs, file,attachmentId,attachmentFlag,uploadPath,divId,size);
|
|
|
- }else{
|
|
|
- parent.layer.msg("该电子发票xml文件已经上传,无法重复上传!", {icon: 5});
|
|
|
- return false;
|
|
|
+ formdata.append("multipartFile", file);
|
|
|
+ formdata.append("id", id);
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 使用 async/await 等待 AJAX 请求完成
|
|
|
+ const data = await uploadXmlFile(formdata);
|
|
|
+
|
|
|
+ if (data.flag) {
|
|
|
+ top.layer.msg(data.message, { icon: 2 });
|
|
|
+ } else {
|
|
|
+ // 获取专用发票信息 行数
|
|
|
+ var trlen = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
|
|
|
+ var includeFlag = false;
|
|
|
+
|
|
|
+ // xml文件处理
|
|
|
+ // 首先查询专用发票信息中对应发票号是否存在,并对应其数据是否正确
|
|
|
+ for (var j = 0; j < trlen; j++) {
|
|
|
+ var invoiceNumber = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(j).find("td").eq(3).find("input").eq(0).val();
|
|
|
+
|
|
|
+ if (invoiceNumber === data.InvoiceNumber && data.InvoiceNumber) {
|
|
|
+ includeFlag = true;
|
|
|
+ // 数据处理
|
|
|
+ updateInvoiceRow(j, data);
|
|
|
+ // 检查文件是否已上传
|
|
|
+ await handleFileUpload(file, size, j);
|
|
|
+ break;
|
|
|
}
|
|
|
+ }
|
|
|
|
|
|
- var invoiceVATTaxes = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
|
|
|
- var reimbursementElectronicInvoiceVATTaxesMoneys = "";
|
|
|
- var reimbursementElectronicInvoiceVATTaxesTaxAmount = "";
|
|
|
- var reimbursementElectronicInvoiceVATTaxesSumMoney = "";
|
|
|
- for(var i = 0;i < invoiceVATTaxes;i++){
|
|
|
- var delFalg = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(1).val();
|
|
|
- var moneys = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
|
|
|
- var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
|
|
|
- var rsumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
|
|
|
-
|
|
|
- if (moneys!=undefined && isNumber(moneys) && 1 != delFalg){
|
|
|
- if(reimbursementElectronicInvoiceVATTaxesMoneys==""){
|
|
|
- reimbursementElectronicInvoiceVATTaxesMoneys = parseFloat(moneys).toFixed(2);
|
|
|
- }else {
|
|
|
- reimbursementElectronicInvoiceVATTaxesMoneys = (parseFloat(reimbursementElectronicInvoiceVATTaxesMoneys) + parseFloat(moneys)).toFixed(2);
|
|
|
- }
|
|
|
- }
|
|
|
- if (taxAmount!=undefined && isNumber(taxAmount) && 1 != delFalg){
|
|
|
- if(reimbursementElectronicInvoiceVATTaxesTaxAmount==""){
|
|
|
- reimbursementElectronicInvoiceVATTaxesTaxAmount = parseFloat(taxAmount).toFixed(2);
|
|
|
- }else {
|
|
|
- reimbursementElectronicInvoiceVATTaxesTaxAmount = (parseFloat(reimbursementElectronicInvoiceVATTaxesTaxAmount) + parseFloat(taxAmount)).toFixed(2);
|
|
|
- }
|
|
|
- }
|
|
|
- if (rsumMoney!=undefined && isNumber(rsumMoney) && 1 != delFalg){
|
|
|
- if(reimbursementElectronicInvoiceVATTaxesSumMoney==""){
|
|
|
- reimbursementElectronicInvoiceVATTaxesSumMoney = parseFloat(rsumMoney).toFixed(2);
|
|
|
- }else {
|
|
|
- reimbursementElectronicInvoiceVATTaxesSumMoney = (parseFloat(reimbursementElectronicInvoiceVATTaxesSumMoney) + parseFloat(rsumMoney)).toFixed(2);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxesMoneys").val(reimbursementElectronicInvoiceVATTaxesMoneys);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxesTaxAmount").val(reimbursementElectronicInvoiceVATTaxesTaxAmount);
|
|
|
- $("#reimbursementElectronicInvoiceVATTaxesSumMoney").val(reimbursementElectronicInvoiceVATTaxesSumMoney);
|
|
|
+ // 若发票号不存在,则新增行将对应信息添加进去
|
|
|
+ if (!includeFlag && data.InvoiceNumber) {
|
|
|
+ addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);
|
|
|
+ updateInvoiceRow(trlen, data);
|
|
|
+ // 检查文件是否已上传
|
|
|
+ await handleFileUpload(file, size, trlen);
|
|
|
+ reimbursementElectronicInvoiceVATTaxesRowIdx++;
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
- else{
|
|
|
- parent.layer.msg("请上传xml格式文件!", {icon: 5});
|
|
|
+ } catch (error) {
|
|
|
+ console.error('文件上传失败', error);
|
|
|
+ parent.layer.msg("文件上传失败,请重试!", { icon: 5 });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ parent.layer.msg("请上传xml格式文件!", { icon: 5 });
|
|
|
return false;
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
+
|
|
|
+ // 上传 XML 文件的异步函数
|
|
|
+ function uploadXmlFile(formdata) {
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
+ $.ajax({
|
|
|
+ type: 'POST',
|
|
|
+ url: "${ctx}/workreimbursement/workReimbursement/disposeXmlFile",
|
|
|
+ data: formdata,
|
|
|
+ contentType: false,
|
|
|
+ async: true,
|
|
|
+ processData: false,
|
|
|
+ success: function (data) {
|
|
|
+ resolve(data); // 成功返回数据
|
|
|
+ },
|
|
|
+ error: function (error) {
|
|
|
+ reject(error); // 发生错误时拒绝
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ // 更新发票行数据
|
|
|
+ function updateInvoiceRow(index, data) {
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(0).find("input").eq(2).val(data.InherentLabelGeneralOrSpecialVATLabelCode);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(1).find("input").eq(0).val(data.InherentLabelGeneralOrSpecialVATLabelName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(2).find("input").eq(0).val(data.IssuItemInformationItemName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(3).find("input").eq(0).val(data.InvoiceNumber);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(4).find("input").eq(0).val(data.IssueTime);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(5).find("input").eq(0).val(data.SellerInformationSellerName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(6).find("input").eq(0).val(data.BasicInformationTotalAmWithoutTax);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(7).find("input").eq(0).val(data.BasicInformationTotalTaxAm);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(8).find("input").eq(0).val(data.BasicInformationTotalTaxincludedAmount);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).find("td").eq(9).find("input").eq(0).val("");
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes" + index + "_delFlag").val("0");
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(index).show();
|
|
|
+ }
|
|
|
+
|
|
|
+ // 处理文件上传
|
|
|
+ async function handleFileUpload(file, size, trlen) {
|
|
|
+ var attachmentFileLength = $("#file_attachment_InvoiceReimbursement tr").length;
|
|
|
+ var attachmentFile = $("#file_attachment_InvoiceReimbursement tr");
|
|
|
+ var fileName = "";
|
|
|
+ var fileNameFlag = true;
|
|
|
+
|
|
|
+ // 检查文件是否已上传
|
|
|
+ for (var i = 0; i < attachmentFileLength; i++) {
|
|
|
+ var firstTd = attachmentFile[i].getElementsByTagName("td")[0];
|
|
|
+ if (firstTd) {
|
|
|
+ var firstA = firstTd.getElementsByTagName("a")[0];
|
|
|
+ if (firstA) {
|
|
|
+ fileName = firstA.textContent || firstA.innerText;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (fileName == file.name) {
|
|
|
+ fileNameFlag = false;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
+ if (fileNameFlag) {
|
|
|
+ // 确保所有变量在使用之前都已初始化
|
|
|
+ let attachmentId = "";
|
|
|
+ let attachmentFlag = "workInvoiceReimbursement"; // 确保这里初始化变量
|
|
|
+ let timestamp = new Date().getTime();
|
|
|
+ let storeAs = "workInvoiceReimbursement";
|
|
|
+ let uploadPath = "http://gangwan-app.oss-cn-hangzhou.aliyuncs.com/" + storeAs;
|
|
|
+
|
|
|
+ $("#addFile_attachment_InvoiceReimbursement").show();
|
|
|
+
|
|
|
+ try {
|
|
|
+ // 调用文件上传函数
|
|
|
+ const map = await invoiceReimbursementMultipartUploadWithStss(storeAs, file, attachmentId, attachmentFlag, uploadPath, "_attachment_InvoiceReimbursement", size);
|
|
|
+
|
|
|
+ // 获取上传返回的参数
|
|
|
+ const fileUrl = map.get("fileUrl");
|
|
|
+ const createByName = map.get("createByName");
|
|
|
+ const createDate = map.get("createDate");
|
|
|
+
|
|
|
+ // 确保 attachmentId 在此时被赋值
|
|
|
+ attachmentId = map.get("attachmentId");
|
|
|
+
|
|
|
+ const download = map.get("download");
|
|
|
+ const del = map.get("del");
|
|
|
+
|
|
|
+ // 更新页面上的文件信息
|
|
|
+ // 清空指定的单元格内容
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(9).empty();
|
|
|
+ // 添加新的数据
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(9).append(fileUrl);
|
|
|
+
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(10).empty();
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(10).append(createByName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(11).empty();
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(11).append(createDate);
|
|
|
+ // 定位到目标 td 并清除其中的所有 a 标签
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(12).find("a").remove();
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(12).prepend(download);
|
|
|
+
|
|
|
+
|
|
|
+ // 获取其他上传的文件信息
|
|
|
+ const url = map.get("url");
|
|
|
+ const fileName = map.get("fileName");
|
|
|
+ const temporaryUrl = map.get("temporaryUrl");
|
|
|
+ const attachmentName = map.get("attachmentName");
|
|
|
+ const createById = map.get("createBy");
|
|
|
+ const type = map.get("type");
|
|
|
+ const fileSize = map.get("fileSize");
|
|
|
+ const divIdType = map.get("divIdType");
|
|
|
+
|
|
|
+ // 更新表格中的文件信息
|
|
|
+ // 清空 input 的值
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(3).val('');
|
|
|
+ // 设置新的值
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(3).val(url);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(4).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(4).val(fileName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(5).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(5).val(attachmentId);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(6).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(6).val(temporaryUrl);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(7).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(7).val(attachmentName);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(8).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(8).val(createById);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(9).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(9).val(type);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(10).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(10).val(attachmentFlag);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(11).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(11).val(fileSize);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(12).val('');
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxes tr").eq(trlen).find("td").eq(0).find("input").eq(12).val(divIdType);
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+ console.error('文件上传失败', error);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ parent.layer.msg("该电子发票xml文件已经上传,无法重复上传!", { icon: 5 });
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ var invoiceVATTaxes = $("#reimbursementElectronicInvoiceVATTaxes tr").length;
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesMoneys = "";
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesTaxAmount = "";
|
|
|
+ var reimbursementElectronicInvoiceVATTaxesSumMoney = "";
|
|
|
+ for(var i = 0;i < invoiceVATTaxes;i++){
|
|
|
+ var delFalg = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(0).find("input").eq(1).val();
|
|
|
+ var moneys = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(6).find("input").eq(0).val();
|
|
|
+ var taxAmount = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(7).find("input").eq(0).val();
|
|
|
+ var rsumMoney = $("#reimbursementElectronicInvoiceVATTaxes tr").eq(i).find("td").eq(8).find("input").eq(0).val();
|
|
|
+
|
|
|
+ if (moneys!=undefined && isNumber(moneys) && 1 != delFalg){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesMoneys==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesMoneys = parseFloat(moneys).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesMoneys = (parseFloat(reimbursementElectronicInvoiceVATTaxesMoneys) + parseFloat(moneys)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (taxAmount!=undefined && isNumber(taxAmount) && 1 != delFalg){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesTaxAmount==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesTaxAmount = parseFloat(taxAmount).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesTaxAmount = (parseFloat(reimbursementElectronicInvoiceVATTaxesTaxAmount) + parseFloat(taxAmount)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (rsumMoney!=undefined && isNumber(rsumMoney) && 1 != delFalg){
|
|
|
+ if(reimbursementElectronicInvoiceVATTaxesSumMoney==""){
|
|
|
+ reimbursementElectronicInvoiceVATTaxesSumMoney = parseFloat(rsumMoney).toFixed(2);
|
|
|
+ }else {
|
|
|
+ reimbursementElectronicInvoiceVATTaxesSumMoney = (parseFloat(reimbursementElectronicInvoiceVATTaxesSumMoney) + parseFloat(rsumMoney)).toFixed(2);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesMoneys").val(reimbursementElectronicInvoiceVATTaxesMoneys);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesTaxAmount").val(reimbursementElectronicInvoiceVATTaxesTaxAmount);
|
|
|
+ $("#reimbursementElectronicInvoiceVATTaxesSumMoney").val(reimbursementElectronicInvoiceVATTaxesSumMoney);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -967,6 +1089,10 @@
|
|
|
padding-left: 0px;
|
|
|
padding-right: 0px;
|
|
|
}
|
|
|
+ #reimbursementElectronicInvoiceVATTaxes td{
|
|
|
+ padding-left: 0px;
|
|
|
+ padding-right: 0px;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
@@ -985,7 +1111,6 @@
|
|
|
<form:hidden id="flag" path="act.flag"/>
|
|
|
<input type="hidden" id="numberFlag" value="${workReimbursement.number}" />
|
|
|
<input id="wId" type="hidden" value="${workReimbursement.id}">
|
|
|
- <input id="wId" type="hidden" value="${workReimbursement.reimbursementType}">
|
|
|
<div class="form-group layui-row first">
|
|
|
<div class="form-group-label"><h2>基础信息</h2></div>
|
|
|
<%--<div class="layui-item layui-col-sm6">
|
|
@@ -1480,25 +1605,29 @@
|
|
|
|
|
|
<div class="form-group layui-row count2">
|
|
|
<div class="form-group-label"><h2>数电发票信息<span style="color: red;font-size: 14px"> (可通过上传数电发票xml格式的附件自动获取发票信息)</span></h2></div>
|
|
|
- <%--<div class="layui-item nav-btns">
|
|
|
+ <input id="attachment_InvoiceReimbursement_file" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(this.value);"/>
|
|
|
+ <%--<div class="layui-item nav-btns">
|
|
|
<a class="nav-btn nav-btn-add" onclick="addRow('#reimbursementElectronicInvoiceVATTaxes', reimbursementElectronicInvoiceVATTaxesRowIdx, reimbursementElectronicInvoiceVATTaxesTpl);reimbursementElectronicInvoiceVATTaxesRowIdx = reimbursementElectronicInvoiceVATTaxesRowIdx + 1;" title="新增"><i class="fa fa-plus"></i> 新增</a>
|
|
|
</div>--%>
|
|
|
<div class="layui-item nav-btns">
|
|
|
<a id="attachment_btn_InvoiceReimbursement" class="nav-btn nav-btn-add" title="上传数电发票xml文件"><i class="fa fa-plus"></i> 上传xml文件</a>
|
|
|
</div>
|
|
|
- <div class="layui-item layui-col-xs12 form-table-container">
|
|
|
- <table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin">
|
|
|
+ <div class="layui-table-body layui-item layui-col-xs12 form-table-container" style="padding:0px">
|
|
|
+ <table id="contentTable3" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <th width="150px"><font color="red">*</font>发票类型</th>
|
|
|
- <th width="200px"><font color="red">*</font>发票项目名</th>
|
|
|
- <th width="200px"><font color="red">*</font>发票号</th>
|
|
|
- <th width="200px"><font color="red">*</font>开票日期</th>
|
|
|
- <th width="200px"><font color="red">*</font>开票单位</th>
|
|
|
- <th width="150px"><font color="red">*</font>金额</th>
|
|
|
- <th width="150px"><font color="red">*</font>税额</th>
|
|
|
- <th width="150px"><font color="red">*</font>价税合计</th>
|
|
|
- <th width="200px">备注</th>
|
|
|
+ <th width="100px"><font color="red">*</font>发票类型</th>
|
|
|
+ <th width="150px"><font color="red">*</font>发票项目名</th>
|
|
|
+ <th width="150px"><font color="red">*</font>发票号</th>
|
|
|
+ <th width="150px"><font color="red">*</font>开票日期</th>
|
|
|
+ <th width="150px"><font color="red">*</font>开票单位</th>
|
|
|
+ <th width="100px"><font color="red">*</font>金额</th>
|
|
|
+ <th width="100px"><font color="red">*</font>税额</th>
|
|
|
+ <th width="100px"><font color="red">*</font>价税合计</th>
|
|
|
+ <td style="width: 200px; max-width: 200px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">文件预览</th>
|
|
|
+ <th width="100px">上传人</th>
|
|
|
+ <th width="150px">上传时间</th>
|
|
|
+ <th width="200px">操作<th>
|
|
|
<%--<th width="150px">操作</th>--%>
|
|
|
</tr>
|
|
|
</thead>
|
|
@@ -1511,6 +1640,18 @@
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes${index.index}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].delFlag" type="hidden" value="0"/>
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes${index.index}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].invoiceType" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.invoiceType}"/>
|
|
|
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_url" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].url" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.url}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_fileName" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].fileName" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.fileName}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_attachmentId" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].attachmentId" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.attachmentId}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_temporaryUrl" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].temporaryUrl" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_attachmentName" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].attachmentName" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.attachmentName}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_createById" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].createById" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.createById}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_type" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].type" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.type}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_attachmentFlag" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].attachmentFlag" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.attachmentFlag}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_fileSize" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].fileSize" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.fileSize}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_divIdType" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].divIdType" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.divIdType}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_workAttachmentId" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].workAttachmentId" type="hidden" value="${reimbursementElectronicInvoiceVATTaxes.workAttachmentId}"/>
|
|
|
+
|
|
|
</td>
|
|
|
<%--发票类型--%>
|
|
|
<td>
|
|
@@ -1545,35 +1686,185 @@
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes${index.index}_sumMoney" onmouseover="this.title=this.value" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].sumMoney" type="text" maxlength="32" value="${reimbursementElectronicInvoiceVATTaxes.sumMoney}" onmouseover="this.title=this.value" class="form-control number judgment sumMoney"/>
|
|
|
</td>
|
|
|
<%--备注--%>
|
|
|
- <td>
|
|
|
- <input id="reimbursementElectronicInvoiceVATTaxes${index.index}_remarks" onmouseover="this.title=this.value" name="reimbursementElectronicInvoiceVATTaxes[${index.index}].remarks" type="text" maxlength="255" value="${reimbursementElectronicInvoiceVATTaxes.remarks}" class="form-control input"/>
|
|
|
+ <td style="width: 200px; max-width: 200px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpeg')}">
|
|
|
+ <img src="${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}','90%','90%')" alt="${reimbursementElectronicInvoiceVATTaxes.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'pdf')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',1)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'rar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'7z')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',3)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',2)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpeg')}">
|
|
|
+ <img src="${reimbursementElectronicInvoiceVATTaxes.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${reimbursementElectronicInvoiceVATTaxes.url}','90%','90%')" alt="${reimbursementElectronicInvoiceVATTaxes.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'pdf')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.url}',1)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpeg')}">
|
|
|
+ <img src="${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}','90%','90%')" alt="${reimbursementElectronicInvoiceVATTaxes.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'pdf')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',1)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'rar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'7z')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',3)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}',2)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpg')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'png')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'gif')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'bmp')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jpeg')}">
|
|
|
+ <img src="${reimbursementElectronicInvoiceVATTaxes.url}" width="50" height="50" onclick="openDialogView('预览','${ctx}/sys/picturepreview/picturePreview?url=${reimbursementElectronicInvoiceVATTaxes.url}','90%','90%')" alt="${reimbursementElectronicInvoiceVATTaxes.attachmentName}">
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'pdf')}">
|
|
|
+ <a href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.url}',1)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'rar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'zip')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'jar')
|
|
|
+ or fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'7z')}">
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.url}',3)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <a class="attention-info" href="javascript:void(0)" onclick="openPreview('${reimbursementElectronicInvoiceVATTaxes.url}',2)">${reimbursementElectronicInvoiceVATTaxes.attachmentName}</a>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </td>
|
|
|
+ <%--备注--%>
|
|
|
+ <td style="text-align: center; vertical-align: middle; ">
|
|
|
+ ${reimbursementElectronicInvoiceVATTaxes.createBy.name}
|
|
|
</td>
|
|
|
- <%--<td class="text-center op-td">
|
|
|
+ <%--备注--%>
|
|
|
+ <td style="text-align: center; vertical-align: middle; ">
|
|
|
+ <fmt:formatDate value="${reimbursementElectronicInvoiceVATTaxes.createDate}" type="both"/>
|
|
|
+ </td>
|
|
|
+ <td class="text-center op-td" style="display: flex; align-items: center; justify-content: center;">
|
|
|
+ <%--附件下载删除--%>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'pdf')}">
|
|
|
+ <a href="${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}" target="_blank" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <c:choose>
|
|
|
+ <c:when test="${fn:containsIgnoreCase(reimbursementElectronicInvoiceVATTaxes.attachmentName,'xml')}">
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${reimbursementElectronicInvoiceVATTaxes.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <a href="${reimbursementElectronicInvoiceVATTaxes.temporaryUrl}" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
+ </c:when>
|
|
|
+ <c:otherwise>
|
|
|
+ <a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${reimbursementElectronicInvoiceVATTaxes.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
+ </c:otherwise>
|
|
|
+ </c:choose>
|
|
|
<span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes${index.index}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>
|
|
|
- </td>--%>
|
|
|
+ </td>
|
|
|
</tr>
|
|
|
</c:forEach>
|
|
|
</c:if>
|
|
|
</tbody>
|
|
|
</table>
|
|
|
- <table id="contentTable4" class="table table-bordered table-condensed can-edit no-bottom-margin">
|
|
|
+ <table id="contentTable4" class="table table-bordered table-condensed can-edit no-bottom-margin details">
|
|
|
<thead>
|
|
|
<tr >
|
|
|
- <td width="150px" style="vertical-align:middle;text-align: center;"><label>费用汇总(元):</label></td>
|
|
|
- <td width="200px"></td>
|
|
|
- <td width="200px"></td>
|
|
|
- <td width="200px"></td>
|
|
|
- <td width="200px"></td>
|
|
|
- <td width="150px" style="border: 0px">
|
|
|
+ <td width="100px">费用汇总(元):</td>
|
|
|
+ <td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
+ <td width="150px"></td>
|
|
|
+ <td width="100px" style="border: 0px">
|
|
|
<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesMoneys" name="reimbursementElectronicInvoiceVATTaxesMoneys" readonly="true" class="form-control layui-input" value=""/>
|
|
|
</td>
|
|
|
- <td width="150px">
|
|
|
+ <td width="100px">
|
|
|
<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesTaxAmount" name="reimbursementElectronicInvoiceVATTaxesTaxAmount" readonly="true" class="form-control layui-input" value=""/>
|
|
|
</td>
|
|
|
- <td width="150px">
|
|
|
+ <td width="100px">
|
|
|
<input htmlEscape="false" style="border: 0px; font-weight: bold;" id="reimbursementElectronicInvoiceVATTaxesSumMoney" name="reimbursementElectronicInvoiceVATTaxesSumMoney" readonly="true" class="form-control layui-input" value=""/>
|
|
|
</td>
|
|
|
- <td width="200px"></td>
|
|
|
+ <td style="width: 200px; max-width: 200px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;"></td>
|
|
|
+ <th width="100px"></th>
|
|
|
+ <th width="150px"></th>
|
|
|
+ <th width="200px"><th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
</table>
|
|
@@ -1583,6 +1874,18 @@
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_id" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].id" type="hidden" value="{{row.id}}"/>
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_delFlag" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].delFlag" type="hidden" value="0"/>
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_invoiceType" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].invoiceType" type="hidden" value="{{row.invoiceType}}"/>
|
|
|
+
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_url" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].url" type="hidden" value="{{row.url}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_fileName" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].fileName" type="hidden" value="{{row.fileName}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_attachmentId" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].attachmentId" type="hidden" value="{{row.attachmentId}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_temporaryUrl" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].temporaryUrl" type="hidden" value="{{row.temporaryUrl}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_attachmentName" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].attachmentName" type="hidden" value="{{row.attachmentName}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_createById" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].createById" type="hidden" value="{{row.createById}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_type" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].type" type="hidden" value="{{row.type}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_attachmentFlag" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].attachmentFlag" type="hidden" value="{{row.attachmentFlag}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_fileSize" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].fileSize" type="hidden" value="{{row.fileSize}}"/>
|
|
|
+ <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_divIdType" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].divIdType" type="hidden" value="{{row.divIdType}}"/>
|
|
|
+
|
|
|
</td>
|
|
|
<%--发票类型--%>
|
|
|
<td>
|
|
@@ -1617,12 +1920,20 @@
|
|
|
<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_sumMoney" readOnly="true" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].sumMoney" type="text" value="{{row.sumMoney}}" maxlength="32" onmouseover="this.title=this.value" class="form-control number judgment sumMoney"/>
|
|
|
</td>
|
|
|
<%--备注--%>
|
|
|
- <td>
|
|
|
- <input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255" onmouseover="this.title=this.value" class="form-control"/>
|
|
|
+ <td style="width: 200px; max-width: 200px; text-align: center; vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
|
|
|
+ <%--<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255" onmouseover="this.title=this.value" class="form-control"/>--%>
|
|
|
+ </td>
|
|
|
+ <%--备注--%>
|
|
|
+ <td style="text-align: center; vertical-align: middle;">
|
|
|
+ <%--<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255" onmouseover="this.title=this.value" class="form-control"/>--%>
|
|
|
+ </td>
|
|
|
+ <%--备注--%>
|
|
|
+ <td style="text-align: center; vertical-align: middle;">
|
|
|
+ <%--<input id="reimbursementElectronicInvoiceVATTaxes{{idx}}_remarks" name="reimbursementElectronicInvoiceVATTaxes[{{idx}}].remarks" type="text" value="{{row.remarks}}" maxlength="255" onmouseover="this.title=this.value" class="form-control"/>--%>
|
|
|
+ </td>
|
|
|
+ <td class="text-center op-td" style="display: flex; align-items: center; justify-content: center;">
|
|
|
+ <span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>
|
|
|
</td>
|
|
|
- <%--<td class="text-center op-td">
|
|
|
- {{#delBtn}}<span class="op-btn op-btn-delete" onclick="delRowA(this, '#reimbursementElectronicInvoiceVATTaxes{{idx}}')" title="删除"><i class="glyphicon glyphicon-remove"></i> 删除</span>{{/delBtn}}
|
|
|
- </td>--%>
|
|
|
</tr>//-->
|
|
|
</script>
|
|
|
<script type="text/javascript">
|
|
@@ -1645,14 +1956,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="form-group layui-row count2">
|
|
|
+ <%--<div class="form-group layui-row count2">
|
|
|
<input id="attachment_InvoiceReimbursement_file" name="attachment_InvoiceReimbursement_file" type="file" multiple="multiple" style="display: none;" onChange="if(this.value)insertTitleInvoiceReimbursement(this.value);"/>
|
|
|
<span id="attachment_title"></span>
|
|
|
<div class="layui-item layui-col-xs12" style="padding:0 16px;">
|
|
|
<table id="listAttachment" class="table table-bordered table-condensed details">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
- <%-- <th>序号</th>--%>
|
|
|
+ <%– <th>序号</th>–%>
|
|
|
<th>数电发票文件预览</th>
|
|
|
<th>上传人</th>
|
|
|
<th>上传时间</th>
|
|
@@ -1663,7 +1974,7 @@
|
|
|
<c:forEach items="${workReimbursement.workAttachmentInvoiceReimbursements}" var = "workClientAttachment" varStatus="status">
|
|
|
<tr>
|
|
|
|
|
|
- <%-- <td>${status.index + 1}</td>--%>
|
|
|
+ <%– <td>${status.index + 1}</td>–%>
|
|
|
<c:choose>
|
|
|
<c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
<c:choose>
|
|
@@ -1786,7 +2097,7 @@
|
|
|
<td><fmt:formatDate value="${workClientAttachment.createDate}" type="both"/></td>
|
|
|
<td class="op-td">
|
|
|
<div class="op-btn-box" >
|
|
|
- <%--附件下载删除--%>
|
|
|
+ <%–附件下载删除–%>
|
|
|
<c:choose>
|
|
|
<c:when test="${workReimbursement.uploadMode == 2}">
|
|
|
<c:choose>
|
|
@@ -1809,9 +2120,9 @@
|
|
|
<a href="javascript:location.href='${ctx}/workfullmanage/workFullManage/downLoadAttach?file='+encodeURIComponent('${workClientAttachment.url}');" class="op-btn op-btn-download"><i class="fa fa-download"></i> 下载</a>
|
|
|
</c:otherwise>
|
|
|
</c:choose>
|
|
|
- <%--<c:if test="${workClientAttachment.collectFlag != 1}">
|
|
|
+ <%–<c:if test="${workClientAttachment.collectFlag != 1}">
|
|
|
<a href="javascript:void(0)" onclick="collectingAccessory(this,'${ctx}/projectAccessory/projectAccessory/saveCollectAccessory','${workClientAttachment.url}','${workClientAttachment.createBy.id}','${workClientAttachment.fileSize}')" class="op-btn op-btn-delete" style="background-color: #FFB800"><i class="layui-icon layui-icon-rate"></i> 收藏</a>
|
|
|
- </c:if>--%>
|
|
|
+ </c:if>–%>
|
|
|
<c:if test="${workClientAttachment.createBy.id eq fns:getUser().id}">
|
|
|
<a href="javascript:void(0)" onclick="deleteFileFromAliyunByInvoiceReimbursement(this,'${ctx}/sys/workattachment/deleteFileFromAliyunByInvoiceReimbursement?url=${workClientAttachment.url}&id=${workClientAttachment.id}&type=2','addFile_attachment_InvoiceReimbursement','_attachment_InvoiceReimbursement')" class="op-btn op-btn-delete" ><i class="fa fa-trash"></i> 删除</a>
|
|
|
</c:if>
|
|
@@ -1823,7 +2134,7 @@
|
|
|
</tbody>
|
|
|
</table>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div>--%>
|
|
|
|
|
|
<div class="form-group layui-row">
|
|
|
<div class="form-group-label"><h2>附件信息</h2></div>
|