ysy 1 年之前
父節點
當前提交
fbbe5c01ed
共有 7 個文件被更改,包括 240 次插入29 次删除
  1. 13 0
      api/pda/workOrder.js
  2. 96 17
      pages/pda/feeding/details.vue
  3. 24 5
      pages/pda/jobBooking/components/semiProductJobBom.vue
  4. 107 7
      pages/pda/jobBooking/index/index.vue
  5. 二進制
      static/close.png
  6. 二進制
      static/leftJt.png
  7. 二進制
      static/rightJt.png

+ 13 - 0
api/pda/workOrder.js

@@ -637,3 +637,16 @@ export async function feedGetCache(params) {
 	}
 	return Promise.reject(data.message);
 }
+
+
+// 清空缓存
+export async function removeCache(params) {
+	const data = await postJ(
+		Vue.prototype.apiUrl + `/pda/mes/workreport/removeCache`, params, true,
+	);
+
+	if (data.code == 0) {
+		return data.data;
+	}
+	return Promise.reject(data.message);
+}

+ 96 - 17
pages/pda/feeding/details.vue

@@ -52,7 +52,18 @@
 
 
 
-					<view class='flex_btn' @click="openDetails(item.workOrderId)">出库单</view>
+					<view :class="[operateBtn ? 'flex_btn': 'flex_btn2']">
+						<image v-if="operateBtn" class="jiantou" src="../../../static/rightJt.png"
+							@click="operateBtn = false"> </image>
+
+						<view class="close_box" @click="operateBtn = true">
+							<image v-if="!operateBtn" class="close" src="../../../static/close.png"></image>
+						</view>
+
+						<view v-if="!operateBtn" @click="openDetails(item.workOrderId)">出库单</view>
+						<view v-if="!operateBtn" @click="removeCacheFn()">清空缓存</view>
+
+					</view>
 
 					<view :class="[ idsList.length == 1 ? 'operate_box' :'operate_box2'] ">
 
@@ -99,7 +110,8 @@
 		getByCode,
 		scanLedger,
 		feedSaveCache,
-		feedGetCache
+		feedGetCache,
+		removeCache
 	} from '@/api/pda/workOrder.js'
 
 	import {
@@ -133,6 +145,9 @@
 
 				clientEnvironmentId: null,
 
+				operateBtn: true
+
+
 
 
 
@@ -310,7 +325,8 @@
 									m.palletList.push(f)
 								} else if (f.rootCategoryLevelId == 26) {
 									m.revolvingDiskList.push(f)
-								} else if ([23, 2, 9, 28].includes(Number(f.rootCategoryLevelId))) {
+								} else if ([23, 2, 9, 28].includes(Number(f
+										.rootCategoryLevelId))) {
 									m.semiProductList.push(f)
 								}
 
@@ -339,7 +355,7 @@
 						}
 					})
 				}).finally(() => {
-					this.getCacheFn()
+					// this.getCacheFn()
 				})
 			},
 
@@ -401,8 +417,8 @@
 			scanItData(result, id) {
 
 				scanLedger(result).then(res => {
-                   console.log(888,res)
- 
+
+
 					let _arr = []
 					if (res.length == 1 && res[0].rootCategoryLevelId == 4) { // 设备
 						_arr = this.List
@@ -425,7 +441,7 @@
 						this.List = _arr
 						this.$forceUpdate()
 
-					} else if (res.length >= 1 &&  [1].includes(Number(res[0].rootCategoryLevelId))) { // 物料
+					} else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) { // 物料
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
@@ -436,7 +452,7 @@
 
 						this.$forceUpdate()
 
-					}  else if (res.length >= 1 &&  [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) { 
+					} else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
@@ -447,9 +463,7 @@
 
 						this.$forceUpdate()
 
-					}
-					
-					else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
+					} else if (res.length >= 1 && res[0].rootCategoryLevelId == 11) { // 干燥区
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							if (e.workOrderId == id) {
@@ -519,7 +533,7 @@
 				uni.scanCode({
 					success: (res) => {
 						this.scanItAllData(res.result)
-						
+
 
 					}
 				})
@@ -548,7 +562,7 @@
 						this.List = _arr
 						this.$forceUpdate()
 
-					} else if (res.length >= 1 &&  [1].includes(Number(res[0].rootCategoryLevelId))) {
+					} else if (res.length >= 1 && [1].includes(Number(res[0].rootCategoryLevelId))) {
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							e.instanceList = e.instanceList.concat(res)
@@ -557,7 +571,7 @@
 
 						this.$forceUpdate()
 
-					}  else if (res.length >= 1 &&  [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
+					} else if (res.length >= 1 && [23, 2, 9, 28].includes(Number(res[0].rootCategoryLevelId))) {
 						_arr = this.List
 						_arr.forEach((e, index) => {
 							e.semiProductList = e.semiProductList.concat(res)
@@ -601,6 +615,32 @@
 				})
 			},
 
+			removeCacheFn() {
+
+				uni.showModal({
+					title: '缓存',
+					content: '是否清空缓存!',
+					confirmText: '确认', //这块是确定按钮的文字
+					success: rr => {
+						if (rr.confirm) {
+							let parma = {
+								workOrderIds: this.idsList,
+								taskId: this.taskId,
+								type: 2
+							}
+
+							removeCache(parma).then(res => {
+								this.getList()
+							})
+						}
+
+					}
+				})
+
+
+
+			},
+
 
 			handAdd(id) {
 				const storageKey = Date.now() + "";
@@ -709,11 +749,10 @@
 
 	.flex_btn {
 		position: fixed;
-
 		right: 0;
 		bottom: 160rpx;
-		width: 140rpx;
-		height: 66rpx;
+		width: 40rpx;
+		height: 50rpx;
 		line-height: 66rpx;
 		border-radius: 22rpx 0 0 22rpx;
 		background: $theme-color;
@@ -723,5 +762,45 @@
 		font-weight: 400;
 		color: #fff;
 		opacity: 0.6;
+
+
+		.jiantou {
+			width: 30rpx;
+			height: 30rpx;
+
+		}
+	}
+
+	.flex_btn2 {
+		position: fixed;
+		right: 0;
+		bottom: 160rpx;
+		width: 126rpx;
+		min-height: 140rpx;
+		line-height: 62rpx;
+		border-radius: 22rpx 0 0 22rpx;
+		background: $theme-color;
+		text-align: center;
+		font-size: 22rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: #fff;
+		opacity: 0.7;
+
+		.close_box {
+			height: 50rpx;
+			line-height: 50rpx;
+			width: 126rpx;
+			text-align: left;
+
+			.close {
+				width: 40rpx;
+				height: 40rpx;
+				padding: 6rpx 10rpx;
+
+			}
+		}
+
+
 	}
 </style>

+ 24 - 5
pages/pda/jobBooking/components/semiProductJobBom.vue

@@ -12,9 +12,12 @@
 
 				<view class="item rx-sc">
 					<view class="rx">
-						<view class="lable lable190 rx-cc ">
+						<view class="lable lable190 rx-cc " @click="getDelete2(idx)">
+							<view class="round">{{idx + 1}}</view>
+							<uni-icons custom-prefix="iconfont" type="icon-shanchu" size="16"
+								color="#fa3534"></uni-icons>
+							物料编码
 
-							<view class="round">{{idx + 1}}</view>物料编码
 						</view>
 						<view class="content rx-bc">
 							<view>{{it.code}} </view>
@@ -408,6 +411,7 @@
 
 			getDelete(idx) {
 				this.paramList.splice(idx, 1)
+
 			},
 
 			changeInp(item, index) {
@@ -510,6 +514,20 @@
 				console.log(e)
 			},
 
+			getDelete2(idx) {
+				uni.showModal({
+					title: '删除',
+					content: '是否确实删除此物料!',
+					confirmText: '确认', //这块是确定按钮的文字
+					success: rr => {
+						if (rr.confirm) {
+							this.list.splice(idx, 1)
+						}
+
+					}
+				})
+			},
+
 			save() {
 
 
@@ -663,7 +681,7 @@
 				}
 
 				.lable190 {
-					width: 190rpx !important;
+					width: 200rpx !important;
 					font-size: 24rpx;
 				}
 
@@ -848,7 +866,7 @@
 	.round {
 		width: 32rpx;
 		height: 32rpx;
-		line-height: 32rpx;
+		line-height: 30rpx;
 		text-align: center;
 		border-radius: 50%;
 		background: $theme-color;
@@ -856,7 +874,8 @@
 		font-style: normal;
 		font-weight: 400;
 		color: #fff;
-		margin-right: 18rpx;
+		margin-right: 10rpx;
+
 	}
 
 

+ 107 - 7
pages/pda/jobBooking/index/index.vue

@@ -74,13 +74,26 @@
 
 					<view style="height: 100rpx;"></view>
 
+
+
 				</view>
 
 			</u-list>
 		</view>
 
 
+		<view :class="[operateBtn ? 'flex_btn': 'flex_btn2']">
+			<image v-if="operateBtn" class="jiantou" src="../../../../static/rightJt.png" @click="operateBtn = false">
+			</image>
+
+			<view class="close_box" @click="operateBtn = true">
+				<image v-if="!operateBtn" class="close" src="../../../../static/close.png"></image>
+			</view>
+
+
+			<view v-if="!operateBtn" @click="removeCacheFn()">清空缓存</view>
 
+		</view>
 
 
 		<view class="bottom-wrapper">
@@ -137,7 +150,8 @@
 		scanLedger,
 		getWarehouseList,
 		saveCache,
-		getCache
+		getCache,
+		removeCache
 	} from '@/api/pda/workOrder.js'
 
 
@@ -222,6 +236,8 @@
 				clientEnvironmentId: uni.getStorageSync("userInfo") && uni.getStorageSync("userInfo")
 					.clientEnvironmentId, // *1 主环境-601环境   2 soll-索尔环境    3 tg-碳谷环境
 
+
+				operateBtn: true
 			}
 		},
 		onLoad(options) {
@@ -505,9 +521,9 @@
 				}).finally(() => {
 					this.isLoad = true
 
-					if (this.taskType == 1) {
-						this.getCacheFn()
-					}
+					// if (this.taskType == 1) {
+					// 	this.getCacheFn()
+					// }
 				})
 			},
 
@@ -814,6 +830,32 @@
 			},
 
 
+			removeCacheFn() {
+
+				uni.showModal({
+					title: '缓存',
+					content: '是否清空缓存!',
+					confirmText: '确认', //这块是确定按钮的文字
+					success: rr => {
+						if (rr.confirm) {
+							let parma = {
+								workOrderIds:[ this.id],
+								taskId: this.taskId,
+								type: 1
+							}
+
+							removeCache(parma).then(res => {
+								this.getList()
+							})
+						}
+
+					}
+				})
+
+
+			},
+
+
 			getCacheFn() {
 				let parma = {
 					workOrderId: this.id,
@@ -827,8 +869,6 @@
 
 
 					this.objData['product'] = res.extInfo.product
-
-
 					this.objData['workReportInfo'] = res.extInfo.workReportInfo
 					this.objData['notFormedList'] = res.extInfo.notFormedList
 					this.objData['turnover'] = res.extInfo.turnover
@@ -836,7 +876,7 @@
 					this.objData['semiProductList'] = res.extInfo.semiProductList
 					this.objData['modelList'] = res.extInfo.modelList
 
-					console.log(999, this.objData)
+			
 
 				})
 			},
@@ -910,4 +950,64 @@
 		min-height: 500rpx;
 		padding: 0 32rpx;
 	}
+
+
+
+
+	.flex_btn {
+		position: fixed;
+		right: 0;
+		bottom: 160rpx;
+		width: 40rpx;
+		height: 50rpx;
+		line-height: 66rpx;
+		border-radius: 22rpx 0 0 22rpx;
+		background: $theme-color;
+		text-align: center;
+		font-size: 22rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: #fff;
+		opacity: 0.6;
+
+
+		.jiantou {
+			width: 30rpx;
+			height: 30rpx;
+
+		}
+	}
+
+	.flex_btn2 {
+		position: fixed;
+		right: 0;
+		bottom: 160rpx;
+		width: 126rpx;
+		min-height: 140rpx;
+		line-height: 62rpx;
+		border-radius: 22rpx 0 0 22rpx;
+		background: $theme-color;
+		text-align: center;
+		font-size: 22rpx;
+		font-style: normal;
+		font-weight: 400;
+		color: #fff;
+		opacity: 0.7;
+
+		.close_box {
+			height: 50rpx;
+			line-height: 50rpx;
+			width: 126rpx;
+			text-align: left;
+
+			.close {
+				width: 40rpx;
+				height: 40rpx;
+				padding: 6rpx 10rpx;
+
+			}
+		}
+
+
+	}
 </style>

二進制
static/close.png


二進制
static/leftJt.png


二進制
static/rightJt.png