From 56ce6140130c265f024e79060b5dc449447e60aa Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 12 十月 2022 13:25:58 +0800
Subject: [PATCH] 1.物料清单页面开发完成

---
 src/views/template.vue |   63 +++++++++++++++++++++++--------
 1 files changed, 47 insertions(+), 16 deletions(-)

diff --git a/src/views/template.vue b/src/views/template.vue
index 3baf0a0..f03e9f5 100644
--- a/src/views/template.vue
+++ b/src/views/template.vue
@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="body" :style="{height:mainHeight+'px'}">
-      <div class="bodyTopButtonGroup">
+      <div class="bodyTopButtonGroup" style="justify-content: space-between">
         <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
         <el-button icon="el-icon-download" @click="upload">瀵煎叆</el-button>
       </div>
@@ -10,18 +10,21 @@
         <el-form
           ref="form"
           :model="form"
-          label-width="80px"
+          label-width="100px"
           inline
           style="display: flex;justify-content: space-between"
         >
-          <div class="elForm">
-            <el-form-item label="缁勭粐缂栫爜" style=" display: flex;">
+          <div class="elForm" style="justify-content: flex-start">
+            <el-form-item label-width="70px" label="姣嶄欢缂栫爜" style=" display: flex;">
               <el-input v-model="form.OrgCode" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="缁勭粐鍚嶇О" style=" display: flex;">
+            <el-form-item label="姣嶄欢鍚嶇О" style=" display: flex;">
               <el-input v-model="form.OrgName" placeholder="璇疯緭鍏�" style="width: 200px" />
             </el-form-item>
-            <el-form-item label="缁勭粐绫诲瀷" style=" display: flex;">
+            <el-form-item label="姣嶄欢瑙勬牸" style=" display: flex;">
+              <el-input v-model="form.OrgName" placeholder="璇疯緭鍏�" style="width: 200px" />
+            </el-form-item>
+            <el-form-item label="鍚敤鐘舵��" style=" display: flex;">
               <el-select v-model="form.OrgType" style="width: 200px" placeholder="璇烽�夋嫨">
                 <el-option
                   v-for="item in OrgTypeArr"
@@ -31,15 +34,43 @@
                 />
               </el-select>
             </el-form-item>
-            <el-form-item label="鍒涘缓浜哄憳" style=" display: flex;">
+            <el-form-item v-show="isExpandForm" label-width="70px" label="鐗堟湰缂栧彿" style=" display: flex;">
+              <el-input v-model="form.OrgName" placeholder="璇疯緭鍏�" style="width: 200px" />
+            </el-form-item>
+            <el-form-item v-show="isExpandForm" label="鍒涘缓浜哄憳" style=" display: flex;">
               <el-input v-model="form.UserName" style="width: 200px" placeholder="璇疯緭鍏�" />
             </el-form-item>
+            <el-form-item v-show="isExpandForm" label="鍒涘缓鏃ユ湡" style=" display: flex;">
+              <el-date-picker
+                v-model="form.createdate"
+                style="width: 200px"
+                type="date"
+                placeholder="閫夋嫨鏃ユ湡"
+              />
+            </el-form-item>
           </div>
-          <div class="bodySearchReset">
+          <div class="bodySearchReset" :style="{marginLeft:$store.state.app.sidebar.opened?'5%':'10%'}">
             <el-button type="primary" icon="el-icon-search" @click="search">鏌ヨ</el-button>
             <el-button type="info" icon="el-icon-refresh" @click="reset">閲嶇疆</el-button>
           </div>
         </el-form>
+        <div
+          class="bodyTopFormExpand"
+        >
+          <svg-icon
+            v-show="mouseHoverType==='mouseout'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown3':'doubleUp3'"
+            @mouseenter="mouseHoverType=$event.type"
+          />
+          <svg-icon
+            v-show="mouseHoverType==='mouseenter'"
+            style="cursor: pointer"
+            :icon-class="!isExpandForm?'doubleDown':'doubleUp'"
+            @click="isExpandForm=!isExpandForm"
+            @mouseout="mouseHoverType=$event.type"
+          />
+        </div>
       </div>
 
       <div class="elTableDiv">
@@ -47,10 +78,10 @@
           ref="tableDataRef"
           class="tableFixed"
           :data="tableData"
-          :height="tableHeight+'px'"
+          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
           border
           :row-class-name="tableRowClassName"
-          :style="{width: 100+'%',height:tableHeight+'px',}"
+          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
           highlight-current-row
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
@@ -183,6 +214,8 @@
   },
   data() {
     return {
+      mouseHoverType: 'mouseout',
+      isExpandForm: false,
       mainHeight: 0,
       tableHeight: 0,
       form: {
@@ -190,17 +223,15 @@
         OrgName: '', // 缁勭粐鏋舵瀯鍚嶇О
         OrgType: '', // 缁勭粐绫诲瀷
         UserName: '', // 鍒涘缓浜哄憳
+        createdate: '',
         prop: 'lm_date', // 鎺掑簭瀛楁
         order: 'desc', // 鎺掑簭瀛楁
         page: 1, // 绗嚑椤�
         rows: 20 // 姣忛〉澶氬皯鏉�
       },
       OrgTypeArr: [
-        { label: '宸ュ巶', value: 'F' },
-        { label: '閮ㄩ棬', value: 'D' },
-        { label: '杞﹂棿', value: 'W' },
-        { label: '绉戝', value: 'K' },
-        { label: '鐢熶骇绾�', value: 'L' }
+        { label: '鏄�', value: 'Y' },
+        { label: '鍚�', value: 'N' }
       ],
 
       total: 10,
@@ -360,7 +391,7 @@
     getHeight() {
       this.$nextTick(() => {
         this.mainHeight = window.innerHeight - 85
-        this.tableHeight = this.mainHeight - 200
+        this.tableHeight = this.mainHeight - 255
         this.$refs.tableDataRef.doLayout()
       })
     },

--
Gitblit v1.9.3