695593266@qq.com hai 4 meses
pai
achega
348d59049e
Modificáronse 2 ficheiros con 21 adicións e 3 borrados
  1. 2 1
      src/components/common/seekPage.vue
  2. 19 2
      src/views/beEntrusted/index.vue

+ 2 - 1
src/components/common/seekPage.vue

@@ -160,7 +160,8 @@
             return {
               ...base,
               multiple: !!item.multiple,
-              filterable: item.filterable !== false
+              filterable: item.filterable !== false,
+              clearable: true
             };
           case 'selectTree':
             return {

+ 19 - 2
src/views/beEntrusted/index.vue

@@ -182,6 +182,7 @@
   import { getList, warehouseEntry, update } from '@/api/beEntrusted/index';
   import goodsDetail from './components/goodsDetail.vue';
   import warehouseDefinition from '@/api/warehouseManagement/warehouseDefinition';
+  import { getByCode } from '@/api/system/dictionary-data';
 
   import {
     getWarehouseList
@@ -207,7 +208,8 @@
         warehouseList: [],
         tableHeight: 'calc(100vh - 320px)',
         selection: [],
-        factoryList: []
+        factoryList: [],
+        typeList: []
       };
     },
     computed: {
@@ -476,6 +478,7 @@
     },
     created() {
       this.requestDict('请托类型');
+      this.getTypeList();
       this.getFactoryList();
       getWarehouseList().then((res) => {
         this.warehouseList = res;
@@ -495,6 +498,20 @@
         this.$refs.create.open(type, row);
       },
 
+      async getTypeList() {
+        let res = await getByCode('entrust_type');
+        if (res?.code == 0) {
+          console.log(res);
+          let list = res.data.map((item) => {
+            let key = Object.keys(item)[0];
+            return { value: Number(key), label: item[key] };
+          });
+          this.typeList = list;
+        }
+
+        console.log(this.typeList, 'this.typeList');
+      },
+
       async getFactoryList() {
         const { list } = await warehouseDefinition.getFactoryarea({
           pageNum: 1,
@@ -520,7 +537,7 @@
 
         if (
           this.selection[0].approvalStatus == 2 &&
-          this.selection[0].sendStatus == 2
+          this.selection[0].sendStatus != 2
         ) {
           return this.$message.warning('请先收货再转生产订单');
         }