ysy vor 2 Jahren
Ursprung
Commit
c9dca69be0

+ 1 - 6
pages/pda/feeding/components/feedBom.js

@@ -43,12 +43,7 @@ export const tableHeader = selectEquiType => {
 					extInfo: false
 				},
 
-				{
-					label: '本次冲压数',
-					prop: 'cyTimes',
-					write: false,
-					extInfo: true
-				},
+	
 				{
 					label: '已冲压次数',
 					prop: 'startCyTimes',

+ 22 - 4
pages/pda/feeding/components/modelBom.vue

@@ -12,7 +12,7 @@
 
 		<view class="material ">
 
-	
+
 
 			<view class="content_table" v-for="(item,index) in list" :key='index'>
 				<view class="item " v-for="(tab, tIdx) in tableH(5)" :key="tIdx">
@@ -24,6 +24,9 @@
 					</view>
 
 
+
+
+
 					<view class="item" v-if="!Array.isArray(tab.prop)">
 						<view class="lable lable300 rx-sc"> {{ tab.label  }}</view>
 						<view class="content content_num" v-if='tab.write'>
@@ -31,13 +34,18 @@
 								type="digit"></input>
 						</view>
 						<view class="content" v-if='!tab.write'>
-							
+
 							{{tab.extInfo ?  item.extInfo[tab.prop] : item[tab.prop]}}
 						</view>
 					</view>
 
+				</view>
 
-
+				<view class="item">
+					<view class="lable lable300 rx-sc">本次冲压数 </view>
+					<view class="content content_num">
+						<input class="uni-input" v-model="item.extInfo.cyTimes" type='digit'></input>
+					</view>
 				</view>
 
 			</view>
@@ -61,6 +69,10 @@
 				type: Array,
 				default: () => []
 			},
+			pattern: {
+				type: String,
+				default: ''
+			}
 		},
 		data() {
 			return {
@@ -73,7 +85,13 @@
 			},
 
 			handleScan(id) {
-				this.$emit('scanIt', id )
+				this.$emit('scanIt', id)
+			},
+			
+			setNum(num) {
+				this.list.forEach(e => {
+					this.$set(e.extInfo, 'cyTimes', num)
+				})
 			},
 		}
 	}

+ 17 - 5
pages/pda/jobBooking/components/byProductBom.vue

@@ -17,13 +17,14 @@
 					<view class="tr row rx-sc" v-for="(item, index) in list" :key='index'>
 				
 						<view class="item ww30">{{item.code}}</view>
-						<view class="item ww30">{{item.name}}</view>
+						<view class="item ww30">{{isDetails ? item.categoryName :  item.name}}</view>
 						<view class="item ww40  content_num">
 
-							<input class="uni-input" v-model="item.recycleQuantity" type="digit"></input>
+							<input class="uni-input" v-model="item.recycleQuantity" type="digit" v-if="!isDetails"></input>
+							<view v-if="isDetails">{{item.quantity}}</view>
 							<view class="unit">{{item.unit}}</view>
-							<view class="penalize" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="penalize(index)">处置</view>
-
+							<view class="penalize" v-if="!isDetails" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="penalize(index)">处置</view>
+                            <view v-if="isDetails"  class="penalize" :style="{ color: item.warehouseId ? 'rgb(255 170 42)' : ''}" @click="handleView(item.warehouseName)">查看</view>
 						</view>
 					</view>
 
@@ -46,6 +47,10 @@
 			list: {
 				type: Array,
 				default: () => {}
+			},
+			isDetails: {
+				type: Boolean,
+				default: false
 			}
 		},
 		data() {
@@ -57,7 +62,14 @@
 		methods: {
 			penalize(index) {
 				this.$emit('penalize', index)
-			}
+			},
+			
+			handleView(name) {
+				uni.showToast({
+					icon: 'none',
+					title: name
+				})
+			},
 		},
 	}
 </script>

+ 18 - 4
pages/pda/jobBooking/components/jobBom.vue

@@ -37,7 +37,7 @@
 					<view class="rx ww55 ">
 						<view class="lable lable150 rx-cc ">合格品数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="item.workReportInfo.formedNum" type="digit"></input>
+							<input class="uni-input" v-model="item.workReportInfo.formedNum" @blur="blurNum" type="digit"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -61,7 +61,7 @@
 					
 						<view class="lable lable150 rx-cc ">不合格数量</view>
 						<view class="content content_num">
-							<input class="uni-input" v-model="not.notFormedNum" type="digit"></input>
+							<input class="uni-input" v-model="not.notFormedNum" type="digit" @blur="blurNum"></input>
 							<view class="unit">{{item.unit}}</view>
 						</view>
 					</view>
@@ -72,7 +72,8 @@
 							<input class="uni-input" v-model="not.notFormedWeight" type="digit"></input>
 							<view class="unit">{{item.weightUnit}}</view>
 							
-							<view class="penalize"  :style="{ color: not.warehouseId ? 'rgb(255 170 42)' : ''}"  @click="penalize">处置</view>
+							<view class="penalize" v-if='!isDetails'  :style="{ color: not.warehouseId ? 'rgb(255 170 42)' : ''}"  @click="penalize">处置</view>
+							<view class="penalize" v-if='isDetails'  :style="{ color: not.warehouseId ? 'rgb(255 170 42)' : ''}"  @click="handleView(item.warehouseName)">查看</view>
 						</view>
 					</view>
 
@@ -137,6 +138,7 @@
 		pageeLedgerMain,
 		assetPage
 	} from '@/api/pda/workOrder.js'
+import { number } from 'echarts'
 	export default {
 		props: {
 			item: {
@@ -239,7 +241,19 @@
 			
 			penalize() {
 				this.$emit('penalize', null)
-			}
+			},
+			
+			handleView(name) {
+				uni.showToast({
+					icon: 'none',
+					title: name || '未设置'
+				})
+			},
+			
+			blurNum() {
+				let total = Number(this.item.workReportInfo.formedNum) + Number(this.notFormedList[0].notFormedNum)
+				this.$emit('modeNum', total)
+			},
 		}
 	}
 </script>

+ 3 - 3
pages/pda/jobBooking/components/turnoverBom.vue

@@ -45,7 +45,7 @@
 
 				<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="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 }}
@@ -53,13 +53,13 @@
 							<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>

+ 9 - 2
pages/pda/jobBooking/index/index.vue

@@ -14,13 +14,13 @@
 
 					<deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList'></deviceBom>
 
-					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'>
+					<modelBom v-if='objData.modelList.length != 0' :list='objData.modelList'  pattern='job' ref='modelRef'>
 					</modelBom>
 
 
 
 					<jobBom :item='objData' :palletList='objData.palletList' :notFormed='objData.notFormedList'
-						@penalize='penalize'></jobBom>
+						@penalize='penalize' @modeNum='modeNum'></jobBom>
 						
 						<oneJobBom :item='objData' :palletList='objData.palletList' :notFormed='objData.notFormedList'></oneJobBom>
 
@@ -446,6 +446,13 @@
 				this.searchShow = false
 
 			},
+			
+			modeNum(num) {
+				if(this.objData.modelList.length == 0) {
+					return false
+				}
+				this.$refs.modelRef.setNum(num)
+			},
 
 
 

+ 29 - 8
pages/pda/workOrder/index/details.vue

@@ -1,12 +1,18 @@
 <template>
 	<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">
+			color="#000" @clickLeft="back" >
 		</uni-nav-bar>
 
 		<view class="list_box">
 			<u-list @scrolltolower="scrolltolower">
 				<view class="card_box" v-for="(objData,index) in list" :key='index'>
+
+					<view class="rx-bc title_card">
+						<view>{{index + 1}}</view>
+						<view>报工时间: {{objData.createTime}}</view>
+					</view>
+
 					<workOrderBom :item='objData' v-if='objData' :isDetails='true'></workOrderBom>
 
 					<deviceBom v-if='objData.equipmentList.length != 0' :list='objData.equipmentList'></deviceBom>
@@ -15,22 +21,29 @@
 					</modelBom>
 
 					<jobBom :item='objData' :palletList='objData.palletList' :notFormed='objData.notFormedList'
-						@penalize='penalize'></jobBom>
+						:isDetails='true'></jobBom>
 
 					<byProductBom v-if='objData.productRecycleList.length != 0 ' :list='objData.productRecycleList'
-						@penalize='penalize'>
+						:isDetails='true'>
 					</byProductBom>
 
 					<turnoverBom v-if='objData.turnover.length != 0' :list='objData.turnover' :wordItem='objData'
-						pattern='job'  :isDetails='true'>
+						pattern='job' :isDetails='true'>
 					</turnoverBom>
 
 
 
 					<aridRegion v-if='objData.aridRegionList.length != 0' :list='objData.aridRegionList'
-						:remainingTime='remainingTime' @handleScan='handleScan' :isType='true'></aridRegion>
+						:remainingTime='0'  :isType='true'></aridRegion>
+
 
+				</view>
 
+				<view v-if='list.length == 0'>
+					<view style='margin-top: 20vh;'>
+						<u-empty iconSize='150' textSize='32' text='暂无报工详情'>
+						</u-empty>
+					</view>
 				</view>
 			</u-list>
 		</view>
@@ -142,8 +155,16 @@
 		}
 	}
 
-	.search_list {
-		min-height: 500rpx;
-		padding: 0 32rpx;
+
+
+	.title_card {
+		height: 70rpx;
+		width: 100%;
+		background: #157A2C;
+		font-size: 30rpx;
+		color: #fff;
+		line-height: 70rpx;
+		padding: 0 22rpx;
+		box-sizing: border-box;
 	}
 </style>