结算管理bug修复

This commit is contained in:
hongchao 2025-03-25 16:11:46 +08:00
parent 4503ee71dc
commit 7efa110ee1
3 changed files with 30 additions and 28 deletions

View File

@ -157,7 +157,7 @@ export default {
{ t_prop: 'nuitName', t_label: '计量单位' }, { t_prop: 'nuitName', t_label: '计量单位' },
{ t_prop: 'num', t_label: '数量' }, { t_prop: 'num', t_label: '数量' },
{ t_prop: 'leasePrice', t_label: '台班费单价(元/天)' }, { t_prop: 'leasePrice', t_label: '台班费单价(元/天)' },
{ t_prop: 'startTime', t_label: '起租日期' }, { t_prop: 'startTime', t_label: '起租日期',t_slot: 't_date' },
{ t_prop: 'endTime', t_label: '终止日期', t_slot: 't_date' }, { t_prop: 'endTime', t_label: '终止日期', t_slot: 't_date' },
{ t_prop: 'leaseDays', t_label: '应结算天数' }, { t_prop: 'leaseDays', t_label: '应结算天数' },
{ t_prop: 'costs', t_label: '应结算金额(元)' }, { t_prop: 'costs', t_label: '应结算金额(元)' },

View File

@ -92,7 +92,7 @@
v-for="(t, index) in tableColumns" v-for="(t, index) in tableColumns"
:key="index" :key="index"
:label="t.t_label" :label="t.t_label"
:width="t.t_slot === 't_date' ? '180' : ''" :width="t.t_slot === 't_date' ? '130' : ''"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">

View File

@ -12,12 +12,10 @@
> >
<el-form-item label="结算单位" prop="unitId"> <el-form-item label="结算单位" prop="unitId">
<el-select <el-select
v-model="unitIds" v-model="queryParams.unitId"
placeholder="请选择往来单位" placeholder="请选择往来单位"
clearable clearable
filterable filterable
multiple
collapse-tags
@change="unitChange" @change="unitChange"
> >
<el-option <el-option
@ -29,11 +27,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="结算工程" prop="projectIds"> <el-form-item label="结算工程" prop="projectIds">
<!-- <el-select <el-select
v-model="queryParams.projectId" v-model="projectIds"
placeholder="请选择工程名称" placeholder="请选择工程名称"
clearable clearable
filterable filterable
multiple
collapse-tags
@change="proChange" @change="proChange"
> >
<el-option <el-option
@ -42,14 +42,7 @@
:label="item.projectName" :label="item.projectName"
:value="item.projectId" :value="item.projectId"
/> />
</el-select> --> </el-select>
<el-cascader
v-model="queryParams.projectIds"
:options="projectList"
:props="{ checkStrictly: true, multiple: true, label: 'projectName', value: 'projectId' }"
clearable
filterable
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="结算状态" prop="sltStatus"> <el-form-item label="结算状态" prop="sltStatus">
<el-select v-model="queryParams.sltStatus" placeholder="请选择结算状态" clearable filterable> <el-select v-model="queryParams.sltStatus" placeholder="请选择结算状态" clearable filterable>
@ -209,6 +202,11 @@ export default {
}, },
// ids // ids
unitIds: [], unitIds: [],
// ids
projectIds: [],
//
isArray:false,
// //
exportDialogVisible: false, exportDialogVisible: false,
// //
@ -234,21 +232,24 @@ export default {
// //
unitChange(val){ unitChange(val){
console.log("xxxxxxxxxx",val) console.log("xxxxxxxxxx",val)
if(val.length==0){ if(!val){
setTimeout(()=>{ console.log("yyyyyyyy")
this.getProjectList() this.projectIds = [];
},500) this.queryParams.unitId=null
this.getUnitList()
this.getProjectList()
// this.GetProData()
return return
} }
setTimeout(()=>{ setTimeout(()=>{
this.queryParams.projectId=null
this.GetProData() this.GetProData()
},500) },500)
}, },
// //
proChange(val){ proChange(val){
console.log("xxxxxxxxxx",val) console.log("xxxxxxxxxx",val)
if(!val){ if(val.length==0){
setTimeout(()=>{ setTimeout(()=>{
this.getUnitList() this.getUnitList()
},500) },500)
@ -261,9 +262,8 @@ export default {
// //
async GetProData() { async GetProData() {
const unitIdsAsNumbers = this.unitIds.map(id => Number(id));
const params = { const params = {
unitIds: unitIdsAsNumbers, unitId: this.queryParams.unitId,
} }
const res = await getProjectListByUnitIds(params) const res = await getProjectListByUnitIds(params)
this.projectList = res.data; this.projectList = res.data;
@ -271,9 +271,8 @@ export default {
}, },
// //
async GetUnitData() { async GetUnitData() {
const params = { const params = {
projectId: this.queryParams.projectId, projectIds: this.projectIds,
} }
const res = await getUnitListByProjetctIds(params) const res = await getUnitListByProjetctIds(params)
this.unitList = res.data; this.unitList = res.data;
@ -297,6 +296,7 @@ export default {
getProjectList().then((response) => { getProjectList().then((response) => {
this.projectList = response.data this.projectList = response.data
}) })
console.log("uuuuuuuuuu",this.projectList)
}, },
/** 查询字典类型列表 */ /** 查询字典类型列表 */
@ -304,8 +304,8 @@ export default {
console.log('🚀 ~ getList ~ :', this.queryParams) console.log('🚀 ~ getList ~ :', this.queryParams)
this.loading = true this.loading = true
const params = { const params = {
unitIds: this.unitIds, projectIds: this.projectIds,
projectId: this.queryParams.projectId, unitId: this.queryParams.unitId,
sltStatus: this.queryParams.sltStatus, sltStatus: this.queryParams.sltStatus,
pageNum: this.queryParams.pageNum, pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize, pageSize: this.queryParams.pageSize,
@ -328,8 +328,10 @@ export default {
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.dateRange = [] this.dateRange = []
this.unitIds = [] this.projectIds = []
this.resetForm('queryForm') this.resetForm('queryForm')
this.getUnitList()
this.getProjectList()
this.handleQuery() this.handleQuery()
}, },
// //