ysy 1 год назад
Родитель
Сommit
b03f8edcdf
2 измененных файлов с 100 добавлено и 5 удалено
  1. 2 1
      src/enum/dict.js
  2. 98 4
      src/views/bpm/handleTask/components/bomApprover/detailDialog.vue

+ 2 - 1
src/enum/dict.js

@@ -80,7 +80,8 @@ export default {
   变更类型: 'change_type',
   请托类型: 'entrust_type',
   设备处置方式: 'equipment_Disposal',
-  不拆物料层规格: 'material_layer'
+  不拆物料层规格: 'material_layer',
+  生产类型: 'productionType'
 };
 
 export const numberList = [

+ 98 - 4
src/views/bpm/handleTask/components/bomApprover/detailDialog.vue

@@ -10,14 +10,53 @@
       class="dict-table"
       tool-class="ele-toolbar-actions"
     >
+      <template v-slot:produceType="{ row }">
+        <el-select
+          v-model="row.produceType"
+          filterable
+          multiple
+          class="ele-block"
+          size="mini"
+           :disabled="true"
+        >
+          <el-option
+            v-for="item in dictList"
+            :key="item.value"
+            :value="item.value"
+            :label="item.label"
+          ></el-option>
+        </el-select>
+      </template>
+
+
+      <template v-slot:supplierId="{ row }">
+        <el-select
+          v-model="row.supplierId"
+          size="mini"
+          clearable
+          style="width: 100%"
+          filterable
+          placeholder="请选择供应商"
+          :disabled="true"
+        >
+          <el-option
+            v-for="item in gysList"
+           :key="item.id + index"  
+            :value="item.id"
+            :label="item.name"
+          ></el-option>
+        </el-select>
+      </template>
+      
     </ele-pro-table>
   </div>
 </template>
 
 <script>
   import BOMSearch from './BOM-search.vue';
-  import { getBomPageCategoryId } from '@/api/bpm/components/bomApprover';
+  import { getBomPageCategoryId, contactList } from '@/api/bpm/components/bomApprover';
 
+  import { getByCode } from '@/api/system/dictionary-data';
   export default {
     components: {
       BOMSearch
@@ -33,6 +72,8 @@
       return {
         visible: false,
         title: '',
+        dictList: [],
+        gysList: [],
 
         columns: [
           {
@@ -60,6 +101,32 @@
             showOverflowTooltip: true
           },
 
+          {
+            prop: 'produceType',
+            slot: 'produceType',
+            label: '生产类型',
+            width: 160
+          },
+          {
+            prop: 'supplierId',
+            slot: 'supplierId',
+            label: '供应商',
+            width: 150
+          },
+
+          {
+            prop: 'factories',
+            label: '生产厂家',
+            width: 180
+          },
+
+          {
+            prop: 'materielDesignation',
+            slot: 'materielDesignation',
+            label: '物料代号',
+            width: 150
+          },
+
           {
             prop: 'measuringUnit',
             label: '计量单位',
@@ -94,7 +161,10 @@
         }
       };
     },
-    created() {},
+    created() {
+      this.getDictList('productionType');
+      this.getContactList()
+    },
     methods: {
       /* 表格数据源 */
       datasource({ where, page, limit }) {
@@ -102,14 +172,38 @@
           ...where,
           pageNum: page,
           size: limit,
-          id: this.businessId,
+          id: this.businessId
         });
       },
 
       /* 刷新表格 */
       reload(where) {
         this.$refs.table.reload({ where });
-      }
+      },
+
+      async getDictList(code) {
+        let { data: res } = await getByCode(code);
+        this.dictList = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: Number(values[0]),
+            label: item[values[0]]
+          };
+        });
+      },
+
+      
+      getContactList() {
+        let param = {
+          pageNum: 1,
+          type: 2,
+          size: -1,
+          status: 1
+        };
+        contactList(param).then((res) => {
+          this.gysList = res.list;
+        });
+      },
     }
   };
 </script>