| | |
| | | <text class="info-label">数量</text> |
| | | <text class="info-content highlight">{{item.fcovertQty}}</text> |
| | | </view> |
| | | <view class="info-item" v-if="item.jyxm !== null && item.jyxm !== undefined"> |
| | | <text class="info-label">检验项目</text> |
| | | <text class="info-content">{{item.jyxm}}</text> |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-item"> |
| | |
| | | </view> |
| | | </view> |
| | | <view class="info-row"> |
| | | <view class="info-item" v-if="item.newFngDesc!=null"> |
| | | <text class="info-label">上次不良描述</text> |
| | | <text class="info-content">{{item.newFngDesc}}</text> |
| | | </view> |
| | | |
| | | <view class="info-item" v-if="item.fngDesc!=null"> |
| | | <text class="info-label">不良描述</text> |
| | | <text class="info-content">{{item.fngDesc}}</text> |
| | |
| | | data() { |
| | | return { |
| | | projectIndex: 0, |
| | | optionsIndex: 0, |
| | | optionsIndex: 1, // 默认选择物料编号 |
| | | projects: ['当前', '全部'], |
| | | activeTab: 0, // 0-未检验, 1-已检验 |
| | | uncheckedCount: 0, |
| | |
| | | }, |
| | | onLoad() { |
| | | //页面加载时调用的事件 |
| | | // 初始化selectedField,因为默认选择物料编号 |
| | | const fieldMap = { |
| | | 0: 'DEPARTMENTNAME', // 项目 |
| | | 1: 'itemNo', // 物料编号 |
| | | 2: 'itemName', // 物料名称 |
| | | 3: 'suppName', // 供应商 |
| | | 4: 'lotNo' ,// 到货单号 |
| | | 5: 'releaseNo' ,// 检验单号 |
| | | 6: 'itemModel',//物料规格 |
| | | }; |
| | | this.selectedField = fieldMap[this.optionsIndex]; |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | |
| | | // 去重处理 - 根据 releaseNo 去重 |
| | | const uniqueList = this.removeDuplicatesByReleaseNo(res.data.tbBillList); |
| | | |
| | | // 对数据进行排序处理 |
| | | const sortedList = this.sortInspectionList(uniqueList); |
| | | |
| | | if (this.pageIndex === 1) { |
| | | // 如果是第一页,直接覆盖原数据 |
| | | this.inspectionList = uniqueList; |
| | | this.inspectionList = sortedList; |
| | | //添加Tab信息,判断是已检还是未检数据 |
| | | this.inspectionList.forEach((item, index) => { |
| | | this.$set(item, 'activeTab', this.activeTab); |
| | |
| | | }); |
| | | } else { |
| | | |
| | | if (uniqueList.length > 0) { |
| | | if (sortedList.length > 0) { |
| | | // 如果是下一页,追加新数据 |
| | | this.inspectionList = [...this.inspectionList, ...uniqueList]; |
| | | this.inspectionList = [...this.inspectionList, ...sortedList]; |
| | | //添加Tab信息,判断是已检还是未检数据 |
| | | this.inspectionList.forEach((item, index) => { |
| | | this.$set(item, 'activeTab', this.activeTab); |
| | |
| | | // 如果item.fcode为null或undefined,说明该物料未在V_LLJ_USER视图中 |
| | | // 或者该物料没有维护检验员 |
| | | return !item.fcode || item.fcode === null || item.fcode === ''; |
| | | }, |
| | | |
| | | // 对检验单列表进行排序 |
| | | sortInspectionList(list) { |
| | | return list.sort((a, b) => { |
| | | // 第一优先级:未提交校验的紧急放行 |
| | | const aIsEmergencyPending = a.lotNo1 === '紧急放行,请勿验退!' && this.activeTab === 0; |
| | | const bIsEmergencyPending = b.lotNo1 === '紧急放行,请勿验退!' && this.activeTab === 0; |
| | | |
| | | if (aIsEmergencyPending && !bIsEmergencyPending) return -1; |
| | | if (!aIsEmergencyPending && bIsEmergencyPending) return 1; |
| | | |
| | | // 第二优先级:未维护检验项目(非紧急放行) |
| | | const aIsUnmaintained = this.isUnmaintainedAndNotEmergency(a); |
| | | const bIsUnmaintained = this.isUnmaintainedAndNotEmergency(b); |
| | | |
| | | if (aIsUnmaintained && !bIsUnmaintained) return -1; |
| | | if (!aIsUnmaintained && bIsUnmaintained) return 1; |
| | | |
| | | // 第三优先级:创建时间(未提交的按创建时间升序,已提交的按提交时间降序) |
| | | if (this.activeTab === 0) { |
| | | // 未检验:按创建时间升序(越早越靠前) |
| | | const aCreateTime = new Date(a.createDate || 0); |
| | | const bCreateTime = new Date(b.createDate || 0); |
| | | return aCreateTime - bCreateTime; |
| | | } else { |
| | | // 已检验:按提交时间降序(越晚越靠前) |
| | | const aIqcTime = new Date(a.iqcDate || 0); |
| | | const bIqcTime = new Date(b.iqcDate || 0); |
| | | return bIqcTime - aIqcTime; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | /* 新增搜索框样式 */ |
| | | .search-container { |
| | | display: flex; |
| | | flex: 1; |
| | | width: 300px; /* 固定宽度 */ |
| | | margin: 0 10px; |
| | | height: 36px; |
| | | /* 与其他控件高度一致 */ |
| | |
| | | border-radius: 4px 0 0 4px; |
| | | font-size: 14px; |
| | | background-color: white; |
| | | min-width: 200px; /* 最小宽度 */ |
| | | max-width: 250px; /* 最大宽度 */ |
| | | } |
| | | |
| | | .search-button { |