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/config.js | 8 +-
UI-Project/src/lang/zh.js | 1
UI-Project/src/utils/constants.js | 6 +-
UI-Project/src/views/PurchaseReturn/purchaseReturn.vue | 107 +++++++++++++++++++++++++++++++++++
4 files changed, 114 insertions(+), 8 deletions(-)
diff --git a/UI-Project/config.js b/UI-Project/config.js
index 8eac427..1c0bc92 100644
--- a/UI-Project/config.js
+++ b/UI-Project/config.js
@@ -1,10 +1,10 @@
export default {
- // serverUrl: "10.153.19.150:88/api",
- serverUrl: "10.153.19.44:801/api",
+ serverUrl: "10.153.19.150:88/api",
+ // serverUrl: "10.153.19.44:88/api",
// serverUrl: "192.168.1.199:88/api",
// serverUrl: "127.0.0.1:88/api",
- // serverUrl2: "10.153.19.150:88"
- serverUrl2: "10.153.19.44:801"
+ serverUrl2: "10.153.19.150:88"
+ // serverUrl2: "10.153.19.44:88"
// serverUrl2: "192.168.1.199:88"
// serverUrl2: "127.0.0.1:88"
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index ca4d316..cdc3b7c 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -106,6 +106,7 @@
dilapidation:'鐮存崯',
takeaway:'浜哄伐鎷胯蛋',
takeon:'鎽嗙墖瀹屾垚',
+ takeall:'鍏ㄩ儴鎷胯蛋',
},
searchOrder:{
deleteTask:'鍒犻櫎宸ョ▼',
diff --git a/UI-Project/src/utils/constants.js b/UI-Project/src/utils/constants.js
index 0175793..557e105 100644
--- a/UI-Project/src/utils/constants.js
+++ b/UI-Project/src/utils/constants.js
@@ -1,5 +1,5 @@
// export const WebSocketHost = "192.168.1.199";
-// export const WebSocketHost = "10.153.19.150";
-export const WebSocketHost = "10.153.19.44";
+export const WebSocketHost = "10.153.19.150";
+// export const WebSocketHost = "10.153.19.44";
// export const WebSocketHost = "127.0.0.1";
-export const host = "801";
\ No newline at end of file
+export const host = "88";
\ No newline at end of file
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