结算管理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: 'num', 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: 'leaseDays', t_label: '应结算天数' },
{ t_prop: 'costs', t_label: '应结算金额(元)' },

View File

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

View File

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