From cb2b0e73ae2e729126f8d04a06d05e9460517cbc Mon Sep 17 00:00:00 2001 From: wu <731351411@qq.com> Date: 星期一, 20 五月 2024 14:26:43 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/HangZhouMes --- UI-Project/src/views/Returns/returns.vue | 84 ++++++++++++++++++++++++++++++++--------- 1 files changed, 65 insertions(+), 19 deletions(-) diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue index 6164565..c917ca0 100644 --- a/UI-Project/src/views/Returns/returns.vue +++ b/UI-Project/src/views/Returns/returns.vue @@ -5,7 +5,6 @@ const router = useRouter() import type { TableColumnCtx } from 'element-plus' -// import { ref } from 'vue' import { ElMessage, ElMessageBox } from 'element-plus' const dialogFormVisible = ref(false) const blind = ref(false) @@ -17,7 +16,7 @@ const flakea = ref(false) // const value = ref('') import request from "@/utils/request" - +const ida = ref(null); import { ref, onMounted } from "vue"; // import http from "@/http/index"; @@ -33,7 +32,7 @@ }) const tableDataa = ref([]) - + const tableData = reactive([]); // let filterData = ref({ // damageDetails: { @@ -70,7 +69,7 @@ if (tableDataa.value[0].patternWidth > 0) { flake.value = true; } - + if (tableDataa.value[1].patternWidth > 0) { flakea.value = true; } @@ -148,7 +147,7 @@ if (response.code == 200) { titleSelectJson.value.processType = response.data; console.log(response.data); - + } else { ElMessage.warning(response.data); } @@ -164,7 +163,7 @@ if (response.code == 200) { titleSelectJsona.value.processTypea = response.data; console.log(response.data); - + } else { ElMessage.warning(response.data); } @@ -214,14 +213,25 @@ // }) const projectNo = ref(''); const workstationId = ref(''); +const id = ref(''); const patternHeight = ref(''); const patternWidth = ref(''); const filmsId = ref(''); const patternThickness = ref(''); const number = ref(''); // 娣诲姞 +const handleBindRack = (row) => { + workstationId.value = row.workstationId; // 鍋囪rackNumber鏄灦鍙峰瓧娈电殑灞炴�у悕 + ida.value = row.id; + console.log(ida.value); + add.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗� +}; +// 娣诲姞 const handleConfirm = async () => { - try { + console.log(ida.value); + // console.log('id.value:', id.value); + if ((ida.value === 2 || ida.value === 4) && (parseInt(patternHeight.value, 10) >= 2700 )) { + try { const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { id: workstationId.value, workstationId: workstationId.value, @@ -231,7 +241,6 @@ patternThickness: patternThickness.value, number: number.value }); - if (response.code == 200) { // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 ElMessage.success(response.message); @@ -248,11 +257,53 @@ // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� ElMessage.error(response.msg); } - } catch (error) { - // 澶勭悊閿欒 - console.error(error); - } -}; + } catch (error) { + // 澶勭悊璇锋眰閿欒 + console.error(error); + alert('璇锋眰澶辫触锛岃绋嶅悗鍐嶈瘯锛�'); + } + } + else if( ida.value === 1 || ida.value === 3){ + try { + const response = await request.post('/loadGlass/LoadGlass/updateGlassMessage', { + id: workstationId.value, + workstationId: workstationId.value, + patternHeight: patternHeight.value, + patternWidth: patternWidth.value, + filmsId: filmsId.value, + patternThickness: patternThickness.value, + number: number.value + }); + if (response.code == 200) { + // 缁戝畾鎴愬姛锛屽鐞嗛�昏緫 + ElMessage.success(response.message); + window.location.reload() + add.value = false; + window.localStorage.setItem('workstationId', response.data.workstationId) + let workstationId = window.localStorage.getItem('workstationId') + if (workstationId == '1') { + flake.value = true + } else if (workstationId == '2'){ + flakea.value = true + } + } else { + // 璇锋眰澶辫触锛屾樉绀洪敊璇秷鎭� + ElMessage.error(response.msg); + } + } catch (error) { + // 澶勭悊璇锋眰閿欒 + console.error(error); + alert('璇锋眰澶辫触锛岃绋嶅悗鍐嶈瘯锛�'); + } + } + else { + ElMessage({ + type: 'info', + message: '绗簩琛屽拰绗洓琛岀殑楂樺繀椤诲ぇ浜�2700鎵嶈兘淇濆瓨锛�', + }) + } + +}; // 鍒犻櫎 const handleConfirma = async () => { try { @@ -482,12 +533,7 @@ blindb.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗� }; -// 娣诲姞 -const handleBindRack = (row) => { - workstationId.value = row.workstationId; // 鍋囪rackNumber鏄灦鍙峰瓧娈电殑灞炴�у悕 - - add.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗� -}; + // 鍒犻櫎 const handleBindRacka = (row) => { workstationId.value = row.workstationId; // 鍋囪rackNumber鏄灦鍙峰瓧娈电殑灞炴�у悕 -- Gitblit v1.8.0