| | |
| | | <template> |
| | | <view class="page-container"> |
| | | <!-- 刷新提示框 --> |
| | | <view class="success-toast" :class="{ 'show': tipShow }"> |
| | | <view :class="{ 'show': tipShow }" class="success-toast"> |
| | | <view class="toast-icon">✓</view> |
| | | <text class="toast-text">刷新成功</text> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 搜索栏 --> |
| | | <view class="search-section"> |
| | | <view class="search-container"> |
| | | <view class="search-input-wrapper"> |
| | | <uni-icons type="search" size="18" color="#94a3b8"></uni-icons> |
| | | <input class="search-input" type="text" v-model="searchValue" |
| | | @confirm="getInputValue" placeholder="搜索物料编码、物料名称、创建人员..." /> |
| | | <view v-if="searchValue" class="clear-btn" @tap="clearSearch"> |
| | | <uni-icons type="clear" size="16" color="#94a3b8"></uni-icons> |
| | | </view> |
| | | </view> |
| | | <view class="filter-btn" @tap="toggleFilter"> |
| | | <uni-icons type="tune" size="18" color="#4f46e5"></uni-icons> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 筛选器 --> |
| | | <view v-if="showFilter" class="filter-panel"> |
| | | <picker mode="selector" :range="searchOptions" v-model="selectedOption" @change="onPickerChange"> |
| | | <view class="filter-option"> |
| | | <text class="filter-label">筛选条件</text> |
| | | <text class="filter-value">{{ searchOptions[selectedOption] }}</text> |
| | | <uni-icons type="arrowdown" size="14" color="#64748b"></uni-icons> |
| | | <!-- 搜索栏样式 --> |
| | | <view class="search-bar"> |
| | | <view class="search-card"> |
| | | <picker v-model="selectedOption" :range="searchOptions" mode="selector" @change="onPickerChange"> |
| | | <view class="picker"> |
| | | {{ searchOptions[selectedOption] }} |
| | | </view> |
| | | </picker> |
| | | <input v-model="searchValue" class="search-input" placeholder="请输入搜索值" type="text" |
| | | @keypress.enter="getInputValue"/> |
| | | <button class="search-btn" @click="getInputValue">搜索</button> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="tab-section"> |
| | | <view class="custom-tabs"> |
| | | <view v-for="(item, index) in items" :key="index" |
| | | class="tab-item" :class="{ 'active': current === index }" |
| | | :class="{ 'active': current === index }" class="tab-item" |
| | | @tap="onClickItem({ currentIndex: index })"> |
| | | <text class="tab-text">{{ item }}</text> |
| | | <view class="tab-indicator" v-if="current === index"></view> |
| | | <view v-if="current === index" class="tab-indicator"></view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="header-right"> |
| | | <view class="status-badge" |
| | | :class="{ |
| | | <view :class="{ |
| | | 'status-submitted': item.fsubmit == 1, |
| | | 'status-pending': item.fsubmit != 1 |
| | | }"> |
| | | }" |
| | | class="status-badge"> |
| | | <view class="status-dot"></view> |
| | | <text class="status-text">{{ item.fsubmit == 1 ? '已提交' : '待提交' }}</text> |
| | | </view> |
| | |
| | | <!-- 检验结果区域 --> |
| | | <view class="inspection-result"> |
| | | <view class="result-item"> |
| | | <view class="result-icon" |
| | | :class="{ |
| | | <view :class="{ |
| | | 'icon-pass': item.fcheckResu === '合格', |
| | | 'icon-fail': item.fcheckResu === '不合格', |
| | | 'icon-pending': !item.fcheckResu || item.fcheckResu === '未检验' |
| | | }"> |
| | | }" |
| | | class="result-icon"> |
| | | <text class="result-symbol">{{ |
| | | item.fcheckResu === '合格' ? '✓' : |
| | | item.fcheckResu === '不合格' ? '✗' : '○' |
| | | }}</text> |
| | | }} |
| | | </text> |
| | | </view> |
| | | <view class="result-content"> |
| | | <text class="result-label">检验结果</text> |
| | | <text class="result-value" |
| | | :class="{ |
| | | <text :class="{ |
| | | 'value-pass': item.fcheckResu === '合格', |
| | | 'value-fail': item.fcheckResu === '不合格', |
| | | 'value-pending': !item.fcheckResu || item.fcheckResu === '未检验' |
| | | }"> |
| | | }" |
| | | class="result-value"> |
| | | {{ item.fcheckResu || '未检验' }} |
| | | </text> |
| | | </view> |
| | |
| | | |
| | | <!-- 操作指示器 --> |
| | | <view class="action-indicator"> |
| | | <uni-icons type="arrowright" size="16" color="#94a3b8"></uni-icons> |
| | | <uni-icons color="#94a3b8" size="16" type="arrowright"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 检验结果区域 --> |
| | | <view class="inspection-result"> |
| | | <view class="result-item"> |
| | | <view class="result-icon" |
| | | :class="{ |
| | | <view :class="{ |
| | | 'icon-pass': item.fcheckResu === '合格', |
| | | 'icon-fail': item.fcheckResu === '不合格' |
| | | }"> |
| | | }" |
| | | class="result-icon"> |
| | | <text class="result-symbol">{{ |
| | | item.fcheckResu === '合格' ? '✓' : '✗' |
| | | }}</text> |
| | | }} |
| | | </text> |
| | | </view> |
| | | <view class="result-content"> |
| | | <text class="result-label">最终结果</text> |
| | | <text class="result-value" |
| | | :class="{ |
| | | <text :class="{ |
| | | 'value-pass': item.fcheckResu === '合格', |
| | | 'value-fail': item.fcheckResu === '不合格' |
| | | }"> |
| | | }" |
| | | class="result-value"> |
| | | {{ item.fcheckResu }} |
| | | </text> |
| | | </view> |
| | |
| | | |
| | | <!-- 操作指示器 --> |
| | | <view class="action-indicator"> |
| | | <uni-icons type="arrowright" size="16" color="#94a3b8"></uni-icons> |
| | | <uni-icons color="#94a3b8" size="16" type="arrowright"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <!-- 浮动操作按钮 --> |
| | | <view class="fab-container"> |
| | | <view class="fab-button" @tap="handleFabClick"> |
| | | <uni-icons type="plus" size="24" color="#ffffff"></uni-icons> |
| | | <uni-icons color="#ffffff" size="24" type="plus"></uni-icons> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | noData: false, |
| | | isLoading: false, |
| | | tipShow: false, |
| | | searchOptions: ['物料编码', '物料名称', '创建人员'], |
| | | searchOptions: ['物料编码', '物料名称', '创建人员', '检验单号'], |
| | | selectedOption: 0, |
| | | searchValue: '', |
| | | copiedText: '', |
| | | headerHeight: 0, |
| | | showFilter: false, // 控制筛选面板显示 |
| | | headerHeight: 0 |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | case 2: // 创建人员 |
| | | requestData.createUser = this.searchValue; |
| | | break; |
| | | case 3: // 检验单号 |
| | | requestData.releaseNo = this.searchValue; |
| | | break; |
| | | } |
| | | requestData.searchIndex = this.selectedOption; |
| | | } |
| | | |
| | | this.$post({ |
| | |
| | | url: 'Add?id=' + item.id |
| | | }); |
| | | }, |
| | | toggleFilter() { |
| | | this.showFilter = !this.showFilter; |
| | | }, |
| | | clearSearch() { |
| | | this.searchValue = ''; |
| | | this.pageIndex = 1; |
| | | this.loadData(); |
| | | } |
| | | }, |
| | | onPullDownRefresh() { |
| | | this.pageIndex = 1; |
| | |
| | | margin-top: 2px; |
| | | } |
| | | |
| | | /* 搜索区域 */ |
| | | .search-section { |
| | | /* 搜索栏样式 */ |
| | | .search-bar { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .search-container { |
| | | display: flex; |
| | | gap: 8px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search-input-wrapper { |
| | | flex: 1; |
| | | position: relative; |
| | | .search-card { |
| | | display: flex; |
| | | align-items: center; |
| | | background: #f8f8f8; |
| | | border: 1px solid #ddd; |
| | | border-radius: 8px; |
| | | padding: 0 12px; |
| | | background-color: white; |
| | | border-radius: 12px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); |
| | | height: 44px; |
| | | } |
| | | |
| | | .search-input-wrapper:focus-within { |
| | | border-color: #007AFF; |
| | | background: white; |
| | | .picker { |
| | | width: 120px; |
| | | height: 44px; |
| | | line-height: 44px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | color: #666; |
| | | border-right: 1px solid #e0e0e0; |
| | | white-space: nowrap; |
| | | } |
| | | |
| | | .search-input { |
| | | flex: 1; |
| | | height: 40px; |
| | | border: none; |
| | | background: transparent; |
| | | height: 44px; |
| | | line-height: 44px; |
| | | font-size: 14px; |
| | | color: #333; |
| | | margin-left: 8px; |
| | | padding: 0 12px; |
| | | border: none; |
| | | outline: none; |
| | | background: transparent; |
| | | } |
| | | |
| | | .search-input::placeholder { |
| | | color: #999; |
| | | } |
| | | |
| | | .clear-btn { |
| | | padding: 4px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .filter-btn { |
| | | width: 40px; |
| | | height: 40px; |
| | | background: #f0f0f0; |
| | | border: 1px solid #ddd; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .filter-btn:active { |
| | | background: #e0e0e0; |
| | | } |
| | | |
| | | /* 筛选面板 */ |
| | | .filter-panel { |
| | | margin-top: 8px; |
| | | background: white; |
| | | border: 1px solid #ddd; |
| | | border-radius: 8px; |
| | | padding: 12px; |
| | | } |
| | | |
| | | .filter-option { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | padding: 8px 0; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .filter-label { |
| | | .search-btn { |
| | | background: linear-gradient(135deg, #007AFF, #0056D6); |
| | | color: white; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | color: #666; |
| | | width: 80px; |
| | | height: 44px; |
| | | line-height: 44px; |
| | | border-radius: 0 12px 12px 0; |
| | | border: none; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | box-shadow: 0 2px 6px rgba(0, 122, 255, 0.2); |
| | | } |
| | | |
| | | .filter-value { |
| | | font-size: 14px; |
| | | color: #333; |
| | | font-weight: 500; |
| | | .search-btn:hover { |
| | | background: linear-gradient(135deg, #0056D6, #004BB8); |
| | | transform: translateY(-1px); |
| | | box-shadow: 0 3px 8px rgba(0, 122, 255, 0.25); |
| | | } |
| | | |
| | | .search-btn:active { |
| | | transform: translateY(1px); |
| | | box-shadow: 0 1px 4px rgba(0, 122, 255, 0.15); |
| | | } |
| | | |
| | | /* 选项卡 */ |
| | |
| | | } |
| | | |
| | | @keyframes spin { |
| | | 0% { transform: rotate(0deg); } |
| | | 100% { transform: rotate(360deg); } |
| | | 0% { |
| | | transform: rotate(0deg); |
| | | } |
| | | 100% { |
| | | transform: rotate(360deg); |
| | | } |
| | | } |
| | | |
| | | .loading-text { |