From eaa506e57403d1b8502f16ca5dd6e82c347724d0 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 17 七月 2025 23:09:32 +0800 Subject: [PATCH] 优化QC模块样式统一和功能完善 --- pages/QC/LLJ/detail.vue | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 files changed, 39 insertions(+), 10 deletions(-) diff --git a/pages/QC/LLJ/detail.vue b/pages/QC/LLJ/detail.vue index 3ad05ea..68272a8 100644 --- a/pages/QC/LLJ/detail.vue +++ b/pages/QC/LLJ/detail.vue @@ -7,12 +7,14 @@ </view> <!-- 鏍囩鏍� --> - <view class="tabs"> - <view v-for="(tab, index) in tabs" :key="index" class="tab" :class="{active: currentTab === index}" - @tap="switchTab(index,tab.id)"> - {{ tab.fcheckItem }} + <scroll-view class="tabs" scroll-x="true" :show-scrollbar="false"> + <view class="tabs-container"> + <view v-for="(tab, index) in tabs" :key="index" class="tab" :class="{active: currentTab === index}" + @tap="switchTab(index,tab.id)"> + {{ tab.fcheckItem }} + </view> </view> - </view> + </scroll-view> <view class="tab-content"> <!-- 鍩烘湰淇℃伅 --> <view class="section"> @@ -138,8 +140,19 @@ <uni-icons type="compose" size="16" color="#fff"></uni-icons> 澶囨敞 </button> - <input v-if="(tableData.length < formData.checkQyt)" @input="search($event)" - v-model="inputTxt" type="text" class="result-input" placeholder="璇疯緭鍏ユ楠岀粨鏋�..." + <input v-if="(tableData.length < formData.checkQyt) && formData.fupAllow && formData.fdownAllow" + @input="onNumberInput" + v-model="formData.fcheckResu" + type="text" + class="result-input" + placeholder="璇疯緭鍏ユ楠岀粨鏋�..." + placeholder-class="placeholder" /> + <input v-else + @input="search($event)" + v-model="inputTxt" + type="text" + class="result-input" + placeholder="璇疯緭鍏ユ楠岀粨鏋�..." placeholder-class="placeholder" /> <button v-if="(tableData.length < formData.checkQyt)" style="margin: 0px;background-color: #3498db;color:#ffffff ;" class="btn primary-btn" @@ -364,6 +377,14 @@ //妫�娴嬭緭鍏ユ鐨勮緭鍏ワ紝骞剁粰鍙橀噺璧嬪�� search(event) { this.formData.fcheckResu = event.detail.value; + }, + onNumberInput(e) { + // 鍙厑璁歌緭鍏ユ暟瀛楀拰灏忔暟鐐� + let val = e.detail.value.replace(/[^\d.]/g, ''); + // 鍙厑璁镐竴涓皬鏁扮偣 + val = val.replace(/\.{2,}/g, '.'); + val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); + this.formData.fcheckResu = val; }, toggleResult(item) { let fstand = "鈭�"; @@ -712,17 +733,25 @@ } .tabs { - display: flex; background-color: $bg-color; border-bottom: 1px solid $border-color; + width: 100%; + white-space: nowrap; + + .tabs-container { + display: flex; + min-width: 100%; + } .tab { - flex: 1; + flex: none; + min-width: 120px; text-align: center; - padding: 12px 0; + padding: 12px 16px; border-right: 1px solid $border-color; color: #666; transition: all 0.3s; + white-space: nowrap; &:last-child { border-right: none; -- Gitblit v1.9.3