diff --git a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue index 90df5b93..8d43681e 100644 --- a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue +++ b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue @@ -281,7 +281,7 @@ export default { purchaseNumber: '', standardConfig: undefined, bmFileInfos: [], - fitNum: 1, + fitNum: 1 }, lastFitNum: 1, standardConfigList: [], @@ -354,7 +354,7 @@ export default { } setTimeout(() => { this.fitNum = this.maForm.fitNum - }, 500); + }, 500) }, watch: { maForm: { @@ -372,7 +372,7 @@ export default { fitNumChange() { const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1)) const ratio = newVal / this.lastFitNum - this.equipmentList.forEach((item) => { + this.equipmentList.forEach(item => { if (typeof item.preNum === 'number') { item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 向下取整,且至少为1 } @@ -446,7 +446,11 @@ export default { }, /** 机具类型 */ equipmentType() { - equipmentTypeTree({ agreementIdList: this.agreementId }).then(response => { + equipmentTypeTree({ + agreementIdList: this.agreementId, + proId: this.maForm.projectId, + teamId: this.maForm.teamId + }).then(response => { this.equipmentTypeList = response.data // 处理并扁平化所有类型数据 this.flattenTypeOptions = this.processTypeData(response.data)