6f2383a7e5
付款申请汇票筛选与提示去重、结算菜单拆分与金蝶同步弹框、应收应付详情高度、合同计费与半月结调整,以及导入运单批量删除校验。 Co-authored-by: Cursor <cursoragent@cursor.com>
119 lines
3.1 KiB
Vue
119 lines
3.1 KiB
Vue
<template>
|
||
<basic-container class="formal-settlement-form-page">
|
||
<div class="formal-settlement-form-page__title">{{ pageTitle }}</div>
|
||
<!-- 新增来源明细可直接调整:计费试算走独立接口,调整结果先暂存,保存正式结算单时再落库。 -->
|
||
<formal-settlement-editor
|
||
v-model="editorVisible"
|
||
page-mode
|
||
:record-id="recordId"
|
||
:readonly="readonly"
|
||
:initial-data="editorInitialData"
|
||
@success="markListNeedRefresh"
|
||
/>
|
||
</basic-container>
|
||
</template>
|
||
|
||
<script>
|
||
import FormalSettlementEditor from './components/formal-settlement-editor.vue';
|
||
import { readSettlementTransfer, removeSettlementTransfer } from '@/utils/settlement-transfer';
|
||
import { settlementBillLabel, settlementListPath } from '@/utils/settlement-menu';
|
||
|
||
const LIST_REFRESH_KEY = 'formal-settlement-list-refresh';
|
||
|
||
export default {
|
||
name: 'FormalSettlementForm',
|
||
components: { FormalSettlementEditor },
|
||
data() {
|
||
return {
|
||
editorVisible: true,
|
||
transferPayload: null,
|
||
};
|
||
},
|
||
computed: {
|
||
recordId() {
|
||
return this.$route.query.id || '';
|
||
},
|
||
readonly() {
|
||
return this.$route.query.mode === 'view';
|
||
},
|
||
settlementType() {
|
||
return this.$route.query.settlementType || this.transferPayload?.settlementType || 'payable';
|
||
},
|
||
billLabel() {
|
||
return settlementBillLabel(this.settlementType);
|
||
},
|
||
pageTitle() {
|
||
return this.readonly
|
||
? `查看${this.billLabel}`
|
||
: this.recordId
|
||
? `编辑${this.billLabel}`
|
||
: `新增${this.billLabel}`;
|
||
},
|
||
listPath() {
|
||
return this.$route.query.listPath || settlementListPath(this.settlementType);
|
||
},
|
||
editorInitialData() {
|
||
const settlementType = this.settlementType;
|
||
if (!this.transferPayload && !this.$route.query.settlementType) return null;
|
||
return {
|
||
...(this.transferPayload || {}),
|
||
...(settlementType ? { settlementType } : {}),
|
||
};
|
||
},
|
||
},
|
||
watch: {
|
||
editorVisible(value) {
|
||
if (!value) this.goBack();
|
||
},
|
||
},
|
||
created() {
|
||
this.transferPayload = readSettlementTransfer(this.$route.query.transferToken);
|
||
this.syncTagTitle();
|
||
},
|
||
methods: {
|
||
markListNeedRefresh() {
|
||
sessionStorage.setItem(LIST_REFRESH_KEY, '1');
|
||
},
|
||
goBack() {
|
||
removeSettlementTransfer(this.$route.query.transferToken);
|
||
this.$router.$avueRouter.closeTag();
|
||
this.$router.push(this.listPath);
|
||
},
|
||
syncTagTitle() {
|
||
this.$nextTick(() => {
|
||
this.$store.commit('SET_TAG', {
|
||
fullPath: this.$route.fullPath,
|
||
name: this.pageTitle,
|
||
});
|
||
this.$router.$avueRouter.setTitle(this.pageTitle);
|
||
});
|
||
},
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style lang="scss" scoped>
|
||
.formal-settlement-form-page {
|
||
&__title {
|
||
display: flex;
|
||
align-items: center;
|
||
min-height: 24px;
|
||
margin-bottom: 16px;
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
|
||
&::before {
|
||
width: 4px;
|
||
height: 20px;
|
||
margin-right: 8px;
|
||
background: #409eff;
|
||
content: '';
|
||
}
|
||
}
|
||
}
|
||
|
||
:deep(.formal-settlement-form-page.basic-container .basic-container__card > .el-card__body) {
|
||
padding: 0;
|
||
}
|
||
</style>
|