|
@@ -35,17 +35,17 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
-import { MtpTableButton, contextMenu, defineAsyncComponent, defineComponent, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
|
|
-
|
|
|
|
|
-import { InvoiceAudit, InvoiceCancel, InvoiceDetail, Filter } from '../../components';
|
|
|
|
|
-
|
|
|
|
|
-import { queryTableList, QryBussinessFpRsp } from './setup';
|
|
|
|
|
|
|
+import { queryTableList, MtpTableButton, contextMenu, defineAsyncComponent, defineComponent, handleComposeTable, ComposeTableParam } from '@/common/export/commonTable';
|
|
|
|
|
+import { Filter } from '../../components';
|
|
|
import { invoiceStatusName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
|
|
import { invoiceStatusName, operateApplyTypeName } from '@/views/manage/finance-review/setup';
|
|
|
import { Column, ColumnType } from '@/common/setup/table';
|
|
import { Column, ColumnType } from '@/common/setup/table';
|
|
|
import { getContractTypeName, getApplyStatusName } from '@/common/constants/enumsName';
|
|
import { getContractTypeName, getApplyStatusName } from '@/common/constants/enumsName';
|
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
import { EnumRouterName } from '@/common/constants/enumRouterName';
|
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
import { BtnListType } from '@/common/components/btnList/interface';
|
|
|
import { getTableButton } from '@/common/setup/table/button';
|
|
import { getTableButton } from '@/common/setup/table/button';
|
|
|
|
|
+import { QueryBusinessFp } from '@/services/go/ermcp/finance-review';
|
|
|
|
|
+import { QryBussinessFpRsp } from '@/services/go/ermcp/finance-review/interface';
|
|
|
|
|
+import { useRoute } from 'vue-router';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'finance_review_invoice',
|
|
name: 'finance_review_invoice',
|
|
@@ -54,15 +54,29 @@ export default defineComponent({
|
|
|
Filter,
|
|
Filter,
|
|
|
MtpTableButton,
|
|
MtpTableButton,
|
|
|
detail: defineAsyncComponent(() => import('../../components/invoiceDetail/index.vue')),
|
|
detail: defineAsyncComponent(() => import('../../components/invoiceDetail/index.vue')),
|
|
|
- invoice_checkpending_check: defineAsyncComponent(() => import('../../components/invoiceAudit/index.vue')),
|
|
|
|
|
- invoice_checkpending_cancel: defineAsyncComponent(() => import('../../components/invoiceCancel/index.vue')),
|
|
|
|
|
|
|
+ check: defineAsyncComponent(() => import('../../components/invoiceAudit/index.vue')),
|
|
|
|
|
+ cancel: defineAsyncComponent(() => import('../../components/invoiceCancel/index.vue')),
|
|
|
},
|
|
},
|
|
|
setup() {
|
|
setup() {
|
|
|
|
|
+ const { name: routeName } = useRoute();
|
|
|
|
|
+ // 权限按钮
|
|
|
|
|
+ const buttons = getTableButton();
|
|
|
|
|
+
|
|
|
// 表格列表数据
|
|
// 表格列表数据
|
|
|
- const { loading, tableList, queryTable } = queryTableList({});
|
|
|
|
|
|
|
+ const { loading, tableList, queryTable } = queryTableList<QryBussinessFpRsp>();
|
|
|
|
|
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
- const queryTableAction = () => queryTable();
|
|
|
|
|
|
|
+ const queryTableAction = () => {
|
|
|
|
|
+ switch (routeName) {
|
|
|
|
|
+ case 'invoice_checkpending':
|
|
|
|
|
+ queryTable(QueryBusinessFp, { applystatus: '1' });
|
|
|
|
|
+ break;
|
|
|
|
|
+ case 'invoice_performance':
|
|
|
|
|
+ queryTable(QueryBusinessFp, { applystatus: '2' });
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
|
|
const filtrFn = (e: Column, item: ColumnType, filtered: any) => {
|
|
|
if (e.columnfield === 'buyusernameOrsellusername') {
|
|
if (e.columnfield === 'buyusernameOrsellusername') {
|
|
|
item.onFilter = (value: string, record: QryBussinessFpRsp) => {
|
|
item.onFilter = (value: string, record: QryBussinessFpRsp) => {
|
|
@@ -101,9 +115,6 @@ export default defineComponent({
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 权限按钮
|
|
|
|
|
- const buttons = getTableButton(['invoice_checkpending_check', 'invoice_checkpending_cancel', 'detail']);
|
|
|
|
|
-
|
|
|
|
|
return {
|
|
return {
|
|
|
...handleComposeTable<QryBussinessFpRsp>(param),
|
|
...handleComposeTable<QryBussinessFpRsp>(param),
|
|
|
loading,
|
|
loading,
|