From 06cc93927ee3aff4164052b9412444702d062dc2 Mon Sep 17 00:00:00 2001
From: zhang_li
Date: Fri, 25 Apr 2025 10:20:20 +0800
Subject: [PATCH] =?UTF-8?q?YT-2519=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6?=
=?UTF-8?q?=E5=8D=95=E5=8F=98=E6=9B=B4=EF=BC=8C=E8=AF=A6=E8=A7=81=E9=9C=80?=
=?UTF-8?q?=E6=B1=82=E6=8F=8F=E8=BF=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/locales/en-US.ts | 5 +-
src/locales/zh-CN.ts | 3 +
.../customerStatement/index.vue | 85 +++++++++++++++++++
3 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts
index 4c195e17d..f0f471b00 100644
--- a/src/locales/en-US.ts
+++ b/src/locales/en-US.ts
@@ -1313,13 +1313,16 @@ export default {
重新对比成功: 'Re comparison successful',
确认对比结果: 'Confirm the comparison results',
确认成功: 'Confirmed successful',
+ 确认不分摊成功: 'Confirm successful non allocation',
确认分摊金额: 'Confirm the shared amount',
+ 确认不分摊: 'Confirm not to allocate',
导入模具分摊对账单: 'Import mold allocation statement',
是否重新对比: 'Do you want to re compare?',
是否确认对比结果: 'Are you sure about the comparison results?',
"是否退回所选中数据?": 'Do you want to return the selected data?',
退回成功: 'Returned successfully',
- 是否确认分摊金额: 'Do you want to confirm the allocation amount?',
+ 是否确认分摊金额: 'Are you sure about the allocation amount?',
+ 是否确认不分摊: 'Are you sure not to allocate?',
创建开票申请: 'Create an invoice request?',
详情:'Detail',
退回:'Return',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 4fa544df5..97dd8493b 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -1313,13 +1313,16 @@ export default {
重新对比成功: '重新对比成功',
确认对比结果: '确认对比结果',
确认成功: '确认成功',
+ 确认不分摊成功: '确认不分摊成功',
确认分摊金额: '确认分摊金额',
+ 确认不分摊: '确认不分摊',
导入模具分摊对账单: '导入模具分摊对账单',
是否重新对比: '是否重新对比?',
"是否确认对比结果": "是否确认对比结果?",
"是否退回所选中数据?": '是否退回所选中数据?',
退回成功: '退回成功',
是否确认分摊金额: '是否确认分摊金额?',
+ 是否确认不分摊: '是否确认不分摊?',
创建开票申请: '创建开票申请',
作废成功:'作废成功',
退回: '退回',
diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
index 1f75ab7fa..1334402d2 100644
--- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
+++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue
@@ -291,6 +291,15 @@ const butttondata = (row, $index) => {
hasPermi: 'wms:customer-statement-main:confirmationShare',
link: true // 文本展现按钮
},
+ {
+ label: t('ts.确认不分摊'),
+ name: 'confirmationNoShare',
+ hide: row.isNoShare!='1',
+ type: 'primary',
+ color: '',
+ hasPermi: 'wms:customer-statement-main:confirmationShare',
+ link: true // 文本展现按钮
+ },
{
label: t('ts.创建开票申请'),
name: 'createTicketApply',
@@ -327,6 +336,9 @@ const buttonTableClick = async (val, row) => {
} else if (val == 'confirmShareMoney') {
// 确认分摊金额
handleConfirmShareMoney(row.id)
+ } else if (val == 'confirmationNoShare') {
+ // 确认不分摊金额
+ handleConfirmationNoShare(row.id)
} else if (val == 'createTicketApply') {
// 创建开票申请
let mainRes = await CustomerStatementMainApi.getCustomerStatementMain(row.id)
@@ -572,6 +584,26 @@ const handleConfirmShareMoney = async (id: number) => {
await getList()
}
}
+// 确认不分摊金额
+const handleConfirmationNoShare = async (id: number) => {
+ try {
+ await message.confirm(t('ts.是否确认不分摊'))
+ await CustomerStatementMainApi.confirmationNoShare(id)
+ // chooseRow.value = 5
+ let res = await CustomerStatementMainApi.getCustomerStatementMainPage({
+ id:chooseRow.value.id,
+ pageSize:20,
+ pageNo:1
+ })
+ if(res&&res.list&&res.list.length>0){
+ chooseRow.value = res.list[0]
+ }
+ await message.success(t('ts.确认不分摊成功'))
+ } finally {
+ // 刷新列表
+ await getList()
+ }
+}
// 根据状态返回该按钮是否显示
const isShowMainButton = (row, val) => {
if (val.indexOf(row.status) > -1) {
@@ -580,6 +612,14 @@ const isShowMainButton = (row, val) => {
return true
}
}
+// 根据状态返回该按钮是否显示
+const isShowMainButton1 = (row, val) => {
+ if (val.indexOf(row.isNoShare) > -1) {
+ return false
+ } else {
+ return true
+ }
+}
const tabCurrent = ref({})
const changeTabs = async (item) => {
tabCurrent.value = item
@@ -684,6 +724,16 @@ console.log(555,DetailAllSchemas.value)
float: 'left',
disabled: chooseRow.value.isShare == 0 ? true : false,
hasPermi: 'wms:customer-statement-main:confirmationShare'
+ },
+ {
+ label: t('ts.确认不分摊'),
+ name: 'confirmationNoShare',
+ hide: isShowMainButton1(chooseRow.value, ['1']),
+ type: 'primary',
+ color: '',
+ float: 'left',
+ disabled: chooseRow.value.isNoShare == 0 ? true : false,
+ hasPermi: 'wms:customer-statement-main:confirmationShare'
}
]
} else {
@@ -747,6 +797,23 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => {
}
]
} catch {}
+ }else if (val == 'confirmationNoShare') {
+ // 确认分摊金额
+ try {
+ await handleConfirmationNoShare(chooseRow.value.id)
+ detailRef.value.submitUpdateList()
+ otherHeadButttonData.value = [
+ {
+ label: t(`ts.导出`).replace('ts.', ''),
+ name: 'export',
+ hide: false,
+ type: 'success',
+ icon: 'ep:download',
+ color: '',
+ hasPermi: 'wms:customer-statement-main:export'
+ }
+ ]
+ } catch {}
}
}
// 子表导出明细
@@ -833,6 +900,15 @@ const handleDetailSubmitForm = async (formType, data) => {
disabled:true,
float: 'left',
hasPermi: 'wms:customer-statement-main:confirmationShare'
+ }, {
+ label: t('ts.确认不分摊'),
+ name: 'confirmationNoShare',
+ hide: isShowMainButton1(chooseRow.value, ['1']),
+ type: 'primary',
+ color: '',
+ float: 'left',
+ disabled:true,
+ hasPermi: 'wms:customer-statement-main:confirmationShare'
}
]
} else {
@@ -855,6 +931,15 @@ const handleDetailSubmitForm = async (formType, data) => {
disabled:false,
float: 'left',
hasPermi: 'wms:customer-statement-main:confirmationShare'
+ } ,{
+ label: t('ts.确认不分摊'),
+ name: 'confirmationNoShare',
+ hide: isShowMainButton1(chooseRow.value, ['1']),
+ type: 'primary',
+ color: '',
+ float: 'left',
+ disabled: false,
+ hasPermi: 'wms:customer-statement-main:confirmationShare'
}
]
}