浏览代码

BOM清单:BugFix

chrislee 1 年之前
父节点
当前提交
682593a07e
共有 1 个文件被更改,包括 6 次插入22 次删除
  1. 6 22
      src/views/modules/warehouse/stock-dialog.vue

+ 6 - 22
src/views/modules/warehouse/stock-dialog.vue

@@ -9,15 +9,7 @@
           <el-input v-model="dataForm.materialName" placeholder="请输入名称" clearable/>
         </el-form-item>
         <el-form-item label="类别">
-          <el-cascader
-            v-model="selectedCateIds"
-            :options="optionsCate"
-            :props="{ expandTrigger: 'hover'}"
-            :show-all-levels="true"
-            popper-class="my-cascader"
-            clearable
-          >
-          </el-cascader>
+          <material-type-component v-model.lazy="dataForm.materialTypeId" :type-id.sync="dataForm.materialTypeId"></material-type-component>
         </el-form-item>
         <el-form-item>
           <el-button @click="getDataList()">查询</el-button>
@@ -150,9 +142,11 @@
 import StockDetails from './stock-details'
 import StockAddOrUpdate from './stock-add-or-update'
 import NoticeChangeSetting from './stock-notice-change-setting'
+import MaterialTypeComponent from '@/views/modules/common/material-type-component.vue'
 export default {
   name: 'stock',
   components: {
+    MaterialTypeComponent,
     StockAddOrUpdate,
     StockDetails,
     NoticeChangeSetting
@@ -176,29 +170,19 @@ export default {
     }
   },
   activated () {
-    this.getCate()
+    // this.getCate()
     this.getDataList()
   },
   methods: {
     async init () {
       this.visible = true
+      // this.getCate()
       this.getDataList()
     },
     onChose () {
       this.addOrUpdateVisible = false
       this.detailVisible = false
     },
-    // 获取类别
-    getCate () {
-      this.$http({
-        url: this.$http.adornUrl('/biz-service/stock-mg-ctl/listCategory'),
-        method: 'get'
-      }).then(({data}) => {
-        if (data && data.code === '200') {
-          this.optionsCate = data.data
-        }
-      })
-    },
     // 获取数据列表
     getDataList () {
       this.dataListLoading = true
@@ -209,7 +193,7 @@ export default {
           'current': this.pageIndex,
           'size': this.pageSize,
           'materialName': this.dataForm.materialName,
-          'materialTypeId': this.selectedCateIds ? this.selectedCateIds[this.selectedCateIds.length - 1] : ''
+          'materialTypeId': this.dataForm.materialTypeId
         })
       }).then(({data}) => {
         if (data && data.code === '200') {