|
@@ -9,7 +9,7 @@
|
|
|
:showSuffix="true"
|
|
|
placeholder="请扫描或输入料箱编号"
|
|
|
@keyup.enter="enterBox"
|
|
|
- :disabled="outStatus"
|
|
|
+ :disabled="outStatus || addStatus"
|
|
|
/>
|
|
|
<el-scrollbar class="boxes-container base-container">
|
|
|
<div
|
|
@@ -33,7 +33,7 @@
|
|
|
<el-button
|
|
|
class="sureBtn"
|
|
|
type="primary"
|
|
|
- :disabled="outStatus"
|
|
|
+ :disabled="outStatus || addStatus"
|
|
|
@click="sureToOut"
|
|
|
>出库
|
|
|
</el-button>
|
|
@@ -41,6 +41,25 @@
|
|
|
<el-col :span="8">
|
|
|
<div class="type-title">盒内原有物料</div>
|
|
|
<el-scrollbar class="outing-container">
|
|
|
+ <div v-if="!outStatus">
|
|
|
+ <div class="addbox" v-if="addSuccessStatus">
|
|
|
+ 扫码的盒子编码:{{ addBoxInfo.code }}
|
|
|
+ </div>
|
|
|
+ <ScanCodeInput
|
|
|
+ v-if="addStatus && addSuccessStatus == false"
|
|
|
+ v-model="addBoxSearch"
|
|
|
+ :clearable="true"
|
|
|
+ :showSuffix="true"
|
|
|
+ placeholder="请扫描或输入料箱编号"
|
|
|
+ @keyup.enter="addenterBox"
|
|
|
+ />
|
|
|
+ <el-button
|
|
|
+ class="sureBtn"
|
|
|
+ :type="addStatus ? 'info' : 'primary'"
|
|
|
+ @click="changeAddStatus"
|
|
|
+ >{{ addStatus ? "取消" : "入库新载具" }}
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
<div
|
|
|
v-for="(material, index) in outingMaterials"
|
|
|
:key="index"
|
|
@@ -66,7 +85,7 @@
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
<el-button class="sureBtn" type="info" @click="backToStorage"
|
|
|
- >返库
|
|
|
+ >出库
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
@@ -108,6 +127,7 @@ import {
|
|
|
getDestinationList,
|
|
|
getMaterialInfoByLabel,
|
|
|
} from "@/api/process/materialFlow";
|
|
|
+import { getVehicleInfo } from "@/api/prepare";
|
|
|
import {
|
|
|
backToStorageAPI,
|
|
|
getStorageBoxesList,
|
|
@@ -118,10 +138,37 @@ import {
|
|
|
const boxSearch = ref("");
|
|
|
//盒内原有物料data
|
|
|
const boxesList = ref<any[]>([]);
|
|
|
+const addStatus = ref(false);
|
|
|
+const addSuccessStatus = ref(false);
|
|
|
+const addBoxInfo = ref();
|
|
|
//选中的item
|
|
|
const currentBox = ref<any>({});
|
|
|
const currentBoxIndex = ref(-1);
|
|
|
const outStatus = ref(false);
|
|
|
+const changeAddStatus = () => {
|
|
|
+ if (addStatus.value == true) {
|
|
|
+ addSuccessStatus.value = false;
|
|
|
+ addBoxInfo.value = null;
|
|
|
+ addBoxSearch.value = "";
|
|
|
+ outingBox.value = {};
|
|
|
+ outingRawBoxList = [];
|
|
|
+ outingMaterials.value = [];
|
|
|
+ materialList.value = [];
|
|
|
+ }
|
|
|
+ addStatus.value = !addStatus.value;
|
|
|
+};
|
|
|
+const addBoxSearch = ref("");
|
|
|
+//扫盒子
|
|
|
+const addenterBox = () => {
|
|
|
+ addBoxSearch.value = addBoxSearch.value.trim();
|
|
|
+ getVehicleInfo(addBoxSearch.value ? addBoxSearch.value : {}).then((res) => {
|
|
|
+ addBoxInfo.value = res.data;
|
|
|
+ addSuccessStatus.value = true;
|
|
|
+ outingBox.value.vehicleNo = addBoxInfo.value.code;
|
|
|
+ outingBox.value.vehicleId = addBoxInfo.value.id;
|
|
|
+ ElMessage.success("扫码成功!");
|
|
|
+ });
|
|
|
+};
|
|
|
//出库
|
|
|
const enterBox = () => {
|
|
|
boxSearch.value = boxSearch.value.trim();
|
|
@@ -181,6 +228,7 @@ const materialList = ref<any>([]);
|
|
|
// 扫码料码
|
|
|
const handleScanCodeInput = () => {
|
|
|
getMaterialInfoByLabel(scanCodeInput.value).then((res) => {
|
|
|
+ //seq是序列号唯一的
|
|
|
if (res.data.codeType == "SEQ") {
|
|
|
res.data.seqNo = scanCodeInput.value;
|
|
|
} else {
|
|
@@ -400,4 +448,12 @@ onMounted(() => {
|
|
|
width: 100%;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
+.addbox {
|
|
|
+ margin-bottom: 10px;
|
|
|
+ border-radius: 16px;
|
|
|
+ background-color: white;
|
|
|
+ text-align: center;
|
|
|
+ padding: 20px 0;
|
|
|
+ font-size: $f24;
|
|
|
+}
|
|
|
</style>
|