|
@@ -12,10 +12,7 @@
|
|
|
</div>
|
|
|
<div v-if="opCompentDataList.length < 1" class="showCodeBody">
|
|
|
<div class="codeBox">
|
|
|
- <img
|
|
|
- src="@/assets/icons/shaoma.svg"
|
|
|
- style="width: 134px; height: 134px"
|
|
|
- />
|
|
|
+ <img src="@/assets/icons/shaoma.svg" style="width: 134px; height: 134px" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-else class="materialInfoBody">
|
|
@@ -26,11 +23,11 @@
|
|
|
@click="toXQPop(item)"
|
|
|
>
|
|
|
<div class="leftMsg">
|
|
|
- <div class="nameMsg">{{ item.itemName }}<span v-if="item.groupName" class="dualSpecifications">({{ item.groupName}}) </span></div>
|
|
|
- <div class="describe">{{ item.itemModel }}</div>
|
|
|
- <div class="describe" v-if="!flStatus">
|
|
|
- 单管需求:{{ item.needNum }}
|
|
|
+ <div class="nameMsg">
|
|
|
+ {{ item.itemName }}<span v-if="item.groupName" class="dualSpecifications">({{ item.groupName }}) </span>
|
|
|
</div>
|
|
|
+ <div class="describe">{{ item.itemModel }}</div>
|
|
|
+ <div class="describe" v-if="!flStatus">单管需求:{{ item.needNum }}</div>
|
|
|
</div>
|
|
|
<div class="rightMsg">
|
|
|
<div class="showSeq" @click.stop="showSeq(item.batchNoList)">
|
|
@@ -48,12 +45,14 @@
|
|
|
<xiangqingPopUp
|
|
|
v-if="!flStatus"
|
|
|
v-model="showXQ"
|
|
|
+ :isMixMaterial="isMix"
|
|
|
:showInfo="seqInfoList"
|
|
|
@data-list="getOpCompentData"
|
|
|
/>
|
|
|
<flXiangqingPopUp
|
|
|
v-else
|
|
|
v-model="showXQ"
|
|
|
+ :isMixMaterial="isFlMix"
|
|
|
:showInfo="seqInfoList"
|
|
|
:isShow="isShowButton"
|
|
|
@data-list="getOpCompentData"
|
|
@@ -75,11 +74,15 @@ import {
|
|
|
getCollectHistory,
|
|
|
searchFlMaterial,
|
|
|
getFlCollectHistory,
|
|
|
+ isMixMaterial,
|
|
|
+ isFlMixMaterial,
|
|
|
} from "@/api/prosteps/wuliaocaiji";
|
|
|
import { useProcessStore } from "@/store";
|
|
|
defineOptions({
|
|
|
name: "Wuliaocaiji",
|
|
|
});
|
|
|
+const isMix = ref(0);
|
|
|
+const isFlMix = ref(0);
|
|
|
const isShowButton = ref(true);
|
|
|
const flStatus = ref(false);
|
|
|
const caijiRef = ref(null);
|
|
@@ -91,27 +94,27 @@ const showCJ = ref(false);
|
|
|
const showSEQ = ref(false);
|
|
|
const seqInfoList = ref([]);
|
|
|
const getHistroyList = async (item) => {
|
|
|
- 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 { 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];
|
|
|
+};
|
|
|
+
|
|
|
+const getFlHistoryList = async (item) => {
|
|
|
+ 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 showSeq = (data) => {
|
|
@@ -124,6 +127,7 @@ const showInfo = ref({});
|
|
|
//详情展示数据
|
|
|
const scanData = ref([]);
|
|
|
provide("scanData", scanData);
|
|
|
+
|
|
|
const enterfnc = async () => {
|
|
|
isShowButton.value = true;
|
|
|
let str = scanCode.value;
|
|
@@ -131,36 +135,140 @@ const enterfnc = async () => {
|
|
|
ElMessage.error("请扫码采集物料");
|
|
|
return;
|
|
|
}
|
|
|
- scanCode.value = "";
|
|
|
- scanCodeCopyValue.value = str;
|
|
|
- if (flStatus.value == false) {
|
|
|
- const { code, data } = await searchMaterial({
|
|
|
+ if (!flStatus.value) {
|
|
|
+ //判断是否混料
|
|
|
+ isMixMaterial({
|
|
|
operationId: store.odersData.operationId,
|
|
|
processId: store.scanInfo.id,
|
|
|
- seqNo: store.scanInfo.seqNo,
|
|
|
scanCode: str,
|
|
|
- flStatus: flStatus.value,
|
|
|
workOrderCode: store.odersData.workOrderCode,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ if (res.data.isMixMaterial === 1) {
|
|
|
+ isMix.value = 1;
|
|
|
+ if (res.data.isDpa === 1) {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ confirmButtonDisabled: true,
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ openDetailForm(str);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ openDetailForm(str);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isMix.value = 0;
|
|
|
+ openDetailForm(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
- if (code == "200") {
|
|
|
- seqInfoList.value = data[0];
|
|
|
- showXQ.value = true;
|
|
|
- }
|
|
|
} else {
|
|
|
- const { code, data } = await searchFlMaterial({
|
|
|
+ isFlMixMaterial({
|
|
|
operationId: store.odersData.operationId,
|
|
|
processId: store.scanInfo.id,
|
|
|
- seqNo: store.scanInfo.seqNo,
|
|
|
scanCode: str,
|
|
|
- flStatus: flStatus.value,
|
|
|
workOrderCode: store.odersData.workOrderCode,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ if (res.data.isMixMaterial === 1) {
|
|
|
+ isFlMix.value = 1;
|
|
|
+ if (res.data.isDpa === 1) {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ confirmButtonDisabled: true,
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ openFlDetailForm(str);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ openFlDetailForm(str);
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isFlMix.value = 0;
|
|
|
+ openFlDetailForm(str);
|
|
|
+ }
|
|
|
+ }
|
|
|
});
|
|
|
- if (code == "200") {
|
|
|
- seqInfoList.value = data[0];
|
|
|
- showXQ.value = true;
|
|
|
- }
|
|
|
}
|
|
|
};
|
|
|
+
|
|
|
+const openDetailForm = async (str) => {
|
|
|
+ scanCode.value = "";
|
|
|
+ scanCodeCopyValue.value = str;
|
|
|
+ const { code, data } = await searchMaterial({
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
+ scanCode: str,
|
|
|
+ flStatus: flStatus.value,
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
+ });
|
|
|
+ if (code == "200") {
|
|
|
+ seqInfoList.value = data[0];
|
|
|
+ showXQ.value = true;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+const openFlDetailForm = async (str) => {
|
|
|
+ scanCode.value = "";
|
|
|
+ scanCodeCopyValue.value = str;
|
|
|
+ const { code, data } = await searchFlMaterial({
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ seqNo: store.scanInfo.seqNo,
|
|
|
+ scanCode: str,
|
|
|
+ flStatus: flStatus.value,
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
+ });
|
|
|
+ if (code == "200") {
|
|
|
+ seqInfoList.value = data[0];
|
|
|
+ showXQ.value = true;
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
const opCompentDataList = ref([]);
|
|
|
//通过id获取详情
|
|
|
// const getInfoById = async (item) => {
|
|
@@ -173,10 +281,92 @@ const opCompentDataList = ref([]);
|
|
|
// showInfo.value = item;
|
|
|
// };
|
|
|
const toXQPop = async (item) => {
|
|
|
- // await getInfoById(item);
|
|
|
- await getHistroyList(item);
|
|
|
- showXQ.value = true;
|
|
|
- isShowButton.value = false;
|
|
|
+ if (!flStatus.value) {
|
|
|
+ //判断是否混料
|
|
|
+ isMixMaterial({
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ materialCode: item.itemCode,
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ if (res.data.isMixMaterial === 1) {
|
|
|
+ isMix.value = 1;
|
|
|
+ if (res.data.isDpa === 1) {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ confirmButtonDisabled: true,
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {})
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ getHistroyList(item);
|
|
|
+ showXQ.value = true;
|
|
|
+ isShowButton.value = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ isMix.value = 0;
|
|
|
+ getHistroyList(item);
|
|
|
+ showXQ.value = true;
|
|
|
+ isShowButton.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ isFlMixMaterial({
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ materialCode: item.itemCode,
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.code == "200") {
|
|
|
+ if (res.data.isMixMaterial === 1) {
|
|
|
+ isFlMix.value = 1;
|
|
|
+ ElMessageBox({
|
|
|
+ title: "提示",
|
|
|
+ message: "当前采集物料出现一致性问题,绑定物料规格或批次不一致",
|
|
|
+ showCancelButton: true,
|
|
|
+ confirmButtonText: "确认",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ getFlHistoryList(item);
|
|
|
+ showXQ.value = true;
|
|
|
+ isShowButton.value = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ return;
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ isFlMix.value = 0;
|
|
|
+ getFlHistoryList(item);
|
|
|
+ showXQ.value = true;
|
|
|
+ isShowButton.value = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
};
|
|
|
//提交录入信息
|
|
|
const submitRecordAdd = async (index) => {
|