From 977e1cf758f7e44454561809ad154b24e30cb59e Mon Sep 17 00:00:00 2001 From: yufei_wang <2267742828@qq.com> Date: Wed, 20 Nov 2024 16:19:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=A8=A1=E5=85=B7=E5=88=86?= =?UTF-8?q?=E6=91=8A=E5=AF=B9=E8=B4=A6=E5=8D=95=E9=A2=84=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../index.ts | 124 ----- .../index.ts | 31 +- .../index.ts | 19 +- src/components/Detail/src/Detail.vue | 2 +- .../ImportCustomerStatementForecastForm.vue | 468 ++++++++++++++++++ .../customerStatementShareRecordMain.data.ts | 1 + ...merToolApportStatementForecastMain.data.ts | 96 +++- .../index.vue | 173 +++++-- 8 files changed, 744 insertions(+), 170 deletions(-) create mode 100644 src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue diff --git a/src/api/wms/customerStatementShareRecordDetail/index.ts b/src/api/wms/customerStatementShareRecordDetail/index.ts index 79ae1f06e..5eeb8dfeb 100644 --- a/src/api/wms/customerStatementShareRecordDetail/index.ts +++ b/src/api/wms/customerStatementShareRecordDetail/index.ts @@ -1,41 +1,4 @@ import request from '@/config/axios' - -export interface CustomerStatementDetailVO { - id: number - number: string - masterId: number - invoiceType: string - releaseNumber: string - ingress: string - ingress2: string - itemCode: string - articleNumber: string - articleName: string - backNumber: string - checkTime: Date - uom: string - qty: number - price: number - amount: number - allocationPrice: number - tftmQuantity: number - intexQuantity: number - quantityVariance: number - tftmPrice: number - intexPrice: number - priceVariance: number - tftmAmount: number - intexAmount: number - amountVariance: number - dischargingTime: Date - acceptCheckTime: Date - remark: string - available: string - siteId: string - concurrencyStamp: string -} - - export const getCustomerStatementShareRecordMainPage = async (params) => { if (params.isSearch) { delete params.isSearch @@ -66,90 +29,3 @@ export const exportCustomerStatementShareRecordDetail = async (params) => { return await request.download({ url: `/wms/customer-tool-apport-statement-detail/export-excel-detail`, params }) } } - -// // 查询客户对账单子信息明细表(WMS)列表或者查询客户对账单对账差异列表 二者共用一个 -// export const getCustomerStatementDetailPage = async (params) => { -// if (params.isSearch) { -// delete params.isSearch -// const data = {...params} -// return await request.post({ url: '/wms/customer-statement-detail/senior', data }) -// } else { -// return await request.get({ url: `/wms/customer-statement-detail/page`, params }) -// } -// } -// // 查询客户对账单子信息明细表(WMS)列表或者查询客户对账单对账差异列表 二者共用一个 -// export const getCustomerStatementReconciliationPage = async (params) => { -// if (params.isSearch) { -// delete params.isSearch -// const data = { ...params } -// return await request.post({ url: '/wms/customer-statement-detail/senior', data }) -// } else { -// return await request.get({ url: `/wms/customer-statement-detail/page`, params }) -// } -// } -// // 查询模具分摊明细列表 -// export const getCustomerToolApportStatementPage = async (params) => { -// if (params.isSearch) { -// delete params.isSearch -// const data = { ...params } -// return await request.post({ url: '/wms/customer-tool-apport-statement-detail/senior', data }) -// } else { -// return await request.get({ url: `/wms/customer-tool-apport-statement-detail/page`, params }) -// } -// } - -// // 查询客户对账单子信息表(WMS)详情 -// export const getCustomerStatementDetail = async (id: number) => { -// return await request.get({ url: `/wms/customer-statement-detail/get?id=` + id }) -// } - -// // 新增客户对账单子信息表(WMS) -// export const createCustomerStatementDetail = async (data: CustomerStatementDetailVO) => { -// return await request.post({ url: `/wms/customer-statement-detail/create`, data }) -// } - -// // 修改客户对账单子信息表(WMS) -// export const updateCustomerStatementDetail = async (data: CustomerStatementDetailVO) => { -// return await request.put({ url: `/wms/customer-statement-detail/update`, data }) -// } - -// // 删除客户对账单子信息表(WMS) -// export const deleteCustomerStatementDetail = async (id: number) => { -// return await request.delete({ url: `/wms/customer-statement-detail/delete?id=` + id }) -// } - -// // 下载用户导入模板 -// export const importTemplate = () => { -// return request.download({ url: '/wms/customer-statement-detail/get-import-template' }) -// } - -// //导出明细数据需要传masterId -// export const exportCustomerStatementDetail = async (params) => { -// if (params.isSearch) { -// const data = {...params} -// return await request.downloadPost({ url: `/wms/customer-statement-detail/export-excel-senior`, data }) -// }else{ -// return await request.download({ url: `/wms/customer-statement-detail/export-excel`, params }) -// } -// } - -// //导出详情对账差异列表数据 需要传masterId -// export const exportCustomerStatementCompareDetail = async (params) => { -// if (params.isSearch) { -// const data = {...params} -// return await request.downloadPost({ url: `/wms/customer-statement-detail/export-excel-compare-senior`, data }) -// }else{ -// return await request.download({ url: `/wms/customer-statement-detail/export-excel-compare`, params }) -// } -// } - - -// // 客户模具分摊对账单修改调整金额 -// export const updateAdjustmentAmount = async (id: number, masterId: number, amount: number) => { -// return await request.get({ url: `wms/customer-tool-apport-statement-detail/updateAdjustmentAmount?id=` + id + '&masterId=' + masterId + '&amount=' + amount }) -// } - -// // 客户对账单直接创建开票申请查询子分页数据 -// export const pageInvoice = async (params) => { -// return await request.get({ url: `/wms/customer-statement-detail/pageInvoice`, params }) -// } diff --git a/src/api/wms/customerToolApportStatementForecastDetail/index.ts b/src/api/wms/customerToolApportStatementForecastDetail/index.ts index 7dcef738d..29a06f6e4 100644 --- a/src/api/wms/customerToolApportStatementForecastDetail/index.ts +++ b/src/api/wms/customerToolApportStatementForecastDetail/index.ts @@ -25,6 +25,18 @@ export const getCustomerToolApportStatementForecastDetailPage = async (params) = } } +// 查询预测与对账单差异 +export const getCustomerToolApportStatementForecastComparisonPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/tool-apport-statement-forecast-comparison/senior', data }) + } else { + return await request.get({ url: `/wms/tool-apport-statement-forecast-comparison/page`, params }) + } +} + + // 查询客户模具分摊对账单预测子表(WMS)详情 export const getCustomerToolApportStatementForecastDetail = async (id: number) => { return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-detail/get?id=` + id }) @@ -47,7 +59,24 @@ export const deleteCustomerToolApportStatementForecastDetail = async (id: number // 导出客户模具分摊对账单预测子表(WMS) Excel export const exportCustomerToolApportStatementForecastDetail = async (params) => { - return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-detail/export-excel`, params }) + } +} + + + +// 导出预测与对账单差异 Excel +export const exportCustomerToolApportStatementForecastComparisonDetail = async (params) => { + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/tool-apport-statement-forecast-comparison/export-excel`, params }) + } } // 下载用户导入模板 diff --git a/src/api/wms/customerToolApportStatementForecastMain/index.ts b/src/api/wms/customerToolApportStatementForecastMain/index.ts index 553a2fe63..769fefa1c 100644 --- a/src/api/wms/customerToolApportStatementForecastMain/index.ts +++ b/src/api/wms/customerToolApportStatementForecastMain/index.ts @@ -43,10 +43,25 @@ export const deleteCustomerToolApportStatementForecastMain = async (id: number) // 导出客户模具分摊对账单预测主表(WMS) Excel export const exportCustomerToolApportStatementForecastMain = async (params) => { - return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params }) + if (params.isSearch) { + const data = {...params} + return await request.downloadPost({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel-senior`, data }) + }else{ + return await request.download({ url: `/wms/customer-tool-apport-statement-forecast-main/export-excel`, params }) + } } // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/wms/customer-tool-apport-statement-forecast-main/get-import-template' }) -} \ No newline at end of file +} + +// 导入客户对账单前校验是否有相同客户代码和年月的数据存在 +export const verifyDataExist = async (yearsMonthStr: String,customerCode:String) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/verifyDataExist?yearsMonthStr=` + yearsMonthStr+'&customerCode='+customerCode }) +} + +// 客户对账单重新比对 +export const recontrast = async (id: number) => { + return await request.get({ url: `/wms/customer-tool-apport-statement-forecast-main/recontrast?id=` + id}) +} diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 786ca72e8..8f771709d 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -960,7 +960,7 @@ const buttonBaseClick = (val, item) => { }else{ openForm('create') } - } else if (val == 'export') { + } else if (val.includes('export')) { // 刷新 emit('buttonBaseClick',val, item,tableObject) } else if (val == 'refresh') { diff --git a/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue b/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue new file mode 100644 index 000000000..a9ca25e88 --- /dev/null +++ b/src/components/ImportForm/src/ImportCustomerStatementForecastForm.vue @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + + + + + + + + + {{t('ts.将文件拖到此处,或')}}{{t('ts.点击上传')}} + + + + + + + + {{ t('ts.下载模板') }} + + + {{ t('ts.确 定') }} + {{ t('ts.取 消') }} + + + + + + + diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts index 915536333..3bec8d33d 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatementShareRecord/customerStatementShareRecordMain.data.ts @@ -2,6 +2,7 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter , dateFormatterYM } from '@/utils/formatTime' import { validateTwoNum } from '@/utils/validator' import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 let custormList = [] try { diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts index d9a30c4a3..38f6d0e33 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerToolApportStatementForecastMain/customerToolApportStatementForecastMain.data.ts @@ -1,6 +1,23 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as CustomerSaleInvoiceMainApi from '@/api/wms/customerSaleInvoiceMain' +const { t } = useI18n() // 国际化 +let custormList = [] +try { + custormList = await CustomerSaleInvoiceMainApi.getCustomerList() + + if(custormList.length>0){ + custormList.unshift({ + customerCode:'ALL', + customerName:t('ts.全选'), + }) + } + console.log('custormList11',custormList) + +} catch (error) { + +} // 表单校验 export const CustomerToolApportStatementForecastMainRules = reactive({ customerCode: [required], @@ -20,6 +37,22 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive1?[custormList[0]['customerCode']]:[], + componentProps: { + showAll:true,// 备用做全选 + multiple:true, + // emptyValues:[null, undefined], + valueOnClear:null, + options:custormList.length>0?custormList.map(item=>({ + label:item.customerName, + value:item.customerCode + })):[] + + } + + }, }, { label: '客户名称', @@ -49,28 +82,61 @@ export const CustomerToolApportStatementForecastMain = useCrudSchemas(reactive - + @@ -32,8 +32,8 @@ {{ row.number }} - - + + @@ -56,7 +56,7 @@ - - +