|
@@ -1,4 +1,5 @@
|
|
|
<template>
|
|
|
+ <view class="mask" v-if="isLoading"></view>
|
|
|
<dialog-base ref="baseDialog" title="结束报工">
|
|
|
<view class="list-container">
|
|
|
<view class="list-title uni-row">
|
|
@@ -93,6 +94,7 @@
|
|
|
const bindList = ref([])
|
|
|
const confirmCarrierList = ref([])
|
|
|
const isFirstOrder = ref(true); //是否为首序
|
|
|
+ const isLoading = ref(false);
|
|
|
const endFlag = ref(0)
|
|
|
const specialDeptProcessList = ref([])
|
|
|
const temp = ref(0) // 保存workInfo.value.qualifiedNum的值(还原用)
|
|
@@ -393,17 +395,17 @@
|
|
|
} else {
|
|
|
console.log("999")
|
|
|
//判断当前序合格总数为0 ,不允许保存
|
|
|
- console.log(parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0)
|
|
|
+ console.log(parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0)
|
|
|
if (workInfo.value.status == "3" && parseInt(workInfo.value.qualifiedNum) + lotPreSumQualifiedNum.value == 0) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
|
title: '当前序合格总数不能为0',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
handleSave();
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
function handleFinishReporting() {
|
|
@@ -463,7 +465,7 @@
|
|
|
title: '当前序合格总数不能为0'
|
|
|
})
|
|
|
return;
|
|
|
- }
|
|
|
+ }
|
|
|
if (showCarrierList.value) {
|
|
|
if (endFlag.value >= bindList.value.length) {
|
|
|
handleSave();
|
|
@@ -517,11 +519,17 @@
|
|
|
if (workInfo.value.status != '3') {
|
|
|
workInfo.value.status = '2';
|
|
|
}
|
|
|
+ isLoading.value = true; // 显示遮罩层
|
|
|
workInfo.value.endTime = timestampToTime(new Date());
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
workInfo.value.rejectList = wasteInfo.value;
|
|
|
workInfo.value.isPreProcess = store.isPreProcess;
|
|
|
workInfo.value.processStepNumber = store.dayworkInfo.currentProcess.processStepNumber
|
|
|
saveDayWorkItem(workInfo.value).then(res => {
|
|
|
+ isLoading.value = false; // 隐藏遮罩层
|
|
|
+ uni.hideLoading();
|
|
|
if (res.code === 200) {
|
|
|
uni.showToast({
|
|
|
icon: 'success',
|
|
@@ -688,4 +696,22 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ .mask {
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ bottom: 0;
|
|
|
+ background-color: rgba(0, 0, 0, 0.5);
|
|
|
+ z-index: 2000;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+
|
|
|
+ .mask .loading-text {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 36rpx;
|
|
|
+ }
|
|
|
</style>
|