This commit is contained in:
ChenQiuYu 2025-05-23 13:41:55 +08:00
parent 6ad6ff721c
commit 6416d2f629
2 changed files with 81 additions and 51 deletions

View File

@ -1,25 +1,24 @@
<template> <template>
<Mask :is-show="isShow" :height="600" :width="800" @close="close" title="采集相同追溯码" :show-footer="true"> <Mask :is-show="isShow" :height="321" :width="818" @close="close" title="采集相同追溯码">
<div class="tips"> <div class="content">
<div class="top">
<div class="tip">
入库单位包装无追溯码时可重复采集上层包装的追溯码 入库单位包装无追溯码时可重复采集上层包装的追溯码
</div> </div>
<div class="content">
<div class="code"> <div class="code">
<div class="before-code"> <span class="before-code">
{{ data.code.slice(0, 7) }} {{ data.code.slice(0, 7) }}
</div> </span>
<div class="after-code"> <span class="after-code">
{{ data.code.slice(7) }} {{ data.code.slice(7) }}
</span>
</div> </div>
</div> </div>
<div class="number"> <div class="body">
<span class="text"> <span class="text">采集</span>
采集 <el-input-number v-model="data.num" min="1" size="large" ref="inputRef"
</span> @keydown.enter="close"></el-input-number>
<el-input-number v-model="data.num" min="1" size="large" ref="inputRef" @keydown.enter="close"></el-input-number> <span class="text"></span>
<span class="text">
</span>
</div> </div>
</div> </div>
</Mask> </Mask>
@ -29,7 +28,7 @@ import Mask from "@/components/common/Mask.vue";
import {nextTick, ref} from "vue"; import {nextTick, ref} from "vue";
const data = ref<any>() const data = ref<any>()
const emit = defineEmits(['close']) const emit = defineEmits(['close', 'save'])
const inputRef = ref<any>() const inputRef = ref<any>()
@ -51,45 +50,77 @@ const close = () => {
emit('close') emit('close')
isShow.value = false isShow.value = false
} }
const save = () => {
emit('save', data.value)
isShow.value = false
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.tips{
}
.content { .content {
border: 1px solid #ddd; width: 100%;
margin: 40px; height: 100%;
border-radius: 10px; display: flex;
flex-direction: column;
.top {
width: 100%;
height: 126px;
background: #F9FAFC;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
font-weight: 500;
font-size: 20px;
color: #666666;
font-style: normal;
padding: 24px;
.code { .code {
width: 100%; width: 100%;
display: flex;
justify-content: center;
font-weight: 800; font-weight: 800;
font-size: 30px; font-size: 30px;
color: #333333;
padding: 40px 0;
font-style: normal;
display: flex;
justify-content: center;
border-bottom: 1px solid #ddd;
.before-code {
color: #999999; color: #999999;
} font-style: normal;
.after-code { .after-code {
color: #333;
margin-left: 10px; margin-left: 10px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
} }
} }
.number{
padding: 40px 0; .body {
width: 100%; flex: 1;
min-height: 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center;
.text { .text {
font-size: 24px; margin: 0 16px;
line-height: 40px;
text-align: center;
} }
} }
} }
.footer {
height: 100%;
padding: 24px;
display: flex;
justify-content: flex-end;
align-items: center;
.default-btn, .btn {
width: 60px;
height: 32px;
line-height: 32px;
margin-left: 10px;
font-size: 14px;
}
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<el-popover placement="bottom-end" :visible="true" width="400"> <el-popover placement="bottom-end" :visible="isVisible" width="400">
<template #reference> <template #reference>
<el-input v-model="input" style="width:100%;height: 100%" placeholder="追溯码" size="small" @focus="focus" <el-input v-model="input" style="width:100%;height: 100%" placeholder="追溯码" size="small" @focus="focus"
@blur="handlerBlur" @keydown.enter="addCode"></el-input> @blur="handlerBlur" @keydown.enter="addCode"></el-input>
@ -13,7 +13,7 @@
</el-table-column> </el-table-column>
<el-table-column label="数量" prop="num" width="70" show-overflow-tooltip> <el-table-column label="数量" prop="num" width="70" show-overflow-tooltip>
<template #default="{row}"> <template #default="{row}">
<span class="small-btn edit" style="cursor: pointer" @click="openCodeNumEdit(row)"> <span class="edit" @click="openCodeNumEdit(row)">
{{ row.num }} {{ row.num }}
</span> </span>
</template> </template>
@ -95,11 +95,10 @@ const openCodeNumEdit = (row: any) => {
:deep(.el-table td.el-table__cell) { :deep(.el-table td.el-table__cell) {
.edit { .edit {
padding: 2px;
width: 100%;
cursor: pointer; cursor: pointer;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: #4d6de4;
} }
} }
</style> </style>