|
@@ -116,7 +116,8 @@
|
|
import {
|
|
import {
|
|
onLoad,
|
|
onLoad,
|
|
onReady,
|
|
onReady,
|
|
- onUnload
|
|
|
|
|
|
+ onUnload,
|
|
|
|
+ onShow
|
|
} from '@dcloudio/uni-app'
|
|
} from '@dcloudio/uni-app'
|
|
import {
|
|
import {
|
|
getDayWorkList,
|
|
getDayWorkList,
|
|
@@ -156,18 +157,22 @@
|
|
}
|
|
}
|
|
console.log(bottomStatus.value)
|
|
console.log(bottomStatus.value)
|
|
|
|
|
|
- init(store.planDetails.id);
|
|
|
|
|
|
+ //init(store.planDetails.id);
|
|
uni.$on('batchReporting-addBatch', () => {
|
|
uni.$on('batchReporting-addBatch', () => {
|
|
init(store.planDetails.id);
|
|
init(store.planDetails.id);
|
|
})
|
|
})
|
|
- uni.$on('dayworkItemUpdate', reflush)
|
|
|
|
|
|
+ // uni.$on('dayworkItemUpdate', reflush)
|
|
uni.$on('bathReportingReflush', reflush)
|
|
uni.$on('bathReportingReflush', reflush)
|
|
})
|
|
})
|
|
|
|
|
|
onUnload(() => {
|
|
onUnload(() => {
|
|
- uni.$off('dayworkItemUpdate', reflush);
|
|
|
|
|
|
+ // uni.$off('dayworkItemUpdate', reflush);
|
|
uni.$off('bathReportingReflush', reflush);
|
|
uni.$off('bathReportingReflush', reflush);
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+ onShow(() => {
|
|
|
|
+ reflush();
|
|
|
|
+ })
|
|
|
|
|
|
function reflush() {
|
|
function reflush() {
|
|
init(store.planDetails.id);
|
|
init(store.planDetails.id);
|
|
@@ -259,13 +264,16 @@
|
|
}).then(response => {
|
|
}).then(response => {
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
console.log(response)
|
|
console.log(response)
|
|
- if (response.data[0].productionPlanDetailId == store.planDetails.id) {
|
|
|
|
|
|
+ console.log(response.data[0].productionPlanDetailId)
|
|
|
|
+ console.log(store.planDetails.id)
|
|
|
|
+ if (!response.data[0].productionPlanDetailId == store.planDetails.id) {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
icon: 'none',
|
|
icon: 'none',
|
|
title: '该批次不在此计划单内',
|
|
title: '该批次不在此计划单内',
|
|
duration: 2000
|
|
duration: 2000
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
|
|
+ console.log(response.data)
|
|
lotDialog.value.open(response.data);
|
|
lotDialog.value.open(response.data);
|
|
}
|
|
}
|
|
}
|
|
}
|