Browse Source

销售开票,客户模具分摊对账单预测

syhx
zhang_li 2 months ago
parent
commit
52e54cc529
  1. 59
      src/api/wms/customerSaleInvoiceDetail/index.ts
  2. 59
      src/api/wms/customerSaleInvoiceMain/index.ts
  3. 124
      src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts
  4. 245
      src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue
  5. 16
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
  6. 3
      src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
  7. 84
      src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts
  8. 105
      src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue

59
src/api/wms/customerSaleInvoiceDetail/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface CustomerSaleInvoiceDetailVO {
id: number
number: string
masterId: number
itemCode: string
articleNumber: string
qty: number
price: number
allocationPrice: number
sumPrice: number
afterTaxAmount: number
beforeTaxAmount: number
taxAmount: number
remark: string
available: string
}
// 查询客户销售开票子信息表(WMS)列表
export const getCustomerSaleInvoiceDetailPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customer-sale-invoice-detail/senior', data })
} else {
return await request.get({ url: `/wms/customer-sale-invoice-detail/page`, params })
}
}
// 查询客户销售开票子信息表(WMS)详情
export const getCustomerSaleInvoiceDetail = async (id: number) => {
return await request.get({ url: `/wms/customer-sale-invoice-detail/get?id=` + id })
}
// 新增客户销售开票子信息表(WMS)
export const createCustomerSaleInvoiceDetail = async (data: CustomerSaleInvoiceDetailVO) => {
return await request.post({ url: `/wms/customer-sale-invoice-detail/create`, data })
}
// 修改客户销售开票子信息表(WMS)
export const updateCustomerSaleInvoiceDetail = async (data: CustomerSaleInvoiceDetailVO) => {
return await request.put({ url: `/wms/customer-sale-invoice-detail/update`, data })
}
// 删除客户销售开票子信息表(WMS)
export const deleteCustomerSaleInvoiceDetail = async (id: number) => {
return await request.delete({ url: `/wms/customer-sale-invoice-detail/delete?id=` + id })
}
// 导出客户销售开票子信息表(WMS) Excel
export const exportCustomerSaleInvoiceDetail = async (params) => {
return await request.download({ url: `/wms/customer-sale-invoice-detail/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customer-sale-invoice-detail/get-import-template' })
}

59
src/api/wms/customerSaleInvoiceMain/index.ts

@ -0,0 +1,59 @@
import request from '@/config/axios'
export interface CustomerSaleInvoiceMainVO {
id: number
number: string
customerStatementNumber: string
beforeTaxAmount: number
taxRate: number
taxAmount: number
adTaxAmount: number
goldenTaxInvoiceNumber: string
invoiceTime: Date
status: string
publishTime: Date
abrogateTime: Date
remark: string
available: string
}
// 查询客户销售开票主信息表(WMS)列表
export const getCustomerSaleInvoiceMainPage = async (params) => {
if (params.isSearch) {
delete params.isSearch
const data = {...params}
return await request.post({ url: '/wms/customer-sale-invoice-main/senior', data })
} else {
return await request.get({ url: `/wms/customer-sale-invoice-main/page`, params })
}
}
// 查询客户销售开票主信息表(WMS)详情
export const getCustomerSaleInvoiceMain = async (id: number) => {
return await request.get({ url: `/wms/customer-sale-invoice-main/get?id=` + id })
}
// 新增客户销售开票主信息表(WMS)
export const createCustomerSaleInvoiceMain = async (data: CustomerSaleInvoiceMainVO) => {
return await request.post({ url: `/wms/customer-sale-invoice-main/create`, data })
}
// 修改客户销售开票主信息表(WMS)
export const updateCustomerSaleInvoiceMain = async (data: CustomerSaleInvoiceMainVO) => {
return await request.put({ url: `/wms/customer-sale-invoice-main/update`, data })
}
// 删除客户销售开票主信息表(WMS)
export const deleteCustomerSaleInvoiceMain = async (id: number) => {
return await request.delete({ url: `/wms/customer-sale-invoice-main/delete?id=` + id })
}
// 导出客户销售开票主信息表(WMS) Excel
export const exportCustomerSaleInvoiceMain = async (params) => {
return await request.download({ url: `/wms/customer-sale-invoice-main/export-excel`, params })
}
// 下载用户导入模板
export const importTemplate = () => {
return request.download({ url: '/wms/customer-sale-invoice-main/get-import-template' })
}

124
src/views/wms/deliversettlementManage/customerSaleInvoiceMain/customerSaleInvoiceMain.data.ts

@ -0,0 +1,124 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime'
// 表单校验
export const CustomerSaleInvoiceMainRules = reactive({
beforeTaxAmount: [required],
taxRate: [required],
taxAmount: [required],
adTaxAmount: [required],
})
export const CustomerSaleInvoiceMain = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '单据号',
field: 'number',
sort: 'custom',
isSearch: true,
} ,{
label: '状态',
field: 'status',
sort: 'custom',
isSearch: true,
// 0:新增1:已发布2已作废
},
{
label: '客户对账单单据号',
field: 'customerStatementNumber',
sort: 'custom',
isSearch: true,
},
{
label: '客户代码',
field: 'customer',
sort: 'custom',
isSearch: true,
},
{
label: '客户名称',
field: 'customerName',
sort: 'custom',
},
{
label: '未税金额',
field: 'beforeTaxAmount',
sort: 'custom',
},
{
label: '税率',
field: 'taxRate',
sort: 'custom',
},
{
label: '税额',
field: 'taxAmount',
sort: 'custom',
},
{
label: '价税合计金额',
field: 'adTaxAmount',
sort: 'custom',
},
{
label: '金税票号',
field: 'goldenTaxInvoiceNumber',
sort: 'custom',
},
{
label: '开票日期',
field: 'invoiceTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
form: {
component: 'DatePicker',
componentProps: {
type: 'datetime',
valueFormat: 'x'
}
},
},
{
label: '备注',
field: 'remark',
sort: 'custom',
},
{
label: '是否可用默认TRUE',
field: 'available',
sort: 'custom',
isTable:false
},
{
label: '创建时间',
field: 'createTime',
sort: 'custom',
formatter: dateFormatter,
search: {
component: 'DatePicker',
componentProps: {
valueFormat: 'YYYY-MM-DD HH:mm:ss',
type: 'daterange',
defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')]
}
},
isForm: false,
},
{
label: '操作',
field: 'action',
isForm: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

245
src/views/wms/deliversettlementManage/customerSaleInvoiceMain/index.vue

@ -0,0 +1,245 @@
<template>
<ContentWrap>
<!-- 搜索工作栏 -->
<Search :schema="CustomerSaleInvoiceMain.allSchemas.searchSchema" @search="setSearchParams" @reset="setSearchParams" />
</ContentWrap>
<!-- 列表头部 -->
<TableHead
:HeadButttondata="HeadButttondata"
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="CustomerSaleInvoiceMain.allSchemas"
/>
<!-- 列表 -->
<ContentWrap>
<Table
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total
}"
v-model:pageSize="tableObject.pageSize"
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span>
</el-button>
</template>
<template #action="{ row }">
<ButtonBase :Butttondata="butttondata" @button-base-click="buttonTableClick($event,row)" />
</template>
</Table>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<BasicForm
ref="basicFormRef"
@success="formsSuccess"
:rules="CustomerSaleInvoiceMainRules"
:formAllSchemas="CustomerSaleInvoiceMain.allSchemas"
:apiUpdate="CustomerSaleInvoiceMainApi.updateCustomerSaleInvoiceMain"
:apiCreate="CustomerSaleInvoiceMainApi.createCustomerSaleInvoiceMain"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="CustomerSaleInvoiceMain.allSchemas" />
<!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/customer-sale-invoice-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
</template>
<script setup lang="ts">
import download from '@/utils/download'
import { CustomerSaleInvoiceMain,CustomerSaleInvoiceMainRules } from './customerSaleInvoiceMain.data'
import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain'
import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue'
defineOptions({ name: 'CustomerSaleInvoiceMain' })
const message = useMessage() //
const { t } = useI18n() //
const route = useRoute() //
const routeName = ref()
routeName.value = route.name
const tableColumns = ref(CustomerSaleInvoiceMain.allSchemas.tableColumns)
//
const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => {
const setV = {}
setV[formField] = val[0][searchField]
formRef.setValues(setV)
})
}
//
const updataTableColumns = (val) => {
tableColumns.value = val
}
const { tableObject, tableMethods } = useTable({
getListApi: CustomerSaleInvoiceMainApi.getCustomerSaleInvoiceMainPage //
})
//
const { getList, setSearchParams } = tableMethods
//
const HeadButttondata = [
defaultButtons.defaultAddBtn({hasPermi:'wms:customerSaleInvoiceMain:create'}), //
defaultButtons.defaultImportBtn({hasPermi:'wms:customerSaleInvoiceMain:import'}), //
defaultButtons.defaultExportBtn({hasPermi:'wms:customerSaleInvoiceMain:export'}), //
defaultButtons.defaultFreshBtn(null), //
defaultButtons.defaultFilterBtn(null), //
defaultButtons.defaultSetBtn(null), //
// {
// label: '',
// name: 'zdy',
// hide: false,
// type: 'primary',
// icon: 'Select',
// color: ''
// },
]
//
const buttonBaseClick = (val, item) => {
if (val == 'add') { //
openForm('create')
} else if (val == 'import') { //
handleImport()
} else if (val == 'export') { //
handleExport()
} else if (val == 'refresh') { //
getList()
} else if (val == 'filtrate') { //
} else { //
console.log('其他按钮', item)
}
}
// -
const butttondata = [
defaultButtons.mainListEditBtn({hasPermi:'wms:customerSaleInvoiceMain:update'}), //
defaultButtons.mainListOrderPubBtn({hasPermi:'wms:customerSaleInvoiceMain:publish'}), //
defaultButtons.mainListOrderPubBtn({hasPermi:'wms:mainListCancelBtn:cancle'}), //
]
// -
const buttonTableClick = async (val, row) => {
if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //
handleDelete(row.id)
}
}
/** 添加/修改操作 */
const basicFormRef = ref()
const openForm = (type: string, row?: any) => {
basicFormRef.value.open(type, row)
}
// form
const formsSuccess = async (formType,data) => {
var isHave =CustomerSaleInvoiceMain.allSchemas.formSchema.some(function (item) {
return item.field === 'activeTime' || item.field === 'expireTime';
});
if(isHave){
if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){
message.error('失效时间要大于生效时间')
return;
}
}
if(data.activeTime==0)data.activeTime = null;
if(data.expireTime==0)data.expireTime = null;
if (formType === 'create') {
await CustomerSaleInvoiceMainApi.createCustomerSaleInvoiceMain(data)
message.success(t('common.createSuccess'))
} else {
await CustomerSaleInvoiceMainApi.updateCustomerSaleInvoiceMain(data)
message.success(t('common.updateSuccess'))
}
basicFormRef.value.dialogVisible = false
getList()
}
/** 详情操作 */
const detailRef = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => {
detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerSaleInvoiceMain')
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await CustomerSaleInvoiceMainApi.deleteCustomerSaleInvoiceMain(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const exportLoading = ref(false) //
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await CustomerSaleInvoiceMainApi.exportCustomerSaleInvoiceMain(tableObject.params)
download.excel(data, '客户销售开票主信息表(WMS).xlsx')
} catch {
} finally {
exportLoading.value = false
}
}
/** 导入 */
const importFormRef = ref()
const handleImport = () => {
importFormRef.value.open()
}
//
const importTemplateData = reactive({
templateUrl: '',
templateTitle: '客户销售开票主信息表(WMS)导入模版.xlsx'
})
//
const importSuccess = () => {
getList()
}
//
const searchFormClick = (searchData) => {
tableObject.params = {
isSearch: true,
filters: searchData.filters
}
getList() //
}
/** 初始化 **/
onMounted(async () => {
getList()
importTemplateData.templateUrl = await CustomerSaleInvoiceMainApi.importTemplate()
})
</script>

16
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts

@ -1,5 +1,6 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { validateTwoNum } from '@/utils/validator'
// 表单校验 // 表单校验
export const CustomerStatementMainRules = reactive({ export const CustomerStatementMainRules = reactive({
@ -261,17 +262,10 @@ export const CustomerStatementMain = useCrudSchemas(reactive<CrudSchema[]>([
// 表单校验 // 表单校验
export const CustomerStatementDetailRules = reactive({ export const CustomerStatementDetailRules = reactive({
releaseNumber: [required], amount: [
ingress: [required], required,
ingress2: [required], { validator: validateTwoNum, message: '小数点后最多2位', trigger: 'blur' }
itemCode: [required], ],
articleNumber: [required],
articleName: [required],
checkTime: [required],
uom: [required],
qty: [required],
price: [required],
amount: [required],
}) })
export const CustomerStatementDetail = useCrudSchemas(reactive<CrudSchema[]>([ export const CustomerStatementDetail = useCrudSchemas(reactive<CrudSchema[]>([

3
src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue

@ -33,14 +33,13 @@
:apiCreate="CustomerStatementMainApi.createCustomerStatementMain" @searchTableSuccess="searchTableSuccess" :apiCreate="CustomerStatementMainApi.createCustomerStatementMain" @searchTableSuccess="searchTableSuccess"
:isBusiness="false" /> :isBusiness="false" />
<!-- 详情 -->
<!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="CustomerStatementMain.allSchemas" /> -->
<!-- 详情 --> <!-- 详情 -->
<Detail <Detail
ref="detailRef" ref="detailRef"
:isBasic="false" :isBasic="false"
:allSchemas="CustomerStatementMain.allSchemas" :allSchemas="CustomerStatementMain.allSchemas"
:detailAllSchemas="DetailAllSchemas" :detailAllSchemas="DetailAllSchemas"
:detailAllSchemasRules="CustomerStatementDetailRules"
:apiPage="apiPage" :apiPage="apiPage"
:tabsExtend="tabsExtend" :tabsExtend="tabsExtend"
:tabs="[{ :tabs="[{

84
src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts

@ -92,3 +92,87 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive<C
} }
} }
])) ]))
// 表单校验
export const CustomerToolApportStatementForecastDetailRules = reactive({
customerCode: [required],
customerName: [required],
yearsMonth: [required],
})
export const CustomerToolApportStatementForecastDetail = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '帐票号',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '品号',
field: 'articleNumber',
sort: 'custom',
isSearch: true,
},
{
label: '车型',
field: 'vehicleType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '模具预测分摊金额',
field: 'forecastAllocationAmount',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
}
]))
// 预测与对账单差异
export const ForecastWithBillDifference = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '车型',
field: 'number',
sort: 'custom',
isSearch: true,
},
{
label: '模具分摊预测金额',
field: 'articleNumber',
sort: 'custom',
isSearch: true,
},
{
label: '模具分摊对账金额',
field: 'vehicleType',
sort: 'custom',
form: {
component: 'SelectV2'
},
},
{
label: '差异',
field: 'forecastAllocationAmount',
sort: 'custom',
},
{
label: '操作',
field: 'action',
isForm: false,
isTable: false,
table: {
width: 150,
fixed: 'right'
}
}
]))

105
src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/index.vue

@ -27,9 +27,9 @@
v-model:currentPage="tableObject.currentPage" v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort" v-model:sort="tableObject.sort"
> >
<template #code="{row}"> <template #number="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.number)">
<span>{{ row.code }}</span> <span>{{ row.number }}</span>
</el-button> </el-button>
</template> </template>
<template #action="{ row }"> <template #action="{ row }">
@ -51,7 +51,30 @@
/> />
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="CustomerToolApportStatementForecastMain.allSchemas" /> <!-- <Detail ref="detailRef" :isBasic="true" :allSchemas="CustomerToolApportStatementForecastMain.allSchemas" /> -->
<!-- 详情 -->
<Detail
ref="detailRef"
:isBasic="false"
:allSchemas="CustomerStatementMain.allSchemas"
:detailAllSchemas="DetailAllSchemas"
:apiPage="apiPage"
:tabsExtend="tabsExtend"
:tabs="[{
label: '明细',
prop: 'Detail'
},{
label: '预测与对账单差异',
prop: 'ForecastWithBilltDifference'
}]"
:otherHeadButttonData="otherHeadButttonData"
:detailButtonIsShowAdd="false"
:detailButtonIsShowEdit="false"
:detailButtonIsShowDelete="false"
@changeTabs="changeTabs"
:tableObjectExtend="tableObjectExtend"
@buttonBaseClick="detailButtonBaseClick"
/>
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/wms/customer-tool-apport-statement-forecast-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/wms/customer-tool-apport-statement-forecast-main/import" :importTemplateData="importTemplateData" @success="importSuccess" />
@ -59,12 +82,16 @@
<script setup lang="ts"> <script setup lang="ts">
import download from '@/utils/download' import download from '@/utils/download'
import { CustomerToolApportStatementForecastMain,CustomerToolApportStatementForecastMainRules } from './customerToolApportStatementForecastMain.data' import { CustomerToolApportStatementForecastMain,CustomerToolApportStatementForecastMainRules,CustomerToolApportStatementForecastDetail,CustomerToolApportStatementForecastDetailRules,ForecastWithBillDifference } from './customerToolApportStatementForecastMain.data'
import * as CustomerToolApportStatementForecastMainApi from '@/api/wms/customerToolApportStatementForecastMain' import * as CustomerToolApportStatementForecastMainApi from '@/api/wms/customerToolApportStatementForecastMain'
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue'
import Detail from '@/components/Detail/src/Detail.vue' import Detail from '@/components/Detail/src/Detail.vue'
//
import { CustomerStatementMain, CustomerStatementMainRules,CustomerStatementDetail,CustomerStatementDetailRules,CustomerStatementReconciliation,CustomerStatementShareReconciliation} from '../customerStatement/customerStatementMain.data'
import * as CustomerStatementMainApi from '@/api/wms/customerStatementMain'
import * as CustomerStatementDetailApi from '@/api/wms/customerStatementDetail'
defineOptions({ name: 'CustomerToolApportStatementForecastMain' }) defineOptions({ name: 'CustomerToolApportStatementForecastMain' })
@ -76,6 +103,13 @@ const routeName = ref()
routeName.value = route.name routeName.value = route.name
const tableColumns = ref(CustomerToolApportStatementForecastMain.allSchemas.tableColumns) const tableColumns = ref(CustomerToolApportStatementForecastMain.allSchemas.tableColumns)
const apiPage = ref(CustomerStatementDetailApi.getCustomerStatementDetailPage)
const DetailAllSchemas = ref(CustomerToolApportStatementForecastDetail.allSchemas)
const tabsExtend = ref(false)
const tableObjectExtend = ref()
const otherHeadButttonData = ref()
// //
const searchTableSuccess = (formField, searchField, val, formRef) => { const searchTableSuccess = (formField, searchField, val, formRef) => {
nextTick(() => { nextTick(() => {
@ -91,7 +125,8 @@ const updataTableColumns = (val) => {
} }
const { tableObject, tableMethods } = useTable({ const { tableObject, tableMethods } = useTable({
getListApi: CustomerToolApportStatementForecastMainApi.getCustomerToolApportStatementForecastMainPage // // getListApi: CustomerToolApportStatementForecastMainApi.getCustomerToolApportStatementForecastMainPage //
getListApi: CustomerStatementMainApi.getCustomerStatementMainPage //
}) })
// //
@ -178,7 +213,9 @@ const formsSuccess = async (formType,data) => {
/** 详情操作 */ /** 详情操作 */
const detailRef = ref() const detailRef = ref()
const chooseRow = ref()
const openDetail = (row: any, titleName: any, titleValue: any) => { const openDetail = (row: any, titleName: any, titleValue: any) => {
chooseRow.value = row
detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerToolApportStatementForecastMain') detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerToolApportStatementForecastMain')
} }
@ -234,7 +271,61 @@ const searchFormClick = (searchData) => {
} }
getList() // getList() //
} }
const tabCurrent = ref({})
const changeTabs = async (item) => {
tabCurrent.value = item
if (item.prop == 'Detail') {
//
tabsExtend.value = true
//
tableObjectExtend.value = [{
key: 'masterId',
value: chooseRow.value.id
}]
apiPage.value = CustomerStatementDetailApi.getCustomerStatementDetailPage
DetailAllSchemas.value = CustomerStatementDetail.allSchemas
otherHeadButttonData.value = [{
label: t(`ts.导出`).replace('ts.', ''),
name: 'exportDetail',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
}]
} else if (item.prop == 'ForecastWithBilltDifference') {
//
tabsExtend.value = true
//
tableObjectExtend.value = [{
key: 'masterId',
value: chooseRow.value.id
}]
DetailAllSchemas.value = ForecastWithBillDifference.allSchemas
apiPage.value = CustomerStatementMainApi.getCustomerStatementMainPage
otherHeadButttonData.value = [
{
label: t(`ts.导出`).replace('ts.', ''),
name: 'exportForecastWithBilltDifference',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
hasPermi: ''
}]
} else{
tableObjectExtend.value = []
tabsExtend.value = false
apiPage.value = ''
otherHeadButttonData.value = []
}
}
//
const detailButtonBaseClick = (val, item) => {
if (val == 'exportForecastWithBilltDifference') {
//
}
}
/** 初始化 **/ /** 初始化 **/
onMounted(async () => { onMounted(async () => {
getList() getList()

Loading…
Cancel
Save