瀏覽代碼

报销审批添加数电发票确认功能

huangguoce 2 周之前
父節點
當前提交
216f5d2815

+ 156 - 137
src/api/ccpm/reimbursement/ReimbursementService.js

@@ -1,167 +1,186 @@
-import request from '@/utils/httpRequest'
-import {CCPM_PATH as prefix} from "../../AppPath";
+import request from "@/utils/httpRequest";
+import { CCPM_PATH as prefix } from "../../AppPath";
 
 export default class ReimbursementService {
-  list (param) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/list',
-      method: 'get',
-      params: param
-    })
-  }
-  reportNoList (param) {
-    return request({
-      url: prefix +  '/ccpmReimbursement/info/reportNoList',
-      method: 'get',
-      params: param
-    })
-  }
-  projectList (params) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/projectList',
-      method: 'get',
-      params: params
-    })
-  }
-  save (param) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/save',
-      method: 'post',
-      data: param
-    })
-  }
-  findById (id) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/findById',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  remove (id) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/remove',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  updateStatusById (param) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/updateStatusById',
-      method: 'post',
-      data: param
-    })
-  }
-  checkNumber (number) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/checkNumber',
-      method: 'get',
-      params: {number: number}
-    })
-  }
-  userTree (name) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/userTree',
-      method: 'get',
-      params: {name: name}
-    })
-  }
-  exportFile (params) {
-    return request({
-      url: prefix + '/ccpmReimbursement/info/exportFile',
-      method: 'get',
-      params: params,
-      responseType: 'blob'
-    })
-  }
-	exportInvoiceReimbursementFile (params) {
-		return request({
-			url: prefix + '/ccpmReimbursement/info/exportInvoiceReimbursementFile',
-			method: 'get',
+	list(param) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/list",
+			method: "get",
+			params: param,
+		});
+	}
+	reportNoList(param) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/reportNoList",
+			method: "get",
+			params: param,
+		});
+	}
+	projectList(params) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/projectList",
+			method: "get",
 			params: params,
-			responseType: 'blob'
-		})
+		});
 	}
-  getEffectiveDataByInvoiceNumber (invoiceNumber,id) {
-	return request({
-		url: prefix + '/ccpmReimbursement/info/getEffectiveDataByInvoiceNumber',
-		method: 'get',
-		params: {invoiceNumber: invoiceNumber,id:id}
-	})
-  }
-	getEffectiveDataByNumbers (invoiceNumber,id) {
+	save(param) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/getEffectiveDataByNumbers',
-			method: 'get',
-			params: {invoiceNumber: invoiceNumber,id:id}
-		})
+			url: prefix + "/ccpmReimbursement/info/save",
+			method: "post",
+			data: param,
+		});
 	}
-	getEffectiveDataByNumbers2 (invoiceNumber,id) {
+	findById(id) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/getEffectiveDataByNumbers2',
-			method: 'post',
-			data: {financeNumber: invoiceNumber,id:id}
-		})
+			url: prefix + "/ccpmReimbursement/info/findById",
+			method: "get",
+			params: { id: id },
+		});
 	}
-	deleteByIdAndNumber (id,invoiceNumber) {
+	remove(id) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/deleteByIdAndNumber',
-			method: 'post',
-			params: {id:id,invoiceNumber: invoiceNumber}
-		})
+			url: prefix + "/ccpmReimbursement/info/remove",
+			method: "get",
+			params: { id: id },
+		});
 	}
-	findHistory (id) {
+	updateStatusById(param) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/findHistory',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/ccpmReimbursement/info/updateStatusById",
+			method: "post",
+			data: param,
+		});
 	}
-	findHiById (id) {
+	checkNumber(number) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/findHiById',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/ccpmReimbursement/info/checkNumber",
+			method: "get",
+			params: { number: number },
+		});
 	}
-	updatePaymentStatus (param) {
+	userTree(name) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/updatePaymentStatus',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/ccpmReimbursement/info/userTree",
+			method: "get",
+			params: { name: name },
+		});
+	}
+	exportFile(params) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/exportFile",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
+	}
+	exportInvoiceReimbursementFile(params) {
+		return request({
+			url:
+				prefix +
+				"/ccpmReimbursement/info/exportInvoiceReimbursementFile",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
+	}
+	getEffectiveDataByInvoiceNumber(invoiceNumber, id) {
+		return request({
+			url:
+				prefix +
+				"/ccpmReimbursement/info/getEffectiveDataByInvoiceNumber",
+			method: "get",
+			params: { invoiceNumber: invoiceNumber, id: id },
+		});
+	}
+	getEffectiveDataByNumbers(invoiceNumber, id) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/getEffectiveDataByNumbers",
+			method: "get",
+			params: { invoiceNumber: invoiceNumber, id: id },
+		});
+	}
+	getEffectiveDataByNumbers2(invoiceNumber, id) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/getEffectiveDataByNumbers2",
+			method: "post",
+			data: { financeNumber: invoiceNumber, id: id },
+		});
+	}
+	deleteByIdAndNumber(id, invoiceNumber) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/deleteByIdAndNumber",
+			method: "post",
+			params: { id: id, invoiceNumber: invoiceNumber },
+		});
+	}
+	findHistory(id) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/findHistory",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiById(id) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/findHiById",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	updatePaymentStatus(param) {
+		return request({
+			url: prefix + "/ccpmReimbursement/info/updatePaymentStatus",
+			method: "post",
+			data: param,
+		});
 	}
 
-
-	updateFileStatusById(param){
+	updateFileStatusById(param) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/updateFileStatusById',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/ccpmReimbursement/info/updateFileStatusById",
+			method: "post",
+			data: param,
+		});
 	}
 
-	findFileById (id) {
+	findFileById(id) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/findFileById',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/ccpmReimbursement/info/findFileById",
+			method: "get",
+			params: { id: id },
+		});
 	}
 
-	saveFile (param) {
+	saveFile(param) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/saveFile',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/ccpmReimbursement/info/saveFile",
+			method: "post",
+			data: param,
+		});
 	}
 
-	findFileByReimId (id) {
+	findFileByReimId(id) {
 		return request({
-			url: prefix + '/ccpmReimbursement/info/findFileByReimId',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/ccpmReimbursement/info/findFileByReimId",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	saveConfirmStatus(param) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/save",
+			method: "post",
+			data: param,
+		});
 	}
 
+	getListByUser(id) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/getListByUser",
+			method: "get",
+			params: {
+				reimbursementId: id,
+			},
+		});
+	}
 }

+ 24 - 0
src/api/consultancy/reimbursement/ReimbursementService.js

@@ -163,4 +163,28 @@ export default class ReimbursementService {
 			params: { id: id },
 		});
 	}
+	updateStatusById(data) {
+		return request({
+			url: prefix + "/consultancyReimbursement/info/updateStatusById",
+			method: "post",
+			data: data,
+		});
+	}
+	saveConfirmStatus(param) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/save",
+			method: "post",
+			data: param,
+		});
+	}
+
+	getListByUser(id) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/getListByUser",
+			method: "get",
+			params: {
+				reimbursementId: id,
+			},
+		});
+	}
 }

+ 22 - 0
src/api/finance/invoice/InvoiceConfirmStatusService.js

@@ -0,0 +1,22 @@
+import request from "@/utils/httpRequest";
+import { FINANCE_PATH as prefix } from "../../AppPath";
+
+export default class InvoiceConfirmStatusService {
+	save(param) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/save",
+			method: "post",
+			data: param,
+		});
+	}
+
+	getListByUser(id) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/getListByUser",
+			method: "get",
+			params: {
+				reimbursementId: id,
+			},
+		});
+	}
+}

+ 17 - 0
src/api/sys/ReimbursementService.js

@@ -171,4 +171,21 @@ export default class ReimbursementService {
 			params: { id: id },
 		});
 	}
+	saveConfirmStatus(param) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/save",
+			method: "post",
+			data: param,
+		});
+	}
+
+	getListByUser(id) {
+		return request({
+			url: prefix + "/invoiceConfirm/confirmStatus/getListByUser",
+			method: "get",
+			params: {
+				reimbursementId: id,
+			},
+		});
+	}
 }

+ 155 - 136
src/api/zs/reimbursement/ReimbursementService.js

@@ -1,166 +1,185 @@
-import request from '@/utils/httpRequest'
-import {CENTRECAREFUL_PATH as prefix} from "../../AppPath";
+import request from "@/utils/httpRequest";
+import { CENTRECAREFUL_PATH as prefix } from "../../AppPath";
 
 export default class ReimbursementService {
-  list (param) {
-    return request({
-      url: prefix + '/zsReimbursement/info/list',
-      method: 'get',
-      params: param
-    })
-  }
-  reportNoList (param) {
-    return request({
-      url: prefix +  '/zsReimbursement/info/reportNoList',
-      method: 'get',
-      params: param
-    })
-  }
-  projectList (params) {
-    return request({
-      url: prefix + '/zsReimbursement/info/projectList',
-      method: 'get',
-      params: params
-    })
-  }
-  save (param) {
-    return request({
-      url: prefix + '/zsReimbursement/info/save',
-      method: 'post',
-      data: param
-    })
-  }
-  findById (id) {
-    return request({
-      url: prefix + '/zsReimbursement/info/findById',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  remove (id) {
-    return request({
-      url: prefix + '/zsReimbursement/info/remove',
-      method: 'get',
-      params: {id: id}
-    })
-  }
-  updateStatusById (param) {
-    return request({
-      url: prefix + '/zsReimbursement/info/updateStatusById',
-      method: 'post',
-      data: param
-    })
-  }
-  checkNumber (number) {
-    return request({
-      url: prefix + '/zsReimbursement/info/checkNumber',
-      method: 'get',
-      params: {number: number}
-    })
-  }
-  userTree (name) {
-    return request({
-      url: prefix + '/zsReimbursement/info/userTree',
-      method: 'get',
-      params: {name: name}
-    })
-  }
-  exportFile (params) {
-    return request({
-      url: prefix + '/zsReimbursement/info/exportFile',
-      method: 'get',
-      params: params,
-      responseType: 'blob'
-    })
-  }
-	exportInvoiceReimbursementFile (params) {
-		return request({
-			url: prefix + '/zsReimbursement/info/exportInvoiceReimbursementFile',
-			method: 'get',
+	list(param) {
+		return request({
+			url: prefix + "/zsReimbursement/info/list",
+			method: "get",
+			params: param,
+		});
+	}
+	reportNoList(param) {
+		return request({
+			url: prefix + "/zsReimbursement/info/reportNoList",
+			method: "get",
+			params: param,
+		});
+	}
+	projectList(params) {
+		return request({
+			url: prefix + "/zsReimbursement/info/projectList",
+			method: "get",
 			params: params,
-			responseType: 'blob'
-		})
+		});
+	}
+	save(param) {
+		return request({
+			url: prefix + "/zsReimbursement/info/save",
+			method: "post",
+			data: param,
+		});
 	}
-	deleteByIdAndNumber (id,invoiceNumber) {
+	findById(id) {
 		return request({
-			url: prefix + '/zsReimbursement/info/deleteByIdAndNumber',
-			method: 'post',
-			params: {id:id,invoiceNumber: invoiceNumber}
-		})
+			url: prefix + "/zsReimbursement/info/findById",
+			method: "get",
+			params: { id: id },
+		});
 	}
-  getEffectiveDataByInvoiceNumber (invoiceNumber,id) {
-	return request({
-		url: prefix + '/zsReimbursement/info/getEffectiveDataByInvoiceNumber',
-		method: 'get',
-		params: {invoiceNumber: invoiceNumber,id:id}
-	})
-  }
-	getEffectiveDataByNumbers (invoiceNumber,id) {
+	remove(id) {
 		return request({
-			url: prefix + '/zsReimbursement/info/getEffectiveDataByNumbers',
-			method: 'get',
-			params: {invoiceNumber: invoiceNumber,id:id}
-		})
+			url: prefix + "/zsReimbursement/info/remove",
+			method: "get",
+			params: { id: id },
+		});
 	}
-	getEffectiveDataByNumbers2 (invoiceNumber,id) {
+	updateStatusById(param) {
 		return request({
-			url: prefix + '/zsReimbursement/info/getEffectiveDataByNumbers2',
-			method: 'post',
-			data: {financeNumber: invoiceNumber,id: id}
-		})
+			url: prefix + "/zsReimbursement/info/updateStatusById",
+			method: "post",
+			data: param,
+		});
 	}
-	findHistory (id) {
+	checkNumber(number) {
 		return request({
-			url: prefix + '/zsReimbursement/info/findHistory',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/zsReimbursement/info/checkNumber",
+			method: "get",
+			params: { number: number },
+		});
+	}
+	userTree(name) {
+		return request({
+			url: prefix + "/zsReimbursement/info/userTree",
+			method: "get",
+			params: { name: name },
+		});
+	}
+	exportFile(params) {
+		return request({
+			url: prefix + "/zsReimbursement/info/exportFile",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
+	}
+	exportInvoiceReimbursementFile(params) {
+		return request({
+			url:
+				prefix + "/zsReimbursement/info/exportInvoiceReimbursementFile",
+			method: "get",
+			params: params,
+			responseType: "blob",
+		});
 	}
-	findHiById (id) {
+	deleteByIdAndNumber(id, invoiceNumber) {
 		return request({
-			url: prefix + '/zsReimbursement/info/findHiById',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/zsReimbursement/info/deleteByIdAndNumber",
+			method: "post",
+			params: { id: id, invoiceNumber: invoiceNumber },
+		});
 	}
-	updatePaymentStatus (param) {
+	getEffectiveDataByInvoiceNumber(invoiceNumber, id) {
 		return request({
-			url: prefix + '/zsReimbursement/info/updatePaymentStatus',
-			method: 'post',
-			data: param
-		})
+			url:
+				prefix +
+				"/zsReimbursement/info/getEffectiveDataByInvoiceNumber",
+			method: "get",
+			params: { invoiceNumber: invoiceNumber, id: id },
+		});
+	}
+	getEffectiveDataByNumbers(invoiceNumber, id) {
+		return request({
+			url: prefix + "/zsReimbursement/info/getEffectiveDataByNumbers",
+			method: "get",
+			params: { invoiceNumber: invoiceNumber, id: id },
+		});
+	}
+	getEffectiveDataByNumbers2(invoiceNumber, id) {
+		return request({
+			url: prefix + "/zsReimbursement/info/getEffectiveDataByNumbers2",
+			method: "post",
+			data: { financeNumber: invoiceNumber, id: id },
+		});
+	}
+	findHistory(id) {
+		return request({
+			url: prefix + "/zsReimbursement/info/findHistory",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	findHiById(id) {
+		return request({
+			url: prefix + "/zsReimbursement/info/findHiById",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	updatePaymentStatus(param) {
+		return request({
+			url: prefix + "/zsReimbursement/info/updatePaymentStatus",
+			method: "post",
+			data: param,
+		});
 	}
 
-	updateFileStatusById(param){
+	updateFileStatusById(param) {
 		return request({
-			url: prefix + '/zsReimbursement/info/updateFileStatusById',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/zsReimbursement/info/updateFileStatusById",
+			method: "post",
+			data: param,
+		});
 	}
 
-	findFileById (id) {
+	findFileById(id) {
 		return request({
-			url: prefix + '/zsReimbursement/info/findFileById',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/zsReimbursement/info/findFileById",
+			method: "get",
+			params: { id: id },
+		});
 	}
 
-	saveFile (param) {
+	saveFile(param) {
 		return request({
-			url: prefix + '/zsReimbursement/info/saveFile',
-			method: 'post',
-			data: param
-		})
+			url: prefix + "/zsReimbursement/info/saveFile",
+			method: "post",
+			data: param,
+		});
 	}
 
-	findFileByReimId (id) {
+	findFileByReimId(id) {
 		return request({
-			url: prefix + '/zsReimbursement/info/findFileByReimId',
-			method: 'get',
-			params: {id: id}
-		})
+			url: prefix + "/zsReimbursement/info/findFileByReimId",
+			method: "get",
+			params: { id: id },
+		});
+	}
+	saveConfirmStatus(param) {
+		return request({
+			url: prefix + "/zsInvoiceConfirm/confirmStatus/save",
+			method: "post",
+			data: param,
+		});
 	}
 
+	getListByUser(id) {
+		return request({
+			url: prefix + "/zsInvoiceConfirm/confirmStatus/getListByUser",
+			method: "get",
+			params: {
+				reimbursementId: id,
+			},
+		});
+	}
 }

文件差異過大導致無法顯示
+ 2043 - 1986
src/views/ccpm/reimbursement/info/ReimbursementForm.vue


+ 59 - 2
src/views/common/DigitalInvoiceUploadComponent.vue

@@ -16,12 +16,17 @@
 						上传报销的数电发票xml文件</span>
 				</template>
 			</el-upload>
+			<el-button v-if="this.allStatus && this.isConfirm" type="primary" size="default" style="margin-left: 10px;"
+				@click="allSelect('0')">全部取消</el-button>
+			<el-button v-if="!this.allStatus && this.isConfirm" type="primary" size="default" style="margin-left: 10px;"
+				@click="allSelect('1')">全部确认</el-button>
 		</el-divider>
+
 		<div style="height: calc(100% - 80px);margin-top: 10px">
 			<!-- 进度条 -->
 			<el-progress style="margin-left: 5em" v-if="progressFlag" :percentage="loadProgress"></el-progress>
-			<el-table ref="uploadTable" v-loading="loading" :key="tableKey" :summary-method="getSummaries" show-summary
-				:data="dataListNew">
+			<el-table :row-class-name="tableRowClassName" ref="uploadTable" v-loading="loading" :key="tableKey"
+				:summary-method="getSummaries" show-summary :data="dataListNew">
 				<!--        <el-table-column type="seq" width="40"></el-table-column>-->
 				<el-table-column label="文件名称" prop="name" align="center" width="290">
 					<template #default="scope">
@@ -107,13 +112,28 @@
 						<el-input disabled="true" v-model="scope.row.count"></el-input>
 					</template>
 				</el-table-column>
+				<el-table-column v-if="isConfirm" prop="confirmStatus" label="确认状态" align="center" width="120"
+					:edit-render="{}" show-overflow="title">
+					<template #default="scope">
+						<el-tag v-if="scope.row.confirmStatus == '1'" type="success">已确认</el-tag>
+						<el-tag v-if="!scope.row.confirmStatus || scope.row.confirmStatus == '0'"
+							type="danger">未确认</el-tag>
+					</template>
+				</el-table-column>
 				<el-table-column label="操作" width="200px" fixed="right" align="center">
 					<template #default="scope">
+						<el-button v-if="isConfirm && (!scope.row.confirmStatus || scope.row.confirmStatus == '0')" text
+							type="primary" key="btn01" icon="el-icon-check" size="small"
+							@click="changeStatus(scope.row, '1')">确认</el-button>
+						<!-- TODO 切换状态时,按钮字不会改变 -->
+						<el-button v-if="isConfirm && scope.row.confirmStatus == '1'" text type="danger" key="btn02"
+							icon="el-icon-close" size="small" @click="changeStatus(scope.row, '0')">取消确认</el-button>
 						<el-button text type="primary" key="01" icon="el-icon-download" size="small"
 							@click="toHref(scope.row)">下载</el-button>
 						<el-button text type="primary" key="02" icon="el-icon-delete" size="small"
 							@click="deleteFileById(scope.row, scope.$index, this.dataListNew)"
 							:disabled="auth === 'view' && delFlag === false && createBy !== scope.row.createBy.name">删除</el-button>
+
 					</template>
 				</el-table-column>
 			</el-table>
@@ -142,6 +162,7 @@ import moment from 'moment'
 export default {
 	data() {
 		return {
+			isConfirm: false,
 			uploadKey: '',
 			progressFlag: false,
 			loadProgress: 0,
@@ -215,10 +236,21 @@ export default {
 		}
 	},
 	watch: {
+		dataListNew: {
+			handler(val) {
+			},
+			deep: true,
+			immediate: true
+		}
 	},
 	created() {
 		this.ossService = new OSSSerivce()
 	},
+	computed: {
+		allStatus() {
+			return this.dataListNew.length > 0 && this.dataListNew.every(item => item.confirmStatus == 1);
+		},
+	},
 	components: {
 		// ElImageViewer
 	},
@@ -884,11 +916,34 @@ export default {
 		formatNumber(number) {
 			return number.toFixed(2);  // 保留两位小数,返回字符串
 		},
+		changeStatus(row, status) {
+			row.confirmStatus = status;
+		},
+		tableRowClassName({ row, rowIndex }) {
+			if (row.confirmStatus == "1") {
+				return 'warning-row';
+			}
+			return '';
+		},
+		allSelect(status) {
+			this.dataListNew.forEach(item => {
+				item.confirmStatus = status
+			})
+		}
 	}
 }
 </script>
 <style scoped lang="scss">
 ::v-deep .el-table {
+	.warning-row {
+		background: #ffe9c0 !important;
+	}
+
+	// 滚动条的宽度
+	.el-scrollbar__bar {
+		height: 16px; // 横向滚动条
+	}
+
 
 	.el-table__footer-wrapper tbody td.el-table__cell,
 	.el-table__header-wrapper tbody td.el-table__cell {
@@ -913,6 +968,8 @@ export default {
 	}
 }
 
+
+
 .el-divider__text {
 	font-size: 16px;
 	font-weight: bold;

+ 1 - 1
src/views/common/InvoiceReimbursementUpLoadComponent.vue

@@ -33,7 +33,7 @@
 						</div>
 						<div v-else>
 							<el-link type="primary" :underline="false" @click="showFile(scope.row)">{{ scope.row.name
-								}}</el-link>
+							}}</el-link>
 						</div>
 					</template>
 				</el-table-column>

+ 1 - 1
src/views/common/UpLoadComponent.vue

@@ -2,7 +2,7 @@
 <template>
   <div :key="uploadKey">
     <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{ dividerName
-      }}</el-divider>
+    }}</el-divider>
     <el-upload ref="upload" style="display: inline-block;" :show-header="'status'" action="" :limit="999"
       :http-request="httpRequest" multiple :on-exceed="(files, fileList) => {
         $message.warning(`当前限制选择 999 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`)

文件差異過大導致無法顯示
+ 1985 - 1927
src/views/consultancy/reimbursement/info/ReimbursementForm.vue


+ 60 - 4
src/views/cw/reimbursementApproval/info/ReimbursementForm.vue

@@ -805,8 +805,9 @@
 
 		</el-form>
 		<!-- 附件 -->
-		<InvoiceReimbursementUpLoadComponent ref="invoiceReimbursementUpLoadComponent"
-			v-show="'1' === this.inputForm.reimbursementType"></InvoiceReimbursementUpLoadComponent>
+		<InvoiceReimbursementUpLoadComponent @changeConfirmList="changeConfirmList"
+			ref="invoiceReimbursementUpLoadComponent" v-show="'1' === this.inputForm.reimbursementType">
+		</InvoiceReimbursementUpLoadComponent>
 		<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
 		<WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
 		<ReportNoChooseRadio ref="reportNoChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2">
@@ -823,6 +824,7 @@ import ReportNoChooseRadio from './ReportNoChooseRadio'
 import ReimbursementApprovalService from '@/api/cw/reimbursementApproval/ReimbursementApprovalService'
 // import ReimbursementTypeService from '@/api/sys/ReimbursementTypeService'
 import ReimbursementApprovalTypeService from '@/api/cw/reimbursementApproval/ReimbursementApprovalTypeService'
+import InvoiceConfirmStatusService from '@/api/finance/invoice/InvoiceConfirmStatusService'
 import InvoiceReimbursementUpLoadComponent from '@/views/common/DigitalInvoiceUploadComponent'
 import UpLoadComponent from '@/views/common/UpLoadComponent'
 import XEUtils from 'xe-utils'
@@ -842,6 +844,8 @@ import ProjectListForm from './ProgramForm'
 import CwProgramPageForm2 from './CwProgramPageForm2'
 import userService from '@/api/sys/UserService'
 import taskService from "@/api/flowable/taskService.js";
+
+
 export default {
 	props: {
 		businessId: {
@@ -859,6 +863,8 @@ export default {
 	},
 	data() {
 		return {
+			currentNodeName: "",
+			confirmStatusList: [],
 			validRules: {
 				userName: [
 					{ required: true, message: '报销人不能为空' }
@@ -985,6 +991,7 @@ export default {
 	// reimbursementService: null,
 	// reimbursementTypeService: null,
 	reimbursementApprovalTypeService: null,
+	invoiceConfirmStatusService: null,
 	commonApi: null,
 	// materialManagementService: null,
 	created() {
@@ -992,6 +999,8 @@ export default {
 		// this.reimbursementService = new ReimbursementService()
 		// this.reimbursementTypeService = new ReimbursementTypeService()
 		this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
+		this.invoiceConfirmStatusService = new InvoiceConfirmStatusService()
+
 		this.commonApi = new CommonApi()
 		// this.materialManagementService = new MaterialManagementService()
 		if (this.$store.state.user.name === '潘中') {
@@ -1105,7 +1114,6 @@ export default {
 				this.loading = true
 				this.$refs.inputForm.resetFields()
 				this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
-					console.log('data', data)
 					this.$refs.invoiceReimbursementUpLoadComponent.clearUpload()
 					this.$refs.uploadComponent.clearUpload()
 					if (this.status === 'audit' || this.status === 'taskFormDetail') {
@@ -1145,6 +1153,26 @@ export default {
 					if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
 						this.startPur(this.inputForm.purchaseId)
 					}
+					//  获取当前审核节点
+					this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
+						this.currentNodeName = name
+						if (name == "综合管理部主任审批" || name == "财务审批") {
+							this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+						}
+					})
+					// 获取文件确认状态
+					this.invoiceConfirmStatusService.getListByUser(this.inputForm.id).then(data => {
+						console.log(data);
+						// 先构建一个 Map 方便查找
+						const statusMap = new Map(data.map(item => [item.invoiceId, item.status]));
+						// 遍历 targetArray 给每项加 confirmStatus
+						this.inputForm.invoiceReimbursementFiles.forEach(item => {
+							const status = statusMap.get(item.id);
+							if (status !== undefined) {
+								item.confirmStatus = status;
+							}
+						});
+					})
 					this.loading = false
 				})
 				if (method !== 'edit' && method !== 'view') {
@@ -1739,6 +1767,7 @@ export default {
 			this.loading = true
 			this.reimbursementApprovalService.findById(this.inputForm.id).then((data) => {
 				if (data.type !== '2') { // 审核状态不是“审核中”,就弹出提示
+
 					taskService.getTaskAuditUsersByprocInstId(this.$route.query.procInsId).then(res => {
 						let userInfo = this.$TOOL.data.get("USER_INFO");
 						// 如果审核人是本人的话,则跳过数据状态的限制,可再次审批
@@ -1782,9 +1811,11 @@ export default {
 											}
 
 										}
-										console.log('this.inputForm', this.inputForm)
 										this.reimbursementApprovalService.save(this.inputForm).then((data) => {
 											callback(data.businessTable, data.businessId, this.inputForm)
+											if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
+												this.changeStatusApi()
+											}
 											this.loading = false
 										}).catch(() => {
 											this.loading = false
@@ -1847,6 +1878,7 @@ export default {
 								console.log('this.inputForm', this.inputForm)
 								this.reimbursementApprovalService.save(this.inputForm).then((data) => {
 									callback(data.businessTable, data.businessId, this.inputForm)
+									this.changeStatusApi()
 									this.loading = false
 								}).catch(() => {
 									this.loading = false
@@ -2765,6 +2797,30 @@ export default {
 			]
 			return footerData
 		},
+		changeConfirmList(row) {
+			// 如果 confirmStatusList 中存在这个 row.id,则移除
+			const index = this.confirmStatusList.findIndex(item => item === row.id);
+			if (index !== -1) {
+				this.confirmStatusList.splice(index, 1);
+				row.confirmStatus = "0"
+			} else {
+				this.confirmStatusList.push(row.id);
+				row.confirmStatus = "1"
+			}
+		},
+		async changeStatusApi() {
+			if (this.$refs.invoiceReimbursementUpLoadComponent.getDataList().length == 0) {
+				return
+			}
+			let invoiceStatusIds = this.$refs.invoiceReimbursementUpLoadComponent.getDataList().map(item => {
+				return item.id
+			}).join(",")
+			await this.invoiceConfirmStatusService.save({
+				invoiceId: invoiceStatusIds,
+				status: "1",
+				reimbursementId: this.inputForm.id
+			})
+		}
 	}
 }
 </script>

文件差異過大導致無法顯示
+ 1980 - 1906
src/views/reimbursement/info/ReimbursementForm.vue


+ 49 - 1
src/views/zs/reimbursement/info/ReimbursementForm.vue

@@ -782,7 +782,8 @@
     </el-form>
     <!-- 附件 -->
     <InvoiceReimbursementUpLoadComponent ref="invoiceReimbursementUpLoadComponent"
-      v-show="'1' === this.inputForm.reimbursementType"></InvoiceReimbursementUpLoadComponent>
+      @changeConfirmList="changeConfirmList" v-show="'1' === this.inputForm.reimbursementType">
+    </InvoiceReimbursementUpLoadComponent>
     <UpLoadComponent ref="uploadComponent"></UpLoadComponent>
     <WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
     <ReportNoChooseRadio ref="reportNoChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2">
@@ -835,6 +836,8 @@ export default {
   },
   data() {
     return {
+      currentNodeName: "",
+      confirmStatusList: [],
       validRules: {
         userName: [
           { required: true, message: '报销人不能为空' }
@@ -1111,6 +1114,23 @@ export default {
           if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
             // this.startPur(this.inputForm.purchaseId)
           }
+          //  获取当前审核节点
+          this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(name => {
+            this.currentNodeName = name
+            if (name == "综合管理部主任审批" || name == "财务审批") {
+              this.$refs.invoiceReimbursementUpLoadComponent.isConfirm = true
+            }
+          })
+          // 获取文件确认状态
+          this.reimbursementService.getListByUser(this.inputForm.id).then(data => {
+            const statusMap = new Map(data.map(item => [item.invoiceId, item.status]));
+            this.inputForm.invoiceReimbursementFiles.forEach(item => {
+              const status = statusMap.get(item.id);
+              if (status !== undefined) {
+                item.confirmStatus = status;
+              }
+            });
+          })
           this.loading = false
         })
         if (method !== 'edit' && method !== 'view') {
@@ -1154,6 +1174,7 @@ export default {
           this.inputForm.files = this.$refs.uploadComponent.getDataList()
           this.reimbursementService.save(this.inputForm).then((data) => {
             this.close()
+            console.log("22222222222222222");
             this.$message.success(data)
             this.$emit('refreshDataList')
             this.loading = false
@@ -1667,6 +1688,9 @@ export default {
             }
             this.reimbursementService.save(this.inputForm).then((data) => {
               callback(data.businessTable, data.businessId, this.inputForm)
+              if (this.currentNodeName == "综合管理部主任审批" || this.currentNodeName == "财务审批") {
+                this.changeStatusApi()
+              }
               this.loading = false
             }).catch(() => {
               this.loading = false
@@ -2463,6 +2487,30 @@ export default {
       ]
       return footerData
     },
+    changeConfirmList(row) {
+      // 如果 confirmStatusList 中存在这个 row.id,则移除
+      const index = this.confirmStatusList.findIndex(item => item === row.id);
+      if (index !== -1) {
+        this.confirmStatusList.splice(index, 1);
+        row.confirmStatus = "0"
+      } else {
+        this.confirmStatusList.push(row.id);
+        row.confirmStatus = "1"
+      }
+    },
+    async changeStatusApi() {
+      if (this.$refs.invoiceReimbursementUpLoadComponent.getDataList().length == 0) {
+        return
+      }
+      let invoiceStatusIds = this.$refs.invoiceReimbursementUpLoadComponent.getDataList().map(item => {
+        return item.id
+      }).join(",")
+      await this.reimbursementService.saveConfirmStatus({
+        invoiceId: invoiceStatusIds,
+        status: "1",
+        reimbursementId: this.inputForm.id
+      })
+    }
   }
 }
 </script>