<template>
|
<app-page-tab v-bind="tabPageProps">
|
<template #header-button="scope">
|
<el-button
|
v-if="scope.active === 'input' && scope.selected.active === 'fee_book_general'"
|
size="small"
|
type="primary"
|
@click="onInputSetting()">
|
发起结算
|
</el-button>
|
<el-button
|
v-if="scope.active === 'input' && scope.selected.active === 'fee_book_general'"
|
size="small"
|
type="primary"
|
@click="onInputConfirm()">
|
确认下发
|
</el-button>
|
|
<el-button
|
v-if="scope.active === 'commercial' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="success"
|
@click="onCommercialAgree(scope.selected.selection)">
|
同意
|
</el-button>
|
<el-button
|
v-if="scope.active === 'commercial' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="danger"
|
@click="onCommercialReject(scope.selected.selection)">
|
拒绝
|
</el-button>
|
|
<el-button
|
v-if="scope.active === 'region' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="success"
|
@click="onRegionAgree(scope.selected.selection)">
|
同意
|
</el-button>
|
<el-button
|
v-if="scope.active === 'region' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="danger"
|
@click="onRegionReject(scope.selected.selection)">
|
拒绝
|
</el-button>
|
|
|
<el-button
|
v-if="scope.active === 'operator' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="success"
|
@click="onOperatorAgree(scope.selected.selection)">
|
同意
|
</el-button>
|
<el-button
|
v-if="scope.active === 'operator' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="danger"
|
@click="onOperatorReject(scope.selected.selection)">
|
拒绝
|
</el-button>
|
|
<el-button
|
v-if="scope.active === 'finance' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="success"
|
@click="onFinanceAgree(scope.selected.selection)">
|
同意
|
</el-button>
|
<el-button
|
v-if="scope.active === 'finance' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="danger"
|
@click="onFinanceReject(scope.selected.selection)">
|
拒绝
|
</el-button>
|
|
|
<el-button
|
v-if="scope.active === 'finish' && scope.selected.active === 'fee_book_general'"
|
:disabled="!scope.selected.selection.length"
|
size="small"
|
type="primary"
|
@click="onFinishAgree(scope.selected.selection)">
|
发放
|
</el-button>
|
|
<el-button
|
v-if="scope.active === 'grant'"
|
:disabled="!scope.selected.row"
|
size="small"
|
type="primary"
|
@click="onGrantApprove(scope.selected.row)">
|
审批
|
</el-button>
|
|
</template>
|
<template #index="scope">
|
<index-page v-bind="indexPageProps"/>
|
</template>
|
<template #input="scope">
|
<input-page v-bind="inputPageProps"/>
|
</template>
|
<template #commercial="scope">
|
<commercial-page v-bind="commercialPageProps"/>
|
</template>
|
<template #region="scope">
|
<region-page v-bind="regionPageProps"/>
|
</template>
|
<template #operator="scope">
|
<operator-page v-bind="operatorPageProps"/>
|
</template>
|
<template #finance="scope">
|
<finance-page v-bind="financePageProps"/>
|
</template>
|
<template #finish="scope">
|
<finish-page v-bind="finishPageProps"/>
|
</template>
|
<template #grant="scope">
|
<grant-page v-bind="grantPageProps"/>
|
</template>
|
</app-page-tab>
|
</template>
|
|
<script setup name="discountSettle">
|
import {useI18n} from 'vue-i18n';
|
|
const {t} = useI18n();
|
|
import IndexPage from './IndexPage';
|
|
import InputPage from './InputPage';
|
|
import CommercialPage from './CommercialPage';
|
|
import RegionPage from './RegionPage';
|
|
import OperatorPage from './OperatorPage';
|
|
import FinancePage from './FinancePage';
|
|
import FinishPage from './FinishPage';
|
|
import GrantPage from './GrantPage';
|
|
const router = useRouter();
|
|
const params = router.currentRoute.value.query;
|
|
/**
|
* index form chart
|
*/
|
const view = params.view || 'index';
|
|
const pageTabRef = ref();
|
|
const tabList = [
|
{
|
name: 'index',
|
title: '结算查询',
|
},
|
{
|
name: 'input',
|
title: '结算发起',
|
},
|
{
|
name: 'commercial',
|
title: '商务确认',
|
},
|
{
|
name: 'region',
|
title: '大区审核',
|
},
|
{
|
name: 'operator',
|
title: '运营复核',
|
},
|
{
|
name: 'finance',
|
title: '财务复核',
|
},
|
{
|
name: 'finish',
|
title: '待发放',
|
},
|
{
|
name: 'grant',
|
title: '折扣执行进度列表',
|
}
|
];
|
|
|
const tabPageProps = {
|
ref: pageTabRef,
|
tabList: [
|
tabList.find(tab => tab.name === view),
|
],
|
};
|
|
const indexPageRef = ref();
|
const inputPageRef = ref();
|
const commercialPageRef = ref();
|
const regionPageRef = ref();
|
const operatorPageRef = ref();
|
const financePageRef = ref();
|
const finishPageRef = ref();
|
const grantPageRef = ref();
|
|
const indexPageProps = {
|
ref: indexPageRef
|
};
|
|
const grantPageProps = {
|
ref: grantPageRef,
|
subCurrent(row) {
|
pageTabRef.value.assignSelected({row});
|
}
|
}
|
|
const inputPageProps = {
|
ref: inputPageRef,
|
subActive(active) {
|
pageTabRef.value.assignSelected({active});
|
}
|
};
|
|
const commercialPageProps = {
|
ref: commercialPageRef,
|
subActive(selected) {
|
pageTabRef.value.assignSelected(selected);
|
}
|
};
|
|
const regionPageProps = {
|
ref: regionPageRef,
|
subActive(selected) {
|
pageTabRef.value.assignSelected(selected);
|
}
|
};
|
|
const operatorPageProps = {
|
ref: operatorPageRef,
|
subActive(selected) {
|
pageTabRef.value.assignSelected(selected);
|
}
|
};
|
|
const financePageProps = {
|
ref: financePageRef,
|
subActive(selected) {
|
pageTabRef.value.assignSelected(selected);
|
}
|
};
|
|
const finishPageProps = {
|
ref: finishPageRef,
|
subActive(selected) {
|
pageTabRef.value.assignSelected(selected);
|
}
|
};
|
|
|
const onInputSetting = () => {
|
inputPageRef.value.onSetting();
|
}
|
|
const onInputConfirm = () => {
|
inputPageRef.value.onConfirm();
|
}
|
|
const onCommercialAgree = (selection) => {
|
commercialPageRef.value.onAgree(selection);
|
}
|
|
const onCommercialReject = (selection) => {
|
commercialPageRef.value.onReject(selection);
|
}
|
|
const onRegionAgree = (selection) => {
|
regionPageRef.value.onAgree(selection);
|
}
|
|
const onRegionReject = (selection) => {
|
regionPageRef.value.onReject(selection);
|
}
|
|
|
const onOperatorAgree = (selection) => {
|
operatorPageRef.value.onAgree(selection);
|
}
|
|
const onOperatorReject = (selection) => {
|
operatorPageRef.value.onReject(selection);
|
}
|
|
const onFinanceAgree = (selection) => {
|
financePageRef.value.onAgree(selection);
|
}
|
|
const onFinanceReject = (selection) => {
|
financePageRef.value.onReject(selection);
|
}
|
|
|
const onFinishAgree = (selection) => {
|
finishPageRef.value.onAgree(selection);
|
}
|
|
const onGrantApprove = (row) => {
|
grantPageRef.value.onApprove(row);
|
}
|
|
</script>
|