| | |
| | | <label class="info-label">检验结果:</label> |
| | | <view class="result-container"> |
| | | <!-- 显示当前检验结果 --> |
| | | <text v-if="data.inspectionResult" class="status-badge" :class="data.inspectionResult === '合格' ? 'success' : 'danger'"> |
| | | <text v-if="data.inspectionResult" :class="data.inspectionResult === '合格' ? 'success' : 'danger'" |
| | | class="status-badge"> |
| | | {{ data.inspectionResult }} |
| | | </text> |
| | | <text v-else class="status-badge pending"> |
| | |
| | | |
| | | <!-- 检验结果选择按钮 --> |
| | | <view v-if="showResultInput" class="result-input-container"> |
| | | <button class="result-btn qualified" @click="updateInspectionResult('合格')" :disabled="updating"> |
| | | <button :disabled="updating" class="result-btn qualified" @click="updateInspectionResult('合格')"> |
| | | 合格 |
| | | </button> |
| | | <button class="result-btn unqualified" @click="updateInspectionResult('不合格')" :disabled="updating"> |
| | | <button :disabled="updating" class="result-btn unqualified" |
| | | @click="updateInspectionResult('不合格')"> |
| | | 不合格 |
| | | </button> |
| | | <button class="result-btn cancel" @click="showResultInput = false" :disabled="updating"> |
| | | <button :disabled="updating" class="result-btn cancel" @click="showResultInput = false"> |
| | | 取消 |
| | | </button> |
| | | </view> |
| | | |
| | | <!-- 图片上传按钮 --> |
| | | <button class="upload-btn" @click="uploadImage"> |
| | | 📷 上传图片 |
| | | </button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | this.$showMessage('录入失败,请重试'); |
| | | }).finally(() => { |
| | | this.updating = false; |
| | | }); |
| | | }, |
| | | |
| | | uploadImage() { |
| | | // 处理billNo,去掉"-"后面的部分 |
| | | const orderNo = this.data.billNo.split('-')[0]; |
| | | |
| | | // 跳转到图片上传页面 |
| | | uni.navigateTo({ |
| | | url: `ImageItem?id=${this.itemId}&orderNo=${orderNo}` |
| | | }); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | .upload-btn { |
| | | padding: 8px 16px; |
| | | font-size: 14px; |
| | | border-radius: 6px; |
| | | border: 1px solid #67C23A; |
| | | background-color: #fff; |
| | | color: #67C23A; |
| | | cursor: pointer; |
| | | transition: all 0.2s; |
| | | |
| | | &:hover { |
| | | background-color: #67C23A; |
| | | color: #fff; |
| | | } |
| | | |
| | | &:active { |
| | | transform: scale(0.95); |
| | | } |
| | | } |
| | | |
| | | .empty-state { |
| | | display: flex; |
| | | flex-direction: column; |