Browse Source

物料基本信息-调整列表字段展示顺序

002390 1 year ago
parent
commit
7fbfd946d4
1 changed files with 17 additions and 88 deletions
  1. 17 88
      src/views/material/basicFile/index.vue

+ 17 - 88
src/views/material/basicFile/index.vue

@@ -16,36 +16,7 @@
         @reset="handleResetQuery"
         @submit="handleQuery"
       ></el-super-search>
-      <!-- <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="启用状态">
-              <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">
-              <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>
     <!-- 操作栏 -->
       <el-row 
@@ -57,10 +28,8 @@
         <!-- 新增、修改、删除、复制 -->
         <el-col :span="1.5">
           <el-button-group>
-            <!-- <el-button size="small" @click="handleInster">新增</el-button> -->
-            <el-button size="small" @click="handleEdit">修改</el-button>
-            <!-- <el-button size="small" @click="handleDel">删除</el-button> -->
-            <!-- <el-button size="small" @click="handleCopy">复制</el-button> -->
+            <el-button :size="size" @click="handleEdit">修改</el-button>
+            <el-button :size="size" @click="handleRefresh">刷新</el-button>
           </el-button-group>
         </el-col>
 
@@ -68,26 +37,13 @@
         <el-col :span="1.5">
           <el-button-group>
 
-            <!-- <el-dropdown size="small" @command="handleFilter">
-            <el-button size="small">
-              过滤<i class="el-icon-arrow-down el-icon--right"></i>
-            </el-button>
-            <el-dropdown-menu slot="dropdown">
-              <el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
-              <el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
-            </el-dropdown-menu>
-          </el-dropdown> -->
-
-            <!-- <el-button size="small" @click="handleQuery">查询</el-button> -->
-            <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="handleIsInvoke" :disabled="checkedList.length != 1"
+            <el-button :size="size" @click="handleIsInvoke" :disabled="checkedList.length != 1"
                        v-hasPermi="['system:material:add']">
               <!-- 0:启用  2:停用 -->
               {{ handleJudgeIsUsing() ? '停用' : '启用' }}
@@ -98,8 +54,8 @@
         <!-- 导入导出 -->
         <el-col :span="1.5">
           <el-button-group>
-            <el-button size="small" @click="handleImport" v-hasPermi="['system:material:import']">批量导入</el-button>
-            <el-button size="small" @click="handleExport" v-hasPermi="['system:material:export']">批量导出</el-button>
+            <el-button :size="size" @click="handleImport" v-hasPermi="['system:material:import']">批量导入</el-button>
+            <el-button :size="size" @click="handleExport" v-hasPermi="['system:material:export']">批量导出</el-button>
           </el-button-group>
         </el-col>
 
@@ -117,6 +73,7 @@
         @selection-change="handleSelectionChange" 
         @select="handleSelect" 
         @select-all="handleSelectAll"
+        :size="size"
       >
         <!--  -->
         <el-table-column type="selection" width="45" :reserve-selection="true" fixed/>
@@ -161,15 +118,6 @@
         style="height: 32px; padding: 0 !important; "
       />
 
-      <!-- <el-pagination 
-        @size-change="handleSizeChange" 
-        @current-change="handleCurrentChange"
-        :current-page="queryParams.pageNum" 
-        :page-sizes="[10, 20, 50, 100,200,500]"
-        layout="total, sizes, prev, pager, next, jumper" 
-        :total="total"
-      >
-      </el-pagination> -->
     </el-card>
 
     <!-- 操作提示 -->
@@ -186,8 +134,8 @@
       <div class="mb-import">
         <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
                    :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
-          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
-          <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板</el-button>
+          <el-button slot="trigger" :size="size" type="primary">选取文件</el-button>
+          <el-button style="margin-left: 10px;" :size="size" type="success" @click="handleDownTemplate">下载模板</el-button>
           <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
         </el-upload>
 
@@ -265,16 +213,7 @@
       handleJudgeIsUsing() {
         return this.checkedList.length == 1 && this.checkedList[0].isEnable == '已启用';
       },
-      // 改变分页大小
-      handleSizeChange(e) {
-        this.queryParams.pageSize = e;
-        this.handleQuery();
-      },
-      // 改变当前页
-      handleCurrentChange(e) {
-        this.queryParams.pageNum = e;
-        this.handleQuery();
-      },
+      
       // 新增
       handleInster() {
         this.$notify({
@@ -332,7 +271,7 @@
         // 重新查询后需要清空列表选中的数据
         this.checkedList = [];
         this.$refs.materialTable.clearSelection();
-        this.getMaterialList('material');
+        this.getMaterialList();
       },
       // 重置查询条件
       handleResetQuery() {
@@ -351,20 +290,12 @@
       },
       // 刷新
       handleRefresh() {
-        this.getMaterialList('material');
+        this.getMaterialList();
         // for (const key in this.queryForm) {
         //   this.queryForm[key] = '';
         // }
       },
-      // 过滤
-      handleFilter(e) {
-        console.log(e, '过滤');
-      },
-      filterCondition(type) {
-        return {
-          type
-        }
-      },
+     
       // 启用/停用
       handleIsInvoke() {
         // true   当前状态为启用,需要改为停用
@@ -486,7 +417,7 @@
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
           let params = {
-            templateCode:'material',
+            templateCode:'material_list',
             ...this.params,
             createTimeBegin: (this.params.createTimeQueue && this.params.createTimeQueue[0]) || '',
             createTimeEnd:(this.params.createTimeQueue && this.params.createTimeQueue[1]) || '',
@@ -554,7 +485,7 @@
         this.checkedList = selection;
       },
       // 获取物料列表信息
-      async getMaterialList(templateCode, query) {
+      async getMaterialList() {
 
         try {
           this.loading = true;
@@ -564,7 +495,7 @@
           }
 
           let param = {
-            templateCode,
+            templateCode:'material_list',
             ...this.params,
             createTimeBegin: (this.params.createTimeQueue && this.params.createTimeQueue[0]) || '',
             createTimeEnd:(this.params.createTimeQueue && this.params.createTimeQueue[1]) || '',
@@ -629,8 +560,6 @@
 
     },
     created() {
-      // this.getMaterialList('material');
-      // this.getTagList('material');
     },
     beforeRouteEnter(to, from, next) {
 
@@ -644,7 +573,7 @@
           vm.$refs.materialTable &&vm.$refs.materialTable.clearSelection();
         }
         vm.getTagList('material');
-        vm.getMaterialList('material');
+        vm.getMaterialList();
       });
     },
     // 进入详情,保留查询条件