Quellcode durchsuchen

【修改】bug【修改】bug

howie vor 3 Jahren
Ursprung
Commit
ad58e8baa0
2 geänderte Dateien mit 17 neuen und 13 gelöschten Zeilen
  1. 16 12
      src/views/stock/stock_list.vue
  2. 1 1
      src/views/supply/apply/components/engin_form.vue

+ 16 - 12
src/views/stock/stock_list.vue

@@ -26,9 +26,9 @@
             </el-form-item>
           </el-col> -->
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="产品类别" prop="smallType">
-              <el-select v-model="screenForm.smallType" placeholder="请选择产品类别" clearable>
-                <el-option v-for="item in smallList" :key="item.kingDeeCategoryId" :label="item.kingDeeCategoryName" :value="item.kingDeeCategoryId"></el-option>
+            <el-form-item label="产品类别" prop="categoryId">
+              <el-select v-model="screenForm.categoryId" placeholder="请选择产品类别" clearable>
+                <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -126,7 +126,7 @@
 
 <script>
 import { getStockList, getWarehouseList } from "@/api/stock";
-import { getDictList, getSmallList } from '@/api/common'
+import { getCategoryList, getSmallList } from '@/api/common'
 
 export default {
   data() {
@@ -144,7 +144,7 @@ export default {
         goodsCode: '',
         model: '',
         type: '',
-        smallType: '',
+        categoryId: '',
       },
       warehouseList: [],
       positionList: [],
@@ -163,14 +163,14 @@ export default {
         materialOldNumber: this.screenForm.goodsNum,
         specification: this.screenForm.model,
         mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.smallType,
+        categoryId: this.screenForm.categoryId,
       }
     },
   },
 
   created() {
     this.getWarehouseList();
-    this.getDictList();
+    this.getCategoryList();
     this.getList();
   },
 
@@ -186,9 +186,13 @@ export default {
     },
 
     // 获取产品大类列表
-    getDictList() {
-      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
-        this.typeList = res.data;
+    getCategoryList() {
+      getCategoryList({
+        pageNum:1,
+        pageSize:-1,
+
+      }).then(res => {
+        this.typeList = res.data.records;
       })
     },
 
@@ -201,7 +205,7 @@ export default {
 
     // 更改大类
     changeType() {
-      this.screenForm.smallType = '';
+      this.screenForm.categoryId = '';
       if(this.screenForm.type) {
         this.getSmallList();
       }else {
@@ -234,7 +238,7 @@ export default {
         materialOldNumber: this.screenForm.goodsNum,
         specification: this.screenForm.model,
         mainNumber: this.screenForm.type,
-        categoryId: this.screenForm.smallType,
+        categoryId: this.screenForm.categoryId,
       };
       getStockList(params).then((res) => {
         this.dataList = res.data.records;

+ 1 - 1
src/views/supply/apply/components/engin_form.vue

@@ -81,7 +81,7 @@
         </el-col>
          <el-col :xs="24" :sm="12" :lg="8">
           <el-form-item label="行业类别" prop="refTradeCategory">
-            <el-input v-model="mainForm.refTradeCategory" placeholder="请输入文件编号" disabled></el-input>
+            <el-input v-model="mainForm.refTradeCategory" placeholder="请输入文件编号" :disabled="isDealer"></el-input>
           </el-form-item>
         </el-col>
           <!-- <el-col :xs="24" :sm="12" :lg="8">