优化模具报工二次报工时,报工进度还是上次输入的数据

This commit is contained in:
think 2025-01-14 11:35:55 +08:00
parent 595315b149
commit ce8aa43d07
2 changed files with 7 additions and 4 deletions

View File

@ -14,7 +14,7 @@ const userId = userStore.userInfo.userId
const isFinish = ref(false) const isFinish = ref(false)
// //
const isTriggered = ref(false) const isTriggered = ref(false)
const progress = ref(0)
const selectedId = ref(null); // selectedId const selectedId = ref(null); // selectedId
// porps // porps
@ -127,6 +127,7 @@ onShow(async () => {
const handleDetail = (item) => { const handleDetail = (item) => {
progress.value = 0;
showPopup.value = true; showPopup.value = true;
selectedId.value = item.id; // selectedId selectedId.value = item.id; // selectedId
/* const url = `/pages/zjPgMaster/zjPgMaster-detail?id=${item.id}` /* const url = `/pages/zjPgMaster/zjPgMaster-detail?id=${item.id}`
@ -215,7 +216,7 @@ const onRefresherrefresh = async () => {
</view> </view>
</scroll-view> </scroll-view>
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> --> <!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
<popup :showPopup="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> <popup :showPopup="showPopup" :progress="progress" :imageLink="''" @close="onPopupClose" />
</view> </view>
</template> </template>

View File

@ -4,7 +4,7 @@
<view class="popup-content"> <view class="popup-content">
<input type="number" class="progress-info" v-model="progress" placeholder="请输入进度"> <input type="number" class="progress-info" v-model="progress" placeholder="请输入进度">
<input type="text" class="image-info" v-model="imageLink" placeholder="请输入图片链接"> <input type="text" class="image-info" v-model="imageLink" placeholder="请输入图片链接">
<button @click="onClose">关闭弹窗</button> <button @click="onClose">确认上报</button>
</view> </view>
</view> </view>
</template> </template>
@ -19,7 +19,7 @@ const props = defineProps({
} }
}); });
const progress = ref(0.0); const progress = ref(0);
const imageLink = ref(''); const imageLink = ref('');
const emit = defineEmits(['close']); const emit = defineEmits(['close']);
@ -29,7 +29,9 @@ const onMaskClick = () => {
}; };
const onClose = () => { const onClose = () => {
emit('close', progress.value, imageLink.value); emit('close', progress.value, imageLink.value);
progress.value = 0;
}; };
</script> </script>