|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search :schema="SupplierinvoiceInvoiced.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
<Search :schema="SupplierinvoiceInvoicedAllSchemas.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" /> |
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -11,7 +11,7 @@ |
|
|
|
:routeName="routeName" |
|
|
|
@updataTableColumns="updataTableColumns" |
|
|
|
@searchFormClick="searchFormClick" |
|
|
|
:allSchemas="SupplierinvoiceInvoiced.allSchemas" |
|
|
|
:allSchemas="SupplierinvoiceInvoicedAllSchemas.allSchemas" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 列表 --> |
|
|
@ -46,7 +46,7 @@ |
|
|
|
ref="basicFormRef" |
|
|
|
@success="formsSuccess" |
|
|
|
:rules="SupplierinvoiceInvoicedRules" |
|
|
|
:formAllSchemas="SupplierinvoiceInvoiced.allSchemas" |
|
|
|
:formAllSchemas="SupplierinvoiceInvoicedAllSchemas.allSchemas" |
|
|
|
:apiUpdate="SupplierinvoiceInvoicedApi.updateSupplierinvoiceInvoiced" |
|
|
|
:apiCreate="SupplierinvoiceInvoicedApi.createSupplierinvoiceInvoiced" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
@ -54,7 +54,7 @@ |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SupplierinvoiceInvoiced.allSchemas" /> |
|
|
|
<Detail ref="detailRef" :isBasic="true" :allSchemas="SupplierinvoiceInvoicedAllSchemas.allSchemas" /> |
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
<!-- <ImportForm ref="importFormRef" url="/wms/supplierinvoice-invoiced/import" :importTemplateData="importTemplateData" @success="importSuccess" /> --> |
|
|
@ -69,6 +69,7 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
import { usePageLoading } from '@/hooks/web/usePageLoading' |
|
|
|
import { cloneDeep } from 'lodash-es' |
|
|
|
const { loadStart, loadDone } = usePageLoading() |
|
|
|
defineOptions({ name: 'SupplierinvoiceInvoiced' }) |
|
|
|
|
|
|
@ -78,7 +79,8 @@ const { t } = useI18n() // 国际化 |
|
|
|
const route = useRoute() // 路由信息 |
|
|
|
const routeName = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(SupplierinvoiceInvoiced.allSchemas.tableColumns) |
|
|
|
const SupplierinvoiceInvoicedAllSchemas = ref(cloneDeep(SupplierinvoiceInvoiced)) |
|
|
|
const tableColumns = ref(SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns) |
|
|
|
|
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
@ -276,8 +278,15 @@ const handleExport = async () => { |
|
|
|
// 发起导出 |
|
|
|
loadStart() |
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
|
const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
if (routeName.value == 'SupplierinvoiceInvoiced') { |
|
|
|
// 待开票数据查询-财务 |
|
|
|
const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} else if (routeName.value == 'SupplierinvoiceInvoicedWork') { |
|
|
|
// 待开票数据查询-工务 |
|
|
|
const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoicedWork(tableObject.params) |
|
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
|
} |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
loadDone() |
|
|
@ -307,11 +316,34 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
// 不同业务展示不同的字段 |
|
|
|
const getFiled=()=> { |
|
|
|
if (routeName.value == 'SupplierinvoiceInvoiced') { |
|
|
|
// 待开票数据查询-财务 |
|
|
|
SupplierinvoiceInvoicedAllSchemas.value = cloneDeep(SupplierinvoiceInvoiced) |
|
|
|
tableColumns .value= SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns |
|
|
|
|
|
|
|
} else if (routeName.value == 'SupplierinvoiceInvoicedWork') { |
|
|
|
// 待开票数据查询-工务 |
|
|
|
SupplierinvoiceInvoicedAllSchemas.value.allSchemas.formSchema = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.formSchema.filter(item=>item.field!='purchasePrice') |
|
|
|
SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns.filter(item=>item.field!='purchasePrice') |
|
|
|
SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableFormColumns = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableFormColumns.filter(item => item.field != 'purchasePrice') |
|
|
|
SupplierinvoiceInvoicedAllSchemas.value.allSchemas.detailSchema = SupplierinvoiceInvoicedAllSchemas.value.allSchemas.detailSchema.filter(item => item.field != 'purchasePrice') |
|
|
|
console.log(755,SupplierinvoiceInvoicedAllSchemas.value.allSchemas) |
|
|
|
tableColumns .value= SupplierinvoiceInvoicedAllSchemas.value.allSchemas.tableColumns |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
|
getFiled() |
|
|
|
// importTemplateData.templateUrl = await SupplierinvoiceInvoicedApi.importTemplate() |
|
|
|
}) |
|
|
|
|
|
|
|
onActivated(async () => { |
|
|
|
routeName.value = route.name |
|
|
|
getFiled() |
|
|
|
}) |
|
|
|
|
|
|
|
</script> |
|
|
|