提交 f8cd6465 authored 作者: lidongxu's avatar lidongxu

测试:高度100%去掉

上级 4ccf5a04
......@@ -19,7 +19,7 @@
html,
body,
#app {
height: 100%;
/* height: 100%; */
margin: 0px;
padding: 0px;
}
......
......@@ -52,6 +52,6 @@ onMounted(() => {
<style scoped
lang="scss">
.wm-class{
height: 100%;
/* height: 100%; */
}
</style>
......@@ -27,7 +27,7 @@ html {
}
#app {
height: 100%;
// height: 100%;
}
*,
......
......@@ -6,65 +6,39 @@
@click-left="router.back()">
</van-nav-bar>
<div class="content">
<p class="title">稽查任务1:</p>
<p class="title">稽查任务:</p>
<!-- 终端名称 -->
<!-- 地址 -->
<!-- 门头照上传 -->
<div class="header-photo-section">
<van-field label="门头照"
label-align="top">
<template #input>
<van-uploader :max-count="1"
accept="image/*"
capture="camera"
:model-value="form.commitStorePicture"
:after-read="commitStorePhotosRead"
preview-size="78"
@delete="deleteCommitStorePhotos">
</van-uploader>
</template>
</van-field>
<div class="terminal-wrap">
<div>
<van-image fit="scale-down"
width="2.25rem"
height="3.5rem"
:src="form.storePicture"
@click="previewStoreImage"></van-image>
</div>
<div class="terminal-info">
<div class="terminal-name">
<span>终端名称:</span>
<van-field v-model="form.storeName"
placeholder="请输入终端名"
@change="handleStoreNameChange" />
</div>
<p>终端编码:P0500052306</p>
<p>经销商:秦皇岛红朗森商贸有限公司</p>
<p>地址:河北省秦皇岛市海港区北环路街道秦皇岛冻结附录</p>
</div>
</div>
<!-- 门店类型选择 -->
<van-field :model-value="form.selectedType.join('')"
label="门店类型"
label-align="top"
placeholder="请选择"
@click="showTypePopup = true" />
<!-- 信息填写组 -->
<!-- 任务总结 -->
<p class="title">稽查任务2:</p>
<!-- 终端名称 -->
<!-- 地址 -->
<!-- 门头照上传 -->
<div class="header-photo-section">
<van-field label="门头照"
label-align="top">
<template #input>
<van-uploader :max-count="1"
accept="image/*"
capture="camera"
:model-value="form.commitStorePicture"
:after-read="commitStorePhotosRead"
preview-size="78"
@delete="deleteCommitStorePhotos">
</van-uploader>
</template>
</van-field>
<div class="location-wrap">
<van-icon name="location-o"
class="location-icon" />
<van-loading size="20px"
v-if="addressLoading">正在获取您的位置...</van-loading>
<p v-else>{{ addressStr }}</p>
<van-icon name="replay"
class="refresh-icon"
@click="handleClickLocation" />
</div>
<!-- 门店类型选择 -->
<van-field :model-value="form.selectedType.join('')"
label="门店类型"
label-align="top"
placeholder="请选择"
@click="showTypePopup = true" />
<!-- 信息填写组 -->
<!-- 任务总结 -->
<p class="title">稽查任务3:</p>
<!-- 终端名称 -->
<!-- 地址 -->
<!-- 门头照上传 -->
<div class="header-photo-section">
<van-field label="门头照"
......@@ -83,46 +57,100 @@
</div>
<!-- 门店类型选择 -->
<van-field :model-value="form.selectedType.join('')"
readonly
label="门店类型"
label-align="top"
placeholder="请选择"
@click="showTypePopup = true" />
<van-popup v-model:show="showTypePopup"
position="bottom"
@close="showTypePopup = false">
<van-picker v-model="form.selectedType"
:columns="typeOptions"
@confirm="handleTypeConfirm"
@cancel="showTypePopup = false" />
</van-popup>
<!-- 信息填写组 -->
<van-tabs v-model:active="active"
class="tabs"
swipeable
sticky
:lazy-render="false">
<van-tab title="常规陈列">
<convention :isInitializing="isInitializing"
:form="form"
ref="conventionRef" />
</van-tab>
<van-tab title="档期陈列">
<scheduleDisplay :isInitializing="isInitializing"
:form="form"
ref="scheduleDisplayRef" />
</van-tab>
<van-tab title="档期补差">
<scheduleAdjustment :isInitializing="isInitializing"
:form="form"
ref="scheduleAdjustmentRef" />
</van-tab>
<van-tab title="品类信息">
<categoryInformation :isInitializing="isInitializing"
:form="form"
ref="categoryInformationRef" />
</van-tab>
</van-tabs>
<!-- 任务总结 -->
<p class="title">稽查任务4:</p>
<!-- 终端名称 -->
<!-- 地址 -->
<!-- 门头照上传 -->
<div class="header-photo-section">
<van-field label="门头照"
<div class="task-summary">
<p class="title">其他:</p>
<van-field label="礼盒/礼袋是否在售:"
label-align="top">
<template #input>
<van-uploader :max-count="1"
accept="image/*"
capture="camera"
:model-value="form.commitStorePicture"
:after-read="commitStorePhotosRead"
preview-size="78"
@delete="deleteCommitStorePhotos">
</van-uploader>
<van-checkbox-group v-model="form.lhldArr"
direction="horizontal"
shape="square"
@change="handleLhldArrChange">
<van-checkbox name="礼盒">礼盒</van-checkbox>
<van-checkbox name="礼袋">礼袋</van-checkbox>
</van-checkbox-group>
</template>
</van-field>
<van-field v-model="form.skuNum"
label="我品 SKU 总数:"
type="number"
placeholder="请输入"
label-align="top"
@change="handleSkuNumChange" />
<van-field v-model="form.remark"
label="备注:"
placeholder="请输入"
label-align="top"
type="textarea"
border
@change="handleRemarkChange" />
<!-- 大日期产品照片 -->
<div class="header-photo-section">
<van-field label="大日期产品照片"
label-align="top">
<template #input>
<van-uploader :max-count="4"
accept="image/*"
capture="camera"
:model-value="form.longTimePictureArr"
:after-read="longTimePictureArrRead"
preview-size="78"
@delete="deleteLongTimePictureArr">
</van-uploader>
</template>
</van-field>
</div>
</div>
<!-- 门店类型选择 -->
<van-field :model-value="form.selectedType.join('')"
label="门店类型"
label-align="top"
placeholder="请选择"
@click="showTypePopup = true" />
<!-- 信息填写组 -->
<!-- 任务总结 -->
</div>
<!-- 加载进度 -->
<van-overlay :show="isInitializing">
<van-loading v-if="isInitializing"
vertical
color="#f12528"
size="40"
text-color="#f12528">加载中...</van-loading>
</van-overlay>
</div>
</template>
......@@ -199,7 +227,7 @@ const getInspectionTaskDetailFn = async () => {
url: route.query.storePicture
}]
if (storeType) form.selectedType = [storeType]
} else {
......@@ -394,32 +422,7 @@ const deleteLongTimePictureArr = async (file, { name, index }) => {
})
showNotify({ type: 'success', message: '大日期产品照片,删除成功' })
}
// 检测是否为 iOS 设备
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
if (isIOS) {
// 监听所有输入框的失焦事件(键盘收起时触发)
document.addEventListener('blur', (e) => {
if (['INPUT', 'TEXTAREA'].includes(e.target.tagName)) {
setTimeout(() => {
// 保存当前滚动位置(避免过度滚动)
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// 先向下滚动1px,再滚回原位置,强制触发重排
window.scrollTo(0, scrollTop + 1);
window.scrollTo(0, scrollTop);
}, 100); // 延迟100ms,确保键盘完全收起
}
}, true); // 注意:需用捕获阶段(true)监听
}
window.addEventListener('resize', () => {
const isKeyboardOpen = window.innerHeight < window.screen.height * 0.7; // 粗略判断键盘是否打开
const fixedElements = document.querySelectorAll('.fixed-element'); // 替换为你的固定元素类名
fixedElements.forEach(el => {
el.style.bottom = isKeyboardOpen ? '0' : 'auto'; // 键盘打开时强制固定到底部
});
});
</script>
......@@ -428,8 +431,6 @@ window.addEventListener('resize', () => {
.wrap {
background-color: #f5f5f5;
/* min-height: 100vh; */
min-height: 100%;
/* height: 3000px; */
font-size: 16px;
.content {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论