Browse Source

2026-06-18

测试申请新增时的“材料总金额”显示有误
master
fengyuan_yang 12 hours ago
parent
commit
d474136538
  1. 18
      src/views/modules/test/requestForTest.vue

18
src/views/modules/test/requestForTest.vue

@ -360,7 +360,7 @@
</el-row> </el-row>
<el-row :gutter="15"> <el-row :gutter="15">
<el-col :span="24" style="position: relative;"> <el-col :span="24" style="position: relative;">
<span style="margin-right: 10px; color: #f56c6c; font-weight: bold; font-size: 14px; position: absolute; right: 0; top: 0; z-index: 2; pointer-events: none;">材料总金额{{ materialTotalAmount.toFixed(2) }}</span>
<span style="margin-right: 10px; color: #f56c6c; font-weight: bold; font-size: 14px; position: absolute; right: 0; top: 0; z-index: 2; pointer-events: none;">材料总金额{{ displayMaterialTotalAmount.toFixed(2) }}</span>
<el-form-item style="height: 150px;"> <el-form-item style="height: 150px;">
<template slot="label"> <template slot="label">
<el-button v-if="isAuth('107001:dataEntry')" style="margin-left: 2px;width: 115px;line-height: 1;font-size: 12px;" type="primary" @click="handleDataEntry">备注区数据录入</el-button> <el-button v-if="isAuth('107001:dataEntry')" style="margin-left: 2px;width: 115px;line-height: 1;font-size: 12px;" type="primary" @click="handleDataEntry">备注区数据录入</el-button>
@ -1048,6 +1048,13 @@ export default {
return this.testSoBomList.reduce((sum, item) => { return this.testSoBomList.reduce((sum, item) => {
return sum + (Number(item.totalCost) || 0) return sum + (Number(item.totalCost) || 0)
}, 0) }, 0)
},
//
displayMaterialTotalAmount() {
if (this.modalData && this.modalData.flag === '1' && !this.modalData.testNo) {
return 0
}
return this.materialTotalAmount
} }
}, },
name: "test", name: "test",
@ -2970,16 +2977,16 @@ export default {
// return // return
// } // }
// this.confirmProjectPart(); // this.confirmProjectPart();
//
this.modalData.materialTotalAmount = this.materialTotalAmount;
if (this.modalData.flag === '1') { if (this.modalData.flag === '1') {
// 0沿
this.modalData.materialTotalAmount = 0
this.testSoRoutingList = [] this.testSoRoutingList = []
this.testSoBomList = [] this.testSoBomList = []
this.testFileList = []; this.testFileList = [];
this.testPropertiesList = []; this.testPropertiesList = [];
this.saveTest() this.saveTest()
} else { } else {
this.modalData.materialTotalAmount = this.materialTotalAmount
this.updateTest() this.updateTest()
} }
} }
@ -3679,7 +3686,8 @@ export default {
createBy: this.$store.state.user.name, createBy: this.$store.state.user.name,
updateDate: '', updateDate: '',
updateBy: '', updateBy: '',
nodeId: ''
nodeId: '',
materialTotalAmount: 0
} }
this.activeTab = 'attribute'; this.activeTab = 'attribute';
this.activeTabList = ['attribute'] this.activeTabList = ['attribute']

Loading…
Cancel
Save