结算管理修复
This commit is contained in:
parent
5294297fbc
commit
2f143d0f83
|
|
@ -737,6 +737,7 @@ export default {
|
|||
|
||||
// 生成成套附属设备
|
||||
getCtFileList(ctData) {
|
||||
console.log("hhhhhhhhhhh",ctData)
|
||||
for (const key in ctData) {
|
||||
const ctList = {
|
||||
wholeTypeName: key,
|
||||
|
|
@ -751,9 +752,9 @@ export default {
|
|||
taskName: this.queryParams.taskName,
|
||||
}
|
||||
})
|
||||
if(this.wholeTypeNameList.length == 0){
|
||||
// if(this.wholeTypeNameList.length == 0){
|
||||
this.wholeTypeNameList.push(ctList)
|
||||
}
|
||||
// }
|
||||
// this.wholeTypeNameList.push(ctList)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
@ -320,15 +320,20 @@ export default {
|
|||
exportList[0].codeNum += e.codeNum + ','
|
||||
})
|
||||
exportList[0].codeNum = exportList[0].codeNum.slice(0, -1)
|
||||
this.downloadZip(
|
||||
'material/sltAgreementInfo/exportLeaseMonthZip',
|
||||
JSON.stringify(exportList),
|
||||
`月结明细${new Date().getTime()}.zip`,
|
||||
)
|
||||
} else {
|
||||
exportList[0].codeNum = row.codeNum
|
||||
}
|
||||
|
||||
this.downloadJson(
|
||||
'material/sltAgreementInfo/exportSltInfoMonth',
|
||||
JSON.stringify(exportList),
|
||||
`月结明细${new Date().getTime()}.xlsx`,
|
||||
)
|
||||
}
|
||||
|
||||
},
|
||||
/** 列表勾选 */
|
||||
handleSelectionChange(list) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@
|
|||
<el-button type="primary" plain size="mini" @click="handleBatchExport"
|
||||
>批量导出结算表</el-button
|
||||
>
|
||||
<el-button type="primary" plain size="mini" @click="handleBatchExport"
|
||||
<el-button type="primary" plain size="mini" @click="handleBatchExportMonth"
|
||||
>批量导出月结明细表</el-button
|
||||
>
|
||||
<el-button
|
||||
|
|
@ -126,13 +126,20 @@
|
|||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 批量导出月结明细 -->
|
||||
<!-- 批量导出结算 -->
|
||||
<ExportDialog
|
||||
:exportDialogVisible="exportDialogVisible"
|
||||
:exportParams="exportParams"
|
||||
@handleCloseDialog="handleCloseDialog"
|
||||
@handleSubmit="handleSubmit"
|
||||
/>
|
||||
<!-- 批量导出月结明细 -->
|
||||
<ExportDialogMonth
|
||||
:exportDialogVisibleMonth="exportDialogVisibleMonth"
|
||||
:exportParamsMonth="exportParamsMonth"
|
||||
@handleCloseDialogMonth="handleCloseDialogMonth"
|
||||
@handleSubmitMonth="handleSubmitMonth"
|
||||
/>
|
||||
<!-- 月结记录弹框 -->
|
||||
<MonthRecord
|
||||
v-if="monthRecordDialogVisible"
|
||||
|
|
@ -152,6 +159,7 @@ import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive'
|
|||
import { getSltAgreementInfo,getProjectListByUnitIds,getUnitListByProjetctIds,exportLeaseAll } from '@/api/cost/cost'
|
||||
import { downloadFile } from '@/utils/download'
|
||||
import ExportDialog from './component/exportDialog.vue'
|
||||
import ExportDialogMonth from './component/exportDialogMonth.vue'
|
||||
import MonthRecord from './component/monthRecord.vue'
|
||||
import FinishAndDetails from './component/finishAndDetails.vue'
|
||||
|
||||
|
|
@ -161,6 +169,7 @@ export default {
|
|||
ExportDialog,
|
||||
MonthRecord,
|
||||
FinishAndDetails,
|
||||
ExportDialogMonth,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -210,10 +219,12 @@ export default {
|
|||
//判断结算工程是否是数组样式
|
||||
isArray:false,
|
||||
|
||||
// 批量导出月结明细弹框
|
||||
// 批量导出结算弹框
|
||||
exportDialogVisible: false,
|
||||
// 月结记录弹框
|
||||
monthRecordDialogVisible: false,
|
||||
// 批量导出月结明细弹框
|
||||
exportDialogVisibleMonth: false,
|
||||
// 是否显示主页
|
||||
isHome: true,
|
||||
// 当前行信息
|
||||
|
|
@ -224,6 +235,8 @@ export default {
|
|||
agreementId: '',
|
||||
// 批量导出的参数
|
||||
exportParams: [],
|
||||
// 批量导出月结明细的参数
|
||||
exportParamsMonth: [],
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
@ -373,9 +386,8 @@ export default {
|
|||
this.isHome = false
|
||||
},
|
||||
|
||||
/** 批量导出月结明细表 */
|
||||
/** 批量导出结算表 */
|
||||
handleBatchExport() {
|
||||
console.log('批量导出月结明细表')
|
||||
this.exportParams = []
|
||||
if (this.ids.length < 1) {
|
||||
this.$message.error('请勾选需要导出的数据!')
|
||||
|
|
@ -395,6 +407,28 @@ export default {
|
|||
|
||||
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() {
|
||||
this.exportDialogVisible = false
|
||||
|
|
@ -413,12 +447,48 @@ export default {
|
|||
this.downloadZip(
|
||||
'material/sltAgreementInfo/exportLeaseAll',
|
||||
JSON.stringify(this.exportParams),
|
||||
`月结明细${new Date().getTime()}.zip`,
|
||||
`结算_${new Date().getTime()}.zip`,
|
||||
)
|
||||
|
||||
this.exportDialogVisible = false
|
||||
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) {
|
||||
this.agreementId = row.agreementId
|
||||
|
|
|
|||
Loading…
Reference in New Issue