|
@@ -371,13 +371,14 @@ uni.navigateTo({
|
|
|
|
|
|
/***************************** 定义了一些事件 *****************************/
|
|
|
// 添加不合格信息
|
|
|
- const handleAddUnfit = () => {
|
|
|
+ async function handleAddUnfit() {
|
|
|
// 监听事件
|
|
|
uni.$once('addUnfitInfoEvent', (data) => {
|
|
|
addUnfitInfo(data)
|
|
|
})
|
|
|
- console.log(getHasInstruction())
|
|
|
- if(!getHasInstruction()){
|
|
|
+ const hasInstruction = await getHasInstruction();
|
|
|
+ console.log(hasInstruction); // 这将打印 true 或 false
|
|
|
+ if (!hasInstruction) {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/sorting/specialOptions",
|
|
|
success: (res) => {
|
|
@@ -414,7 +415,7 @@ uni.navigateTo({
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
- function getHasInstruction(){
|
|
|
+ async function getHasInstruction(){
|
|
|
const res = selectInstructionList({
|
|
|
technologicalProcessId: dayworkItem.value.technologicalProcessId,
|
|
|
processCode: dayworkItem.value.processCode,
|
|
@@ -422,7 +423,6 @@ uni.navigateTo({
|
|
|
}).then(res=> {
|
|
|
return res.data
|
|
|
})
|
|
|
- return res
|
|
|
}
|
|
|
// 删除不合格信息
|
|
|
const handleDelUnfit = (index) => {
|