|
@@ -37,9 +37,19 @@
|
|
|
<div class="spec">{{ item.spec }}</div>
|
|
|
</div>
|
|
|
<div class="bottom">
|
|
|
- <NumberInput v-model="item.num" />
|
|
|
+ <NumberInput
|
|
|
+ v-if="item.codeType === 'BATCH'"
|
|
|
+ v-model="item.num"
|
|
|
+ />
|
|
|
+ <div v-else class="number" v-text="item.num"></div>
|
|
|
<span class="unit">{{ item.unitDictLabel }}</span>
|
|
|
</div>
|
|
|
+ <i-ep-delete
|
|
|
+ class="delete"
|
|
|
+ color="#ff4d4f"
|
|
|
+ size="20px"
|
|
|
+ @click="deleteMaterial(index)"
|
|
|
+ />
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
@@ -110,7 +120,7 @@ const enterBox = () => {
|
|
|
|
|
|
// 物料
|
|
|
const scanCodeInput = ref("");
|
|
|
-const materialList = ref<any>([]);
|
|
|
+const materialList = ref<any[]>([]);
|
|
|
|
|
|
const handleScanCodeInput = () => {
|
|
|
getMaterialInfoByLabel(scanCodeInput.value).then((res) => {
|
|
@@ -122,15 +132,21 @@ const handleScanCodeInput = () => {
|
|
|
currentMaterial.batchCode === res.data.batchCode &&
|
|
|
currentMaterial.materialCode === res.data.materialCode
|
|
|
) {
|
|
|
- materialList.value[i].num += res.data.num;
|
|
|
hasMaterial = true;
|
|
|
- break;
|
|
|
+ // SEQ/BATCH 如果是流转卡号数量只能唯1,序列号相加
|
|
|
+ if (currentMaterial.codeType === "BATCH") {
|
|
|
+ materialList.value[i].num += res.data.num;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
!hasMaterial && materialList.value.push(res.data);
|
|
|
scanCodeInput.value = "";
|
|
|
});
|
|
|
};
|
|
|
+const deleteMaterial = (index: number) => {
|
|
|
+ materialList.value.splice(index, 1);
|
|
|
+};
|
|
|
// 流转终点
|
|
|
const destinationList = ref<any>();
|
|
|
const currentDestination = ref<any>({});
|
|
@@ -140,7 +156,7 @@ const selectStore = ref<any>({});
|
|
|
const onEndBoxClick = (index: number, item: any) => {
|
|
|
currentDestination.value = item;
|
|
|
currentDestinationIndex.value = index;
|
|
|
- // 如果是仓库,会根据仓库的no获取仓储的列表,存入map, 如果已经有数据了则不需要再次请求接口
|
|
|
+ // 如果是仓库,会根据仓库的no获取仓储的列表,存入map, 如果已经有数据了则不需要再次请求接口 =》 后来不需要展示了 就注释了
|
|
|
// if (item.targetType === "stock") {
|
|
|
// if (!storeMap.has(item.houseNo)) {
|
|
|
// getStoreListByNo(item.houseNo).then((res) => {
|
|
@@ -153,7 +169,6 @@ const onEndBoxClick = (index: number, item: any) => {
|
|
|
onMounted(() => {
|
|
|
let wm = new WeakMap();
|
|
|
getDestinationList(1).then((res) => {
|
|
|
- console.log("destinationList", res);
|
|
|
destinationList.value = res.data;
|
|
|
});
|
|
|
});
|
|
@@ -247,6 +262,7 @@ const createTask = () => {
|
|
|
justify-content: space-between;
|
|
|
align-items: start;
|
|
|
padding: 30px 30px;
|
|
|
+ position: relative;
|
|
|
|
|
|
.name {
|
|
|
font-weight: 500;
|
|
@@ -274,6 +290,12 @@ const createTask = () => {
|
|
|
text-align: left;
|
|
|
margin-left: 5px;
|
|
|
}
|
|
|
+
|
|
|
+ .delete {
|
|
|
+ position: absolute;
|
|
|
+ top: 20px;
|
|
|
+ right: 20px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -319,4 +341,9 @@ const createTask = () => {
|
|
|
width: 100%;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
+
|
|
|
+.number {
|
|
|
+ font-size: $f38;
|
|
|
+ font-weight: bolder;
|
|
|
+}
|
|
|
</style>
|