From a09623776190a28c33020d3e3ae29cf613df4dd9 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Fri, 18 Oct 2024 17:11:54 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E5=AF=B9=E8=B4=A6=E5=8D=95?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E5=88=86=E6=91=8A=E9=87=91=E9=A2=9D=E4=B8=AD?= =?UTF-8?q?=E8=8B=B1=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Detail/src/Detail.vue | 3 + src/locales/en-US.ts | 4 +- src/locales/zh-CN.ts | 6 +- .../customerStatement/index.vue | 75 ++++++++++++++++++- 4 files changed, 79 insertions(+), 9 deletions(-) diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue index 37c35d170..c8ebbd536 100644 --- a/src/components/Detail/src/Detail.vue +++ b/src/components/Detail/src/Detail.vue @@ -1187,6 +1187,9 @@ watch( () => props.otherHeadButttonData, (val) => { HeadButttondata.value = [...HeadButttondataBackups.value, ...props.otherHeadButttonData] + }, + { + deep: true } ) defineExpose({ openDetail, formRef ,updateList,submitUpdateList,changeTabCurrent,openForm,tableObjectRef}) // 提供 open 方法,用于打开弹窗 diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index 045afaff0..d97935f3b 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1308,8 +1308,8 @@ export default { 导入模具分摊对账单: 'Import mold allocation statement', 是否重新对比: 'Do you want to re compare?', 是否确认对比结果: 'Are you sure about the comparison results?', - 是否退回: 'Do you want to return it?', - 是否作废: 'Do you want to invalidate it?', + "是否退回所选中数据?": 'Do you want to return the selected data?', + 退回成功: 'Returned successfully', 是否确认分摊金额: 'Do you want to confirm the allocation amount?', 创建开票申请: 'Create an invoice request?', }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index 41339b7ec..acf92e53e 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1308,9 +1308,9 @@ export default { 确认分摊金额: '确认分摊金额', 导入模具分摊对账单: '导入模具分摊对账单', 是否重新对比: '是否重新对比?', - 是否确认对比结果: "是否确认对比结果?", - 是否退回: '是否退回?', - 是否作废: '是否作废?', + "是否确认对比结果": "是否确认对比结果?", + "是否退回所选中数据?": '是否退回所选中数据?', + 退回成功: '退回成功', 是否确认分摊金额: '是否确认分摊金额?', 创建开票申请: '创建开票申请', }, diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue index 3d6249207..0b2d09215 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue @@ -468,8 +468,9 @@ const tapConfirmationContrast = async (id: number) => { //点击退回方法 const tapSendBack = async (id: number) => { try { - await message.confirm(t('ts.是否退回')) + await message.confirm(t('ts.是否退回所选中数据?')) await CustomerStatementMainApi.sendBack(id) + await message.success(t('ts.退回成功')) // 发起导出 //exportLoading.value = true } catch { @@ -482,8 +483,9 @@ const tapSendBack = async (id: number) => { //点击作废方法 const tapCancel = async (id: number) => { try { - await message.confirm(t('ts.是否作废')) + await message.confirm(t('ts.是否作废所选中数据?')) await CustomerStatementMainApi.nodeAbrogate(id) + await message.success(t('ts.作废成功')) // 发起导出 //exportLoading.value = true } catch { @@ -497,6 +499,7 @@ const handleConfirmShareMoney = async (id: number) => { try { await message.confirm(t('ts.是否确认分摊金额')) await CustomerStatementMainApi.confirmationShare(id) + await message.success(t('ts.确认成功')) } finally { // 刷新列表 await getList() @@ -652,10 +655,23 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => { } ] } catch {} - } else if (val == 'exportConfirmShareMoney') { - // 子表导出模具分摊对账单 } else if (val == 'confirmShareMoney') { // 确认分摊金额 + try { + await handleConfirmShareMoney(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 {} } } // 子表导出明细 @@ -697,8 +713,59 @@ const openDetailForm = (row) => { // 调整金额提交 const handleDetailSubmitForm = async (formType, data) => { console.log(detailRef.value.tableObjectRef.tableList) + await CustomerStatementDetailApi.updateAdjustmentAmount(data.id,data.masterId,data.adjustmentAmount) message.success(t('common.updateSuccess')) detailRef.value.submitUpdateList() + const amount = ref(0) + detailRef.value.tableObjectRef.tableList.forEach(item => { + amount.value = amount.value + item.adjustmentAmount + }) + // 确认分摊金额 + if (amount.value == 0) { + otherHeadButttonData.value = [ + { + label: t(`ts.导出`).replace('ts.', ''), + name: 'export', + hide: false, + type: 'success', + icon: 'ep:download', + color: '', + hasPermi: 'wms:customer-statement-main:export' + }, + { + label: t('ts.确认分摊金额'), + name: 'confirmShareMoney', + hide: isShowMainButton(chooseRow.value, ['4']), + type: 'primary', + color: '', + disabled:true, + float: 'left', + hasPermi: 'wms:customer-statement-main:confirmationShare' + } + ] + } else { + otherHeadButttonData.value = [ + { + label: t(`ts.导出`).replace('ts.', ''), + name: 'export', + hide: false, + type: 'success', + icon: 'ep:download', + color: '', + hasPermi: 'wms:customer-statement-main:export' + }, + { + label: t('ts.确认分摊金额'), + name: 'confirmShareMoney', + hide: isShowMainButton(chooseRow.value, ['4']), + type: 'primary', + color: '', + disabled:false, + float: 'left', + hasPermi: 'wms:customer-statement-main:confirmationShare' + } + ] + } }