未结算报表增加费用减免列

This commit is contained in:
syruan 2025-08-24 19:12:31 +08:00
parent e472d8042e
commit aec4479c80
3 changed files with 46 additions and 12 deletions

View File

@ -244,13 +244,43 @@ export default {
} }
}, },
mounted() { mounted() {
let arr = JSON.parse(this.row) console.log('📋 ApplyDetail 组件挂载,接收到的 row 数据:', this.row);
this.rowData = arr this.initData();
this.getDataAll()
// this.getUnitList(); // this.getUnitList();
// this.getProjectList(); // this.getProjectList();
}, },
activated() {
// keep-alive
console.log('📋 ApplyDetail 组件激活 (keep-alive)row 数据:', this.row);
this.initData();
},
watch: {
// row
row: {
handler(newVal, oldVal) {
console.log('📋 监听到 row 数据变化:', { newVal, oldVal });
if (newVal && newVal !== oldVal) {
this.initData();
}
},
immediate: false
}
},
methods: { methods: {
// - API
initData() {
if (!this.row) {
console.log('📋 row 数据为空,跳过初始化');
return;
}
console.log('📋 开始初始化数据row:', this.row);
let arr = JSON.parse(this.row)
console.log('📋 解析后的数据:', arr);
this.rowData = arr
console.log('📋 准备调用 getDataAll() 获取详情数据');
this.getDataAll()
},
// ,getUnitList, getProjectList // ,getUnitList, getProjectList
getUnitList() { getUnitList() {
getUnitList().then((response) => { getUnitList().then((response) => {
@ -264,7 +294,10 @@ export default {
}, },
/** 查询列表 */ /** 查询列表 */
getDataAll() { getDataAll() {
console.log('🔥 开始调用 getSltInfo API传入参数:', this.rowData);
getSltInfo(this.rowData).then((response) => { getSltInfo(this.rowData).then((response) => {
console.log('🔥 API 调用成功,返回数据:', response);
console.log('🔥 返回的详情数据:', response.data);
this.leaseList = response.data.leaseList // this.leaseList = response.data.leaseList //
this.projectName = response.data.projectName this.projectName = response.data.projectName
this.unitName = response.data.unitName this.unitName = response.data.unitName
@ -311,6 +344,9 @@ export default {
this.costAll = costSum this.costAll = costSum
this.subCostFlag = costSum this.subCostFlag = costSum
}).catch((error) => {
console.error('❌ API 调用失败:', error);
this.$message.error('获取结算详情失败: ' + (error.message || error));
}) })
}, },
//1 //1

View File

@ -431,18 +431,14 @@ export default {
}, },
// //
handleApply(row) { handleApply(row) {
console.log('🚀 handleApply 被调用,传入数据:', row);
let arr = []; let arr = [];
arr.push(row); arr.push(row);
// console.log(arr) console.log('🚀 准备发送的数据:', arr);
// console.log(this.ids) console.log('🚀 JSON化后的数据:', JSON.stringify(arr));
// console.log(JSON.stringify(arr)) // '/cost/costApplyDetail' 使
// this.$tab.closeOpenPage({
// path: '/cost/costApplyDetail',
// query: {
// rowData: JSON.stringify(arr),
// },
// })
this.$emit("goDetail",JSON.stringify(arr)); this.$emit("goDetail",JSON.stringify(arr));
console.log('🚀 goDetail 事件已发出');
}, },
handleApplyList() { handleApplyList() {
if (this.ids.length < 1) { if (this.ids.length < 1) {

View File

@ -39,9 +39,11 @@ export default {
methods: { methods: {
// 退 // 退
goDetail(rowData) { goDetail(rowData) {
console.log('🎯 父组件接收到 goDetail 事件,数据:', rowData);
this.rowData = rowData; this.rowData = rowData;
this.pageContent = '结算详情'; this.pageContent = '结算详情';
this.isShowComponent = 'ApplyDetail'; this.isShowComponent = 'ApplyDetail';
console.log('🎯 组件已切换到 ApplyDetail');
}, },
goBack() { goBack() {
this.isShowComponent = 'ApplyHome' this.isShowComponent = 'ApplyHome'