|
@@ -19,7 +19,13 @@
|
|
class="box-item"
|
|
class="box-item"
|
|
@click="clickBox(item, index)"
|
|
@click="clickBox(item, index)"
|
|
>
|
|
>
|
|
- <div class="box-name">{{ item.vehicleNo }}</div>
|
|
|
|
|
|
+ <div class="box-header">
|
|
|
|
+ <div class="box-name">{{ item.vehicleNo }}</div>
|
|
|
|
+ <div class="box-name">
|
|
|
|
+ {{ item.locationNo ? item.locationNo : "-" }}
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
<div
|
|
<div
|
|
v-for="(material, index) in item.list"
|
|
v-for="(material, index) in item.list"
|
|
:key="index"
|
|
:key="index"
|
|
@@ -65,11 +71,19 @@
|
|
:key="index"
|
|
:key="index"
|
|
class="outing-box"
|
|
class="outing-box"
|
|
>
|
|
>
|
|
- <div class="material-title">
|
|
|
|
- {{ material.materialName }} | {{ material.materialNo }}
|
|
|
|
|
|
+ <div class="outing-box-header">
|
|
|
|
+ <div class="material-title">
|
|
|
|
+ {{ material.materialName }} | {{ material.materialNo }}
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ @click="deleteIndexOld(index)"
|
|
|
|
+ class="material-title deleteSty"
|
|
|
|
+ >
|
|
|
|
+ 删除
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="material-info">
|
|
<div class="material-info">
|
|
- <div>批次号</div>
|
|
|
|
|
|
+ <div>批次号/序列号</div>
|
|
<el-tooltip :content="material.batchCode" placement="top">
|
|
<el-tooltip :content="material.batchCode" placement="top">
|
|
<div class="batchCode">{{ material.batchCode }}</div>
|
|
<div class="batchCode">{{ material.batchCode }}</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
@@ -79,13 +93,13 @@
|
|
<div>{{ material.locationNo }}</div>
|
|
<div>{{ material.locationNo }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="material-info">
|
|
<div class="material-info">
|
|
- <div>数量</div>
|
|
|
|
|
|
+ <div>量值</div>
|
|
<div>{{ material.num }}</div>
|
|
<div>{{ material.num }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-scrollbar>
|
|
</el-scrollbar>
|
|
<el-button class="sureBtn" type="info" @click="backToStorage"
|
|
<el-button class="sureBtn" type="info" @click="backToStorage"
|
|
- >出库
|
|
|
|
|
|
+ >入库
|
|
</el-button>
|
|
</el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -102,13 +116,23 @@
|
|
:key="index"
|
|
:key="index"
|
|
class="list-box"
|
|
class="list-box"
|
|
>
|
|
>
|
|
- <div>
|
|
|
|
- <div class="name">{{ item.materialName }}</div>
|
|
|
|
- <div class="spec">{{ item.spec }}</div>
|
|
|
|
- </div>
|
|
|
|
- <div class="bottom">
|
|
|
|
- <NumberInput v-model="item.num" />
|
|
|
|
- <span class="unit">{{ item.unitDictLabel }}</span>
|
|
|
|
|
|
+ <div class="list-box-header">
|
|
|
|
+ <div>
|
|
|
|
+ <div>
|
|
|
|
+ <div class="name">{{ item.materialName }}</div>
|
|
|
|
+ <div class="spec">{{ item.spec }}</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="bottom">
|
|
|
|
+ <NumberInput v-model="item.num" />
|
|
|
|
+ <span class="unit">{{ item.unitDictLabel }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ @click="deleteIndexScanAdd(index)"
|
|
|
|
+ class="list-box-delete deleteSty"
|
|
|
|
+ >
|
|
|
|
+ 删除
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -136,6 +160,16 @@ import {
|
|
} from "@/api/storage/in";
|
|
} from "@/api/storage/in";
|
|
|
|
|
|
const boxSearch = ref("");
|
|
const boxSearch = ref("");
|
|
|
|
+const deleteIndexOld = (index: any) => {
|
|
|
|
+ outingMaterials.value.splice(index, 1);
|
|
|
|
+ ElMessage.success("操作成功!");
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+const deleteIndexScanAdd = (index: any) => {
|
|
|
|
+ materialList.value.splice(index, 1);
|
|
|
|
+ ElMessage.success("操作成功!");
|
|
|
|
+};
|
|
|
|
+
|
|
//盒内原有物料data
|
|
//盒内原有物料data
|
|
const boxesList = ref<any[]>([]);
|
|
const boxesList = ref<any[]>([]);
|
|
const addStatus = ref(false);
|
|
const addStatus = ref(false);
|
|
@@ -145,17 +179,26 @@ const addBoxInfo = ref();
|
|
const currentBox = ref<any>({});
|
|
const currentBox = ref<any>({});
|
|
const currentBoxIndex = ref(-1);
|
|
const currentBoxIndex = ref(-1);
|
|
const outStatus = ref(false);
|
|
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 = () => {
|
|
const changeAddStatus = () => {
|
|
if (addStatus.value == true) {
|
|
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("");
|
|
const addBoxSearch = ref("");
|
|
//扫盒子
|
|
//扫盒子
|
|
@@ -166,6 +209,7 @@ const addenterBox = () => {
|
|
addSuccessStatus.value = true;
|
|
addSuccessStatus.value = true;
|
|
outingBox.value.vehicleNo = addBoxInfo.value.code;
|
|
outingBox.value.vehicleNo = addBoxInfo.value.code;
|
|
outingBox.value.vehicleId = addBoxInfo.value.id;
|
|
outingBox.value.vehicleId = addBoxInfo.value.id;
|
|
|
|
+ outingBox.value.houseNo = "1";
|
|
ElMessage.success("扫码成功!");
|
|
ElMessage.success("扫码成功!");
|
|
});
|
|
});
|
|
};
|
|
};
|
|
@@ -204,7 +248,6 @@ let outingRawBoxList: any[] = []; //确认添加的时候会对比捡料位和
|
|
const outingBox = ref<any>({});
|
|
const outingBox = ref<any>({});
|
|
const outingMaterials = ref<any[]>([]);
|
|
const outingMaterials = ref<any[]>([]);
|
|
const backToStorage = async () => {
|
|
const backToStorage = async () => {
|
|
- console.log("back to storage");
|
|
|
|
await backToStorageAPI({
|
|
await backToStorageAPI({
|
|
vehicleCode: outingBox.value.vehicleNo,
|
|
vehicleCode: outingBox.value.vehicleNo,
|
|
houseNo: outingBox.value.houseNo,
|
|
houseNo: outingBox.value.houseNo,
|
|
@@ -213,9 +256,7 @@ const backToStorage = async () => {
|
|
outingBox.value = {};
|
|
outingBox.value = {};
|
|
outingMaterials.value = [];
|
|
outingMaterials.value = [];
|
|
ElMessage.success("返库成功");
|
|
ElMessage.success("返库成功");
|
|
- currentBox.value = {};
|
|
|
|
- currentBoxIndex.value = -1;
|
|
|
|
- boxSearch.value = "";
|
|
|
|
|
|
+ resetData();
|
|
getStorageBoxesList({}).then((res) => {
|
|
getStorageBoxesList({}).then((res) => {
|
|
boxesList.value = res.data;
|
|
boxesList.value = res.data;
|
|
});
|
|
});
|
|
@@ -236,11 +277,11 @@ const handleScanCodeInput = () => {
|
|
}
|
|
}
|
|
materialList.value.push({ ...res.data });
|
|
materialList.value.push({ ...res.data });
|
|
scanCodeInput.value = "";
|
|
scanCodeInput.value = "";
|
|
|
|
+ ElMessage.success("扫码成功!");
|
|
});
|
|
});
|
|
};
|
|
};
|
|
//确认添加:只是页面静态添加 不做接口发送
|
|
//确认添加:只是页面静态添加 不做接口发送
|
|
const sureToAdd = () => {
|
|
const sureToAdd = () => {
|
|
- outingMaterials.value = JSON.parse(JSON.stringify(outingRawBoxList));
|
|
|
|
for (let i = 0; i < materialList.value.length; i++) {
|
|
for (let i = 0; i < materialList.value.length; i++) {
|
|
let status = false;
|
|
let status = false;
|
|
for (let b = 0; b < outingMaterials.value.length; b++) {
|
|
for (let b = 0; b < outingMaterials.value.length; b++) {
|
|
@@ -250,14 +291,17 @@ const sureToAdd = () => {
|
|
materialNo: materialList.value[i].materialCode,
|
|
materialNo: materialList.value[i].materialCode,
|
|
unit: materialList.value[i].unitDictValue,
|
|
unit: materialList.value[i].unitDictValue,
|
|
});
|
|
});
|
|
|
|
+ status = true;
|
|
} else {
|
|
} else {
|
|
if (
|
|
if (
|
|
materialList.value[i].materialCode ==
|
|
materialList.value[i].materialCode ==
|
|
outingMaterials.value[b].materialNo &&
|
|
outingMaterials.value[b].materialNo &&
|
|
|
|
+ materialList.value[i].materialName ==
|
|
|
|
+ outingMaterials.value[b].materialName &&
|
|
materialList.value[i].batchCode == outingMaterials.value[b].batchCode
|
|
materialList.value[i].batchCode == outingMaterials.value[b].batchCode
|
|
) {
|
|
) {
|
|
- 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;
|
|
status = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -270,6 +314,7 @@ const sureToAdd = () => {
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ materialList.value = [];
|
|
ElMessage.success("添加成功!");
|
|
ElMessage.success("添加成功!");
|
|
};
|
|
};
|
|
// 流转终点
|
|
// 流转终点
|
|
@@ -310,7 +355,10 @@ onMounted(() => {
|
|
.box-selected {
|
|
.box-selected {
|
|
border: 2px solid #0a59f7;
|
|
border: 2px solid #0a59f7;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ .box-header {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
.box-name {
|
|
.box-name {
|
|
font-size: 20px;
|
|
font-size: 20px;
|
|
line-height: 40px;
|
|
line-height: 40px;
|
|
@@ -324,7 +372,9 @@ onMounted(() => {
|
|
font-size: 24px;
|
|
font-size: 24px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+.deleteSty {
|
|
|
|
+ color: #0a59f7;
|
|
|
|
+}
|
|
.outing-container {
|
|
.outing-container {
|
|
height: calc(100vh - 354px);
|
|
height: calc(100vh - 354px);
|
|
|
|
|
|
@@ -334,6 +384,10 @@ onMounted(() => {
|
|
margin-bottom: 15px;
|
|
margin-bottom: 15px;
|
|
padding: 10px 8px;
|
|
padding: 10px 8px;
|
|
}
|
|
}
|
|
|
|
+ .outing-box-header {
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
|
|
|
|
.material-title {
|
|
.material-title {
|
|
font-weight: bolder;
|
|
font-weight: bolder;
|
|
@@ -376,6 +430,16 @@ onMounted(() => {
|
|
align-items: start;
|
|
align-items: start;
|
|
padding: 30px 30px;
|
|
padding: 30px 30px;
|
|
|
|
|
|
|
|
+ .list-box-header {
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ }
|
|
|
|
+ .list-box-delete {
|
|
|
|
+ text-align: right;
|
|
|
|
+ font-weight: bolder;
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ }
|
|
.name {
|
|
.name {
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
font-size: 24px;
|
|
font-size: 24px;
|