|
@@ -35,6 +35,7 @@ import {
|
|
|
recordList,
|
|
|
searchMaterial,
|
|
|
itemRecordAdd,
|
|
|
+ getInfo,
|
|
|
} from "@/api/prosteps/wuliaocaiji";
|
|
|
import { useProcessStore } from "@/store";
|
|
|
|
|
@@ -49,30 +50,32 @@ const showCJ = ref(false);
|
|
|
const scanData = ref([]);
|
|
|
provide("scanData", scanData);
|
|
|
const enterfnc = async () => {
|
|
|
- // const { code, data } = await searchMaterial({
|
|
|
- // operationId: store.odersData.operationId,
|
|
|
- // processId: "",
|
|
|
- // seqNo: scanCode.value,
|
|
|
- // workOrderCode: store.odersData.workOrderCode,
|
|
|
- // });
|
|
|
const { code, data } = await searchMaterial({
|
|
|
- operationId: "242",
|
|
|
- processId: "14",
|
|
|
- seqNo: "1202010000005",
|
|
|
- workOrderCode: "GD2404150002",
|
|
|
+ operationId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ seqNo: scanCode.value,
|
|
|
+ workOrderCode: store.odersData.workOrderCode,
|
|
|
});
|
|
|
if (code == "200") {
|
|
|
- scanData.value = [...data, ...data];
|
|
|
+ scanData.value = data;
|
|
|
showCJ.value = true;
|
|
|
}
|
|
|
};
|
|
|
const opCompentDataList = ref([]);
|
|
|
+//通过id获取详情
|
|
|
+const getInfoById = async (item: any) => {
|
|
|
+ const { data } = await getInfo({
|
|
|
+ itemCode: item.itemCode,
|
|
|
+ opId: store.odersData.operationId,
|
|
|
+ processId: store.scanInfo.id,
|
|
|
+ });
|
|
|
+};
|
|
|
const toXQPop = async (item: any) => {
|
|
|
+ await getInfoById(item);
|
|
|
showXQ.value = true;
|
|
|
};
|
|
|
//提交录入信息
|
|
|
const submitRecordAdd = async (index) => {
|
|
|
- console.log(index, "222");
|
|
|
const { data } = await itemRecordAdd({
|
|
|
itemCode: "242",
|
|
|
itemModel: "14",
|
|
@@ -86,7 +89,6 @@ const submitRecordAdd = async (index) => {
|
|
|
};
|
|
|
const submit = () => {
|
|
|
let selectIndex = caijiRef.value.selectIndex;
|
|
|
- console.log(selectIndex);
|
|
|
submitRecordAdd(selectIndex);
|
|
|
};
|
|
|
|