ysy 1 年之前
父节点
当前提交
e456a3f32b
共有 2 个文件被更改,包括 43 次插入35 次删除
  1. 37 34
      pages/pda/jobBooking/index/index.vue
  2. 6 1
      pages/pda/sample/inspection/job.vue

+ 37 - 34
pages/pda/jobBooking/index/index.vue

@@ -22,8 +22,8 @@
 					</modelBom>
 
 
-					<jobBom v-if='isLoad' :item='objData' ref='jobRef' :notFormed='objData.notFormedList' @penalize='penalize'
-						@modeNum='modeNum'></jobBom>
+					<jobBom v-if='isLoad' :item='objData' ref='jobRef' :notFormed='objData.notFormedList'
+						@penalize='penalize' @modeNum='modeNum'></jobBom>
 
 					<palletBom v-if="objData.palletList.length != 0" :palletList='objData.palletList'></palletBom>
 
@@ -83,7 +83,8 @@
 
 
 		<view class="bottom-wrapper">
-			<view class="btn_box" @click="save">一键报工</view>
+			<view class="btn_box" @click="save(1)">缓存</view>
+			<view class="btn_box" @click="save(2)">一键报工</view>
 		</view>
 
 
@@ -384,10 +385,10 @@
 			},
 
 
-				formedNumFn(num) {
-					this.$refs.jobRef.setFormedNum(num)
-					
-				},
+			formedNumFn(num) {
+				this.$refs.jobRef.setFormedNum(num)
+
+			},
 
 
 			getList() {
@@ -500,7 +501,7 @@
 				}).finally(() => {
 					this.isLoad = true
 
-					if (this.clientEnvironmentId == 2 && this.taskType == 1) {
+					if (this.taskType == 1) {
 						this.getCacheFn()
 					}
 				})
@@ -567,7 +568,7 @@
 
 
 
-			async save() {
+			async save(type) {
 				uni.showLoading({
 					title: '加载中'
 				});
@@ -628,7 +629,7 @@
 
 
 
-				if (this.objData.productRecycleList.length > 0 && this.clientEnvironmentId != 2) { 
+				if (this.objData.productRecycleList.length > 0 && this.clientEnvironmentId != 2) {
 
 					const isRecycle = await this.checkRecycle()
 					if (!isRecycle) {
@@ -666,8 +667,8 @@
 				}
 
 
-				if (this.clientEnvironmentId == 2 && this.taskType == 1) {
-					const isCache = await this.checkCache()
+				if (this.taskType == 1) {
+					const isCache = await this.checkCache(type)
 
 					if (!isCache) {
 						return false
@@ -801,29 +802,21 @@
 
 			},
 
-			checkCache() {
+			checkCache(type) {
 				uni.hideLoading();
 				return new Promise((resolve) => {
-					uni.showModal({
-						title: '提示',
-						content: '报工是否缓存!',
-						cancelText: '报工',
-						confirmText: '缓存', //这块是确定按钮的文字
-						success: res => {
-							if (res.confirm) {
-								saveCache(this.objData).then(rr => {
-									uni.showToast({
-										title: `已经缓存`,
-										icon: 'none'
-									})
-								})
-								resolve(false)
-							} else {
-								resolve(true)
-
-							}
-						}
-					})
+					if (type == 1) {
+						saveCache(this.objData).then(rr => {
+							uni.showToast({
+								title: `已经缓存`,
+								icon: 'none'
+							})
+						})
+						resolve(false)
+					}
+					else if(type ==2) {
+						resolve(true)
+					}
 
 				})
 			},
@@ -879,8 +872,14 @@
 	}
 
 	.bottom-wrapper {
+		width: 100%;
+		display: flex;
+		align-items: center;
+		justify-content: space-around;
+
+
 		.btn_box {
-			width: 750rpx;
+			width: 50%;
 			height: 88rpx;
 			line-height: 88rpx;
 			background: $theme-color;
@@ -889,6 +888,10 @@
 			font-style: normal;
 			font-weight: 400;
 			color: #fff;
+
+			&:first-child {
+				border-right: 2rpx solid #fff;
+			}
 		}
 	}
 

+ 6 - 1
pages/pda/sample/inspection/job.vue

@@ -12,6 +12,8 @@
 
 					<diagramLast v-if='lastObj' :item='lastObj'>
 					</diagramLast>
+					
+					<deviceBom v-if='objData && objData.equipmentList.length != 0' :list='objData.equipmentList' ></deviceBom>
 
 					<qualityStat :normalQuality='objData.normalQuality' v-if='objData'></qualityStat>
 
@@ -54,11 +56,13 @@
 	import workOrderBom from '../../feeding/components/workOrderBom.vue'
 	import qualityStat from '../components/qualityStat.vue'
 	import diagramLast from '../components/diagramLast.vue'
+	import deviceBom from '../../feeding/components/deviceBom.vue'
 	export default {
 		components: {
 			workOrderBom,
 			qualityStat,
-			diagramLast
+			diagramLast,
+			deviceBom
 		},
 		data() {
 			return {
@@ -127,6 +131,7 @@
 					}
 
 					this.objData = res
+					console.log(66,this.objData )
 
 
 				})