|
|
@@ -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;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|