Kaynağa Gözat

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-mes into dev

quwangxin 2 yıl önce
ebeveyn
işleme
f4f206be46

+ 58 - 0
src/views/produceOrder/components/bomList.vue

@@ -0,0 +1,58 @@
+<template>
+  <ele-modal :visible.sync="visible" title="物料清单">
+    <ele-pro-table 
+	  :columns="columns" 
+	  :datasource="tableList" 
+	  cache-key="bomList"
+	  :need-page="false"
+	>
+    </ele-pro-table>
+  </ele-modal>
+</template>
+
+<script>
+  export default {
+    data () {
+      return {
+        visible: false,
+		tableList:[],
+        columns: [
+          {
+            label: '序号',
+            type: 'index',
+            width: 55,
+            align: 'center'
+          },
+          {
+            label: '编码',
+            prop: 'listCode'
+          },
+          {
+            label: '名称',
+            prop: 'listName'
+          },
+          {
+            label: '类型',
+            prop: 'listType'
+          },
+          {
+            label: '计量单位',
+            prop: 'listUnit'
+          },
+		  {
+		    label: '数量',
+		    prop: 'listQuantity'
+		  }
+        ]
+      };
+    },
+    methods: {
+      open (row) {
+		if(row){
+			this.tableList = row.materialList
+		}
+        this.visible = true;
+      }
+    }
+  };
+</script>

+ 16 - 4
src/views/produceOrder/detail.vue

@@ -2,7 +2,7 @@
   <div class="ele-body">
     <div class="page-title">
       <el-page-header @back="$router.go(-1)">
-        <div slot="content" class="pageContent" @click="writeOff">
+        <div slot="content" class="pageContent">
           <div>详情</div>
         </div>
       </el-page-header>
@@ -148,29 +148,35 @@
                 {{countMsg.joinTotalNum}}PCS
               </li>
             </ul>
-<!--            <el-link type="primary" v-if="activeName == 1" @click="openOther"
+           <!-- <el-link type="primary" v-if="activeName == 1" @click="openOther"
               >其他任务记录</el-link
             > -->
           </div>
         </template>
+		<template v-slot:bom="{ row }">
+		  <el-link type="primary" @click="check(row)">查看</el-link>
+		</template>
         <template v-slot:action="{ row }">
           <el-link type="primary" @click="writeOff(row)">冲销</el-link>
         </template>
       </ele-pro-table>
     </el-card>
     <otherMission ref="otherMissionRef" />
+	<bomList ref="bomListRef" /> 
   </div>
 </template>
 
 <script>
   import progressBox from './components/progressBox';
   import otherMission from './components/otherMission';
+  import bomList from './components/bomList';
   import { getTaskListById } from '@/api/mainData/index.js';
   import { reportPage , getInfoById , reportCount , writeOffWork } from '@/api/produceOrder/index.js';
   export default {
     components: {
       otherMission,
-      progressBox
+      progressBox,
+	  bomList
     },
     data () {
       return {
@@ -874,7 +880,8 @@
               label: '物料清单',
               prop: 'materialList',
 			  minWidth: 100,
-			  align: 'center'
+			  align: 'center',
+			  slot: 'bom'
             },
             {
               label: '操作',
@@ -1077,7 +1084,12 @@
 				})
 			})
 			.catch(() => {});
+		},
+		
+		check(row){
+			this.$refs.bomListRef.open(row);
 		}
+		
 		  
     }
   };