Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/master'

徐滕 2 settimane fa
parent
commit
93b5499429

+ 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,
+			},
+		});
+	}
 }

File diff suppressed because it is too large
+ 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;

+ 498 - 0
src/views/common/HandoverUpLoadComponent.vue

@@ -0,0 +1,498 @@
+<!--文件上传组件-->
+<template>
+  <div :key="uploadKey">
+    <el-divider v-if="showDivider" content-position="left"><i class="el-icon-document"></i> {{ dividerName
+    }}</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} 个文件`)
+      }" :show-file-list="false" :on-change="changes" :on-progress="uploadVideoProcess" :file-list="fileList">
+      <template v-if="auth === 'view' && uploadFlag === false" #tip>
+        <el-button :loading="loading" type="primary" size="default" :disabled="true"> 点击上传 </el-button>
+      </template>
+      <template v-else #trigger>
+        <el-button :loading="loading" type="primary" size="default"> 点击上传 </el-button>
+      </template>
+      <AttachmentLib v-if="auth !== 'view'" :directory="directory" @onDownToOss="handleOnDownToOss">
+      </AttachmentLib>
+
+    </el-upload>
+
+    <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" :data="dataListNew">
+        <el-table-column type="seq" width="40"></el-table-column>
+        <el-table-column label="文件名称" prop="attachmentName" align="center">
+          <template #default="scope">
+            <div v-if="ifName(scope.row) === true">
+              <el-image style="width: 30px; height: 30px;padding-top: 4px;" :src="scope.row.lsUrl"
+                :preview-src-list="[scope.row.lsUrl]" :preview-teleported="true"></el-image>
+            </div>
+            <div v-else>
+              <el-link type="primary" :underline="false" @click="showFile(scope.row)">{{ scope.row.attachmentName
+              }}</el-link>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" prop="createBy.name" align="center"></el-table-column>
+        <el-table-column label="创建时间" prop="createTime" align="center"></el-table-column>
+        <el-table-column label="文件大小" prop="size" align="center">
+          <template #default="scope">
+            {{ getSize(scope.row.size) }}
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" width="200px" fixed="right" align="center">
+          <template #default="scope">
+            <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="deleteById(scope.row, scope.$index, fileList)"
+              :disabled="auth === 'view' && delFlag === false && createBy !== scope.row.createBy.name">删除</el-button>
+
+            <!--            <el-button v-if="createBy===scope.row.createBy.name" type="text"  icon="el-icon-delete" size="small"  @click="deleteById(scope.row, scope.$index)" :disabled="auth==='view'&&delFlag === false">删除2</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    <!--    <el-image-viewer v-if="showViewer" :on-close="closeViewer" :url-list="[url]" :zIndex=9999></el-image-viewer>-->
+  </div>
+</template>
+
+<script>
+// eslint-disable-next-line no-unused-vars
+import OSSSerivce, {
+  httpRequest,
+  // eslint-disable-next-line no-unused-vars
+  handleRemove,
+  fileName,
+  // eslint-disable-next-line no-unused-vars
+  beforeAvatarUpload,
+  // eslint-disable-next-line no-unused-vars
+  openWindowOnUrl,
+  // eslint-disable-next-line no-unused-vars
+  toHref
+} from '@/api/sys/OSSService'
+// import ElImageViewer from 'element-ui/packages/image/src/image-viewer'
+import moment from 'moment'
+import AttachmentLib from './AttachmentLib.vue'
+export default {
+  data() {
+    return {
+      uploadKey: '',
+      progressFlag: false,
+      loadProgress: 0,
+      fileList: [],
+      dataList: [],
+      dataListNew: [],
+      url: '',
+      showViewer: false,
+      ossService: null,
+      auth: '',
+      directory: 'public',
+      maxValue: 300,
+      tableKey: '',
+      fileLoading: true,
+      dividerName: '',
+      uploadFlag: false,
+      delFlag: false,
+      createBy: '',
+      showDivider: true,
+      loading: false,
+      dataListLength: ''
+    }
+  },
+  watch: {
+  },
+  created() {
+    this.ossService = new OSSSerivce()
+  },
+  components: {
+    AttachmentLib
+    // ElImageViewer
+  },
+  mounted() {
+    window.onPreview = this.onPreview
+  },
+  methods: {
+    /**
+     * dividerName: 组件中divider的名称赋值
+     * showDivider: ‘附件‘Divider是否展示
+     *     注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     **/
+    setDividerName(dividerName, showDivider) {
+      if (this.commonJS.isNotEmpty(dividerName)) {
+        this.dividerName = dividerName
+      }
+      if (this.commonJS.isNotEmpty(showDivider)) {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      } else {
+        this.showDivider = true
+      }
+    },
+    /**
+     * 文件上传组件初始化
+     * @param auth
+     *    auth的值为"view"时,不可上传/编辑文件
+     *    auth为其他值时,可上传/编辑文件
+     * @param fileList  要显示到文件上传列表中的文件。
+     *    注:文件必须要有url属性并且文件的url属性值必须是在oss中的路径值
+     *    例:'/attachment-file/xxx/xxx/2022/9/08/xxx.jpg'
+     * @param directory  要存放到oss的哪个文件夹下。
+     *    注:值为空时,默认存放到"public"文件夹
+     * @param maxValue  上传文件允许的最大值,单位:MB
+     *    注:值为空时,默认值为300MB
+     * @param dividerName  组件中divider的名称
+     *    注:值为空时,默认值为‘附件’
+     * @param uploadFlag  ‘上传文件’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&uploadFlag=false时 ‘上传文件’按钮禁用
+     * @param delFlag  ‘删除’按钮是否禁用
+     *    注:值为空时,默认值为false
+     *    auth=view&&delFlag=false时 ‘删除’按钮禁用
+     * @param showDivider  ‘附件‘Divider是否展示
+     *    注:值为空时,默认值为true
+     *    showDivider=false时 ‘附件‘Divider隐藏
+     */
+    async newUpload(auth, fileList, directory, maxValue, dividerName, uploadFlag, delFlag, showDivider) {
+      console.log(fileList);
+
+      await this.fileLoadingFalse()
+      if (this.commonJS.isEmpty(fileList)) {
+        this.fileLoading = true
+      } else {
+        this.dataListLength = fileList.length
+      }
+      if (this.commonJS.isEmpty(dividerName)) {
+        this.dividerName = '附件'
+      } else {
+        this.dividerName = dividerName
+      }
+      if (directory !== undefined && directory !== null && directory !== '' && directory !== {}) {
+        this.directory = directory
+      } else {
+        this.directory = 'public'
+      }
+      if (maxValue !== undefined && maxValue !== null && maxValue !== '' && maxValue !== 0) {
+        this.maxValue = maxValue
+      } else {
+        this.maxValue = 300
+      }
+      this.auth = auth
+      if (this.commonJS.isEmpty(uploadFlag)) {
+        this.uploadFlag = false
+      } else {
+        if (uploadFlag !== true && uploadFlag !== false) {
+          this.uploadFlag = false
+        } else {
+          this.uploadFlag = uploadFlag
+        }
+      }
+      if (this.commonJS.isEmpty(delFlag)) {
+        this.delFlag = false
+      } else {
+        if (delFlag !== true && delFlag !== false) {
+          this.delFlag = false
+          this.createBy = delFlag
+        } else {
+          this.delFlag = delFlag
+        }
+      }
+
+      for await (let item of fileList) {
+        if (item.url && item.url !== null && item.url !== undefined && item.url !== "") {
+          await this.ossService.getFileSizeByUrl(item.url).then((data) => {
+            item.lsUrl = data.url
+            item.size = data.size
+            this.dataList.push(item)
+            this.dataListNew.push(item)
+            this.fileList.push(item)
+            if (this.dataListNew.length === fileList.length) {
+              this.fileLoading = true
+            }
+          })
+        } else {
+          this.dataList.push(item)
+          this.dataListNew.push(item)
+          this.fileList.push(item)
+          this.fileLoading = true
+        }
+      }
+      // this.dataList = JSON.parse(JSON.stringify(fileList))
+      // this.dataListNew = JSON.parse(JSON.stringify(fileList))
+      if (this.commonJS.isEmpty(showDivider)) {
+        this.showDivider = true
+      } else {
+        if (showDivider === false) {
+          this.showDivider = false
+        } else {
+          this.showDivider = true
+        }
+      }
+    },
+    addMyAttachment(row) {
+      this.$confirm(`确定收藏到个人资料库?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        let inputForm = {
+          classification: "",
+          fileDescription: "",
+          workAttachments: []
+        }
+        inputForm.workAttachments.push(row)
+        this.ossService.downloadAndUploadToMyCollect({
+          url: row.lsUrl,
+          fileName: row.name,
+          dir: this.directory,
+          workCollectAccessoryDTO: {
+            ...inputForm
+          }
+        }).then(res => {
+          this.$message.success(`操作成功`);
+        })
+      });
+
+    },
+    async httpRequest(file) {
+      await httpRequest(file, fileName(file), this.directory, this.maxValue)
+    },
+    handleOnDownToOss(row, url) {
+      let flag = false
+      this.fileList.forEach(item => {
+        if (row.fileName == item.name) {
+          flag = true
+        }
+      })
+      console.log(this.fileList);
+
+      if (flag) {
+        this.$message.error(`${row.fileName}已存在,无法重复上传`);
+        return
+      }
+      this.ossService.getFileSizeByUrl(url).then((data) => {
+        let file = {
+          lsUrl: data.url,
+          size: data.size,
+          createBy: {
+            id: this.$store.state.user.id,
+            name: this.$store.state.user.name,
+          },
+          createTime: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
+          name: row.fileName,
+          percentage: 100,
+          status: "success",
+          url: url
+        }
+        this.dataList.push(file)
+        this.dataListNew.push(file)
+        this.fileList.push(file)
+      })
+    },
+    uploadVideoProcess(event, file, fileList) {
+      this.progressFlag = true // 显示进度条
+      this.loadProgress = parseInt(event.percent) // 动态获取文件上传进度
+      if (this.loadProgress >= 100) {
+        this.loadProgress = 100
+        setTimeout(() => {
+          this.progressFlag = false
+        }, 1000) // 一秒后关闭进度条
+      }
+    },
+    getSize(value) {
+      if (this.commonJS.isEmpty(value)) {
+        return '0 B'
+      } else {
+        let val = parseInt(value)
+        if (this.commonJS.isEmpty(val)) {
+          return '0 B'
+        }
+        if (isNaN(val)) {
+          return '0 B'
+        }
+        if (val === 0) {
+          return '0 B'
+        }
+        let k = 1024
+        let sizes = ['B', 'KB', 'MB', 'GB', 'PB', 'TB', 'EB', 'ZB', 'YB']
+        let i = Math.floor(Math.log(val) / Math.log(k))
+        let result = val / Math.pow(k, i);
+        let kb = parseFloat(result.toPrecision(3));
+        return kb + '' + sizes[i]
+      }
+    },
+    async changes(file, fileList) {
+      // if (file.status !== 'ready') {
+      //   return
+      // }
+
+
+      if (file.status !== 'ready') {
+        let fileListNamesList = []
+        this.fileList.forEach(fileItem => {
+          fileListNamesList.push(fileItem.name)
+        })
+
+        if (fileListNamesList.indexOf(file.name) != -1) {
+
+          this.$message.error(`${file.name}已存在,无法重复上传`)
+          return
+        } else {
+
+          if (!beforeAvatarUpload(file, fileList, this.maxValue)) {
+            this.$message.error('文件大小不能超过 ' + this.maxValue + ' MB!')
+            return
+          }
+          // this.dataListNew = []
+          // this.dataList.forEach((item) => {
+          //   this.dataListNew.push(item)
+          // })
+          var fileListNames = []
+          for (let fileItem of this.fileList) {
+            fileListNames.push(fileItem.name)
+          }
+          // for (let item of fileList) {
+
+
+          let item1 = JSON.parse(JSON.stringify(file))
+          // if (fileListNames.length === 0 || fileListNames.indexOf(item1.name) === -1) {
+          this.fileList.push(item1)
+          // }
+          item1.createTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+          item1.createBy = {
+            id: '',
+            name: ''
+          }
+          item1.attachmentName = item1.name
+          item1.createBy.id = this.$store.state.user.id
+          item1.createBy.name = this.$store.state.user.name
+          this.dataListNew.push(item1)
+          this.dataList.push(item1)
+          // }
+          for (let item of this.dataListNew) {
+            if (item.raw !== undefined && item.raw !== null && item.raw !== {}) {
+              item.url = item.raw.url
+              if (item.raw.url !== undefined && item.raw.url !== null && item.raw.url !== {}) {
+                this.ossService.getTemporaryUrl(item.raw.url).then((data) => {
+                  item.lsUrl = data
+                })
+              }
+            }
+
+          }
+        }
+      }
+
+    },
+    showFile(row) {
+      console.log('row', row)
+      openWindowOnUrl(row)
+    },
+    onPreview(url) {
+      this.url = url
+      this.showViewer = true
+    },
+    // 关闭查看器
+    closeViewer() {
+      this.url = ''
+      this.showViewer = false
+    },
+    toHref(row) {
+      toHref(row)
+    },
+    async deleteById(row, index, fileList) {
+      // this.$refs.upload.handleRemove(this.dataListNew[index])
+      await this.dataListNew.splice(index, 1)
+      await this.dataList.splice(index, 1)
+      if (this.commonJS.isNotEmpty(row.id)) {
+        this.ossService.deleteMsgById(row.id)
+      }
+      var newFileList = [];
+      for (var i = 0; i < fileList.length; i++) {
+        if (fileList[i].name !== row.name) {
+          newFileList.push(fileList[i])
+        }
+      }
+      this.fileList = newFileList;
+    },
+    /**
+     * 关闭dialog时使用  清除el-upload中上传的文件
+     */
+    clearUpload() {
+      this.$refs.upload.clearFiles()
+      this.dataList = []
+      this.dataListNew = []
+      this.fileList = []
+      this.createBy = ''
+    },
+    /**
+     * 获取当前文件列表中的文件数据
+     */
+    getDataList() {
+
+      return this.dataListNew
+    },
+    /**
+     * 判断进度条是否结束,附件是否加载完成
+     * @returns {boolean}
+     */
+    checkProgress() {
+      if (this.progressFlag === true) {
+        this.$message.warning('请等待附件上传完成再进行操作')
+        return true
+      }
+      if (this.fileLoading === false) {
+        this.$message.warning('请等待附件加载完成再进行操作')
+        if (this.dataListLength === this.dataListNew.length) {
+          this.fileLoading = true
+        }
+        return true
+      }
+
+      const invalidFile = this.dataListNew.find(file => !file.url); // 找到第一个 URL 为空的文件
+      if (invalidFile) {
+        this.$message.warning(`${invalidFile.name}的URL为空,请检查后重新上传`)
+        return true; // 只要有一个 url 为空,直接 return
+      }
+
+      return false
+    },
+    ifName(row) {
+      if (this.commonJS.isEmpty(row.name)) {
+        row.name = '---'
+        return false
+      }
+      let suffix = row.name.substring(row.name.lastIndexOf('.') + 1)
+      if (suffix === 'jpg' || suffix === 'png' || suffix === 'gif' || suffix === 'bmp' || suffix === 'jpeg') {
+        return true
+      } else {
+        return false
+      }
+    },
+    fileLoadingFalse() {
+      this.fileLoading = false
+    },
+    // 开启/关闭页面的加载中状态
+    changeLoading(loading) {
+      if (this.commonJS.isNotEmpty(loading)) {
+        this.loading = loading
+      } else {
+        this.loading = false
+      }
+    }
+  }
+}
+</script>
+<style>
+.el-divider__text {
+  font-size: 16px;
+  font-weight: bold;
+}
+</style>

+ 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} 个文件`)

File diff suppressed because it is too large
+ 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>

+ 31 - 28
src/views/human/depart/handover/HandoverAddForm.vue

@@ -240,7 +240,7 @@ import UserSelect2 from '@/components/userSelect'
 import projectReportService from '@/api/cw/reportManagement/ProjectReportService'
 import ProjectReportArchiveService from '@/api/cw/projectRecords/ProjectReportArchiveService'
 import ReportCancellApplyArchivedService from '@/api/cw/reportCancellApplyArchived/ReportCancellApplyArchivedService'
-import UpLoadComponent from '@/views/common/UpLoadComponent'
+import UpLoadComponent from '@/views/common/HandoverUpLoadComponent'
 import OSSSerivce from '@/api/sys/OSSService'
 import UserSelect3 from '@/views/utils/UserTreeSelectToResign'
 import ProjectRecordsForm from '@/views/cw/projectRecords/projectRecordsForm'
@@ -538,15 +538,15 @@ export default {
 						this.inputForm.department = this.$store.state.user.office.id
 					}
 					if (this.inputForm.workAttachments && this.inputForm.workAttachments.length > 0) {
-						this.dataList = this.inputForm.workAttachments.map(item => {
-							return {
-								...item,
-								name: item.attachmentName
-							}
-						})
+						// this.dataList = this.inputForm.workAttachments.map(item => {
+						// 	return {
+						// 		...item,
+						// 		name: item.attachmentName
+						// 	}
+						// })
+						this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachments, 'handover', 300, "交接资料附件上传")
 					}
 
-					this.$refs.uploadComponent.newUpload(method, this.dataList, 'handover', 300, "交接资料附件上传")
 
 					if (this.inputForm.type != 5) {
 						this.getNotCompProjectInfo()
@@ -615,16 +615,17 @@ export default {
 					if (this.commonJS.isEmpty(this.inputForm.files)) {
 						this.inputForm.files = []
 					}
-					this.$refs.uploadComponent.getDataList().forEach((item) => {
-						if (item.id === null || item.id === undefined || item.id === '') {
-							item.url = item.raw.url
-						}
-						item.attachmentFlag = 'workClient'
-						item.fileSize = item.size
-						item.attachmentName = item.name
-						item.createBy = null
-						this.inputForm.workAttachments.push(item)
-					})
+					this.inputForm.workAttachments = this.$refs.uploadComponent.getDataList()
+					// this.$refs.uploadComponent.getDataList().forEach((item) => {
+					// 	if (item.id === null || item.id === undefined || item.id === '') {
+					// 		item.url = item.raw.url
+					// 	}
+					// 	item.attachmentFlag = 'workClient'
+					// 	item.fileSize = item.size
+					// 	item.attachmentName = item.name
+					// 	item.createBy = null
+					// 	this.inputForm.workAttachments.push(item)
+					// })
 					this.inputForm.id = this.businessId
 					handoverService.save(this.inputForm).then((data) => {
 						this.close()
@@ -685,16 +686,18 @@ export default {
 					if (this.commonJS.isEmpty(this.inputForm.registrationId)) {
 						this.inputForm.registrationId = this.businessId
 					}
-					this.$refs.uploadComponent.getDataList().forEach((item) => {
-						if (item.id === null || item.id === undefined || item.id === '') {
-							item.url = item.raw.url
-						}
-						item.attachmentFlag = 'workClient'
-						item.fileSize = item.size
-						item.attachmentName = item.name
-						item.createBy = null
-						this.inputForm.workAttachments.push(item)
-					})
+					this.inputForm.workAttachments = this.$refs.uploadComponent.getDataList()
+
+					// this.$refs.uploadComponent.getDataList().forEach((item) => {
+					// 	if (item.id === null || item.id === undefined || item.id === '') {
+					// 		item.url = item.raw.url
+					// 	}
+					// 	item.attachmentFlag = 'workClient'
+					// 	item.fileSize = item.size
+					// 	item.attachmentName = item.name
+					// 	item.createBy = null
+					// 	this.inputForm.workAttachments.push(item)
+					// })
 
 					handoverService.save(this.inputForm).then((data) => {
 						this.inputForm.title = `${this.$store.state.user.name} 发起了 [离职交接]`

File diff suppressed because it is too large
+ 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>