审稿人证书生成

This commit is contained in:
2026-07-10 09:12:09 +08:00
parent 262e634f85
commit 3448ffe961
29 changed files with 7825 additions and 492 deletions

View File

@@ -115,6 +115,64 @@
</el-table-column>
</el-table>
</div>
<div
v-if="priceApplyHistory.length > 0"
class="price-apply-history"
v-loading="priceApplyHistoryLoading"
>
<h5 class="price-apply-history__title">{{ $t('journalFeeApproval.historyTitle') }}</h5>
<div class="price-apply-history__list">
<div
v-for="(item, index) in priceApplyHistory"
:key="index"
class="price-apply-history__item"
>
<div class="price-apply-history__track">
<i
class="price-apply-history__dot"
:class="'is-' + applyTimelineType(item.statusText)"
></i>
<i
v-if="index < priceApplyHistory.length - 1"
class="price-apply-history__tail"
></i>
</div>
<div class="price-apply-history__row">
<el-tag size="mini" :type="applyTagType(item.statusText)" class="price-apply-history__tag">
{{ item.statusText }}
</el-tag>
<span v-if="item.applyTime" class="price-apply-history__time">
{{ formatApplyDateTime(item.applyTime) }}
</span>
<span class="price-apply-history__text">
{{ $t('pendingPayment.total') }}: {{ formatApplyFee(item.originalFee) }} USD
</span>
<span class="price-apply-history__sep">|</span>
<span class="price-apply-history__text">
{{ $t('pendingPayment.discountprice') }}: {{ formatApplyFee(item.applyFee) }} USD
</span>
<template v-if="item.remark">
<span class="price-apply-history__sep">|</span>
<span class="price-apply-history__text">
{{ $t('pendingPayment.youhuiremark') }}: {{ item.remark }}
</span>
</template>
<template v-if="item.rejectRemark">
<span class="price-apply-history__sep">|</span>
<span class="price-apply-history__text">
{{ $t('journalFeeApproval.rejectRemark') }}: {{ item.rejectRemark }}
</span>
</template>
<template v-if="item.operator && item.operator !== '-'">
<span class="price-apply-history__sep">|</span>
<span class="price-apply-history__text">
{{ $t('journalFeeApproval.operator') }}: {{ item.operator }}
</span>
</template>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -256,7 +314,7 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="finalFeeVisible = false">Cancel</el-button>
<el-button type="primary" @click="saveFinalFee">Save</el-button>
<el-button type="primary" @click="saveFinalFee">{{ $t('pendingPayment.applyPrice') }}</el-button>
</span>
</el-dialog>
</div>
@@ -281,6 +339,8 @@ export default {
tableData: [],
talkMsgs: [],
finalFeeVisible: false,
priceApplyHistoryLoading: false,
priceApplyHistory: [],
FeeVisible: false,
communVisible: false,
msgform: {
@@ -581,6 +641,7 @@ export default {
created() {
this.opMedical = this.$commonJS.opMedicalList();
this.getPreacceptPayment();
this.fetchArticlePriceApplyHistory();
this.getHight();
window.addEventListener('resize', this.getHight);
// this.getData();
@@ -591,6 +652,7 @@ export default {
activated() {
this.opMedical = this.$commonJS.opMedicalList();
this.getPreacceptPayment();
this.fetchArticlePriceApplyHistory();
this.getHight();
window.addEventListener('resize', this.getHight);
// this.getData();
@@ -614,11 +676,10 @@ export default {
background: 'rgba(0, 0, 0, 0.7)'
});
this.$api
.post('api/Order/changePrice', {
.post('api/Order/applyPrice', {
article_id: this.$route.query.id,
editor_id: localStorage.getItem('U_id'),
fee: Number(this.finalFeeData.fee).toFixed(2),
fee_remark: this.finalFeeData.fee_remark
remark: this.finalFeeData.fee_remark
})
.then((res) => {
load.close();
@@ -626,6 +687,7 @@ export default {
if (res.code == 0) {
this.finalFeeVisible = false;
this.getPreacceptPayment();
this.fetchArticlePriceApplyHistory();
} else {
this.$message.error(res.msg);
}
@@ -646,6 +708,106 @@ export default {
fee_remark: this.article_pay_info.fee_remark
};
},
fetchArticlePriceApplyHistory() {
const articleId = this.$route.query.id;
if (!articleId) return;
this.priceApplyHistoryLoading = true;
this.$api
.post('api/Order/getArticlePriceApplyList', {
article_id: articleId
})
.then((res) => {
this.priceApplyHistoryLoading = false;
if (res.code == 0) {
this.priceApplyHistory = this.normalizePriceApplyHistory(res.data);
} else {
this.priceApplyHistory = [];
}
})
.catch(() => {
this.priceApplyHistoryLoading = false;
this.priceApplyHistory = [];
});
},
extractPriceApplyList(data) {
if (Array.isArray(data)) return data;
if (!data || typeof data !== 'object') return [];
return data.list || data.applies || data.applys || data.items || data.logs || data.data || [];
},
pickApplyValue() {
for (let i = 0; i < arguments.length; i++) {
const value = arguments[i];
if (value !== undefined && value !== null) {
return value;
}
}
return '';
},
normalizePriceApplyHistory(data) {
const rawList = this.extractPriceApplyList(data);
return rawList
.map((row) => {
if (!row || typeof row !== 'object') return null;
const status = row.status !== undefined ? row.status : row.state;
return {
originalFee: this.pickApplyValue(row.old_fee, row.original_fee, row.origin_fee, row.original_price, row.total, ''),
applyFee: this.pickApplyValue(row.fee, row.apply_fee, row.new_fee, ''),
remark: this.pickApplyValue(row.remark, row.fee_remark, row.apply_remark, ''),
rejectRemark: this.pickApplyValue(row.reject_remark, row.reject_reason, row.audit_remark, ''),
operator: row.operator || row.account || row.editor_name || row.apply_user || row.username || row.realname || '-',
applyTime: row.ctime || row.apply_time || row.create_time || row.add_time || row.update_time || row.time || 0,
statusText: this.getApplyStatusText(status, row)
};
})
.filter(Boolean)
.sort((a, b) => Number(b.applyTime) - Number(a.applyTime));
},
getApplyStatusText(status, row) {
const raw = status !== undefined && status !== null && status !== '' ? status : row.action || row.type || '';
const text = String(raw).toLowerCase();
if (text.includes('reject') || text === '2' || text === '拒绝' || text === '驳回') {
return this.$t('journalFeeApproval.statusReject');
}
if (text.includes('accept') || text.includes('agree') || text === '1' || text === '同意' || text === '通过') {
return this.$t('journalFeeApproval.statusAccept');
}
if (text.includes('pending') || text.includes('wait') || text === '0' || text === '待审' || text === '待审批') {
return this.$t('journalFeeApproval.statusPending');
}
if (text.includes('apply') || text === '申请' || text === '提交') {
return this.$t('journalFeeApproval.statusApply');
}
return raw ? String(raw) : this.$t('journalFeeApproval.statusOther');
},
applyTimelineType(statusText) {
if (statusText === this.$t('journalFeeApproval.statusAccept')) return 'success';
if (statusText === this.$t('journalFeeApproval.statusReject')) return 'danger';
if (statusText === this.$t('journalFeeApproval.statusPending')) return 'warning';
return 'primary';
},
applyTagType(statusText) {
if (statusText === this.$t('journalFeeApproval.statusAccept')) return 'success';
if (statusText === this.$t('journalFeeApproval.statusReject')) return 'danger';
if (statusText === this.$t('journalFeeApproval.statusPending')) return 'warning';
return '';
},
formatApplyFee(value) {
if (value === '' || value === null || value === undefined) return '-';
const num = Number(value);
if (isNaN(num)) return value;
return num.toFixed(2);
},
formatApplyDateTime(timestamp) {
if (!timestamp) return '-';
if (typeof timestamp === 'string' && timestamp.indexOf('-') > 0) {
return timestamp;
}
const ts = String(timestamp).length === 10 ? Number(timestamp) * 1000 : Number(timestamp);
const date = new Date(ts);
if (isNaN(date.getTime())) return '-';
const pad = (n) => (n < 10 ? '0' + n : '' + n);
return date.getFullYear() + '-' + pad(date.getMonth() + 1) + '-' + pad(date.getDate()) + ' ' + pad(date.getHours()) + ':' + pad(date.getMinutes()) + ':' + pad(date.getSeconds());
},
formatAmount(amount) {
return amount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
@@ -2112,6 +2274,99 @@ export default {
.payment_info .price {
font-weight: 700;
}
.price-apply-history {
margin-top: 18px;
padding-top: 16px;
border-top: 1px solid #ebeef5;
}
.price-apply-history__title {
margin: 0 0 12px;
font-size: 15px;
color: #303133;
font-weight: 600;
}
.price-apply-history__list {
padding: 0;
}
.price-apply-history__item {
display: flex;
align-items: flex-start;
}
.price-apply-history__item + .price-apply-history__item {
margin-top: 10px;
}
.price-apply-history__track {
position: relative;
width: 14px;
flex-shrink: 0;
margin-right: 12px;
align-self: stretch;
}
.price-apply-history__dot {
display: block;
width: 10px;
height: 10px;
border-radius: 50%;
margin: 4px auto 0;
background: #409eff;
}
.price-apply-history__dot.is-success {
background: #67c23a;
}
.price-apply-history__dot.is-danger {
background: #f56c6c;
}
.price-apply-history__dot.is-warning {
background: #e6a23c;
}
.price-apply-history__dot.is-primary {
background: #409eff;
}
.price-apply-history__dot.is-info {
background: #909399;
}
.price-apply-history__tail {
position: absolute;
left: 50%;
top: 16px;
bottom: -10px;
width: 2px;
margin-left: -1px;
background: #e4e7ed;
}
.price-apply-history__row {
flex: 1;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 8px;
min-width: 0;
padding-top: 1px;
line-height: 1.6;
}
.price-apply-history__tag {
flex-shrink: 0;
}
.price-apply-history__time {
flex-shrink: 0;
color: #909399;
font-size: 12px;
white-space: nowrap;
}
.price-apply-history__text {
color: #606266;
font-size: 13px;
}
.price-apply-history__sep {
color: #dcdfe6;
font-size: 12px;
line-height: 1;
}
.price-apply-history__empty {
margin: 0;
color: #909399;
font-size: 13px;
}
.payment_info .remark {
/* color: #888; */
}