diff --git a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
index c09961a7..13dd6723 100644
--- a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
+++ b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
@@ -132,6 +132,16 @@
rows="2"
/>
+
+
+
@@ -270,8 +280,10 @@ export default {
remark: '',
purchaseNumber: '',
standardConfig: undefined,
- bmFileInfos: []
+ bmFileInfos: [],
+ fitNum: 1,
},
+ lastFitNum: 1,
standardConfigList: [],
// 表单校验
rules: {
@@ -340,6 +352,9 @@ export default {
} else {
this.getBmTeam()
}
+ setTimeout(() => {
+ this.fitNum = this.maForm.fitNum
+ }, 500);
},
watch: {
maForm: {
@@ -354,8 +369,21 @@ export default {
}
},
methods: {
+ fitNumChange() {
+ const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
+ const ratio = newVal / this.lastFitNum
+ this.equipmentList.forEach((item) => {
+ if (typeof item.preNum === 'number') {
+ item.preNum = Math.max(1, Math.floor(item.preNum * ratio)) // 向下取整,且至少为1
+ }
+ })
+
+ this.lastFitNum = newVal
+ this.maForm.fitNum = newVal
+ },
// 获取协议id
getAgreementId() {
+ if (!this.maForm.teamId || !this.maForm.projectId) return
getAgreement({
teamId: this.maForm.teamId,
projectId: this.maForm.projectId