From d0c71a27140d1483d950ebaa6510327635df2365 Mon Sep 17 00:00:00 2001 From: wangfei <3597712270@qq.com> Date: 星期二, 24 十二月 2024 09:48:29 +0800 Subject: [PATCH] 钢化模块新增全部拿走功能 --- UI-Project/src/views/PurchaseReturn/purchaseReturn.vue | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 106 insertions(+), 1 deletions(-) diff --git a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue index 1692170..97e0a11 100644 --- a/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue +++ b/UI-Project/src/views/PurchaseReturn/purchaseReturn.vue @@ -25,6 +25,7 @@ const cantakea = ref(true); const cantakeb = ref(true); const canona = ref(true); +const cantakeall = ref(true); const canonb = ref(true); const canSelectProjectb = ref(true); const adjustedRects1 = ref([]); @@ -35,6 +36,8 @@ const engineerId = ref('') const router = useRouter() const currentGlassId = ref(null); +const currentengineerId = ref(null); +const currenttemperingLayoutId = ref(null); const currenttemperingFeedSequence = ref(null); onMounted(async () => { try { @@ -449,6 +452,8 @@ adjustedRects1.value[index].isActive = true; } currentGlassId.value = rect.glassId; + currentengineerId.value = rect.engineerId; + currenttemperingLayoutId.value = rect.temperingLayoutId; currenttemperingFeedSequence.value = rect.temperingFeedSequence; blind1.value = true; currentRect.value = rect; @@ -458,7 +463,7 @@ canSelectProject1.value = true; } if (currentRect.value.state == 9) { - cantakea.value = false; + alla.value = false; } else if (currentRect.value.state !== 9) { cantakea.value = true; } @@ -469,6 +474,8 @@ adjustedRects2.value[index].isActive = true; } currentGlassId.value = rect.glassId; + currentengineerId.value = rect.engineerId; + currenttemperingLayoutId.value = rect.temperingLayoutId; currenttemperingFeedSequence.value = rect.temperingFeedSequence; blind2.value = true; currentRect.value = rect; @@ -489,6 +496,8 @@ adjustedRectsa.value[index].isActive = true; } currentGlassId.value = rect.glassId; + currentengineerId.value = rect.engineerId; + currenttemperingLayoutId.value = rect.temperingLayoutId; currenttemperingFeedSequence.value = rect.temperingFeedSequence; blinda.value = true; currentRect.value = rect; @@ -507,6 +516,11 @@ } else if (currentRect.value.state == 0) { canona.value = true; } + if (currentRect.value.state > 5) { + cantakeall.value = false; + } else{ + cantakeall.value = true; + } } function showDialogb(rect) { const index = adjustedRectsb.value.findIndex(r => r.glassId === rect.glassId); @@ -514,6 +528,8 @@ adjustedRectsb.value[index].isActive = true; } currentGlassId.value = rect.glassId; + currentengineerId.value = rect.engineerId; + currenttemperingLayoutId.value = rect.temperingLayoutId; currenttemperingFeedSequence.value = rect.temperingFeedSequence; blindb.value = true; currentRect.value = rect; @@ -626,6 +642,26 @@ console.error(error); } } +// 杩涚倝鍓嶅叏閮ㄦ嬁璧� +const handletakeall3 = async () => { + try { + const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { + temperingLayoutId: currenttemperingLayoutId.value, + engineerId: currentengineerId.value, + state: 9, + }) + if (response.code == 200) { + ElMessage.success('鎴愬姛锛�'); + blinda.value = false; + } else { + ElMessage.error(response.message); + } +} +catch (error) { + // 澶勭悊閿欒 + console.error(error); + } +} // 杩涚倝鍓嶄汉宸ユ嬁璧� const takeouta = async () => { try { @@ -664,6 +700,63 @@ updateonColorsa(); } else { // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� + ElMessage.error(response.message); + } +} +catch (error) { + // 澶勭悊閿欒 + console.error(error); + } +} +const handletakeall1 = async () => { + try { + const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { + temperingLayoutId: currenttemperingLayoutId.value, + engineerId: currentengineerId.value, + state: 9, + }) + if (response.code == 200) { + ElMessage.success('鎴愬姛锛�'); + blind1.value = false; + } else { + ElMessage.error(response.message); + } +} +catch (error) { + // 澶勭悊閿欒 + console.error(error); + } +} +const handletakeall2 = async () => { + try { + const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { + temperingLayoutId: currenttemperingLayoutId.value, + engineerId: currentengineerId.value, + state: 9, + }) + if (response.code == 200) { + ElMessage.success('鎴愬姛锛�'); + blind2.value = false; + } else { + ElMessage.error(response.message); + } +} +catch (error) { + // 澶勭悊閿欒 + console.error(error); + } +} +const handletakeall4 = async () => { + try { + const response = await request.post('/temperingGlass/temperingGlassInfo/updateTemperingStateAll', { + temperingLayoutId: currenttemperingLayoutId.value, + engineerId: currentengineerId.value, + state: 9, + }) + if (response.code == 200) { + ElMessage.success('鎴愬姛锛�'); + blindb.value = false; + } else { ElMessage.error(response.message); } } @@ -965,6 +1058,9 @@ <el-icon class="el-icon--right"><Upload /></el-icon> {{ $t('order.takeaway') }} </el-button> + <el-button type="info" plain @click="handletakeall1" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> + {{ $t('order.takeall') }} + </el-button> </el-dialog> <el-dialog v-model="blind2" top="30vh" width="15%" style="text-align: center;" @close="handleDialogClose2"> <el-button :disabled="!canSelectProject2" type="warning" plain :icon="Delete" @click="handleDamage2" style="width: 150px;margin-left: 10px;"> @@ -973,6 +1069,9 @@ <el-button :disabled="!cantakea" type="danger" plain @click="takeoutd" style="width: 150px;margin-left: 10px;margin-top: 10px;"> <el-icon class="el-icon--right"><Upload /></el-icon> {{ $t('order.takeaway') }} + </el-button> + <el-button type="info" plain @click="handletakeall2" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> + {{ $t('order.takeall') }} </el-button> </el-dialog> <!-- 杩涚倝鍓� --> @@ -987,6 +1086,9 @@ <el-button type="success" plain :icon="Edit" @click="takeona" :disabled="!canona" style="width: 150px;margin-left: 10px;margin-top: 10px;"> {{ $t('order.takeon') }} </el-button> + <el-button type="info" plain @click="handletakeall3" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> + {{ $t('order.takeall') }} + </el-button> </el-dialog> <!-- 宸插嚭鐐� --> <el-dialog v-model="blindb" top="30vh" width="15%" style="text-align: center;" @close="handleDialogCloseb"> @@ -997,6 +1099,9 @@ <el-icon class="el-icon--right"><Upload /></el-icon> {{ $t('order.takeaway') }} </el-button> + <el-button type="info" plain @click="handletakeall4" :disabled="!cantakeall" style="width: 150px;margin-left: 10px;margin-top: 10px;"> + {{ $t('order.takeall') }} + </el-button> <!-- <el-button type="success" plain :icon="Edit" @click="takeonb" :disabled="!canonb" style="width: 150px;margin-left: 10px;margin-top: 10px;"> {{ $t('order.takeon') }} </el-button> --> -- Gitblit v1.8.0