From d44d15d044c9e1b70f3dbf87b8d7a54ac8983852 Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Thu, 07 May 2026 15:22:19 +0800
Subject: [PATCH] 修改

---
 src/views/work/procurementPlatform/materialMng/components/editDialog.vue |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/views/work/procurementPlatform/materialMng/components/editDialog.vue b/src/views/work/procurementPlatform/materialMng/components/editDialog.vue
index 9aa55d1..b327a30 100644
--- a/src/views/work/procurementPlatform/materialMng/components/editDialog.vue
+++ b/src/views/work/procurementPlatform/materialMng/components/editDialog.vue
@@ -19,6 +19,15 @@
             </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="年份:" prop="year">
+          <el-date-picker
+              v-model="state.form.year"
+              type="year"
+              value-format="YYYY"
+              placeholder="年份"
+              style="width: 100%"
+          />
+        </el-form-item>
         <el-form-item label="材料名称:" prop="materialName">
           <el-input v-model.trim="state.form.materialName" :readonly="state.title =='查看'" placeholder="材料名称"></el-input>
         </el-form-item>
@@ -65,6 +74,7 @@
     specification: '',
     materialBatch:'',
     materialUnit: '',
+    year:new Date().getFullYear().toString(),
     inventory: ''
   },
   formRules:{
@@ -73,7 +83,8 @@
     materialBatch: [{ required: true, message: '请输入批次', trigger: 'blur' }],
     specification: [{ required: true, message: '请输入规格', trigger: 'blur' }],
     materialUnit: [{ required: true, message: '请输入单位', trigger: 'blur' }],
-    inventory: [{ required: true, message: '请输入库存量', trigger: 'blur' }]
+    inventory: [{ required: true, message: '请输入库存量', trigger: 'blur' }],
+    year: [{ required: true, message: '请选择年份', trigger: 'blur' }],
   },
   isAdmin: false,
   companyList: []
@@ -110,7 +121,8 @@
         materialBatch:state.form.materialBatch,
         specification: state.form.specification,
         materialUnit: state.form.materialUnit,
-        inventory: state.form.inventory
+        inventory: state.form.inventory,
+        year:state.form.year
       }
     }else{
       data = state.form
@@ -136,6 +148,7 @@
     specification: '',
     materialBatch:'',
     materialUnit: '',
+    year:new Date().getFullYear().toString(),
     inventory: ''
   }
   superRef.value.clearValidate();

--
Gitblit v1.9.2