Browse Source

fix: bug调整

zh 2 years ago
parent
commit
71cef894d9
2 changed files with 45 additions and 20 deletions
  1. 7 1
      src/components/NotifyBox/index.vue
  2. 38 19
      src/views/stock/stock_list.vue

+ 7 - 1
src/components/NotifyBox/index.vue

@@ -140,7 +140,7 @@
                     "
                     >重置</el-button
                   >
-                  <el-button type="primary" @click="getArrivalNotice">查询</el-button>
+                  <el-button type="primary" @click="handleReset">查询</el-button>
                 </div>
               </el-form-item>
             </el-col>
@@ -381,6 +381,12 @@ export default {
       this.arrivalNoticeList = res.data.records
       this.listTotal = res.data.total
     },
+    handleReset() {
+      this.pageSize = 10
+      this.pageNum = 1
+      this.specification = ''
+      this.getArrivalNotice()
+    },
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val

+ 38 - 19
src/views/stock/stock_list.vue

@@ -1,31 +1,29 @@
 <template>
   <template-page
     ref="pageRef"
-    :getList="getList"
-    :exportList="exportList"
-    :optionsEvensGroup="optionsEvensGroup"
-    :columnParsing="columnParsing"
-  >
-
-  </template-page>
+    :get-list="getList"
+    :export-list="exportList"
+    :options-evens-group="optionsEvensGroup"
+    :column-parsing="columnParsing"
+    :no-use="true"
+    :field-beans-hook="fieldBeansHook"
+  />
 </template>
 
 <script>
 import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
-import Popu from '@/components/template/popu.vue'
-import { getStockListV2, getWarehouseList,exportStockListV2 } from '@/api/stock'
+import { getStockListV2, getWarehouseList, exportStockListV2 } from '@/api/stock'
 import { getCategoryList, getSmallList } from '@/api/common'
 export default {
-  components: { TemplatePage, Popu },
+  components: { TemplatePage },
   mixins: [import_mixin, add_callback_mixin],
   data() {
     return {
       visible: false,
       // 事件组合
-      optionsEvensGroup: [
-      ],
+      optionsEvensGroup: [],
       // 表格属性
       tableAttributes: {
         // 启用勾选列
@@ -56,10 +54,33 @@ export default {
       warehouseList: [],
       positionList: [],
       typeList: [],
-      smallList: [],
+      smallList: []
     }
   },
   methods: {
+    fieldBeansHook(List) {
+      return [
+        ...List,
+        {
+          adminUserId: null,
+          colName: 'specification',
+          enumMap: '{}',
+          frontCode: '',
+          hide: false,
+          isCopy: false,
+          isQuery: true,
+          isShow: false,
+          isTotal: false,
+          jname: 'specification',
+          label: '机型规格',
+          multiple: false,
+          pk: false,
+          sortNum: 0,
+          tbName: '',
+          type: 'input'
+        }
+      ]
+    },
     // 列表请求函数
     getList(...p) {
       this.recordSelected = []
@@ -78,7 +99,7 @@ export default {
     operation() {
       return (h, { row, index, column }) => {
         return (
-          <div class="operation-btns">
+          <div class='operation-btns'>
             {/* <el-button
               size="mini"
               type="text"
@@ -98,8 +119,8 @@ export default {
         this.visible = false
       })()
     },
-     // 获取仓库列表
-     getWarehouseList() {
+    // 获取仓库列表
+    getWarehouseList() {
       getWarehouseList({
         pageNum: 1,
         pageSize: -1
@@ -123,9 +144,7 @@ export default {
       getSmallList({ id: this.screenForm.type }).then(res => {
         this.smallList = res.data
       })
-    },
-
-
+    }
   }
 }
 </script>