|
@@ -5,16 +5,16 @@
|
|
|
<div class="type-title">当前料箱</div>
|
|
|
|
|
|
<div style="display: flex; margin-bottom: 15px">
|
|
|
- <ScanCodeInput
|
|
|
- v-model="currentBox"
|
|
|
- :clearable="true"
|
|
|
- placeholder="请扫描或输入料箱编号"
|
|
|
- style="width: 50%"
|
|
|
- @keyup.enter="enterBox"
|
|
|
- />
|
|
|
+ <!-- <ScanCodeInput-->
|
|
|
+ <!-- v-model="currentBox"-->
|
|
|
+ <!-- :clearable="true"-->
|
|
|
+ <!-- placeholder="请扫描或输入料箱编号"-->
|
|
|
+ <!-- style="width: 50%"-->
|
|
|
+ <!-- @keyup.enter="enterBox"-->
|
|
|
+ <!-- />-->
|
|
|
<div class="current-box">
|
|
|
- <span class="left">{{ boxDetail?.name || "未绑定料箱" }}</span>
|
|
|
- <span class="right">{{ boxDetail?.code || "未绑定料箱" }}</span>
|
|
|
+ <span class="left">料箱id: {{ boxDetail?.rfid ?? "" }}</span>
|
|
|
+ <!-- <span class="right">{{ boxDetail?.code || "未绑定料箱" }}</span>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
@@ -94,7 +94,10 @@
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
- <el-button class="sureBtn el-button-big" type="primary" @click="createTask"
|
|
|
+ <el-button
|
|
|
+ class="sureBtn el-button-big"
|
|
|
+ type="primary"
|
|
|
+ @click="createTask"
|
|
|
>创建任务
|
|
|
</el-button>
|
|
|
</el-col>
|
|
@@ -109,14 +112,19 @@ import {
|
|
|
getBoxDetailByLabel,
|
|
|
getDestinationList,
|
|
|
getMaterialInfoByLabel,
|
|
|
+ getStationInfo,
|
|
|
} from "@/api/process/materialFlow";
|
|
|
-import { useCommonStoreHook } from "@/store";
|
|
|
+import { useCommonStoreHook, useUserStore } from "@/store";
|
|
|
|
|
|
const commonS = useCommonStoreHook();
|
|
|
+const userStore = useUserStore();
|
|
|
const map = commonS.loadingMap;
|
|
|
|
|
|
const currentBox = ref("");
|
|
|
const boxDetail = ref<any>({});
|
|
|
+
|
|
|
+let currentTimer = -1;
|
|
|
+
|
|
|
const enterBox = () => {
|
|
|
currentBox.value = currentBox.value.trim();
|
|
|
getBoxDetailByLabel(currentBox.value).then((res: any) => {
|
|
@@ -178,6 +186,18 @@ onMounted(() => {
|
|
|
getDestinationList(1).then((res: any) => {
|
|
|
destinationList.value = res.data;
|
|
|
});
|
|
|
+
|
|
|
+ currentTimer = setInterval(() => {
|
|
|
+ getStationInfo({ stanCode: userStore.user.stationCode }).then(
|
|
|
+ (res: any) => {
|
|
|
+ boxDetail.value = res;
|
|
|
+ }
|
|
|
+ );
|
|
|
+ });
|
|
|
+});
|
|
|
+
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ clearInterval(currentTimer);
|
|
|
});
|
|
|
|
|
|
const createTask = () => {
|