ysy пре 2 година
родитељ
комит
e1f879a489

+ 12 - 0
api/pda/feeding.js

@@ -12,3 +12,15 @@ export async function batchSave(params) {
   }
   return Promise.reject(data.message);
 }
+
+
+// pda根据工单ids查询投料单
+export async function feedByOrderIds(params) {
+  const data = await postJ(
+   Vue.prototype.apiUrl  + `/pda/mes/feed/listByOrderIds`, params, true,
+  );
+  if (data.code == 0) {
+    return data.data;
+  }
+  return Promise.reject(data.message);
+}

+ 1 - 1
api/pda/workOrder.js

@@ -78,7 +78,7 @@ export async function  pageeLedgerMain(params) {
 // 资产台账
 export async function  assetPage(params) {
   const data = await get(
-   Vue.prototype.apiUrl  + `/main/asset/page`, params,  true,
+   Vue.prototype.apiUrl  + `/main/asset/pdaPage`, params,  true,
   );
   if (data.code == 0) {
     return data.data;

+ 106 - 4
pages/pda/feeding/bill/index.vue

@@ -2,21 +2,81 @@
 	<view class="content-box">
 		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" title="投料单" background-color="#F7F9FA" color="#000"
 			@clickLeft="back"></uni-nav-bar>
+
+
+		<view class="list_box">
+			<u-list @scrolltolower="scrolltolower" key="dataList">
+
+				<view class="card_box " v-for="(item, index) in dataList" :key="index">
+					<view class="item_box rx-bc">
+						<view class="round">{{index + 1}}</view>
+						<view class="time">投料时间:{{item.createTime}} </view>
+					</view>
+
+					<view v-for="(it,idx) in item.orderInfoList" :key="idx">
+						<workOrderBom :item='it' :isDetails='true'></workOrderBom>
+
+						<deviceBom v-if='it.equipmentList.length != 0'   :list='it.equipmentList'></deviceBom>
+
+						<modelBom v-if='it.equipmentList.length != 0' :list='it.modelList'>
+						</modelBom>
+
+						<instanceBom v-if='it.instanceList.length != 0' :list='it.instanceList'></instanceBom>
+
+					</view>
+
+
+
+
+				</view>
+
+			</u-list>
+		</view>
+
 	</view>
 </template>
 
 <script>
+	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 {
+		feedByOrderIds
+	} from '@/api/pda/feeding.js'
 	export default {
+		components: {
+			workOrderBom,
+			deviceBom,
+			modelBom,
+			instanceBom
+		},
 		data() {
 			return {
-				
+				ids: [],
+				dataList: [],
 			}
 		},
+
+		onLoad(option) {
+			this.ids = [option.id]
+			this.getList()
+		},
+
 		methods: {
-			
+
+
+			async getList() {
+				const res = await feedByOrderIds(this.ids)
+				this.dataList = res
+
+			},
+
+
+			scrolltolower() {}
 		}
 	}
-</script> 
+</script>
 
 <style lang="scss" scoped>
 	.content-box {
@@ -27,5 +87,47 @@
 
 	}
 
+	.item_box {
+		margin-top: 10rpx;
+		margin-bottom: 16rpx;
+		width: 706rpx;
+
+		.round {
+			width: 40rpx;
+			height: 40rpx;
+			line-height: 40rpx;
+			border-radius: 50%;
+			background: $theme-color;
+			color: #fff;
+			text-align: center;
+			font-size: 20rpx;
+		}
+
+		.time {
+			color: #000;
+			font-family: PingFang HK;
+			font-size: 28rpx;
+			font-style: normal;
+			font-weight: 600;
+			margin-left: 16rpx;
+		}
+
+	}
 
-</style>
+
+	.list_box {
+		flex: 1;
+		overflow: hidden;
+		padding: 4rpx 0;
+
+		.u-list {
+			height: 100% !important;
+		}
+
+		.card_box {
+			padding: 16rpx 24rpx;
+		}
+
+
+	}
+</style>

+ 6 - 3
pages/pda/feeding/components/deviceBom.vue

@@ -3,7 +3,7 @@
 		<view class="title_box rx-bc">
 			<view class="name">设备信息</view>
 
-			<view class="btn_box rx-bc" @click="handleScan(workOrderId)">
+			<view class="btn_box rx-bc" @click="handleScan(workOrderId)" v-if='workOrderId'>
 				<image class="scan" src="@/static/pda/ScanIt.svg"></image>
 				更换设备
 			</view>
@@ -16,13 +16,13 @@
 				<view class="item">
 					<view class="lable rx-cc">设备编码</view>
 					<view class="content">
-						{{item.code}}
+						{{ workOrderId ?  item.code: item.categoryCode }}
 					</view>
 				</view>
 
 				<view class="item">
 					<view class="lable rx-cc">设备名称</view>
-					<view class="content">{{ item.name }}</view>
+					<view class="content">{{ workOrderId ?  item.name : item.categoryName }}</view>
 				</view>
 
 				<view class="item">
@@ -44,6 +44,7 @@
 
 <script>
 	export default {
+		
 		props: {
 			workOrderId: {
 				type: String,
@@ -53,6 +54,8 @@
 				type: Array,
 				default: () => []
 			},
+			
+			
 		},
 		data() {
 			return {

+ 3 - 4
pages/pda/feeding/components/instanceBom.vue

@@ -5,7 +5,7 @@
 		</view>
 
 		<view class="material rx-ss" v-for="(mate, idx) in list">
-			<view class="left rx-ss" @click="getDelete(idx)">
+			<view class="left rx-ss" @click="getDelete(idx)" v-if='workOrderId'>
 				<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 			</view>
 			<view class="content_table">
@@ -22,13 +22,12 @@
 					<view class="lable rx-cc">数量</view>
 					<view class="content content_num">
 						<input class="uni-input" v-model="mate.demandQuantity"
-							@blur='mate.demandQuantity > mate.availableCountBase ?  mate.demandQuantity = mate.availableCountBase : mate.demandQuantity'
 							type="digit"></input>
 						<view class="unit">/{{mate.unit}}</view>
-						<view>&nbsp;&nbsp; (库存:{{ mate.availableCountBase }})</view>
+					
 					</view>
 				</view>
-
+				
 
 
 			

+ 1 - 1
pages/pda/feeding/components/modelBom.vue

@@ -3,7 +3,7 @@
 		<view class="title_box rx-bc">
 			<view class="name">模具信息</view>
 
-			<view class="btn_box rx-bc" @click="handleScan(workOrderId)">
+			<view class="btn_box rx-bc" @click="handleScan(workOrderId)" v-if='workOrderId'>
 				<image class="scan" src="@/static/pda/ScanIt.svg"></image>
 				更换模具
 			</view>

+ 7 - 2
pages/pda/feeding/components/workOrderBom.vue

@@ -3,7 +3,7 @@
 		<view class="title_box rx-bc">
 			<view class="name">工单信息</view>
 
-			<view class="btn_box rx-bc" @click="handleScan(item.workOrderId)">
+			<view class="btn_box rx-bc" @click="handleScan(item.workOrderId)" v-if='!isDetails'>
 				<image class="scan" src="@/static/pda/ScanIt.svg"></image>
 				更换工单
 			</view>
@@ -27,7 +27,7 @@
 
 				<view class="item">
 					<view class="lable rx-cc">产品名称</view>
-					<view class="content">{{ item.produceRoutingName }}</view>
+					<view class="content">{{ item.productName }}</view>
 				</view>
 
 				<view class="item rx-sc">
@@ -67,6 +67,11 @@
 				type: Object,
 				default: () => {}
 			},
+			isDetails: {
+				type: Boolean,
+				default: false
+			}
+			
 		},
 		data() {
 			return {

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

@@ -113,8 +113,8 @@
 
 				})
 
-                 
-				 console.log(_arr)
+
+				console.log(_arr)
 
 				batchSave(_arr).then(res => {
 
@@ -194,7 +194,7 @@
 				// CX-EQ-YLSJL-008	  设备
 				// M001 M002 模具 
 				//  S310000552731 物料
-				this.scanItData('M002', id)
+				this.scanItData('CX-EQ-YLSJL-008', id)
 				return false
 
 				let _this = this
@@ -214,6 +214,7 @@
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
+								 console.log(res.fixCode)
 								_arr[index].equipmentList = res
 							}
 						})
@@ -248,62 +249,63 @@
 				})
 
 			},
-			
+
 			// 全部扫一扫
 			handlScanCode() {
-				
-				
+
+
 				// CX-EQ-YLSJL-008	  设备
 				// M001 M002 模具 
 				//  S310000552731 物料
 				// this.scanItAllData('M001')
 				// return false
-				
+
 				let _this = this
 				uni.scanCode({
 					success: function(res) {
 						_this.scanItAllData(res.result)
-			
+
 					}
 				})
 			},
-			
-			
+
+
 			scanItAllData(result) {
 				scanLedger(result).then(res => {
-			
+
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
 						_arr.forEach((e, index) => {
-						        e.equipmentList = res
+							res['extInfo'].fixCode = res.fixCode
+							e.equipmentList = res
 						})
 						this.List = _arr
 						this.$forceUpdate()
-			
+
 					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 5) { // 模具
-			
+
 						_arr = this.List
 						_arr.forEach((e, index) => {
-						e.modelList = res
+							e.modelList = res
 						})
 						this.List = _arr
 						this.$forceUpdate()
-			
+
 					} else if (res.length >= 1 && ['1'].includes(res[0].rootCategoryLevelId)) {
-			
+
 						_arr = this.List
 						_arr.forEach((e, index) => {
-						   e.instanceList = e.instanceList.concat(res)
+							e.instanceList = e.instanceList.concat(res)
 						})
 						this.List = _arr
-			
+
 						this.$forceUpdate()
-			
+
 					}
-			
+
 				})
-			
+
 			},
 
 			handAdd(id, list) {
@@ -325,7 +327,7 @@
 		overflow: hidden;
 		display: flex;
 		flex-direction: column;
-		
+
 
 	}
 
@@ -345,9 +347,6 @@
 
 
 
-
-
-
 	}
 
 	.bottom-wrapper {

+ 37 - 34
pages/pda/workOrder/search/index.vue

@@ -30,6 +30,7 @@
 					<label class="listBox rx-bs">
 
 						<view class="listBox-sel">
+						 
 							<checkbox :value="item.code" color="#fff" :disabled="item.disabled"
 								:checked="item.checked" />
 						</view>
@@ -60,15 +61,15 @@
 				</checkbox-group>
 
 
-			
-	            <view  v-if='list.length == 0' style='margin-top: 20vh;' >
+
+				<view v-if='list.length == 0' style='margin-top: 20vh;'>
 					<u-empty iconSize='150' textSize='32' text='暂无数据'>
 					</u-empty>
 				</view>
 
 			</u-list>
-			
-			
+
+
 
 		</view>
 
@@ -88,8 +89,8 @@
 
 		<ba-tree-picker ref="treePicker" key="verify" :multiple="false" @select-change="confirm" title="选择分类"
 			:localdata="classificationList" valueKey="id" textKey="name" childrenKey="children" />
-			
-			<matterPop v-if='matterShow' @close='close'></matterPop>
+
+		<matterPop v-if='matterShow' :matterId='matterId' @close='close'></matterPop>
 
 	</view>
 </template>
@@ -118,17 +119,18 @@
 				classificationList: [],
 				treePickerShow: false,
 				list: [],
-				
+
 
 				seletedAll: false, //全选状态
 				memoList: [],
-				
+
 				isType: null,
 
 				pid: null, // 上个页面id
 				storageKey: null,
-				
-				matterShow: false
+
+				matterShow: false, //物料 左弹框
+				matterId: null
 			}
 		},
 
@@ -214,7 +216,7 @@
 				this.getList()
 			},
 
-		
+
 
 			getList() {
 				let param = {
@@ -222,67 +224,67 @@
 					keyWord: this.keyWord,
 					pageNum: 1,
 					size: -1,
-					
+
 				}
 				this.list = []
-				if(this.isType == 'pick') {
-					param.dimension = 1 
+				if (this.isType == 'pick') {
+					param.dimension = 1
 					pageeLedgerMain(param).then(res => {
 						this.list.push(
 							...res.list.map(i => {
 								const checked =
 									this.memoList.findIndex(itm => itm.id === i.id) > -1
-					             
-								 const warehouseId = i.pathIds && i.pathIds.split(',')[0]
-							   
+
+								const warehouseId = i.pathIds && i.pathIds.split(',')[0]
+
 								return {
 									checked,
 									warehouseId,
 									...i,
 									instanceId: i.id,
 									categoryId: i.assetId,
-									
+
 								}
 							})
 						)
 					})
-					
-				} else if(this.isType == 'feed') {
+
+				} else if (this.isType == 'feed') {
 					assetPage(param).then(res => {
 						this.list.push(
 							...res.list.map(i => {
 								const checked =
 									this.memoList.findIndex(itm => itm.id === i.id) > -1
-					             
-								 const warehouseId = i.pathIds && i.pathIds.split(',')[0]
-							   
+
+								const warehouseId = i.pathIds && i.pathIds.split(',')[0]
+
 								return {
 									checked,
 									warehouseId,
 									...i,
 									instanceId: i.id,
 									categoryId: i.assetId,
-									
+
 								}
 							})
 						)
 					})
-					
+
 				}
-			
+
 			},
 
 			//勾选
 			selectVal(e, val, index) {
-                if(this.isType == 'pick') {
+				if (this.isType == 'pick') {
 					this.list[index].checked = !this.list[index].checked
-					
+
 					this.seletedAll = !this.list.some(item => !item.checked)
-					
+
 					const idx = this.memoList.findIndex(
 						item => item.id === this.list[index].id
 					)
-					
+
 					if (this.list[index].checked) {
 						if (idx === -1) {
 							this.memoList.push(this.list[index])
@@ -292,15 +294,16 @@
 							this.memoList.splice(idx, 1)
 						}
 					}
-				} else if(this.isType == 'feed') {
+				} else if (this.isType == 'feed') {
+					this.matterId = val.id
 					this.matterShow = true
 				}
-				
-				
+
+
 
 
 			},
-			
+
 			close() {
 				this.matterShow = false
 			},

+ 5 - 1
pages/pda/workOrder/search/matterPop.vue

@@ -4,6 +4,7 @@
 			<view class="content-box">
 
 				<view class="list_box">
+			
 					<u-list @scrolltolower="scrolltolower">
 
 						<checkbox-group v-for="(item, index) in list" :key="index"
@@ -58,6 +59,9 @@
 		tableHeader
 	} from '../../common.js'
 	export default {
+		props: {
+			matterId: [String, Number]
+		},
 		data() {
 			return {
 				show: true,
@@ -377,7 +381,7 @@
 
 			},
 
-	tableH(type) {
+			tableH(type) {
 				return tableHeader(type)
 			},
 			handleClose() {