结算管理

This commit is contained in:
hongchao 2025-03-25 08:49:27 +08:00
parent 353902a469
commit a876f1bbfd
3 changed files with 121 additions and 17 deletions

View File

@ -87,7 +87,19 @@ export const costAuditingPassApi = (params) => {
params params
}) })
} }
/** 获取工程下拉接口*/
export const getProjectListByUnitIds = (params) => {
return request.get('/material/sltAgreementInfo/getProjectListByUnitIds', {
params
})
}
/** 获取单位下拉接口*/
export const getUnitListByProjetctIds = (params) => {
return request.get('/material/sltAgreementInfo/getUnitListByProjetctIds', {
params
})
}

View File

@ -3,8 +3,8 @@
<div> <div>
<PageHeader :pageContent="pageContent" @goBack="goBack" /> <PageHeader :pageContent="pageContent" @goBack="goBack" />
<div class="row-header"> <div class="row-header">
<div>领用单位{{ currRowInfo.unitName }}</div> <div>领用单位{{ uniqueUnitNames.join(', ') }}</div>
<div>工程名称{{ currRowInfo.projectName }}</div> <div>工程名称{{ uniqueProjectNames.join(', ') }}</div>
<div>总合计{{ totalAmount }}</div> <div>总合计{{ totalAmount }}</div>
<div> <div>
<el-button <el-button
@ -50,7 +50,7 @@
:listType="3" :listType="3"
:isRepair="true" :isRepair="true"
:tableTitle="`设备维修清单`" :tableTitle="`设备维修清单`"
:currRowInfo="currRowInfo" :currRowInfo="currRowInfo[0]"
:tableData="repairTableData" :tableData="repairTableData"
@handleExport="handleExport" @handleExport="handleExport"
:totalPrice="repairTotalPrice" :totalPrice="repairTotalPrice"
@ -94,7 +94,7 @@
size="mini" size="mini"
type="primary" type="primary"
@click="submitComSett" @click="submitComSett"
v-if="currRowInfo.isSlt == 0" v-if="currRowInfo[0].isSlt == 0"
>确认完工结算</el-button >确认完工结算</el-button
> >
</el-row> </el-row>
@ -124,11 +124,19 @@ export default {
}, },
// //
currRowInfo: { currRowInfo: {
type: Object, type: Array,
default: () => null, default: () => [],
}, },
}, },
computed: { computed: {
//
uniqueUnitNames() {
return [...new Set(this.currRowInfo.map(item => item.unitName))].filter(name => name);
},
//
uniqueProjectNames() {
return [...new Set(this.currRowInfo.map(item => item.projectName))].filter(name => name);
},
totalAmount() { totalAmount() {
return ( return (
this.settleTotalPrice_01 * 1 + this.settleTotalPrice_01 * 1 +
@ -238,9 +246,8 @@ export default {
methods: { methods: {
/** 获取结算信息 */ /** 获取结算信息 */
async getComSellList() { async getComSellList() {
const { data: res } = await getComSellQueryApi([ console.log("xxxxxxxxxxxxxxxx", this.currRowInfo)
{ agreementId: this.currRowInfo.agreementId }, const { data: res } = await getComSellQueryApi(this.currRowInfo)
])
this.settleTableData_01 = res.leaseListOne // 01 this.settleTableData_01 = res.leaseListOne // 01
this.settleTableData_03 = res.leaseListThree // 03 this.settleTableData_03 = res.leaseListThree // 03

View File

@ -10,12 +10,15 @@
v-show="showSearch" v-show="showSearch"
label-width="80px" label-width="80px"
> >
<el-form-item label="结算单位" prop="unitId"> <el-form-item label="结算单位" prop="unitId">
<el-select <el-select
v-model="queryParams.unitId" v-model="unitIds"
placeholder="请选择往来单位" placeholder="请选择往来单位"
clearable clearable
filterable filterable
multiple
collapse-tags
@change="unitChange"
> >
<el-option <el-option
v-for="item in unitList" v-for="item in unitList"
@ -31,6 +34,7 @@
placeholder="请选择工程名称" placeholder="请选择工程名称"
clearable clearable
filterable filterable
@change="proChange"
> >
<el-option <el-option
v-for="item in projectList" v-for="item in projectList"
@ -76,6 +80,14 @@
@click="handleBatchExport" @click="handleBatchExport"
>批量导出月结明细表</el-button >批量导出月结明细表</el-button
> >
<el-button
icon="el-icon-refresh"
size="mini"
@click="handleBatchSlt"
:disabled="
ids.length == 0 "
>批量结算</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -86,7 +98,7 @@
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
ref="tableRef" ref="tableRef"
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" :selectable="selectAble"/>
<el-table-column <el-table-column
align="center" align="center"
label="序号" label="序号"
@ -195,7 +207,7 @@
<script> <script>
import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive' import { getUnitList, getProjectList } from '@/api/claimAndRefund/receive'
import { getSltAgreementInfo } from '@/api/cost/cost' import { getSltAgreementInfo,getProjectListByUnitIds,getUnitListByProjetctIds } from '@/api/cost/cost'
import ExportDialog from './component/exportDialog.vue' import ExportDialog from './component/exportDialog.vue'
import MonthRecord from './component/monthRecord.vue' import MonthRecord from './component/monthRecord.vue'
@ -248,6 +260,8 @@ export default {
unitId: '', unitId: '',
projectId: '', projectId: '',
}, },
// ids
unitIds: [],
// //
exportDialogVisible: false, exportDialogVisible: false,
// //
@ -255,7 +269,7 @@ export default {
// //
isHome: true, isHome: true,
// //
currRowInfo: null, currRowInfo: [],
// //
pageContent: '', pageContent: '',
// //
@ -270,6 +284,62 @@ export default {
this.getProjectList() this.getProjectList()
}, },
methods: { methods: {
//
unitChange(val){
console.log("xxxxxxxxxx",val)
if(val.length==0){
setTimeout(()=>{
this.getProjectList()
},500)
return
}
setTimeout(()=>{
this.queryParams.projectId=null
this.GetProData()
},500)
},
//
proChange(val){
console.log("xxxxxxxxxx",val)
if(!val){
setTimeout(()=>{
this.getUnitList()
},500)
return
}
setTimeout(()=>{
this.GetUnitData()
},500)
},
//
async GetProData() {
const unitIdsAsNumbers = this.unitIds.map(id => Number(id));
const params = {
unitIds: unitIdsAsNumbers,
}
const res = await getProjectListByUnitIds(params)
this.projectList = res.data;
},
//
async GetUnitData() {
const params = {
projectId: this.queryParams.projectId,
}
const res = await getUnitListByProjetctIds(params)
this.unitList = res.data;
},
selectAble(row) {
if (row.isSlt != 1) {
return true
}else{
return false
}
},
// ,getUnitList, getProjectList // ,getUnitList, getProjectList
getUnitList() { getUnitList() {
getUnitList().then((response) => { getUnitList().then((response) => {
@ -285,7 +355,14 @@ export default {
/** 查询字典类型列表 */ /** 查询字典类型列表 */
getList() { getList() {
this.loading = true this.loading = true
getSltAgreementInfo(this.queryParams).then((response) => { const params = {
unitIds: this.unitIds,
projectId: this.queryParams.projectId,
sltStatus: this.queryParams.sltStatus,
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
}
getSltAgreementInfo(params).then((response) => {
this.agreementList = response.rows this.agreementList = response.rows
this.total = response.total this.total = response.total
this.loading = false this.loading = false
@ -300,6 +377,7 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = [] this.dateRange = []
this.unitIds = []
this.resetForm('queryForm') this.resetForm('queryForm')
this.handleQuery() this.handleQuery()
}, },
@ -332,6 +410,13 @@ export default {
this.ids = selection.map((item) => item) this.ids = selection.map((item) => item)
}, },
//
handleBatchSlt() {
this.currRowInfo = this.ids
this.pageContent = '完工结算'
this.isHome = false
},
/** 批量导出月结明细表 */ /** 批量导出月结明细表 */
handleBatchExport() { handleBatchExport() {
console.log('批量导出月结明细表') console.log('批量导出月结明细表')
@ -379,7 +464,7 @@ export default {
}, },
/** 完工结算 结算明细*/ /** 完工结算 结算明细*/
handleFinishCostAndDetails(row, isSlt) { handleFinishCostAndDetails(row, isSlt) {
this.currRowInfo = row this.currRowInfo = [row]
// this.pageContent = '' // this.pageContent = ''
isSlt == 1 isSlt == 1
? (this.pageContent = '结算明细') ? (this.pageContent = '结算明细')