|
@ -72,6 +72,7 @@ |
|
|
</Detail> |
|
|
</Detail> |
|
|
<!-- 导入 --> |
|
|
<!-- 导入 --> |
|
|
<ImportCustomerStatementForm ref="importFormRef" url="/wms/customer-statement-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
<ImportCustomerStatementForm ref="importFormRef" url="/wms/customer-statement-main/import" :importTemplateData="importTemplateData" @success="importSuccess" /> |
|
|
|
|
|
<ImportCustomerStatementShareForm ref="importShareFormRef" url="/wms/customer-tool-apport-statement-detail/import" :importTemplateData="importShareTemplateData" @success="importSuccess" /> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
<script setup lang="ts"> |
|
@ -83,6 +84,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import TableHead from '@/components/TableHead/src/TableHead.vue' |
|
|
import ImportCustomerStatementForm from '@/components/ImportForm/src/ImportCustomerStatementForm.vue' |
|
|
import ImportCustomerStatementForm from '@/components/ImportForm/src/ImportCustomerStatementForm.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
import Detail from '@/components/Detail/src/Detail.vue' |
|
|
|
|
|
import ImportCustomerStatementShareForm from '@/components/ImportForm/src/ImportCustomerStatementShareForm.vue' |
|
|
|
|
|
import { formatDate } from '@/utils/formatTime' |
|
|
|
|
|
|
|
|
defineOptions({ name: 'CustomerStatementMain' }) |
|
|
defineOptions({ name: 'CustomerStatementMain' }) |
|
|
|
|
|
|
|
@ -125,10 +128,8 @@ const { getList, setSearchParams } = tableMethods |
|
|
// 列表头部按钮 |
|
|
// 列表头部按钮 |
|
|
const HeadButttondata = [ |
|
|
const HeadButttondata = [ |
|
|
//defaultButtons.defaultAddBtn({hasPermi:'wms:customerStatementMain:create'}), // 新增 |
|
|
//defaultButtons.defaultAddBtn({hasPermi:'wms:customerStatementMain:create'}), // 新增 |
|
|
//defaultButtons.defaultImportBtn({hasPermi:'wms:customerStatementMain:import'}), // 导入 |
|
|
defaultButtons.defaultImportBtn({hasPermi:'wms:customer-statement-main:import'}), // 导入 |
|
|
//defaultButtons.defaultExportBtn({hasPermi:'wms:customerStatementMain:export'}), // 导出 |
|
|
defaultButtons.defaultExportBtn({hasPermi:'wms:customer-statement-main:export'}), // 导出 |
|
|
defaultButtons.defaultImportBtn(null), // 导入 |
|
|
|
|
|
defaultButtons.defaultExportBtn(null), // 导出 |
|
|
|
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFreshBtn(null), // 刷新 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultFilterBtn(null), // 筛选 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
|
defaultButtons.defaultSetBtn(null), // 设置 |
|
@ -168,7 +169,7 @@ const butttondata = (row, $index) => { |
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), // 编辑 |
|
|
// defaultButtons.mainListEditBtn({hasPermi:'wms:customerStatementMain:update'}), // 编辑 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), // 删除 |
|
|
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:customerStatementMain:delete'}), // 删除 |
|
|
{ |
|
|
{ |
|
|
label: t('重新比对'), |
|
|
label: t('ts.重新比对'), |
|
|
name: 'rematch', |
|
|
name: 'rematch', |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
@ -178,7 +179,7 @@ const butttondata = (row, $index) => { |
|
|
link: true // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label: t('确认对比结果'), |
|
|
label: t('ts.确认对比结果'), |
|
|
name: 'confirmationContrast', |
|
|
name: 'confirmationContrast', |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
hide: isShowMainButton(row, ['2']), |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
@ -187,18 +188,36 @@ const butttondata = (row, $index) => { |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
defaultButtons.mainSendBackBtn({ hide: isShowMainButton(row, ['3','4','5']) }), // 退回 |
|
|
|
|
|
//defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5']), hasPermi: 'wms:purchase-plan-main:update' }), // 作废 |
|
|
|
|
|
defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5'])}), // 作废 |
|
|
|
|
|
{ |
|
|
{ |
|
|
label: t('导入'), |
|
|
label: t('ts.导入模具分摊对账单'), |
|
|
name: 'import', |
|
|
name: 'importShareReconciliation', |
|
|
hide: isShowMainButton(row, ['3','4']), |
|
|
hide: isShowMainButton(row, ['3','4']), |
|
|
type: 'warning', |
|
|
type: 'primary', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true // 文本展现按钮 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: t('ts.确认分摊金额'), |
|
|
|
|
|
name: 'confirmShareMoney', |
|
|
|
|
|
hide: isShowMainButton(row, ['4']), |
|
|
|
|
|
type: 'primary', |
|
|
color: '', |
|
|
color: '', |
|
|
hasPermi: '', |
|
|
hasPermi: '', |
|
|
link: true // 文本展现按钮 |
|
|
link: true // 文本展现按钮 |
|
|
}, |
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: t('ts.创建开票申请'), |
|
|
|
|
|
name: 'createTicketApply', |
|
|
|
|
|
hide: isShowMainButton(row, ['5']), |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true // 文本展现按钮 |
|
|
|
|
|
}, |
|
|
|
|
|
defaultButtons.mainSendBackBtn({ hide: isShowMainButton(row, ['3','4','5']) }), // 退回 |
|
|
|
|
|
defaultButtons.mainListCancelBtn({ hide: isShowMainButton(row, ['2','3','4','5'])}), // 作废 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
] |
|
|
] |
|
|
} |
|
|
} |
|
@ -209,12 +228,16 @@ const buttonTableClick = async (val, row) => { |
|
|
tapRematch(row.id); |
|
|
tapRematch(row.id); |
|
|
} else if (val == 'confirmationContrast') { // 确认对比结果 |
|
|
} else if (val == 'confirmationContrast') { // 确认对比结果 |
|
|
tapConfirmationContrast(row.id) |
|
|
tapConfirmationContrast(row.id) |
|
|
|
|
|
} else if (val == 'importShareReconciliation') { // 导入模具分摊对账单、 |
|
|
|
|
|
handleShareImport(row.id) |
|
|
|
|
|
} else if (val == 'confirmShareMoney') { // 确认分摊金额 |
|
|
|
|
|
handleConfirmShareMoney(row.id) |
|
|
|
|
|
} else if (val == 'createTicketApply') { // 创建开票申请 |
|
|
|
|
|
// handleConfirmShareMoney(row.id) |
|
|
}else if (val == 'sendBack') { // 退回 |
|
|
}else if (val == 'sendBack') { // 退回 |
|
|
tapSendBack(row.id) |
|
|
tapSendBack(row.id) |
|
|
}else if (val == 'cancel') { // 作废 |
|
|
}else if (val == 'cancel') { // 作废 |
|
|
tapCancel(row.id) |
|
|
tapCancel(row.id) |
|
|
}else if (val == 'import') { // 导入 |
|
|
|
|
|
handleDelete(row.id) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -277,8 +300,9 @@ const handleExport = async () => { |
|
|
await message.exportConfirm() |
|
|
await message.exportConfirm() |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
exportLoading.value = true |
|
|
exportLoading.value = true |
|
|
|
|
|
const excelTitle = ref(route.meta.title) |
|
|
const data = await CustomerStatementMainApi.exportCustomerStatementMain(tableObject.params) |
|
|
const data = await CustomerStatementMainApi.exportCustomerStatementMain(tableObject.params) |
|
|
download.excel(data, '客户对账单主信息表(WMS).xlsx') |
|
|
download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) |
|
|
} catch { |
|
|
} catch { |
|
|
} finally { |
|
|
} finally { |
|
|
exportLoading.value = false |
|
|
exportLoading.value = false |
|
@ -287,13 +311,25 @@ const handleExport = async () => { |
|
|
|
|
|
|
|
|
/** 导入 */ |
|
|
/** 导入 */ |
|
|
const importFormRef = ref() |
|
|
const importFormRef = ref() |
|
|
|
|
|
//导入客户模具分摊对账单 |
|
|
|
|
|
const importShareFormRef = ref() |
|
|
const handleImport = () => { |
|
|
const handleImport = () => { |
|
|
importFormRef.value.open() |
|
|
importFormRef.value.open() |
|
|
} |
|
|
} |
|
|
|
|
|
const handleShareImport = (id:number) => { |
|
|
|
|
|
importShareTemplateData.customerId = id |
|
|
|
|
|
importShareFormRef.value.open() |
|
|
|
|
|
} |
|
|
// 导入附件弹窗所需的参数 |
|
|
// 导入附件弹窗所需的参数 |
|
|
const importTemplateData = reactive({ |
|
|
const importTemplateData = reactive({ |
|
|
templateUrl: '', |
|
|
templateUrl: '', |
|
|
templateTitle: '客户对账单导入模版.xlsx' |
|
|
templateTitle: `【${route.meta.title}】导入模版.xlsx` |
|
|
|
|
|
}) |
|
|
|
|
|
//导入客户模具对账单参数 |
|
|
|
|
|
const importShareTemplateData = reactive({ |
|
|
|
|
|
templateUrl: '', |
|
|
|
|
|
templateTitle: '模具分摊对账单导入模版.xlsx', |
|
|
|
|
|
customerId: 0 |
|
|
}) |
|
|
}) |
|
|
// 导入成功之后 |
|
|
// 导入成功之后 |
|
|
const importSuccess = () => { |
|
|
const importSuccess = () => { |
|
@ -318,7 +354,7 @@ onMounted(async () => { |
|
|
const tapRematch = async (id:number) => { |
|
|
const tapRematch = async (id:number) => { |
|
|
try { |
|
|
try { |
|
|
// 确认 |
|
|
// 确认 |
|
|
await message.confirm('是否重新比对') |
|
|
await message.confirm( t('ts.是否重新比对')) |
|
|
await CustomerStatementMainApi.recontrast(id); |
|
|
await CustomerStatementMainApi.recontrast(id); |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
//exportLoading.value = true |
|
|
//exportLoading.value = true |
|
@ -333,7 +369,7 @@ const tapRematch = async (id:number) => { |
|
|
//点击确认对比方法 |
|
|
//点击确认对比方法 |
|
|
const tapConfirmationContrast = async (id:number) => { |
|
|
const tapConfirmationContrast = async (id:number) => { |
|
|
try { |
|
|
try { |
|
|
await message.confirm('是否确认对比结果') |
|
|
await message.confirm( t('ts.是否确认对比结果')) |
|
|
await CustomerStatementMainApi.confirmationContrast(id); |
|
|
await CustomerStatementMainApi.confirmationContrast(id); |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
//exportLoading.value = true |
|
|
//exportLoading.value = true |
|
@ -348,7 +384,7 @@ const tapConfirmationContrast = async (id:number) => { |
|
|
//点击退回方法 |
|
|
//点击退回方法 |
|
|
const tapSendBack = async (id:number) => { |
|
|
const tapSendBack = async (id:number) => { |
|
|
try { |
|
|
try { |
|
|
await message.confirm('是否退回') |
|
|
await message.confirm(t('ts.是否退回')) |
|
|
await CustomerStatementMainApi.sendBack(id); |
|
|
await CustomerStatementMainApi.sendBack(id); |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
//exportLoading.value = true |
|
|
//exportLoading.value = true |
|
@ -363,7 +399,7 @@ const tapSendBack = async (id:number) => { |
|
|
//点击作废方法 |
|
|
//点击作废方法 |
|
|
const tapCancel = async (id:number) => { |
|
|
const tapCancel = async (id:number) => { |
|
|
try { |
|
|
try { |
|
|
await message.confirm('是否作废') |
|
|
await message.confirm(t('ts.是否作废')) |
|
|
await CustomerStatementMainApi.nodeAbrogate(id); |
|
|
await CustomerStatementMainApi.nodeAbrogate(id); |
|
|
// 发起导出 |
|
|
// 发起导出 |
|
|
//exportLoading.value = true |
|
|
//exportLoading.value = true |
|
@ -374,9 +410,18 @@ const tapCancel = async (id:number) => { |
|
|
await getList() |
|
|
await getList() |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 确认分摊金额 |
|
|
// 根据状态返回该按钮是否显示 |
|
|
const handleConfirmShareMoney = async (id:number) => { |
|
|
const isShowMainButton = (row, val) => { |
|
|
try { |
|
|
|
|
|
await message.confirm(t('ts.是否确认分摊金额')) |
|
|
|
|
|
await CustomerStatementMainApi.confirmationShare(id); |
|
|
|
|
|
} finally { |
|
|
|
|
|
// 刷新列表 |
|
|
|
|
|
await getList() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
|
|
const isShowMainButton = (row, val) => { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
if (val.indexOf(row.status) > -1) { |
|
|
return false |
|
|
return false |
|
|
} else { |
|
|
} else { |
|
@ -426,7 +471,7 @@ const changeTabs = async (item) => { |
|
|
hasPermi: '' |
|
|
hasPermi: '' |
|
|
}, |
|
|
}, |
|
|
{ |
|
|
{ |
|
|
label:'重新对比', |
|
|
label: t('ts.重新对比'), |
|
|
name: 'againContrast', |
|
|
name: 'againContrast', |
|
|
hide: false, |
|
|
hide: false, |
|
|
type: 'primary', |
|
|
type: 'primary', |
|
|