质检图片提交不刷新问题

This commit is contained in:
Ledo 2025-07-11 15:00:42 +08:00
parent fc5a4fa2a2
commit a3e8cffda8
2 changed files with 41 additions and 25 deletions

View File

@ -184,7 +184,7 @@
title: '总报工数量超出派工数量,请确认', title: '总报工数量超出派工数量,请确认',
confirmText: '确认', confirmText: '确认',
cancelText: '取消', cancelText: '取消',
success: async(res) => { success: async (res) => {
if (res.confirm) { if (res.confirm) {
const params = { const params = {
@ -199,17 +199,20 @@
const data = await postOperateAPIEnd(params) const data = await postOperateAPIEnd(params)
if (isQua.value == 1) { if (isQua.value == 1) {
await imgUpload() await imgUpload()
} }else{
await initPage(); await getDetailData(idValue.value)
await getData()
const pages = getCurrentPages(); // const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; // const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`; const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); // uni.reLaunch({ url }); //
} }
}
}, },
}); });
}else{ } else {
const params = { const params = {
zjMxId: detailInfo.value?.id, zjMxId: detailInfo.value?.id,
amount: amount.value, amount: amount.value,
@ -222,13 +225,13 @@
const data = await postOperateAPIEnd(params) const data = await postOperateAPIEnd(params)
if (isQua.value == 1) { if (isQua.value == 1) {
await imgUpload() await imgUpload()
} }else{
await initPage();
const pages = getCurrentPages(); // const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; // const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`; const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); // uni.reLaunch({ url }); //
} }
}
} else { } else {
@ -410,7 +413,7 @@
id: detailId.value, id: detailId.value,
Authorization: token, Authorization: token,
'Tenant-Id': 2, 'Tenant-Id': 2,
'type':1, 'type': 1,
}, },
success: async (uploadFileRes) => { success: async (uploadFileRes) => {
uni.hideLoading(); uni.hideLoading();
@ -420,6 +423,10 @@
duration: 2000 duration: 2000
}); });
await initPage() await initPage()
const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); //
popup.value.close(); popup.value.close();
}, },
@ -493,7 +500,8 @@
</view> </view>
</view> </view>
<!-- <view class="product-item">预计生产日期{{ detailInfo.startTime }} {{ detailInfo.entTime }}</view> --> <!-- <view class="product-item">预计生产日期{{ detailInfo.startTime }} {{ detailInfo.entTime }}</view> -->
<view class="finish" v-if="isShowStart && historyList.length &&detailInfo.pgType != 1" @click="handleComplate"> <view class="finish" v-if="isShowStart && historyList.length &&detailInfo.pgType != 1"
@click="handleComplate">
<image class="complate-img" src="/static/images/productionReport-detail-complate.png" <image class="complate-img" src="/static/images/productionReport-detail-complate.png"
mode="scaleToFill" /> mode="scaleToFill" />
质检完成 质检完成
@ -925,6 +933,7 @@
} }
} }
} }
.no { .no {
font-size: 32rpx; font-size: 32rpx;
margin: 20rpx auto 80rpx; margin: 20rpx auto 80rpx;
@ -935,6 +944,7 @@
background-color: red; background-color: red;
color: #fff; color: #fff;
} }
.ok { .ok {
font-size: 32rpx; font-size: 32rpx;
margin: 20rpx auto 80rpx; margin: 20rpx auto 80rpx;

View File

@ -193,12 +193,13 @@
const data = await postOperateAPIEnd(params) const data = await postOperateAPIEnd(params)
if (isQua.value == 1) { if (isQua.value == 1) {
await imgUpload() await imgUpload()
} }else{
const pages = getCurrentPages(); // const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; // const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`; const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); // uni.reLaunch({ url }); //
}
} }
}, },
@ -216,13 +217,13 @@
const data = await postOperateAPIEnd(params) const data = await postOperateAPIEnd(params)
if (isQua.value == 1) { if (isQua.value == 1) {
await imgUpload() await imgUpload()
} }else{
await initPage();
const pages = getCurrentPages(); // const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; // const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`; const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); // uni.reLaunch({ url }); //
} }
}
} else { } else {
@ -396,6 +397,11 @@
icon: 'none', // iconnone icon: 'none', // iconnone
duration: 2000 duration: 2000
}); });
await initPage()
const pages = getCurrentPages(); //
const currentPage = pages[pages.length - 1]; //
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
uni.reLaunch({ url }); //
popup.value.close(); popup.value.close();
}, },