| | |
| | | </view> |
| | | |
| | | <view class="filter-controls" style="margin-bottom: 5px;"> |
| | | <view class="dropdown-filter"> |
| | | <picker @change="onOptionsChange" :value="optionsIndex" :range="options"> |
| | | <view class="picker">{{options[optionsIndex]}}</view> |
| | | </picker> |
| | | </view> |
| | | <view class="search-container"> |
| | | <input class="search-input" v-model="searchValue" placeholder="请输入检验单号或物料编码" |
| | | <input class="search-input" v-model="searchValue" :placeholder="'请输入'+options[optionsIndex]" |
| | | @confirm="handleSearch" /> |
| | | <button class="search-button" @click="handleSearch">搜索</button> |
| | | </view> |
| | |
| | | @click="navigateToDetail(item)"> |
| | | <view class="card-header"> |
| | | <view class="card-title">检验单号: {{item.releaseNo}}</view> |
| | | <view class="status" :class="{'status-pending': current === 0, 'status-pass': item.fcheckResu === '合格', 'status-fail': item.fcheckResu === '不合格'}"> |
| | | {{current === 0 ? '未提交' : (item.fcheckResu ? item.fcheckResu : '已提交')}} |
| | | <view class="status" :class="{'status-pending': item.fsubmit === 0 || item.fsubmit == null, 'status-pass': item.fsubmit === 1 && item.fcheckResu === '合格', 'status-fail': item.fsubmit === 1 && item.fcheckResu === '不合格'}"> |
| | | {{(item.fsubmit === 0 || item.fsubmit == null) ? '未提交' : (item.fcheckResu ? item.fcheckResu : '已提交')}} |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | </view> |
| | | |
| | | <view class="card-actions"> |
| | | <button class="primary">{{current === 0 ? '继续检验' : '查看详情'}}</button> |
| | | <button class="primary">{{(item.fsubmit === 0 || item.fsubmit == null) ? '继续检验' : '查看详情'}}</button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <!-- 添加按钮 --> |
| | | <view class="plus-button" @click="handleFabClick" v-if="current === 0"> |
| | | <view class="plus-icon">+</view> |
| | | </view> |
| | | <!-- 添加按钮已移除 - 不再支持自建单据 --> |
| | | </view> |
| | | </template> |
| | | |
| | |
| | | totalCount: 0, |
| | | noData: false, // 没有更多数据了 |
| | | isLoading: false, // 是否正在加载 |
| | | optionsIndex: 0, |
| | | options: ['物料编号', '物料名称', '检验单号'] |
| | | }; |
| | | }, |
| | | onLoad() { |
| | |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | //搜索选项变化 |
| | | onOptionsChange(e) { |
| | | this.optionsIndex = e.detail.value; |
| | | // 根据选择的选项设置搜索字段 |
| | | const fieldMap = { |
| | | 0: 'itemNo', // 物料编号 |
| | | 1: 'itemName', // 物料名称 |
| | | 2: 'releaseNo' // 检验单号 |
| | | }; |
| | | this.selectedField = fieldMap[this.optionsIndex]; |
| | | }, |
| | | init() { |
| | | let result = "未完成"; |
| | | if (this.current === 1) { |
| | | result = "已完成"; |
| | | let fsubmit = null; |
| | | if (this.current === 0) { |
| | | fsubmit = 0; // 未提交 |
| | | } else if (this.current === 1) { |
| | | fsubmit = 1; // 已提交 |
| | | } |
| | | |
| | | if (this.isLoading) return; // 如果正在加载则不继续执行 |
| | |
| | | |
| | | //页面加载时调用的事件 |
| | | this.$post({ |
| | | url: "/RKJ/getPage", |
| | | url: "/RKJ/GetPage", |
| | | data: { |
| | | pageIndex: this.pageIndex, |
| | | limit: this.limit, |
| | | createUser: this.$loginInfo.account, |
| | | result: result, |
| | | searchValue: this.searchValue |
| | | fsubmit: fsubmit, |
| | | searchValue: this.searchValue, |
| | | SelectedIndex: this.optionsIndex |
| | | } |
| | | }).then(res => { |
| | | if (this.pageIndex === 1) { |
| | |
| | | this.isLoading = false; // 出现错误时结束加载 |
| | | }); |
| | | }, |
| | | handleFabClick() { |
| | | uni.navigateTo({ |
| | | url: 'Add?id' |
| | | }); |
| | | }, |
| | | // handleFabClick方法已移除 - 不再支持自建单据 |
| | | onClickItem(index) { |
| | | if (this.current !== index.currentIndex) { |
| | | this.current = index.currentIndex; |
| | |
| | | }, |
| | | navigateToDetail(item) { |
| | | uni.navigateTo({ |
| | | url: 'Add?id=' + item.id + '&releaseNo=' + item.releaseNo |
| | | url: 'Add?id=' + item.id + '&releaseNo=' + item.releaseNo + '¤t=A' |
| | | }); |
| | | } |
| | | }, |
| | |
| | | font-size: 14px; |
| | | margin: 0; |
| | | } |
| | | |
| | | |
| | | .filter-controls { |
| | | display: flex; |
| | |
| | | opacity: 1; |
| | | } |
| | | |
| | | /* 加号按钮样式 */ |
| | | .plus-button { |
| | | position: fixed; |
| | | bottom: 20px; |
| | | right: 20px; |
| | | width: 60px; |
| | | height: 60px; |
| | | border-radius: 50%; |
| | | background-color: #3498db; |
| | | color: #ffffff; |
| | | text-align: center; |
| | | line-height: 59px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | z-index: 1000; |
| | | box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); |
| | | } |
| | | /* 加号按钮样式已移除 - 不再支持自建单据 */ |
| | | |
| | | /* 响应式设计 */ |
| | | @media (min-width: 768px) { |