|
@@ -1,6 +1,14 @@
|
|
<template>
|
|
<template>
|
|
- <div class="scanCode">
|
|
|
|
- <ScanCodeInput v-model="scanCode" @keyup.enter="enterfnc" />
|
|
|
|
|
|
+ <div style="display: flex; justify-content: space-between">
|
|
|
|
+ <div class="scanCode">
|
|
|
|
+ <ScanCodeInput v-model="scanCode" @keyup.enter="enterfnc" />
|
|
|
|
+ </div>
|
|
|
|
+ <el-button
|
|
|
|
+ style="height: 50px; font-size: 20px"
|
|
|
|
+ :type="!flStatus ? 'primary' : 'warning'"
|
|
|
|
+ @click="flStatus = !flStatus"
|
|
|
|
+ >{{ flStatus ? "切换为物料采集" : "切换为辅料采集" }}</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
<div v-if="opCompentDataList.length < 1" class="showCodeBody">
|
|
<div v-if="opCompentDataList.length < 1" class="showCodeBody">
|
|
<div class="codeBox">
|
|
<div class="codeBox">
|
|
@@ -8,7 +16,6 @@
|
|
src="@/assets/icons/shaoma.svg"
|
|
src="@/assets/icons/shaoma.svg"
|
|
style="width: 134px; height: 134px"
|
|
style="width: 134px; height: 134px"
|
|
/>
|
|
/>
|
|
- <div class="codeText">扫码物料码添加物料</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div v-else class="materialInfoBody">
|
|
<div v-else class="materialInfoBody">
|
|
@@ -21,13 +28,15 @@
|
|
<div class="leftMsg">
|
|
<div class="leftMsg">
|
|
<div class="nameMsg">{{ item.itemName }}</div>
|
|
<div class="nameMsg">{{ item.itemName }}</div>
|
|
<div class="describe">{{ item.itemModel }}</div>
|
|
<div class="describe">{{ item.itemModel }}</div>
|
|
- <div class="describe">单管需求:{{ item.needNum }}</div>
|
|
|
|
|
|
+ <div class="describe" v-if="!flStatus">
|
|
|
|
+ 单管需求:{{ item.needNum }}
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="rightMsg">
|
|
<div class="rightMsg">
|
|
<div class="showSeq" @click.stop="showSeq(item.batchNoList)">
|
|
<div class="showSeq" @click.stop="showSeq(item.batchNoList)">
|
|
- <el-button type="text"> 查看已绑管号 </el-button>
|
|
|
|
|
|
+ <el-button type="text"> 查看已绑批次号 </el-button>
|
|
</div>
|
|
</div>
|
|
- <div class="info">
|
|
|
|
|
|
+ <div v-if="!flStatus" class="info">
|
|
<div class="describe">可采集数量:</div>
|
|
<div class="describe">可采集数量:</div>
|
|
<div class="sum">{{ item.surplusNum }}</div>
|
|
<div class="sum">{{ item.surplusNum }}</div>
|
|
</div>
|
|
</div>
|
|
@@ -35,7 +44,15 @@
|
|
<svg-icon class="svgStyle" icon-class="jiaobiao" size="25" />
|
|
<svg-icon class="svgStyle" icon-class="jiaobiao" size="25" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
<xiangqingPopUp
|
|
<xiangqingPopUp
|
|
|
|
+ v-if="!flStatus"
|
|
|
|
+ v-model="showXQ"
|
|
|
|
+ :showInfo="seqInfoList"
|
|
|
|
+ @data-list="getOpCompentData"
|
|
|
|
+ />
|
|
|
|
+ <flXiangqingPopUp
|
|
|
|
+ v-else
|
|
v-model="showXQ"
|
|
v-model="showXQ"
|
|
:showInfo="seqInfoList"
|
|
:showInfo="seqInfoList"
|
|
@data-list="getOpCompentData"
|
|
@data-list="getOpCompentData"
|
|
@@ -45,20 +62,24 @@
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
|
|
import ScanCodeInput from "@/components/ScanCodeInput/index.vue";
|
|
-
|
|
|
|
|
|
+import flXiangqingPopUp from "../popUpView/flXiangqingPopUp.vue";
|
|
import xiangqingPopUp from "../popUpView/xiangqingPopUp.vue";
|
|
import xiangqingPopUp from "../popUpView/xiangqingPopUp.vue";
|
|
import seqPopUp from "../popUpView/seqPopUp.vue";
|
|
import seqPopUp from "../popUpView/seqPopUp.vue";
|
|
import {
|
|
import {
|
|
getInfo,
|
|
getInfo,
|
|
itemRecordAdd,
|
|
itemRecordAdd,
|
|
recordList,
|
|
recordList,
|
|
|
|
+ accessoryList,
|
|
searchMaterial,
|
|
searchMaterial,
|
|
getCollectHistory,
|
|
getCollectHistory,
|
|
|
|
+ searchFlMaterial,
|
|
|
|
+ getFlCollectHistory,
|
|
} from "@/api/prosteps/wuliaocaiji";
|
|
} from "@/api/prosteps/wuliaocaiji";
|
|
import { useProcessStore } from "@/store";
|
|
import { useProcessStore } from "@/store";
|
|
defineOptions({
|
|
defineOptions({
|
|
name: "Wuliaocaiji",
|
|
name: "Wuliaocaiji",
|
|
});
|
|
});
|
|
|
|
+const flStatus = ref(false);
|
|
const caijiRef = ref(null);
|
|
const caijiRef = ref(null);
|
|
const store = useProcessStore();
|
|
const store = useProcessStore();
|
|
const scanCode = ref("");
|
|
const scanCode = ref("");
|
|
@@ -68,15 +89,27 @@ const showCJ = ref(false);
|
|
const showSEQ = ref(false);
|
|
const showSEQ = ref(false);
|
|
const seqInfoList = ref([]);
|
|
const seqInfoList = ref([]);
|
|
const getHistroyList = async (item) => {
|
|
const getHistroyList = async (item) => {
|
|
- const { data } = await getCollectHistory({
|
|
|
|
- itemCode: item.itemCode,
|
|
|
|
- operationId: store.odersData.operationId,
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 9999,
|
|
|
|
- processId: store.scanInfo.id,
|
|
|
|
- workOrderCode: store.odersData.workOrderCode,
|
|
|
|
- });
|
|
|
|
- seqInfoList.value = data[0];
|
|
|
|
|
|
+ if (!flStatus.value) {
|
|
|
|
+ const { data } = await getCollectHistory({
|
|
|
|
+ itemCode: item.itemCode,
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ });
|
|
|
|
+ seqInfoList.value = data[0];
|
|
|
|
+ } else {
|
|
|
|
+ const { data } = await getFlCollectHistory({
|
|
|
|
+ itemCode: item.itemCode,
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ });
|
|
|
|
+ seqInfoList.value = data[0];
|
|
|
|
+ }
|
|
};
|
|
};
|
|
const showSeqData = ref([]);
|
|
const showSeqData = ref([]);
|
|
const showSeq = (data) => {
|
|
const showSeq = (data) => {
|
|
@@ -97,16 +130,30 @@ const enterfnc = async () => {
|
|
}
|
|
}
|
|
scanCode.value = "";
|
|
scanCode.value = "";
|
|
scanCodeCopyValue.value = str;
|
|
scanCodeCopyValue.value = str;
|
|
- const { code, data } = await searchMaterial({
|
|
|
|
- operationId: store.odersData.operationId,
|
|
|
|
- processId: store.scanInfo.id,
|
|
|
|
- seqNo: store.scanInfo.seqNo,
|
|
|
|
- scanCode: str,
|
|
|
|
- workOrderCode: store.odersData.workOrderCode,
|
|
|
|
- });
|
|
|
|
- if (code == "200") {
|
|
|
|
- seqInfoList.value = data[0];
|
|
|
|
- showXQ.value = true;
|
|
|
|
|
|
+ if (flStatus.value == false) {
|
|
|
|
+ const { code, data } = await searchMaterial({
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
|
+ scanCode: str,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ });
|
|
|
|
+ if (code == "200") {
|
|
|
|
+ seqInfoList.value = data[0];
|
|
|
|
+ showXQ.value = true;
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ const { code, data } = await searchFlMaterial({
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
|
+ scanCode: str,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ });
|
|
|
|
+ if (code == "200") {
|
|
|
|
+ seqInfoList.value = data[0];
|
|
|
|
+ showXQ.value = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
};
|
|
};
|
|
const opCompentDataList = ref([]);
|
|
const opCompentDataList = ref([]);
|
|
@@ -162,20 +209,35 @@ const submit = () => {
|
|
|
|
|
|
//获取tag列表数据
|
|
//获取tag列表数据
|
|
const getOpCompentData = async () => {
|
|
const getOpCompentData = async () => {
|
|
- const { data } = await recordList({
|
|
|
|
- operationId: store.odersData.operationId,
|
|
|
|
- workOrderCode: store.odersData.workOrderCode,
|
|
|
|
- seqNo: store.scanInfo.seqNo,
|
|
|
|
- processId: store.scanInfo.id,
|
|
|
|
- pageNo: 1,
|
|
|
|
- pageSize: 9999,
|
|
|
|
- });
|
|
|
|
- opCompentDataList.value = data;
|
|
|
|
|
|
+ if (flStatus.value == false) {
|
|
|
|
+ const { data } = await recordList({
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ });
|
|
|
|
+ opCompentDataList.value = data;
|
|
|
|
+ } else {
|
|
|
|
+ const { data } = await accessoryList({
|
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
|
+ processId: store.scanInfo.id,
|
|
|
|
+ pageNo: 1,
|
|
|
|
+ pageSize: 9999,
|
|
|
|
+ });
|
|
|
|
+ opCompentDataList.value = data;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
const input = ref("");
|
|
const input = ref("");
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
getOpCompentData();
|
|
getOpCompentData();
|
|
});
|
|
});
|
|
|
|
+watch(flStatus, (value) => {
|
|
|
|
+ getOpCompentData();
|
|
|
|
+});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|