|
|
@@ -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>
|