소스 검색

物料流转添加逻辑。

jiaxiaoqiang 9 달 전
부모
커밋
562bb2b290
1개의 변경된 파일11개의 추가작업 그리고 7개의 파일을 삭제
  1. 11 7
      src/views/material-flow/creatTask.vue

+ 11 - 7
src/views/material-flow/creatTask.vue

@@ -188,11 +188,16 @@ onMounted(() => {
   });
 
   currentTimer = setInterval(() => {
-    getStationInfo({ stanCode: userStore.user.stationCode }).then(
-      (res: any) => {
-        boxDetail.value = res.data;
-      }
-    );
+    if (currentBox.value && currentBox.value.trim() !== "") {
+      boxDetail.value.rfid = currentBox.value.trim();
+    } else {
+      getStationInfo({ stanCode: userStore.user.stationCode }).then(
+        (res: any) => {
+          boxDetail.value = res.data;
+          // 如果右边的输入框有值,就以右边的为准
+        }
+      );
+    }
   }, 1500);
 });
 
@@ -225,8 +230,7 @@ const createTask = () => {
     ElMessage.success("创建成功");
 
     //1366 一体机—物料流转任务创建成功后 清空页面数据
-    currentBox.value = "";
-    boxDetail.value = {};
+
     scanCodeInput.value = "";
     materialList.value = [];
   });