Browse Source

调整物料基本档案按钮布局以及基本信息展示高度

002390 1 year ago
parent
commit
39abbdf4f3
2 changed files with 175 additions and 127 deletions
  1. 134 92
      src/views/material/basicFile/details.vue
  2. 41 35
      src/views/material/basicFile/index.vue

+ 134 - 92
src/views/material/basicFile/details.vue

@@ -3,84 +3,102 @@
   <div class="material-details" v-loading="loading">
     <!-- 操作栏 -->
     <!-- 基本信息栏 -->
-    <div v-if="activeMainTab == 'material'">
-
-      <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
-      <el-row :gutter="10" class="mb10" v-if="updateButtonGroup || maintainNewVersion">
-        <el-col :span="1.5">
-          <el-button-group>
-            <el-button size="small" @click="handleSave"
-                       v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
-              保存
-            </el-button>
-          </el-button-group>
-        </el-col>
-
-        <el-col :span="1.5">
-          <el-button-group>
-            <el-button size="small" @click="handleCancel">取消</el-button>
-          </el-button-group>
-        </el-col>
-      </el-row>
-
-      <el-row :gutter="10" class="mb10" v-else>
-        <!-- 新增、修改、删除、复制 -->
-        <el-col :span="1.5">
-          <el-button-group>
-            <!-- <el-button size="small" @click="handleInster">新增</el-button> -->
-            <el-button size="small" @click="handleBasicEdit">修改</el-button>
-            <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
-            <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
-          </el-button-group>
-        </el-col>
-
-        <!-- 查询、刷新、过滤 -->
-        <el-col :span="1.5">
-          <el-button-group>
-
-            <el-button size="small" @click="handleRefresh">刷新</el-button>
-
-          </el-button-group>
-        </el-col>
-
-        <!-- 启用 -->
+    <div style="display: flex;justify-content: end;">
+      <div v-if="activeMainTab == 'material'">
+  
+        <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
+        <el-row 
+          v-if="updateButtonGroup || maintainNewVersion"
+          :gutter="10" 
+          class="mb10" 
+          type="flex"
+          justify="end"
+        >
+          <el-col :span="1.5">
+            <el-button-group>
+              <el-button size="small" @click="handleSave"
+                         v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
+                保存
+              </el-button>
+            </el-button-group>
+          </el-col>
+  
+          <el-col :span="1.5">
+            <el-button-group>
+              <el-button size="small" @click="handleCancel">取消</el-button>
+            </el-button-group>
+          </el-col>
+        </el-row>
+  
+        <el-row 
+          v-else
+          :gutter="10" 
+          class="mb10" 
+          type="flex"
+          justify="end" 
+        >
+          <!-- 新增、修改、删除、复制 -->
+          <el-col :span="1.5">
+            <el-button-group>
+              <!-- <el-button size="small" @click="handleInster">新增</el-button> -->
+              <el-button size="small" @click="handleBasicEdit">修改</el-button>
+              <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
+              <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
+            </el-button-group>
+          </el-col>
+  
+          <!-- 查询、刷新、过滤 -->
+          <el-col :span="1.5">
+            <el-button-group>
+  
+              <el-button size="small" @click="handleRefresh">刷新</el-button>
+  
+            </el-button-group>
+          </el-col>
+  
+          <!-- 启用 -->
+          <el-col :span="1.5">
+            <el-button-group>
+              <el-button size="small" @click="handleMaterialType">维护物料类别</el-button>
+              <el-button size="small" @click="handleIsInvoke" :key="count" v-hasPermi="['system:material:add']">
+                <!-- 0:启用  2:停用 -->
+                {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
+              </el-button>
+            </el-button-group>
+          </el-col>
+  
+          <!-- 维护新版本 -->
+          <el-col :span="1.5">
+            <el-button-group>
+              <el-button size="small" @click="handleNewVersion" v-hasPermi="['system:material:versions']">维护新版本
+              </el-button>
+            </el-button-group>
+          </el-col>
+  
+        </el-row>
+  
+  
+      </div>
+  
+      <!-- 其他标签页操作  修改、删除 -->
+      <el-row 
+        :gutter="10" 
+        class="mb10" 
+        v-show="activeMainTab != 'material'"
+        type="flex"
+        justify="end"
+      >
         <el-col :span="1.5">
           <el-button-group>
-            <el-button size="small" @click="handleMaterialType">维护物料类别</el-button>
-            <el-button size="small" @click="handleIsInvoke" :key="count" v-hasPermi="['system:material:add']">
-              <!-- 0:启用  2:停用 -->
-              {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
-            </el-button>
+            <el-button size="small" @click="handleOtherEdit('table')">修改</el-button>
+            <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
           </el-button-group>
-        </el-col>
-
-        <!-- 维护新版本 -->
-        <el-col :span="1.5">
           <el-button-group>
-            <el-button size="small" @click="handleNewVersion" v-hasPermi="['system:material:versions']">维护新版本
-            </el-button>
+            <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
           </el-button-group>
         </el-col>
-
       </el-row>
 
-
-    </div>
-
-    <!-- 其他标签页操作  修改、删除 -->
-    <el-row :gutter="10" class="mb10" v-show="activeMainTab != 'material'">
-      <el-col :span="1.5">
-        <el-button-group>
-          <el-button size="small" @click="handleOtherEdit('table')">修改</el-button>
-          <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
-        </el-button-group>
-        <el-button-group>
-          <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
-        </el-button-group>
-      </el-col>
-    </el-row>
-
-    <el-card>
       <!-- 返回   切换   附件管理 -->
       <el-row type="flex" justify="space-between">
         <el-col :span="6">
@@ -88,22 +106,14 @@
           <el-button size="small" @click="handleBack" :disabled="updateButtonGroup">返回</el-button>
         </el-col>
         <el-col :span="6" style="text-align: right;">
-          <!-- 附件管理 -->
-          <!-- <el-button-group> <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
-
-          <!-- 切换 -->
-          <!-- <el-button-group>
-            <el-button size="small" icon="el-icon-d-arrow-left" :disabled="!handleBasicEdit"
-              @click="handleChangePage('first')" />
-            <el-button size="small" icon="el-icon-arrow-left" :disabled="!handleBasicEdit"
-              @click="handleChangePage('pre')" />
-            <el-button size="small" icon="el-icon-arrow-right" :disabled="!handleBasicEdit"
-              @click="handleChangePage('next')" />
-            <el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
-            @click="handleChangePage('end')" /></el-button-group> -->
+          
         </el-col>
       </el-row>
 
+    </div>
+
+    <el-card>
+    
       <div class="md-content">
         <el-form :inline="true" label-position="right" :model="basicData.value">
           <!-- <el-form-item label="所属组织"></el-form-item> -->
@@ -247,8 +257,14 @@
                   >
                   <el-table-column type="selection" width="55"/>
                   <el-table-column type="index" v-if="mainMsg.form.length" label="序号" width="55" align="center"/>
-                  <el-table-column v-for="m in  mainMsg.form" v-if="m.show" :label="m.name" align="center"
-                                   :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip>
+                  <el-table-column 
+                    v-for="m in  mainMsg.form" 
+                    v-if="m.show" 
+                    :label="m.name" 
+                    align="center"
+                    :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" 
+                    show-overflow-tooltip
+                  >
                     <template slot-scope="scope">
                       {{ m.attribute == 'select' ? scope.row[`${m.prop}Name`] :
                       (m.attribute == 'checkbox' ?
@@ -418,11 +434,24 @@
     </el-card>
 
     <!-- 维护物料类别弹窗 -->
-    <el-dialog title="物料类别维护" :visible.sync="materialType.show" :before-close="handleCloseTypeDetails"
-               :close-on-press-escape="false" :close-on-click-modal="false" width="80%" center class="materialType">
+    <el-dialog 
+      title="物料类别维护" 
+      :visible.sync="materialType.show" 
+      :before-close="handleCloseTypeDetails"
+      :close-on-press-escape="false" 
+      :close-on-click-modal="false" 
+      width="80%" 
+      center 
+      class="materialType"
+    >
 
       <!-- 操作按钮 -->
-      <el-row :gutter="10" class="mb10">
+      <el-row 
+        :gutter="10" 
+        class="mb10" 
+        type="flex"
+        justify="end"
+      >
         <el-col :span="1.5">
           <el-button-group>
             <el-button size="small" :disabled="!materialType.isEdit" @click="handleMaterialTypeRow('add')">增行
@@ -441,8 +470,15 @@
         </el-col>
       </el-row>
       <!-- 表格数据 -->
-      <el-table :data="materialType.value" stripe style="width: 100%" max-height="350" v-loading="materialType.loading"
-                :key="refer" @selection-change="handleSelectionType">
+      <el-table 
+        :data="materialType.value" 
+        stripe 
+        style="width: 100%" 
+        max-height="350" 
+        v-loading="materialType.loading"
+        :key="refer" 
+        @selection-change="handleSelectionType"
+      >
         <el-table-column type="selection" width="30"/>
         <el-table-column type="index" width="50" label="序号"/>
         <el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
@@ -498,7 +534,12 @@
     >
       <div  v-loading="otherDeatils.loading">
         <!-- 其他标签页操作  修改、删除 -->
-        <el-row :gutter="10" class="mb10">
+        <el-row 
+          :gutter="10" 
+          class="mb10" 
+          type="flex"
+          justify="end"
+        >
           <el-col :span="1.5" v-if="!otherDeatils.isEdit">
             <el-button-group>
               <el-button size="small" @click="handleOtherEdit('form')">修改</el-button>
@@ -2529,7 +2570,7 @@
           }
 
           .el-form {
-            max-height: 200px;
+            max-height: 350px;
             overflow-y: auto;
             overflow-x: hidden;
 
@@ -2701,6 +2742,7 @@
   .od-msg >>> .el-checkbox__label {
     width: 85%;
     box-sizing: border-box;
+    
   }
 
 

+ 41 - 35
src/views/material/basicFile/index.vue

@@ -5,7 +5,47 @@
 
     <!-- 操作栏 -->
     <div>
-      <el-row :gutter="10" class="mb10">
+    
+      <!-- 查询条件 -->
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+          <el-form :inline="true" :model="queryForm" class="mb-query" @submit.native.prevent>
+            <el-form-item label="物料编码">
+              <el-input size="small" v-model="queryForm.code" placeholder="物料编码" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="物料名称">
+              <el-input size="small" v-model="queryForm.name" placeholder="物料名称" clearable></el-input>
+            </el-form-item>
+            <el-form-item label="启用状态">
+              <!-- 0=已启用,2=已停用 -->
+              <el-select size="small" v-model="queryForm.isEnable" placeholder="请选择" clearable>
+                <el-option key="0" label="已启用" value="0"></el-option>
+                <el-option key="2" label="已停用" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="是否同步NC">
+              <!-- 是否同步;2=否,0=是 -->
+              <el-select size="small" v-model="queryForm.isSync" placeholder="请选择" clearable>
+                <el-option key="0" label="是" value="0"></el-option>
+                <el-option key="2" label="否" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+
+            <el-form-item>
+              <el-button size="small" type="primary" @click="handleQuery">搜索</el-button>
+              <el-button size="small" @click="handleResetQuery">重置</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+
+      </el-row>
+
+      <el-row 
+        :gutter="10" 
+        class="mb10"
+        type="flex"
+        justify="end"
+      >
         <!-- 新增、修改、删除、复制 -->
         <el-col :span="1.5">
           <el-button-group>
@@ -57,40 +97,6 @@
 
 
       </el-row>
-
-      <!-- 查询条件 -->
-      <el-row :gutter="10">
-        <el-col :span="1.5">
-          <el-form :inline="true" :model="queryForm" class="mb-query" @submit.native.prevent>
-            <el-form-item label="物料编码">
-              <el-input size="small" v-model="queryForm.code" placeholder="物料编码" clearable></el-input>
-            </el-form-item>
-            <el-form-item label="物料名称">
-              <el-input size="small" v-model="queryForm.name" placeholder="物料名称" clearable></el-input>
-            </el-form-item>
-            <el-form-item label="启用状态">
-              <!-- 0=已启用,2=已停用 -->
-              <el-select size="small" v-model="queryForm.isEnable" placeholder="请选择" clearable>
-                <el-option key="0" label="已启用" value="0"></el-option>
-                <el-option key="2" label="已停用" value="2"></el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="是否同步NC">
-              <!-- 是否同步;2=否,0=是 -->
-              <el-select size="small" v-model="queryForm.isSync" placeholder="请选择" clearable>
-                <el-option key="0" label="是" value="0"></el-option>
-                <el-option key="2" label="否" value="2"></el-option>
-              </el-select>
-            </el-form-item>
-
-            <el-form-item>
-              <el-button size="small" type="primary" @click="handleQuery">查询</el-button>
-              <el-button size="small" @click="handleResetQuery">重置</el-button>
-            </el-form-item>
-          </el-form>
-        </el-col>
-
-      </el-row>
     </div>
 
     <!-- 主体列表 -->