ysy %!s(int64=2) %!d(string=hai) anos
pai
achega
477eeac6e6

+ 13 - 0
api/pda/workOrder.js

@@ -98,3 +98,16 @@ export async function  producerouting(params) {
   return Promise.reject(data.message);
 }
 
+
+// 扫码切换工单
+
+export async function  getByCode(code) {
+  const data = await get(
+   Vue.prototype.apiUrl  + `/pda/mes/workorder/getByCode/${code}`
+  );
+
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}

+ 149 - 8
pages/pda/feeding/components/workOrderBom.vue

@@ -3,12 +3,60 @@
 		<view class="title_box rx-bc">
 			<view class="name">工单信息</view>
 
-			<view class="btn_box rx-bc">
+			<view class="btn_box rx-bc" @click="handleScan(item.workOrderId)">
 				<image class="scan" src="@/static/pda/ScanIt.svg"></image>
 				更换工单
 			</view>
+		</view>
+
+
+		<view class="material ">
+
+			<view class="content_table">
+				<view class="item">
+					<view class="lable rx-cc">工单编号</view>
+					<view class="content">
+						{{item.code}}
+					</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">产品编码</view>
+					<view class="content">{{ item.productCode }}</view>
+				</view>
+
+				<view class="item">
+					<view class="lable rx-cc">产品名称</view>
+					<view class="content">{{ item.produceRoutingName }}</view>
+				</view>
+
+				<view class="item rx-sc">
+					<view class="rx ww55 ">
+						<view class="lable lable150 rx-cc">要求成型数量</view>
+						<view class="content rx-sc">
+							<view>{{item.formingNum}}</view>
+							<view class="unit">{{item.unit}}</view>
+						</view>
+					</view>
+
+					<view class="rx ww45">
+						<view class="lable rx-cc ww80">重量</view>
+						<view class="content content_num">
+							<view>{{item.formingWeight}}</view>
+							<view class="unit">{{item.weightUnit}}</view>
+
+						</view>
+					</view>
+
+				</view>
+
+
+
 
+			</view>
 		</view>
+
+
 	</view>
 </template>
 
@@ -26,7 +74,9 @@
 			}
 		},
 		methods: {
-
+			handleScan(id) {
+				this.$emit('handleScan', id, 'wordOrder')
+			},
 		}
 	}
 </script>
@@ -59,21 +109,112 @@
 
 		.btn_box {
 			padding: 0 18rpx;
-			height: 40rpx;
+			height: 60rpx;
 			background: $theme-color;
-			font-size: 24rpx;
+			font-size: 26rpx;
 			font-style: normal;
 			font-weight: 400;
 			font-size: 24rpx;
 			color: #fff;
 			border-radius: 4rpx;
-			.scan{
-				width: 28rpx;
-				height: 28rpx;
+
+			.scan {
+				width: 34rpx;
+				height: 34rpx;
 				margin-right: 12rpx;
-				
+
+			}
+
+		}
+
+	}
+
+
+	.material {
+		margin-top: 10rpx;
+
+
+
+		.content_table {
+			width: 100%;
+			border: 2rpx solid $border-color;
+
+			.item {
+				display: flex;
+				border-bottom: 2rpx solid $border-color;
+
+
+				.lable {
+					width: 132rpx;
+					text-align: center;
+					background-color: #F7F9FA;
+					font-size: 26rpx;
+					border-right: 2rpx solid $border-color;
+					flex-shrink: 0;
+				}
+
+				.lable150 {
+					width: 156rpx !important;
+					font-size: 24rpx;
+				}
+
+				.ww80 {
+					width: 80rpx;
+				}
+
+				.content {
+					width: 518rpx;
+					min-height: 64rpx;
+					font-size: 28rpx;
+					line-height: 28rpx;
+					font-style: normal;
+					font-weight: 400;
+					padding: 18rpx 8rpx;
+					box-sizing: border-box;
+					word-wrap: break-word;
+					flex-grow: 1 !important;
+
+
+					.unit {
+						padding: 0 4rpx;
+						font-size: 24rpx;
+						color: #404446;
+					}
+
+				}
+
+				.content_num {
+					display: flex;
+					align-items: center;
+					padding: 0 4rpx;
+
+					/deep/ .uni-input-input {
+						border: 2rpx solid #F0F8F2;
+						background: #F0F8F2;
+						color: $theme-color;
+					}
+
+
+				}
+
+				.pd4 {
+					padding: 4rpx 8rpx;
+				}
+
+
+
+				&:last-child {
+					border-bottom: none;
+				}
 			}
 
+			.ww55 {
+				width: 55%;
+			}
+
+			.ww45 {
+				width: 45%;
+			}
 		}
 	}
 </style>

+ 26 - 10
pages/pda/feeding/details.vue

@@ -7,7 +7,7 @@
 			<u-list @scrolltolower="scrolltolower">
 
 				<view v-for="(item,index) in List" :key="index" class="card_box">
-		            <workOrderBom :item='item'></workOrderBom>
+					<workOrderBom :item='item' @handleScan='handleScan'></workOrderBom>
 				</view>
 			</u-list>
 
@@ -26,7 +26,8 @@
 <script>
 	import workOrderBom from './components/workOrderBom.vue'
 	import {
-		workorderList
+		workorderList,
+		getByCode
 	} from '@/api/pda/workOrder.js'
 
 	import {
@@ -44,10 +45,6 @@
 				List: [],
 
 
-
-
-
-
 			}
 		},
 		onLoad(options) {
@@ -85,8 +82,6 @@
 			save() {
 				let _arr = []
 				_arr = this.List.map(m => {
-					m.workOrderId = m.id
-					delete m.id
 					return {
 						...m
 					}
@@ -113,7 +108,7 @@
 				})
 			},
 
-	
+
 
 			addPicking(id, list) {
 				const storageKey = Date.now() + "";
@@ -123,6 +118,27 @@
 				})
 			},
 
+			handleScan(id, type) {
+				console.log(id)
+				console.log(type)
+
+				let _this = this
+				uni.scanCode({
+					success: function(res) {
+						_this.scanData(res.result, type, id)
+					}
+				})
+
+
+			},
+
+			scanData(result, type, id) {
+				console.log(444)
+				getByCode(result).then(res => {
+					console.log(res)
+				})
+			}
+
 		},
 
 	}
@@ -152,7 +168,7 @@
 		}
 
 
-	
+
 
 
 

+ 1 - 1
pages/pda/picking/bill/index.vue

@@ -22,7 +22,7 @@
 					<view v-for="(it,idx) in item.orderInfoList" :key='idx'>
 						<view class="word_order ">工单编号:{{it.code}}</view>
 
-<instanceBom :list='it.bomDetailDTOS'></instanceBom>
+						<instanceBom :list='it.bomDetailDTOS'></instanceBom>
 						<instanceBom :list='it.instanceList'></instanceBom>