ysy 2 лет назад
Родитель
Сommit
92eae9d025

+ 12 - 0
api/pda/workOrder.js

@@ -207,3 +207,15 @@ export async function getNewVehicle(params) {
 	return Promise.reject(data.message);
 }
 
+
+// pda根据工单id和工序id查询报工详情
+export async function listWorkReport(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/workreport/listWorkReport`, params, true,
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}

+ 29 - 18
pages/pda/jobBooking/components/turnoverBom.vue

@@ -5,7 +5,7 @@
 		</view>
 
 		<view v-for="(item, index) in newList" :key='index'>
-			<view class="title_box rx-bc">
+			<view class="title_box rx-bc" v-if='!isDetails'>
 				<view class="left rx-ss" @click="getDelete(index)">
 					<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="20" color="#fa3534"></uni-icons>
 				</view>
@@ -45,20 +45,25 @@
 
 				<view class="table">
 					<u-list @scrolltolower="scrolltolower" class="z_list">
-					<view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
-						<view class="item ww10">{{it.code}}</view>
-						<view class="item ww35" :class="{'color157': it.workOrderCode === wordItem.code}">
-							{{ it.workOrderCode }}
-						</view>
-						<view class="item ww35" :class="{'color157': it.categoryCode === wordItem.productCode}">
-							{{it.categoryCode}}
-						</view>
-						<view class="item ww20  " :class="{'content_num' : pattern == 'job' }">
-							<input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
-								v-model="it.quantity" type="digit" :disabled="pattern != 'job'"></input>
-							<text v-else>{{it.quantity}}</text>
+						<view class="tr row rx-sc" v-for="(it, idx) in item.extInfo.positionList" :key='idx'>
+							<view class="item ww10">{{it.code}}</view>
+							<view class="item ww35" :class="{'color157': it.workOrderCode === wordItem.code}">
+								{{ it.workOrderCode }}
+							</view>
+							<view class="item ww35" :class="{'color157': it.categoryCode === wordItem.productCode}">
+								{{it.categoryCode}}
+							</view>
+			
+							<view class="item ww20  " :class="{'content_num' : pattern == 'job' }" v-if='!isDetails'>
+								<input class="uni-input" v-if='it.isFull == 0' @input="quantInt(index, idx, it)"
+									v-model="it.quantity" type="digit" :disabled="pattern != 'job'"></input>
+								<text v-else>{{it.quantity}}</text>
+							</view>
+							
+							<view class="item ww20" v-if='isDetails'>
+								{{ it.quantity }}
+							</view>
 						</view>
-					</view>
 					</u-list>
 
 				</view>
@@ -81,10 +86,15 @@
 				type: Object,
 				default: () => {}
 			},
-			
+
 			pattern: {
 				type: String,
 				default: ''
+			},
+
+			isDetails: {
+				type: Boolean,
+				default: false
 			}
 		},
 
@@ -96,7 +106,7 @@
 				deep: true,
 				handler(newVal) {
 					this.newList = newVal
-				
+
 				}
 			}
 		},
@@ -129,7 +139,7 @@
 			},
 
 			getDelete(index) {
-				this.list.splice(index,1)
+				this.list.splice(index, 1)
 
 
 			},
@@ -334,7 +344,8 @@
 		}
 
 	}
-	.z_list{
+
+	.z_list {
 		max-height: 500rpx;
 	}
 </style>

+ 133 - 6
pages/pda/workOrder/index/details.vue

@@ -1,22 +1,149 @@
 <template>
-	<view>
-		
+	<view class="content-box">
+		<uni-nav-bar fixed="true" statusBar="true" left-icon="back" :title="title" background-color="#F7F9FA"
+			color="#000" @clickLeft="back" right-icon="scan" @clickRight="HandlScanCode">
+		</uni-nav-bar>
+
+		<view class="list_box">
+			<u-list @scrolltolower="scrolltolower">
+				<view class="card_box" v-for="(objData,index) in list" :key='index'>
+					<workOrderBom :item='objData' v-if='objData' :isDetails='true'></workOrderBom>
+
+					<deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList'></deviceBom>
+
+					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
+					</modelBom>
+
+					<jobBom :item='objData' :palletList='objData.palletList' :notFormed='objData.notFormedList'
+						@penalize='penalize'></jobBom>
+
+					<byProductBom v-if='objData.productRecycleList.length != 0 ' :list='objData.productRecycleList'
+						@penalize='penalize'>
+					</byProductBom>
+
+					<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
+						pattern='job'  :isDetails='true'>
+					</turnoverBom>
+
+
+
+					<aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
+						:remainingTime='remainingTime' @handleScan='handleScan' :isType='true'></aridRegion>
+
+
+				</view>
+			</u-list>
+		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		listWorkReport,
+	} from '@/api/pda/workOrder.js'
+	import workOrderBom from '../../feeding/components/workOrderBom.vue'
+	import deviceBom from '../../feeding/components/deviceBom.vue'
+	import modelBom from '../../feeding/components/modelBom.vue'
+	import jobBom from '../../jobBooking/components/jobBom.vue'
+	import oneJobBom from '../../jobBooking/components/oneJobBom.vue'
+	import byProductBom from '../../jobBooking/components/byProductBom'
+	import turnoverBom from '../../jobBooking/components/turnoverBom.vue'
+	import aridRegion from '../../feeding/components/aridRegion.vue'
+	import paramBom from '../../feeding/components/paramBom.vue'
 	export default {
+		components: {
+			workOrderBom,
+			deviceBom,
+			modelBom,
+			jobBom,
+			oneJobBom,
+			byProductBom,
+			turnoverBom,
+			aridRegion,
+			paramBom,
+		},
 		data() {
 			return {
-				
+				workOrderId: null,
+				taskId: null,
+				list: []
 			}
 		},
+		onLoad(options) {
+			this.title = options.taskName ? options.taskName + '-报工详情' : '报工详情'
+			this.workOrderId = options.id
+			this.taskId = options.taskId
+			this.getList()
+		},
+
 		methods: {
-			
+			getList() {
+				let param = {
+					workOrderId: this.workOrderId,
+					taskId: this.taskId
+				}
+				listWorkReport(param).then(res => {
+
+					this.list = res
+				})
+			},
+
+			scrolltolower() {}
 		}
 	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.content-box {
+		height: 100vh;
+		overflow: hidden;
+		display: flex;
+		flex-direction: column;
+
+	}
+
+	.list_box {
+		flex: 1;
+		overflow: hidden;
+		padding: 4rpx 0;
+
+		.u-list {
+			height: 100% !important;
+		}
+
+		.card_box {
+			padding: 16rpx 24rpx;
+		}
+
+
+
+	}
+
+	.bottom-wrapper {
+		.btn_box {
+			width: 750rpx;
+			height: 88rpx;
+			line-height: 88rpx;
+			background: $theme-color;
+			text-align: center;
+			font-size: 36rpx;
+			font-style: normal;
+			font-weight: 400;
+			color: #fff;
+		}
+	}
+
+
+	.operate_box {
+		padding: 10rpx 160rpx;
 
-</style>
+		/deep/ .u-button {
+			width: 160rpx;
+		}
+	}
+
+	.search_list {
+		min-height: 500rpx;
+		padding: 0 32rpx;
+	}
+</style>