|
@@ -23,14 +23,17 @@
|
|
|
<div class="record-time">
|
|
|
<el-input v-model="RecheckForm.time[index]" disabled></el-input>
|
|
|
</div>
|
|
|
- <!-- 审核人/复核通过 -->
|
|
|
+ <!-- 审核人 -->
|
|
|
<div class="record-user">
|
|
|
<el-input v-model="RecheckForm.userName[index]" disabled></el-input>
|
|
|
- <el-button type="primary" @click="confirmRecheck(index)">复核通过</el-button>
|
|
|
</div>
|
|
|
<!-- 复核内容 -->
|
|
|
<div class="record-content">
|
|
|
- <el-input v-model="RecheckForm.text[index]" ></el-input>
|
|
|
+ <el-input v-model="RecheckForm.text[index]"></el-input>
|
|
|
+ </div>
|
|
|
+ <!-- 复核通过按钮 -->
|
|
|
+ <div class="record-action">
|
|
|
+ <el-button type="primary" @click="confirmRecheck(index)">复核通过</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -382,6 +385,7 @@ export default {
|
|
|
time: [], // 复核时间
|
|
|
userName: [], // 复核人
|
|
|
isFinal: [], // 标记哪条数据是最终复核通过的
|
|
|
+ code: [], // 记录类型(A01: 审核记录, A02: 复核记录)
|
|
|
},
|
|
|
// 复核按钮索引
|
|
|
RecheckIndex: 0,
|
|
@@ -652,8 +656,18 @@ export default {
|
|
|
this.reviewedItems += 1;
|
|
|
this.reviewProgress = ((this.reviewedItems / this.totalItems) * 100).toFixed(2);
|
|
|
|
|
|
- // 如果条目状态不是“已审核”, 则更新 backup1
|
|
|
- if (res.data.status !== '已审核') {
|
|
|
+ // // 如果条目状态不是“已审核”, 则更新 backup1
|
|
|
+ // if (res.data.status !== '已审核') {
|
|
|
+ // console.log("更新前的 backup1:", this.BookForm.backup1);
|
|
|
+ // this.BookForm.backup1 += 1;
|
|
|
+ // await updateBook(this.BookForm);
|
|
|
+ // console.log("更新后的 backup1:", this.BookForm.backup1);
|
|
|
+ // }
|
|
|
+
|
|
|
+ // 只有当条目状态不是“已审核”时,才增加 backup1
|
|
|
+ const itemResponse = await getItem(itemGuid);
|
|
|
+ console.log("条目状态:", itemResponse.data.status);
|
|
|
+ if (itemResponse.data.status !== '已审核') {
|
|
|
console.log("更新前的 backup1:", this.BookForm.backup1);
|
|
|
this.BookForm.backup1 += 1;
|
|
|
await updateBook(this.BookForm);
|
|
@@ -784,22 +798,23 @@ export default {
|
|
|
// 获取条目截图
|
|
|
this.RecheckRecordForm.imgCode = itemResponse.data.itemImgCode;
|
|
|
|
|
|
- // // 获取时间、复核人、内容
|
|
|
- // this.RecheckRecordForm.text = byItemResponse.data.map((item) => item.target2);
|
|
|
- // this.RecheckRecordForm.time = byItemResponse.data.map((item) => item.createAt);
|
|
|
- // this.RecheckRecordForm.userName = byItemResponse.data.map((item) => item.userGuid);
|
|
|
- //
|
|
|
- //
|
|
|
- // // 标记最终通过的记录
|
|
|
- // this.RecheckRecordForm.isFinal = byItemResponse.data.map((item) => item.isFinal || false);
|
|
|
-
|
|
|
- // 获取所有记录
|
|
|
+ // 获取时间、复核人、内容
|
|
|
this.RecheckRecordForm.text = byItemResponse.data.map((item) => item.target2);
|
|
|
this.RecheckRecordForm.time = byItemResponse.data.map((item) => item.createAt);
|
|
|
this.RecheckRecordForm.userName = byItemResponse.data.map((item) => item.userGuid);
|
|
|
- this.RecheckRecordForm.isFinal = byItemResponse.data.map((item) => item.isFinal || false);
|
|
|
this.RecheckRecordForm.code = byItemResponse.data.map((item) => item.code); // 记录类型
|
|
|
|
|
|
+
|
|
|
+ // 标记最终通过的记录
|
|
|
+ this.RecheckRecordForm.isFinal = byItemResponse.data.map((item) => item.isFinal || false);
|
|
|
+
|
|
|
+ // // 获取所有记录
|
|
|
+ // this.RecheckRecordForm.text = byItemResponse.data.map((item) => item.target2);
|
|
|
+ // this.RecheckRecordForm.time = byItemResponse.data.map((item) => item.createAt);
|
|
|
+ // this.RecheckRecordForm.userName = byItemResponse.data.map((item) => item.userGuid);
|
|
|
+ // this.RecheckRecordForm.isFinal = byItemResponse.data.map((item) => item.isFinal || false);
|
|
|
+ // this.RecheckRecordForm.code = byItemResponse.data.map((item) => item.code); // 记录类型
|
|
|
+
|
|
|
console.log("byItemResponse.data:", byItemResponse.data);
|
|
|
console.log("byItemResponse.data[0].target2:", byItemResponse.data[0]?.target2);
|
|
|
console.log("RecheckRecordForm.text:", this.RecheckRecordForm.text);
|
|
@@ -1009,15 +1024,23 @@ export default {
|
|
|
this.itemForm.status = "已复核";
|
|
|
await updateItem(this.itemForm);
|
|
|
|
|
|
- // 标记最终复核通过的记录
|
|
|
+ // // 标记最终复核通过的记录
|
|
|
+ // // const finalReviewIndex = this.RecheckRecordForm.text.findIndex(
|
|
|
+ // // (text, index) => this.RecheckRecordForm.code[index] === "A02" && text === this.RecheckForm.text[this.RecheckIndex]
|
|
|
+ // // );
|
|
|
// const finalReviewIndex = this.RecheckRecordForm.text.findIndex(
|
|
|
- // (text, index) => this.RecheckRecordForm.code[index] === "A02" && text === this.RecheckForm.text[this.RecheckIndex]
|
|
|
+ // (text, index) =>
|
|
|
+ // this.RecheckRecordForm.code[index] === "A02" &&
|
|
|
+ // text.includes(this.RecheckForm.text[this.RecheckIndex])
|
|
|
// );
|
|
|
+
|
|
|
+ // 标记最终复核通过的记录
|
|
|
const finalReviewIndex = this.RecheckRecordForm.text.findIndex(
|
|
|
- (text, index) =>
|
|
|
- this.RecheckRecordForm.code[index] === "A02" &&
|
|
|
- text.includes(this.RecheckForm.text[this.RecheckIndex])
|
|
|
+ (text, index) => this.RecheckRecordForm.code[index] === "A02" && text === this.RecheckForm.text[this.RecheckIndex]
|
|
|
);
|
|
|
+ if (finalReviewIndex !== -1) {
|
|
|
+ this.$set(this.RecheckRecordForm.isFinal, finalReviewIndex, true);
|
|
|
+ }
|
|
|
|
|
|
console.log("finalReviewIndex:", finalReviewIndex);
|
|
|
|
|
@@ -1320,13 +1343,17 @@ export default {
|
|
|
.record-user {
|
|
|
flex: 1;
|
|
|
margin-right: 10px;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
}
|
|
|
|
|
|
.record-content {
|
|
|
flex: 2;
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+
|
|
|
+.record-action {
|
|
|
+ flex: 1;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
}
|
|
|
|
|
|
.info-container {
|