108 lines
2.4 KiB
Vue
108 lines
2.4 KiB
Vue
<template>
|
|
<basic-container class="transport-reconciliation-form-page">
|
|
<div class="transport-reconciliation-form-page__title">{{ pageTitle }}</div>
|
|
<transport-reconciliation-editor
|
|
v-model="editorVisible"
|
|
page-mode
|
|
:record-id="recordId"
|
|
:settlement-type="settlementType"
|
|
@success="handleSuccess"
|
|
/>
|
|
</basic-container>
|
|
</template>
|
|
|
|
<script>
|
|
import TransportReconciliationEditor from './components/transport-reconciliation-editor.vue';
|
|
|
|
export default {
|
|
name: 'TransportReconciliationForm',
|
|
components: { TransportReconciliationEditor },
|
|
data() {
|
|
return {
|
|
editorVisible: true,
|
|
savedRecordId: '',
|
|
};
|
|
},
|
|
computed: {
|
|
recordId() {
|
|
return this.$route.query.id || '';
|
|
},
|
|
settlementType() {
|
|
return this.$route.query.settlementType || 'payable';
|
|
},
|
|
pageTitle() {
|
|
return this.recordId || this.savedRecordId ? '编辑运输对账单' : '新增运输对账单';
|
|
},
|
|
},
|
|
watch: {
|
|
editorVisible(value) {
|
|
if (!value) this.goBack();
|
|
},
|
|
},
|
|
created() {
|
|
this.syncTagTitle();
|
|
},
|
|
methods: {
|
|
handleSuccess(recordId) {
|
|
this.savedRecordId = recordId || this.savedRecordId;
|
|
this.syncTagTitle();
|
|
},
|
|
goBack() {
|
|
this.$router.push('/settlement/transport-reconciliation');
|
|
},
|
|
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>
|
|
.transport-reconciliation-form-page {
|
|
min-height: 100%;
|
|
padding-bottom: 72px;
|
|
background: #f5f6fa;
|
|
|
|
&__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(.transport-reconciliation-form-page.basic-container .basic-container__card > .el-card__body) {
|
|
padding: 0;
|
|
}
|
|
|
|
:deep(.transport-reconciliation-form-page.basic-container .basic-container__card) {
|
|
border: 0;
|
|
background: transparent;
|
|
box-shadow: none;
|
|
}
|
|
|
|
:global(.avue--collapse) .reconciliation-editor__page-actions {
|
|
left: 60px;
|
|
}
|
|
|
|
:global(.avue-layout--horizontal) .reconciliation-editor__page-actions {
|
|
left: 0;
|
|
}
|
|
</style>
|