From c51c2a38142865cf43d33ceb5bc72b0283a110c2 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 05 九月 2024 10:42:23 +0800
Subject: [PATCH] Merge branch 'master' of http://bore.pub:10439/r/HangZhouMes
---
UI-Project/src/views/Returns/returns.vue | 46 +++++++++++++++++++++++++++++++---------------
1 files changed, 31 insertions(+), 15 deletions(-)
diff --git a/UI-Project/src/views/Returns/returns.vue b/UI-Project/src/views/Returns/returns.vue
index ad2298d..c5ffe12 100644
--- a/UI-Project/src/views/Returns/returns.vue
+++ b/UI-Project/src/views/Returns/returns.vue
@@ -28,14 +28,13 @@
const filmsId = ref('');
const patternThickness = ref('');
const number = ref('');
-const canSelectProject = ref(true); // 鍋囪寮�濮嬫椂鍙互閫夋嫨椤圭洰
+const canSelectProject = ref(true);
const canStartLoading = ref(false);
import { WebSocketHost ,host} from '@/utils/constants'
import request from "@/utils/request"
const ida = ref(null);
import { initializeWebSocket, closeWebSocket } from '@/utils/WebSocketService';
import { ref, onMounted, onUnmounted, onBeforeUnmount } from "vue";
-// 鍝嶅簲寮忔暟鎹�
const selectedProjectNo = ref(''); // 褰撳墠閫変腑鐨勫伐绋嬪彿
const selectedProjectNoa = ref(''); // 褰撳墠閫変腑鐨勫伐绋嬪彿
const selectedValue = ref(''); // 褰撳墠閫変腑鐨勫
@@ -96,6 +95,10 @@
const handlezhiban = () => {
dialoglea.value = true; // 鎵撳紑缁戝畾鏋跺瓙瀵硅瘽妗�
fetchFlowCardId();
+};
+const selectproject = () => {
+ dialogFormVisible.value = true;
+ selectgong();
};
// 鍊肩彮淇℃伅
const fetchFlowCardId = async () => {
@@ -225,7 +228,27 @@
const requestData = {
state: 100
};
-// 璋冪敤鎺ュ彛鑾峰彇閫夐」鏁版嵁鐨勫嚱鏁�
+
+
+
+
+const selectgong = async (queryString: string) => {
+ try {
+ const response = await request.post('/loadGlass/optimizeProject/listByState',{
+ ...requestData,
+ query: queryString
+ })
+ if (response.code == 200) {
+ titleSelectJson.value.processType = response.data;
+ } else {
+ ElMessage.error(response.message);
+ }
+}
+catch (error) {
+ // 澶勭悊閿欒
+ console.error(error);
+ }
+}
const fetchOptions = async (queryString: string) => {
try {
// 鍙戦�佽姹傚埌鍚庣鎺ュ彛
@@ -233,9 +256,8 @@
...requestData,
query: queryString // 灏嗘煡璇㈠瓧绗︿覆浣滀负鍙傛暟浼犻��
});
-
if (response.code == 200) {
- titleSelectJson.value.processType = response.data;
+ // titleSelectJson.value.processType = response.data;
console.log(response.data);
} else {
@@ -244,7 +266,7 @@
} catch (error) {
console.error('Error fetching options:', error);
}
-};
+};
// 澶勭悊鐢ㄦ埛杈撳叆鍙樺寲鐨勬柟娉�
const handleInputChange = async (value: string) => {
if (value) {
@@ -376,7 +398,6 @@
message: t('basicData.pause'),
})
}
-
};
// 鍒犻櫎
const handleConfirma = async () => {
@@ -388,8 +409,7 @@
filmsId: "",
patternThickness: 0,
number: 0
- });
-
+ });
if (response.code == 200) {
// 缁戝畾鎴愬姛锛屽鐞嗛�昏緫
ElMessage.success(response.message);
@@ -436,7 +456,6 @@
const uniqueHeights = new Set(response.data.map(item => item.height));
const uniqueFilmsIds = new Set(response.data.map(item => item.filmsId));
const uniqueThicknesses = new Set(response.data.map(item => item.thickness));
-
selectOptions.value = Array.from(uniqueWidths).map(width => ({
value: width,
label: width,
@@ -466,12 +485,9 @@
}
// 寮�濮嬩笂鐗�
const handle = async () => {
- if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
-
+ if (markingMachineStatus.value === 'green' && cuttingMachineStatus.value === 'green') {
try {
let engineeringId = window.localStorage.getItem('engineeringId')
-console.log(engineeringId);
-
const response = await request.post('/loadGlass/engineering/engineering/changeTask', {
engineerId: engineeringId,
state: 1,
@@ -709,7 +725,7 @@
<el-button @click="confirmCutting" style="margin-left: 30px;margin-top: -3px;" >{{ $t('basicData.change') }}</el-button>
</div>
- <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;" type="primary" @click="dialogFormVisible = true">{{ $t('basicData.selectproject') }}</el-button>
+ <el-button :disabled="!canSelectProject" style="margin-top: 5px;margin-left: 15px;" type="primary" @click="selectproject">{{ $t('basicData.selectproject') }}</el-button>
<el-button :disabled="!canSelectProject" :style="{ backgroundColor: canStartLoading ? 'green' : 'initial',color: canStartLoading ? 'white' : 'black', }" style="margin-top: 5px;margin-left: 20px;" @click="handleBind">{{ $t('basicData.startloading') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="warning" @click="handleBinda">{{ $t('basicData.stop') }}</el-button>
<el-button style="margin-top: 5px;margin-left: 20px;" id="searchButton" type="info" @click="handlezhiban">{{ $t('searchOrder.dutyinformation') }}</el-button>
--
Gitblit v1.8.0