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: '', purchaseNumber: '',
standardConfig: undefined, standardConfig: undefined,
bmFileInfos: [], bmFileInfos: [],
fitNum: 1, fitNum: 1
}, },
lastFitNum: 1, lastFitNum: 1,
standardConfigList: [], standardConfigList: [],
@ -354,7 +354,7 @@ export default {
} }
setTimeout(() => { setTimeout(() => {
this.fitNum = this.maForm.fitNum this.fitNum = this.maForm.fitNum
}, 500); }, 500)
}, },
watch: { watch: {
maForm: { maForm: {
@ -372,7 +372,7 @@ export default {
fitNumChange() { fitNumChange() {
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1)) const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
const ratio = newVal / this.lastFitNum const ratio = newVal / this.lastFitNum
this.equipmentList.forEach((item) => { this.equipmentList.forEach(item => {
if (typeof item.preNum === 'number') { if (typeof item.preNum === 'number') {
item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 1 item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 1
} }
@ -446,7 +446,11 @@ export default {
}, },
/** 机具类型 */ /** 机具类型 */
equipmentType() { 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.equipmentTypeList = response.data
// //
this.flattenTypeOptions = this.processTypeData(response.data) this.flattenTypeOptions = this.processTypeData(response.data)