Просмотр исходного кода

数据池管理-企业贸易绩效数据-新增-添加年月下拉框

Sanmu8 1 год назад
Родитель
Сommit
f65d574dc3
1 измененных файлов с 34 добавлено и 7 удалено
  1. 34 7
      src/views/ENTERPRISETRADEPERFORMANCE/index.vue

+ 34 - 7
src/views/ENTERPRISETRADEPERFORMANCE/index.vue

@@ -119,7 +119,7 @@
       </el-table-column>
       <el-table-column label="更新时间" align="center" prop="updateTime">
       </el-table-column>
-      <el-table-column label="更信任" align="center" prop="updateBy">
+      <el-table-column label="更新人" align="center" prop="updateBy">
       </el-table-column>
       <el-table-column
         fixed="right"
@@ -185,14 +185,21 @@
                   </el-select>
                 </el-form-item>
               </el-col>
+
               <el-col :span="12">
-                <el-form-item label="固定资产投资" prop="gdzctz">
-                  <el-input
-                    v-model="form.gdzctz"
-                    placeholder="请输入固定资产投资"
-                  ></el-input>
+                <el-form-item label="年月" prop="dateValue">
+                  <el-date-picker
+                    v-model="form.dateValue"
+                    type="month"
+                    @change="changeDate"
+                    value-format="yyyy-MM"
+                    format="yyyy 年 MM 月"
+                    placeholder="选择年月"
+                  >
+                  </el-date-picker>
                 </el-form-item>
               </el-col>
+
               <el-col :span="12">
                 <el-form-item label="资产分类 " prop="zcfl">
                   <el-input
@@ -249,6 +256,14 @@
                   ></el-input>
                 </el-form-item>
               </el-col>
+              <el-col :span="12">
+                <el-form-item label="固定资产投资" prop="gdzctz">
+                  <el-input
+                    v-model="form.gdzctz"
+                    placeholder="请输入固定资产投资"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
             </el-row>
           </el-form>
         </el-tab-pane>
@@ -437,6 +452,9 @@ export default {
         deptId: [
           { required: true, message: "部门id不能为空", trigger: "blur" },
         ],
+        dateValue: [
+          { required: true, message: "年月不能为空", trigger: "blur" },
+        ],
         gmysgycz: [
           {
             required: true,
@@ -585,6 +603,9 @@ export default {
         yfywjckz: null,
         zlmyjckz: null,
         kjdsywjckz: null,
+        dateValue: null,
+        year:null,
+        month:null
       };
       this.resetForm("form");
     },
@@ -604,6 +625,12 @@ export default {
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
+    changeDate(val){
+      this.form.year = this.form.dateValue.slice(0,4)
+      console.log('年'+this.form.year);
+      this.form.month = this.form.dateValue.slice(5)
+      console.log('月'+this.form.month);
+    },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
@@ -612,7 +639,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.activeName = 'first';
+      this.activeName = "first";
       this.reset();
       const id = row.id || this.ids;
       getENTERPRISETRADEPERFORMANCE(id).then((response) => {