|
@@ -69,7 +69,7 @@
|
|
|
{{ material.materialName }} | {{ material.materialNo }}
|
|
|
</div>
|
|
|
<div class="material-info">
|
|
|
- <div>批次号</div>
|
|
|
+ <div>批次号/序列号</div>
|
|
|
<el-tooltip :content="material.batchCode" placement="top">
|
|
|
<div class="batchCode">{{ material.batchCode }}</div>
|
|
|
</el-tooltip>
|
|
@@ -79,13 +79,13 @@
|
|
|
<div>{{ material.locationNo }}</div>
|
|
|
</div>
|
|
|
<div class="material-info">
|
|
|
- <div>数量</div>
|
|
|
+ <div>量值</div>
|
|
|
<div>{{ material.num }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
<el-button class="sureBtn" type="info" @click="backToStorage"
|
|
|
- >出库
|
|
|
+ >入库
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -145,17 +145,26 @@ const addBoxInfo = ref();
|
|
|
const currentBox = ref<any>({});
|
|
|
const currentBoxIndex = ref(-1);
|
|
|
const outStatus = ref(false);
|
|
|
+const resetData = () => {
|
|
|
+ addSuccessStatus.value = false;
|
|
|
+ addBoxInfo.value = null;
|
|
|
+ addBoxSearch.value = "";
|
|
|
+ outingBox.value = {};
|
|
|
+ outingRawBoxList = [];
|
|
|
+ outingMaterials.value = [];
|
|
|
+ materialList.value = [];
|
|
|
+ currentBox.value = {};
|
|
|
+ currentBoxIndex.value = -1;
|
|
|
+ boxSearch.value = "";
|
|
|
+ addStatus.value = false;
|
|
|
+ outStatus.value = false;
|
|
|
+};
|
|
|
const changeAddStatus = () => {
|
|
|
if (addStatus.value == true) {
|
|
|
- addSuccessStatus.value = false;
|
|
|
- addBoxInfo.value = null;
|
|
|
- addBoxSearch.value = "";
|
|
|
- outingBox.value = {};
|
|
|
- outingRawBoxList = [];
|
|
|
- outingMaterials.value = [];
|
|
|
- materialList.value = [];
|
|
|
+ resetData();
|
|
|
+ } else {
|
|
|
+ addStatus.value = !addStatus.value;
|
|
|
}
|
|
|
- addStatus.value = !addStatus.value;
|
|
|
};
|
|
|
const addBoxSearch = ref("");
|
|
|
//扫盒子
|
|
@@ -204,7 +213,6 @@ let outingRawBoxList: any[] = []; //确认添加的时候会对比捡料位和
|
|
|
const outingBox = ref<any>({});
|
|
|
const outingMaterials = ref<any[]>([]);
|
|
|
const backToStorage = async () => {
|
|
|
- console.log("back to storage");
|
|
|
await backToStorageAPI({
|
|
|
vehicleCode: outingBox.value.vehicleNo,
|
|
|
houseNo: outingBox.value.houseNo,
|
|
@@ -213,9 +221,7 @@ const backToStorage = async () => {
|
|
|
outingBox.value = {};
|
|
|
outingMaterials.value = [];
|
|
|
ElMessage.success("返库成功");
|
|
|
- currentBox.value = {};
|
|
|
- currentBoxIndex.value = -1;
|
|
|
- boxSearch.value = "";
|
|
|
+ resetData();
|
|
|
getStorageBoxesList({}).then((res) => {
|
|
|
boxesList.value = res.data;
|
|
|
});
|
|
@@ -236,11 +242,11 @@ const handleScanCodeInput = () => {
|
|
|
}
|
|
|
materialList.value.push({ ...res.data });
|
|
|
scanCodeInput.value = "";
|
|
|
+ ElMessage.success("扫码成功!");
|
|
|
});
|
|
|
};
|
|
|
//确认添加:只是页面静态添加 不做接口发送
|
|
|
const sureToAdd = () => {
|
|
|
- outingMaterials.value = JSON.parse(JSON.stringify(outingRawBoxList));
|
|
|
for (let i = 0; i < materialList.value.length; i++) {
|
|
|
let status = false;
|
|
|
for (let b = 0; b < outingMaterials.value.length; b++) {
|
|
@@ -250,14 +256,16 @@ const sureToAdd = () => {
|
|
|
materialNo: materialList.value[i].materialCode,
|
|
|
unit: materialList.value[i].unitDictValue,
|
|
|
});
|
|
|
+ status = true;
|
|
|
} else {
|
|
|
if (
|
|
|
materialList.value[i].materialCode ==
|
|
|
outingMaterials.value[b].materialNo &&
|
|
|
- materialList.value[i].batchCode == outingMaterials.value[b].batchCode
|
|
|
+ materialList.value[i].materialName ==
|
|
|
+ outingMaterials.value[b].materialName
|
|
|
) {
|
|
|
- outingMaterials.value[i].num =
|
|
|
- outingMaterials.value[i].num + materialList.value[i].num;
|
|
|
+ outingMaterials.value[b].num =
|
|
|
+ outingMaterials.value[b].num + materialList.value[i].num;
|
|
|
status = true;
|
|
|
}
|
|
|
}
|
|
@@ -270,6 +278,7 @@ const sureToAdd = () => {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
+ materialList.value = [];
|
|
|
ElMessage.success("添加成功!");
|
|
|
};
|
|
|
// 流转终点
|