结算管理修复

This commit is contained in:
hongchao 2025-05-19 17:38:29 +08:00
parent 5294297fbc
commit 2f143d0f83
4 changed files with 181 additions and 13 deletions

View File

@ -737,6 +737,7 @@ export default {
// //
getCtFileList(ctData) { getCtFileList(ctData) {
console.log("hhhhhhhhhhh",ctData)
for (const key in ctData) { for (const key in ctData) {
const ctList = { const ctList = {
wholeTypeName: key, wholeTypeName: key,
@ -751,9 +752,9 @@ export default {
taskName: this.queryParams.taskName, taskName: this.queryParams.taskName,
} }
}) })
if(this.wholeTypeNameList.length == 0){ // if(this.wholeTypeNameList.length == 0){
this.wholeTypeNameList.push(ctList) this.wholeTypeNameList.push(ctList)
} // }
// this.wholeTypeNameList.push(ctList) // this.wholeTypeNameList.push(ctList)
} }

View File

@ -0,0 +1,92 @@
<template>
<!-- 批量导出月结明细弹框 -->
<div>
<el-dialog
title="明细导出"
append-to-body
:visible.sync="exportDialogVisibleMonth"
:before-close="handleCloseDialogMonth"
width="30%"
>
<el-form
:model="exportFormMonth"
label-width="120px"
:rules="rules"
ref="formRef"
>
<!-- <el-form-item label="导出月份">
<el-date-picker
v-model="exportParams.dateMonth"
type="month"
placeholder="请选择导出月份"
value-format="yyyy-MM"
/>
</el-form-item> -->
<el-form-item label="费用承担方" prop="costBearingParty">
<el-checkbox-group v-model="exportFormMonth.costBearingParty">
<el-checkbox label="01" name="01" />
<el-checkbox label="03" name="03" />
</el-checkbox-group>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" type="primary" @click="handleSubmitMonth"
> </el-button
>
<el-button size="mini" @click="handleCloseDialogMonth"
> </el-button
>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
props: {
//
exportDialogVisibleMonth: {
type: Boolean,
default: () => false,
},
},
data() {
return {
exportFormMonth: {
costBearingParty: ['01', '03'],
},
rules: {
costBearingParty: [
{ required: true, message: '请选择费用承担方' },
],
},
}
},
methods: {
/** 关闭 */
handleCloseDialogMonth() {
this.$emit('handleCloseDialogMonth')
},
/** 确定 */
handleSubmitMonth() {
this.$refs.formRef.validate((valid) => {
if (valid) {
this.$emit('handleSubmitMonth', this.exportFormMonth.costBearingParty)
}
})
},
},
watch: {
exportDialogVisibleMonth: {
handler(newVla) {
if (!newVla) {
// this.exportParams.dateMonth = ''
}
},
},
},
}
</script>

View File

@ -320,15 +320,20 @@ export default {
exportList[0].codeNum += e.codeNum + ',' exportList[0].codeNum += e.codeNum + ','
}) })
exportList[0].codeNum = exportList[0].codeNum.slice(0, -1) exportList[0].codeNum = exportList[0].codeNum.slice(0, -1)
this.downloadZip(
'material/sltAgreementInfo/exportLeaseMonthZip',
JSON.stringify(exportList),
`月结明细${new Date().getTime()}.zip`,
)
} else { } else {
exportList[0].codeNum = row.codeNum exportList[0].codeNum = row.codeNum
}
this.downloadJson( this.downloadJson(
'material/sltAgreementInfo/exportSltInfoMonth', 'material/sltAgreementInfo/exportSltInfoMonth',
JSON.stringify(exportList), JSON.stringify(exportList),
`月结明细${new Date().getTime()}.xlsx`, `月结明细${new Date().getTime()}.xlsx`,
) )
}
}, },
/** 列表勾选 */ /** 列表勾选 */
handleSelectionChange(list) { handleSelectionChange(list) {

View File

@ -55,7 +55,7 @@
<el-button type="primary" plain size="mini" @click="handleBatchExport" <el-button type="primary" plain size="mini" @click="handleBatchExport"
>批量导出结算表</el-button >批量导出结算表</el-button
> >
<el-button type="primary" plain size="mini" @click="handleBatchExport" <el-button type="primary" plain size="mini" @click="handleBatchExportMonth"
>批量导出月结明细表</el-button >批量导出月结明细表</el-button
> >
<el-button <el-button
@ -126,13 +126,20 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 批量导出月结明细 --> <!-- 批量导出结算 -->
<ExportDialog <ExportDialog
:exportDialogVisible="exportDialogVisible" :exportDialogVisible="exportDialogVisible"
:exportParams="exportParams" :exportParams="exportParams"
@handleCloseDialog="handleCloseDialog" @handleCloseDialog="handleCloseDialog"
@handleSubmit="handleSubmit" @handleSubmit="handleSubmit"
/> />
<!-- 批量导出月结明细 -->
<ExportDialogMonth
:exportDialogVisibleMonth="exportDialogVisibleMonth"
:exportParamsMonth="exportParamsMonth"
@handleCloseDialogMonth="handleCloseDialogMonth"
@handleSubmitMonth="handleSubmitMonth"
/>
<!-- 月结记录弹框 --> <!-- 月结记录弹框 -->
<MonthRecord <MonthRecord
v-if="monthRecordDialogVisible" v-if="monthRecordDialogVisible"
@ -152,6 +159,7 @@ import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive'
import { getSltAgreementInfo,getProjectListByUnitIds,getUnitListByProjetctIds,exportLeaseAll } from '@/api/cost/cost' import { getSltAgreementInfo,getProjectListByUnitIds,getUnitListByProjetctIds,exportLeaseAll } from '@/api/cost/cost'
import { downloadFile } from '@/utils/download' import { downloadFile } from '@/utils/download'
import ExportDialog from './component/exportDialog.vue' import ExportDialog from './component/exportDialog.vue'
import ExportDialogMonth from './component/exportDialogMonth.vue'
import MonthRecord from './component/monthRecord.vue' import MonthRecord from './component/monthRecord.vue'
import FinishAndDetails from './component/finishAndDetails.vue' import FinishAndDetails from './component/finishAndDetails.vue'
@ -161,6 +169,7 @@ export default {
ExportDialog, ExportDialog,
MonthRecord, MonthRecord,
FinishAndDetails, FinishAndDetails,
ExportDialogMonth,
}, },
data() { data() {
return { return {
@ -210,10 +219,12 @@ export default {
// //
isArray:false, isArray:false,
// //
exportDialogVisible: false, exportDialogVisible: false,
// //
monthRecordDialogVisible: false, monthRecordDialogVisible: false,
//
exportDialogVisibleMonth: false,
// //
isHome: true, isHome: true,
// //
@ -224,6 +235,8 @@ export default {
agreementId: '', agreementId: '',
// //
exportParams: [], exportParams: [],
//
exportParamsMonth: [],
} }
}, },
created() { created() {
@ -373,9 +386,8 @@ export default {
this.isHome = false this.isHome = false
}, },
/** 批量导出月结明细表 */ /** 批量导出结算表 */
handleBatchExport() { handleBatchExport() {
console.log('批量导出月结明细表')
this.exportParams = [] this.exportParams = []
if (this.ids.length < 1) { if (this.ids.length < 1) {
this.$message.error('请勾选需要导出的数据!') this.$message.error('请勾选需要导出的数据!')
@ -395,6 +407,28 @@ export default {
this.exportDialogVisible = true this.exportDialogVisible = true
}, },
/** 批量导出月结明细表 */
handleBatchExportMonth() {
this.exportParamsMonth = []
if (this.ids.length < 1) {
this.$message.error('请勾选需要导出的数据!')
return
}
// id
this.ids.forEach((e) => {
this.exportParamsMonth.push({
agreementId: e.agreementId,
agreementCode: e.agreementCode,
costBearingParty: '',
codeNum: '',
projectName: e.projectName,
unitName: e.unitName,
})
})
this.exportDialogVisibleMonth = true
},
/** 关闭弹框 */ /** 关闭弹框 */
handleCloseDialog() { handleCloseDialog() {
this.exportDialogVisible = false this.exportDialogVisible = false
@ -413,12 +447,48 @@ export default {
this.downloadZip( this.downloadZip(
'material/sltAgreementInfo/exportLeaseAll', 'material/sltAgreementInfo/exportLeaseAll',
JSON.stringify(this.exportParams), JSON.stringify(this.exportParams),
`月结明细${new Date().getTime()}.zip`, `结算_${new Date().getTime()}.zip`,
) )
this.exportDialogVisible = false this.exportDialogVisible = false
this.$refs.tableRef.clearSelection() this.$refs.tableRef.clearSelection()
}, },
/** 关闭月结明细弹框 */
handleCloseDialogMonth() {
this.exportDialogVisibleMonth = false
},
/** 确定月结明细按钮 */
handleSubmitMonth(form) {
console.log("xxxxxxxxxxxxxxxxxx",form)
if (form.length === 1) {
if(form[0]=='01'){
this.exportParamsMonth.forEach((e) => {
e.codeNum = '0'
})
}else{
this.exportParamsMonth.forEach((e) => {
e.codeNum = '1'
})
}
}else{
this.exportParamsMonth.forEach((e) => {
e.codeNum = '0,1'
})
}
// exportLeaseAll(this.exportParams).then(res => {
// downloadFile({ fileName: `_${new Date().getTime()}.zip`, fileData: res, fileType: 'application/zip;charset=utf-8' })
// })
this.downloadZip(
'material/sltAgreementInfo/exportLeaseMonthZip',
JSON.stringify(this.exportParamsMonth),
`结算_${new Date().getTime()}.zip`,
)
this.exportDialogVisibleMonth = false
this.$refs.tableRef.clearSelection()
},
/** 月结记录 */ /** 月结记录 */
handleMonthRecord(row) { handleMonthRecord(row) {
this.agreementId = row.agreementId this.agreementId = row.agreementId