| | |
| | | </view> |
| | | |
| | | <view v-if="tableData.length > 0" class="inspection-list"> |
| | | <view v-for="(item, index) in tableData" :key="index" :class="{ 'item-completed': item.fcheckResu === '合格', 'item-failed': item.fcheckResu === '不合格' }" |
| | | <view v-for="(item, index) in tableData" :key="index" |
| | | :class="{ 'item-completed': item.fcheckResu === '合格', 'item-failed': item.fcheckResu === '不合格' }" |
| | | class="inspection-item"> |
| | | |
| | | <!-- 左侧状态指示器 --> |
| | | <view :class="{ 'status-pass': item.fcheckResu === '合格', 'status-fail': item.fcheckResu === '不合格', 'status-pending': item.fcheckResu === '未检验' }" |
| | | class="status-indicator"> |
| | | <view |
| | | :class="{ 'status-pass': item.fcheckResu === '合格', 'status-fail': item.fcheckResu === '不合格', 'status-pending': item.fcheckResu === '未检验' }" |
| | | class="status-indicator"> |
| | | </view> |
| | | |
| | | <!-- 主要内容区域 --> |
| | | <view class="item-content"> |
| | | <view class="item-header"> |
| | | <view class="item-title">{{ item.fcheckItem }}</view> |
| | | <view :class="{ 'badge-pass': item.fcheckResu === '合格', 'badge-fail': item.fcheckResu === '不合格', 'badge-pending': item.fcheckResu === '未检验' }" |
| | | class="status-badge"> |
| | | <view |
| | | :class="{ 'badge-pass': item.fcheckResu === '合格', 'badge-fail': item.fcheckResu === '不合格', 'badge-pending': item.fcheckResu === '未检验' }" |
| | | class="status-badge"> |
| | | <text class="status-icon">{{ |
| | | item.fcheckResu === '合格' ? '✓' : item.fcheckResu === '不合格' ? '✗' : '○' |
| | | }} |
| | |
| | | <view class="progress-info"> |
| | | <text class="progress-label">检验进度:</text> |
| | | <view class="progress-bar"> |
| | | <view :class="{ 'progress-complete': item.fenterQty >= item.checkQyt, 'progress-incomplete': item.fenterQty < item.checkQyt }" |
| | | :style="{ width: (item.fenterQty / item.checkQyt * 100) + '%' }" |
| | | class="progress-fill"> |
| | | <view |
| | | :class="{ 'progress-complete': item.fenterQty >= item.checkQyt, 'progress-incomplete': item.fenterQty < item.checkQyt }" |
| | | :style="{ width: (item.fenterQty / item.checkQyt * 100) + '%' }" |
| | | class="progress-fill"> |
| | | </view> |
| | | </view> |
| | | <text class="progress-text">{{ item.fenterQty }}/{{ item.checkQyt }}</text> |
| | | </view> |
| | | |
| | | <view :class="{ 'btn-complete': item.fenterQty >= item.checkQyt, 'btn-incomplete': item.fenterQty < item.checkQyt }" class="action-button" |
| | | @click="toDetail(item)"> |
| | | <view |
| | | :class="{ 'btn-complete': item.fenterQty >= item.checkQyt, 'btn-incomplete': item.fenterQty < item.checkQyt }" |
| | | class="action-button" |
| | | @click="toDetail(item)"> |
| | | <text class="btn-text">{{ item.fenterQty >= item.checkQyt ? '查看详情' : '开始检验' }}</text> |
| | | <text class="btn-icon">→</text> |
| | | </view> |
| | |
| | | <!-- 操作按钮区域 --> |
| | | <view class="action-buttons"> |
| | | <button class="btn btn-primary" @click="submitInspection">提交</button> |
| | | <button class="btn btn-primary" @click="regenerate">生成检验项目</button> |
| | | <button class="secondary-btn" @click="uploadImages">上传/查看图片</button> |
| | | <button class="btn btn-secondary" @click="addDefectDescription">添加不合格描述</button> |
| | | </view> |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | regenerate() { |
| | | // 检验提交的逻辑 |
| | | this.$post({ |
| | | url: "/MesOqcItemsDetect02/Regenerate", |
| | | data: { |
| | | releaseNo: this.formData.releaseNo, |
| | | itemId: this.formData.itemId |
| | | } |
| | | }).then(res => { |
| | | if (res.status == 0) { |
| | | uni.showToast({ |
| | | title: res.message.toString(), |
| | | icon: 'success', |
| | | duration: 2000 |
| | | }) |
| | | } else { |
| | | uni.showModal({ |
| | | title: "提示", |
| | | content: res.message.toString(), |
| | | confirmText: "确定", |
| | | showCancel: false, |
| | | success: (res) => { |
| | | |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | editRemarks() { |
| | | if (this.remarks && this.formData.id) { |
| | | this.$post({ |