This commit is contained in:
bb_pan 2025-07-04 16:02:21 +08:00
parent 24bc952231
commit eb5fe96f1c
1 changed files with 8 additions and 4 deletions

View File

@ -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)