whj 7 maanden geleden
bovenliggende
commit
9b58c38d2b
2 gewijzigde bestanden met toevoegingen van 111 en 57 verwijderingen
  1. 39 12
      src/views/report/sparepartinfo/SparePartInfo.vue
  2. 72 45
      src/views/store/sparestore/SpareStore.vue

+ 39 - 12
src/views/report/sparepartinfo/SparePartInfo.vue

@@ -29,11 +29,12 @@
       :columns="columns"
       :data="loadData"
       :alert="options.alert"
+      :scroll="{x: 1, y: BaseTool.Constant.scrollY }"
       :rowSelection="options.rowSelection"
       showPagination="auto"
     >
       <span slot="status" slot-scope="text, record">
-        <a @click="handleStore(record)">{{text||"无"}}</a>
+        <a @click="handleStore(record)">{{ text||"无" }}</a>
       </span>
 
       <span slot="action" slot-scope="record">
@@ -87,15 +88,21 @@ export default {
 
         {
           title: '备件编码',
+          checked: true,
+          width: 150,
           dataIndex: 'no'
         },
         {
           title: '备件名称',
+          checked: true,
+          width: 150,
           dataIndex: 'name'
         },
         {
           title: '备件类别',
           dataIndex: 'typeId',
+          checked: true,
+          width: 150,
           customRender: (text, record, index) => {
             return record.typeName
           }
@@ -103,6 +110,8 @@ export default {
         {
           title: '等级',
           dataIndex: 'level',
+          checked: true,
+          width: 150,
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.levelMap, text)
           }
@@ -111,26 +120,36 @@ export default {
         {
           title: '当前库存',
           dataIndex: 'currentStock',
+          checked: true,
+          width: 150,
           scopedSlots: { customRender: 'status' }
         },
         {
           title: '最高库存',
+          checked: true,
+          width: 150,
           dataIndex: 'maxStock'
         },
         {
           title: '最低库存',
+          checked: true,
+          width: 150,
           dataIndex: 'minStock'
         },
-         {
-            title: '是否预警',
-            dataIndex: 'minStock',
-            customRender: (text, record, index) => {
-                return record.currentStock<record.mixStock?"是":"否"
-              }
-          },
-         {
+        {
+          title: '是否预警',
+          dataIndex: 'minStock',
+          checked: true,
+          width: 150,
+          customRender: (text, record, index) => {
+            return record.currentStock < record.mixStock ? '是' : '否'
+          }
+        },
+        {
           title: '生产商',
           dataIndex: 'producerId',
+          checked: true,
+          width: 150,
           customRender: (text, record, index) => {
             return record.producerName
           }
@@ -138,22 +157,30 @@ export default {
         {
           title: '计量单位',
           dataIndex: 'unit',
+          checked: true,
+          width: 150,
           customRender: (text, record, index) => {
             return this.BaseTool.Object.getField(this.unitMap, text)
           }
         },
         {
           title: '备注',
+          checked: true,
+          width: 150,
           dataIndex: 'remark'
         },
         {
           title: '创建日期',
+          checked: true,
+          width: 150,
           dataIndex: 'createdTime'
         },
         {
           title: '操作',
           key: 'action',
-          width: '400px',
+          checked: true,
+          width: 200,
+          fixed: 'right',
           align: 'center',
           scopedSlots: { customRender: 'action' }
         }
@@ -254,7 +281,7 @@ export default {
       })
     },
     handleSparePartUsed (record) {
-      this.$refs.sparePartUsedSelectModal.base({},{spareId:record.id})
+      this.$refs.sparePartUsedSelectModal.base({}, { spareId: record.id })
     },
     handleOutStore (record) {
       fetchOutStoreList({ id: record.id }).then(res => {
@@ -294,7 +321,7 @@ export default {
         res.data.id = null
         modal.base(res.data)
       })
-    },
+    }
   }
 }
 </script>

+ 72 - 45
src/views/store/sparestore/SpareStore.vue

@@ -12,7 +12,71 @@
         />
       </a-col>
       <a-col :span="20">
-        <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+        <a-drawer
+          title="筛选"
+          placement="top"
+          :closable="false"
+          :visible="showFilter"
+          :height="330"
+          @close="showFilter=false"
+        >
+          <div class="table-page-search-wrapper" @keyup.enter="handleEnter">
+            <a-form layout="inline">
+              <a-row :gutter="48">
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="关键字">
+                    <a-input v-model.trim="queryParam.keyword" placeholder="请输入备件名称"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="规格型号">
+                    <a-input v-model="queryParam.ggxh" placeholder="请输入规格型号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="原厂编号">
+                    <a-input v-model="queryParam.initNo" placeholder="请输入原厂编号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="关联设备">
+                    <a-input v-model="queryParam.model" placeholder="新号/旧号/名称/规格"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="最低数量">
+                    <a-input v-model="queryParam.num" placeholder="请输入数量"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item
+                    label="仓库"
+                    :labelCol="BaseTool.Constant.labelCol"
+                    :wrapperCol="BaseTool.Constant.wrapperCol"
+                  >
+                    <a-tree-select
+                      style="width: 100%"
+                      :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
+                      :treeData="storeTreeDate"
+                      :treeNodeFilterProp="'title'"
+                      :showSearch="true"
+                      v-model="queryParam.storeId"
+                      placeholder="请选择"
+                    >
+                    </a-tree-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8 || 24" :sm="24">
+                  <span class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+        </a-drawer>
+        <div class="table-page-search-wrapper">
           <a-form layout="inline">
             <a-row :gutter="48">
               <a-col :md="8" :sm="24">
@@ -20,54 +84,16 @@
                   <a-input v-model.trim="queryParam.keyword" placeholder="请输入备件名称"/>
                 </a-form-item>
               </a-col>
-              <a-col :md="8" :sm="24">
-                <a-form-item label="规格型号">
-                  <a-input v-model="queryParam.ggxh" placeholder="请输入规格型号"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="8" :sm="24">
-                <a-form-item label="原厂编号">
-                  <a-input v-model="queryParam.initNo" placeholder="请输入原厂编号"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="8" :sm="24">
-                <a-form-item label="关联设备">
-                  <a-input v-model="queryParam.model" placeholder="新号/旧号/名称/规格"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="8" :sm="24">
-                <a-form-item label="最低数量">
-                  <a-input v-model="queryParam.num" placeholder="请输入数量"/>
-                </a-form-item>
-              </a-col>
-              <a-col :md="8" :sm="24">
-                <a-form-item
-                  label="仓库"
-                  :labelCol="BaseTool.Constant.labelCol"
-                  :wrapperCol="BaseTool.Constant.wrapperCol"
-                >
-                  <a-tree-select
-                    style="width: 100%"
-                    :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
-                    :treeData="storeTreeDate"
-                    :treeNodeFilterProp="'title'"
-                    :showSearch="true"
-                    v-model="queryParam.storeId"
-                    placeholder="请选择"
-                  >
-                  </a-tree-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="8 || 24" :sm="24">
-                <span class="table-page-search-submitButtons">
-                  <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
-                </span>
+              <a-col :md="6 || 24" :sm="24">
+                <a-space>
+                  <a-button type="primary" @click="handleOk">查询</a-button>
+                  <a-button type="primary" @click="showFilter=true">筛选</a-button>
+                  <a-button @click="resetSearchForm">重置</a-button>
+                </a-space>
               </a-col>
             </a-row>
           </a-form>
         </div>
-
         <div class="table-operator" style="margin-bottom: 8px;">
           <a-button type="primary" icon="plus" @click="$refs.baseModal.base()">新增</a-button>
           <a-button style="margin-left: 8px" type="primary" icon="download" @click="doExport">导出</a-button>
@@ -136,6 +162,7 @@ export default {
       queryParam: {
         filter: this.filter
       },
+      showFilter: false,
       storeTreeDate: [],
       spareTypeTreeData: [],
       // 表头