小程序端不提示错误问题和设计时间问题

This commit is contained in:
Ledo 2025-06-30 22:49:17 +08:00
parent 6aed54f04e
commit 8ecf0e1cfe
2 changed files with 24 additions and 11 deletions

View File

@ -808,6 +808,7 @@ const onAddItem = async() => {
// //
var date = new Date(); var date = new Date();
date.setHours(0,0,0,0) date.setHours(0,0,0,0)
var date2 = new Date();
if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){ if(processDesignType.value == 'BLUEPRINT_WORKBLANK'){
if(formData.value.blankDate != null ){ if(formData.value.blankDate != null ){
var date1 = new Date(formData.value.blankDate); var date1 = new Date(formData.value.blankDate);
@ -899,8 +900,8 @@ const onAddItem = async() => {
progress: undefined, progress: undefined,
blueprintLink: undefined, blueprintLink: undefined,
remark: '', remark: '',
createTime: date.getTime(), createTime: date2.getTime(),
beginTime:date.getTime(), beginTime:date2.getTime(),
endTime:undefined, endTime:undefined,
isOver:0, isOver:0,
workTime:undefined, workTime:undefined,

View File

@ -159,17 +159,29 @@ const handleComplate = async () => {
try { try {
const data = await postOperateAPI(params); const data = await postOperateAPI(params);
} catch (error) { } catch (error) {
console.log(error)
uni.showToast({
icon: 'none',
duration: 3000,
title: error.data.msg,
})
} finally { } finally {
isLoading.value = false; await getDetailData(detailInfo.value.id)
await getData()
const obj = historyList.value[0]
//
if (obj && obj?.workTime == null && obj.endTime) {
popupShow.value = true
} }
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}` }
uni.redirectTo({ isLoading.value = false;
url, // const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
}) // uni.redirectTo({
// url,
// })
} }
// //
const handleOk = async (active) => { const handleOk = async (active) => {
console.log(amount.value)
const params = { const params = {
id: detailInfo.value?.id, id: detailInfo.value?.id,
active: 'SUBMIT', active: 'SUBMIT',