|
|
@ -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' |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|