ysy vor 2 Jahren
Ursprung
Commit
a66ec58469

+ 0 - 22
pages/pda/feeding/components/instance.vue

@@ -1,22 +0,0 @@
-<template>
-	<view>
-		
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		methods: {
-			
-		}
-	}
-</script>
-
-<style>
-
-</style>

+ 63 - 2
pages/pda/feeding/components/instanceBom.vue

@@ -1,6 +1,8 @@
 <template>
 	<view>
-
+	<view class="title_box rx-bc">
+			<view class="name">物料清单</view>
+		</view>
 
 		<view class="material rx-ss" v-for="(mate, idx) in list">
 			<view class="left rx-ss" @click="getDelete(idx)">
@@ -58,7 +60,16 @@
 		tableHeader
 	} from '../../common.js'
 	export default {
-		props: ['list'],
+		props:{
+			workOrderId: {
+				type: String,
+				default: ''
+			},
+			list: {
+				type: Array,
+				default: () => []
+			},
+		},
 		data() {
 			return {
 
@@ -77,6 +88,56 @@
 </script>
 
 <style lang="scss" scoped>
+	
+	.title_box {
+		margin-top: 20rpx;
+	
+		.name {
+			font-size: 28rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: $theme-color;
+			padding-left: 20rpx;
+	
+			position: relative;
+	
+			&:before {
+				position: absolute;
+				content: '';
+				left: 0rpx;
+				top: 0rpx;
+				bottom: 0rpx;
+				width: 4rpx;
+				height: 28rpx;
+				background: $theme-color;
+				margin: auto;
+			}
+	
+	
+		}
+	
+		.btn_box {
+			padding: 0 18rpx;
+			height: 60rpx;
+			background: $theme-color;
+			font-size: 26rpx;
+			font-style: normal;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #fff;
+			border-radius: 4rpx;
+	
+			.scan {
+				width: 34rpx;
+				height: 34rpx;
+				margin-right: 12rpx;
+	
+			}
+	
+		}
+	
+	}
+	
 	.material {
 		margin-top: 10rpx;
 

+ 8 - 2
pages/pda/feeding/details.vue

@@ -13,6 +13,8 @@
 
 					<modelBom v-if='item.modelList.length != 0' :workOrderId='item.workOrderId' :list='item.modelList' @scanIt='scanIt'>
 					</modelBom>
+					
+					<instanceBom v-if='item.instanceList.length != 0' :workOrderId='item.workOrderId' :list='item.instanceList'></instanceBom>
 
 
 					<view class="operate_box rx-sc">
@@ -40,6 +42,7 @@
 	import workOrderBom from './components/workOrderBom.vue'
 	import deviceBom from './components/deviceBom.vue'
 	import modelBom from './components/modelBom.vue'
+	import instanceBom from './components/instanceBom.vue'
 	import {
 		workorderList,
 		getByCode,
@@ -56,7 +59,8 @@
 		components: {
 			workOrderBom,
 			deviceBom,
-			modelBom
+			modelBom,
+			instanceBom
 		},
 		data() {
 			return {
@@ -196,7 +200,7 @@
 
 			scanItData(result, id) {
 				scanLedger(result).then(res => {
-					console.log(res)
+				
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
@@ -209,6 +213,7 @@
 						this.$forceUpdate()
 
 					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) {
+				
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
@@ -216,6 +221,7 @@
 							}
 						})
 						this.List = _arr
+						console.log(this.List)
 						this.$forceUpdate()
 					
 					}

+ 2 - 2
utils/request.js

@@ -61,9 +61,9 @@ const http = ({
               url: "/pages/login/login",
             });
           }, 1500);
-        } else if (res.data.errMsg == "request:fail ") {
+        } else if (res.data.code == -1) {
           wx.showToast({
-            title: "获取数据失败,请重试",
+            title: res.data.message,
             icon: "none",
           });
         } else {