From 5c1030c892001a3420e6481946e455c1aa442246 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Sat, 12 Oct 2024 10:48:16 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6=E5=8D=95?=
=?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=B9=E6=B3=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/wms/customerStatementDetail/index.ts | 11 ++-
src/components/Detail/src/Detail.vue | 3 +
src/locales/zh-CN.ts | 2 +-
src/views/login/components/LoginForm.vue | 20 ++---
.../customerStatementMain.data.ts | 12 +--
.../customerStatement/index.vue | 80 ++++++++++++++-----
6 files changed, 88 insertions(+), 40 deletions(-)
diff --git a/src/api/wms/customerStatementDetail/index.ts b/src/api/wms/customerStatementDetail/index.ts
index c1bb2837c..57e541428 100644
--- a/src/api/wms/customerStatementDetail/index.ts
+++ b/src/api/wms/customerStatementDetail/index.ts
@@ -45,7 +45,16 @@ export const getCustomerStatementDetailPage = async (params) => {
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 })
+ }
+}
// 查询客户对账单子信息表(WMS)详情
export const getCustomerStatementDetail = async (id: number) => {
return await request.get({ url: `/wms/customer-statement-detail/get?id=` + id })
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index d34a31098..ea69c0f83 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -912,6 +912,9 @@ const buttonBaseClick = (val, item) => {
}else{
openForm('create')
}
+ } else if (val == 'export') {
+ // 刷新
+ emit('buttonBaseClick',val, item,tableObject)
} else if (val == 'refresh') {
// 刷新
getList()
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 969885e1b..ea8719a5c 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1301,7 +1301,7 @@ export default {
发票回转成功: '发票回转成功',
最后更新人:'最后更新人',
可开票数量范围是: '可开票数量范围是',
- 重新比对: '重新比对',
+ 重新对比: '重新对比',
确认对比结果: '确认对比结果',
确认分摊金额: '确认分摊金额',
导入模具分摊对账单: '导入模具分摊对账单',
diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue
index 5ab2c3bbc..04b15d7ba 100644
--- a/src/views/login/components/LoginForm.vue
+++ b/src/views/login/components/LoginForm.vue
@@ -307,16 +307,16 @@
authUtil.removeLoginForm()
}
authUtil.setToken(res)
- if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
- await ElMessageBox.alert(
- '系统迁移,请移步至' +
- `${getSystermUpdateUrl()}`,
- '重要提示',
- {
- dangerouslyUseHTMLString: true,
- }
- )
- }
+ // if(getSystermUpdateAlert()=='true'||getSystermUpdateAlert()===true){
+ // await ElMessageBox.alert(
+ // '系统迁移,请移步至' +
+ // `${getSystermUpdateUrl()}`,
+ // '重要提示',
+ // {
+ // dangerouslyUseHTMLString: true,
+ // }
+ // )
+ // }
if (!redirect.value) {
redirect.value = '/'
}
diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
index 96d0ec791..5c6f89abe 100644
--- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
+++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/customerStatementMain.data.ts
@@ -253,14 +253,14 @@ export const CustomerStatementReconciliation = useCrudSchemas(reactive
-
+
{{ row.qty }}
@@ -169,13 +169,13 @@ const butttondata = (row, $index) => {
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), // 编辑
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), // 删除
{
- label: t('ts.重新比对'),
+ label: t('ts.重新对比'),
name: 'rematch',
hide: isShowMainButton(row, ['2']),
type: 'primary',
icon: '',
color: '',
- hasPermi: '',
+ hasPermi: 'wms:customer-statement-main:recontrast',
link: true // 文本展现按钮
},
{
@@ -185,7 +185,7 @@ const butttondata = (row, $index) => {
type: 'primary',
icon: '',
color: '',
- hasPermi: '',
+ hasPermi: 'wms:customer-statement-main:confirmationContrast',
link: true // 文本展现按钮
},
{
@@ -194,7 +194,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['3','4']),
type: 'primary',
color: '',
- hasPermi: '',
+ hasPermi: 'wms:customer-statement-main:import',
link: true // 文本展现按钮
},
{
@@ -203,7 +203,7 @@ const butttondata = (row, $index) => {
hide: isShowMainButton(row, ['4']),
type: 'primary',
color: '',
- hasPermi: '',
+ hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true // 文本展现按钮
},
{
@@ -215,8 +215,8 @@ const butttondata = (row, $index) => {
hasPermi: '',
link: true // 文本展现按钮
},
- defaultButtons.mainSendBackBtn({ hide: isShowMainButton(row, ['3','4','5']) }), // 退回
- defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5'])}), // 作废
+ defaultButtons.mainSendBackBtn({hasPermi: 'wms:customer-statement-main:sendBack', hide: isShowMainButton(row, ['3','4','5']) }), // 退回
+ defaultButtons.mainListCancelBtn({ hasPermi: 'wms:customer-statement-main:publish',hide: isShowMainButton(row, ['2','3','4','5'])}), // 作废
]
@@ -443,12 +443,12 @@ const changeTabs = async (item) => {
DetailAllSchemas.value = CustomerStatementDetail.allSchemas
otherHeadButttonData.value = [{
label: t(`ts.导出`).replace('ts.', ''),
- name: 'exportDetail',
+ name: 'export',
hide: false,
type: 'success',
icon: 'ep:download',
color: '',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:export'
}]
} else if (item.prop == 'Reconciliation') {
// 点击对账差异按钮
@@ -459,7 +459,7 @@ const changeTabs = async (item) => {
value: chooseRow.value.id
}]
DetailAllSchemas.value = CustomerStatementReconciliation.allSchemas
- apiPage.value = CustomerStatementMainApi.getCustomerStatementMainPage
+ apiPage.value = CustomerStatementDetailApi.getCustomerStatementReconciliationPage
otherHeadButttonData.value = [
{
label: t(`ts.导出`).replace('ts.', ''),
@@ -468,24 +468,24 @@ const changeTabs = async (item) => {
type: 'success',
icon: 'ep:download',
color: '',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:export'
},
{
label: t('ts.重新对比'),
name: 'againContrast',
- hide: false,
+ hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary',
color: '',
float:'left',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:recontrast'
},{
label: t('ts.确认对比结果'),
name: 'confirmResults',
- hide: false,
+ hide: isShowMainButton( chooseRow.value, ['2']),
type: 'primary',
color: '',
float:'left',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:confirmationContrast'
}]
} else if (item.prop == 'ShareReconciliation') {
// 点击模具分摊对账单按钮
@@ -505,16 +505,16 @@ const changeTabs = async (item) => {
type: 'success',
icon: 'ep:download',
color: '',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:export'
},
{
label: t('ts.确认分摊金额'),
name: 'confirmShareMoney',
- hide: false,
+ hide: isShowMainButton(chooseRow.value, ['4']),
type: 'primary',
color: '',
float:'left',
- hasPermi: ''
+ hasPermi: 'wms:customer-statement-main:confirmationShare'
}]
} else{
tableObjectExtend.value = []
@@ -524,9 +524,17 @@ const changeTabs = async (item) => {
}
}
// 点击子表按钮事件
-const detailButtonBaseClick = (val, item) => {
- if (val == 'exportReconciliation') {
- // 子表导出对账差异
+const detailButtonBaseClick = (val, item,detailTableObject) => {
+ if (val == 'export') {
+ // 子表导出明细
+ if (tabCurrent.value.prop == 'Detail') {
+ handleExportDetail(detailTableObject)
+ } else if (tabCurrent.value.prop == 'Reconciliation') {
+ // 子表导出对账差异
+ handleExportReconciliation(detailTableObject)
+ } {
+
+ }
}else if (val == 'againContrast') {
// 重新对比
}else if (val == 'confirmResults') {
@@ -536,6 +544,34 @@ const detailButtonBaseClick = (val, item) => {
}else if (val == 'confirmShareMoney') {
// 确认分摊金额
}
+}
+ // 子表导出明细
+const handleExportDetail = async (detailTableObject) => {
+ try {
+ // 导出的二次确认
+ await message.exportConfirm()
+ // 发起导出
+ exportLoading.value = true
+ const data = await CustomerStatementDetailApi.exportCustomerStatementDetail(detailTableObject.params)
+ download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`)
+ } catch {
+ } finally {
+ exportLoading.value = false
+ }
+}
+ // 子表导出对账差异
+const handleExportReconciliation = async (detailTableObject) => {
+ try {
+ // 导出的二次确认
+ await message.exportConfirm()
+ // 发起导出
+ exportLoading.value = true
+ const data = await CustomerStatementDetailApi.exportCustomerStatementCompareDetail(detailTableObject.params)
+ download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`)
+ } catch {
+ } finally {
+ exportLoading.value = false
+ }
}
// 模具分摊对账单修改进屋金额
const openDetailForm = (row) => {