|
|
@ -1,11 +1,11 @@ |
|
|
|
<template> |
|
|
|
<ContentWrap> |
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
<Search |
|
|
|
<Search ref="seachRef" |
|
|
|
:schema="CustomerStatementMain.allSchemas.searchSchema" |
|
|
|
@search="setSearchParams" |
|
|
|
@reset="setSearchParams" |
|
|
|
@search="searchClick" @reset="searchClick" @onChange="onSearchChange" |
|
|
|
/> |
|
|
|
|
|
|
|
</ContentWrap> |
|
|
|
|
|
|
|
<!-- 列表头部 --> |
|
|
@ -428,7 +428,42 @@ const searchFormClick = (searchData) => { |
|
|
|
} |
|
|
|
getList() // 刷新当前列表 |
|
|
|
} |
|
|
|
|
|
|
|
const seachRef = ref() |
|
|
|
const onSearchChange = (field, value)=>{ |
|
|
|
if(field=='status'){ |
|
|
|
// 状态 |
|
|
|
if(value.length>0){ |
|
|
|
if(value[value.length-1]==''){ |
|
|
|
//全选 |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
status:[''] |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
status:value.filter(item=>item!='') |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
if(field=='customerCode'){ |
|
|
|
if(value.length>0){ |
|
|
|
if(value[value.length-1]=='ALL'){ |
|
|
|
//全选 |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
customerCode:['ALL'] |
|
|
|
}) |
|
|
|
}else{ |
|
|
|
seachRef.value.setFormValues({ |
|
|
|
customerCode:value.filter(item=>item!='ALL') |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
const searchClick = async (data)=>{ |
|
|
|
console.log('查询',data) |
|
|
|
setSearchParams({...data,customerCode:data.customerCode.filter(item=>item!='ALL'),status:data.status.filter(item=>item!='')}) |
|
|
|
} |
|
|
|
/** 初始化 **/ |
|
|
|
onMounted(async () => { |
|
|
|
getList() |
|
|
@ -640,6 +675,7 @@ const detailButtonBaseClick = async (val, item, detailTableObject) => { |
|
|
|
handleExportReconciliation(detailTableObject) |
|
|
|
} else if (tabCurrent.value.prop == 'ShareReconciliation') { |
|
|
|
// 子表导出模具分摊对账单 |
|
|
|
handleExportShareReconciliation(detailTableObject) |
|
|
|
} |
|
|
|
} else if (val == 'againContrast') { |
|
|
|
// 重新对比 |
|
|
@ -693,7 +729,24 @@ const handleExportDetail = async (detailTableObject) => { |
|
|
|
const data = await CustomerStatementDetailApi.exportCustomerStatementDetail( |
|
|
|
detailTableObject.params |
|
|
|
) |
|
|
|
download.excel(data, `对账差异【${formatDate(new Date())}】.xlsx`) |
|
|
|
download.excel(data, `客户对账单明细子【${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 模具分摊对账单导出 |
|
|
|
const handleExportShareReconciliation = async (detailTableObject) => { |
|
|
|
try { |
|
|
|
// 导出的二次确认 |
|
|
|
await message.exportConfirm() |
|
|
|
// 发起导出 |
|
|
|
exportLoading.value = true |
|
|
|
const data = await CustomerStatementDetailApi.exportCustomerStatementShareReconciliatioDetail( |
|
|
|
detailTableObject.params |
|
|
|
) |
|
|
|
download.excel(data, `模具分摊对账单子${formatDate(new Date())}】.xlsx`) |
|
|
|
} catch { |
|
|
|
} finally { |
|
|
|
exportLoading.value = false |
|
|
|