|
@@ -12,10 +12,11 @@
|
|
|
</uni-section>
|
|
|
</view>
|
|
|
<view style="display: flex; flex-direction: row; align-items: center; margin-top: 10rpx;">
|
|
|
- <uni-section title="检查状态:" type="square" class="uni-row sta" style="flex: 1;">
|
|
|
- <uni-data-select v-model="quer.status" :localdata="statusData" :clear="true" placeholder="请选择检查状态"
|
|
|
- @change="handleChangeStatus" style="background-color: #ffffff; flex: 1;width: 100%;"></uni-data-select>
|
|
|
- </uni-section>
|
|
|
+ <uni-section title="检查状态:" type="square" class="uni-row sta" style="flex: 1;">
|
|
|
+ <uni-data-select v-model="quer.status" :localdata="statusData" :clear="true" placeholder="请选择检查状态"
|
|
|
+ @change="handleChangeStatus"
|
|
|
+ style="background-color: #ffffff; flex: 1;width: 100%;"></uni-data-select>
|
|
|
+ </uni-section>
|
|
|
</view>
|
|
|
<view class="daywork-item uni-column" v-for="(item, index) in inspecionList" :key="index"
|
|
|
@click="handleSelection(item)">
|
|
@@ -23,7 +24,7 @@
|
|
|
<text>批次号:{{ item.lotCode }}</text>
|
|
|
<text style="margin-left: 16rpx;color: #55ff7f;">{{ item.inspectionType }}</text>
|
|
|
<text :style="selectType(item)">{{ selectText(item) }}</text>
|
|
|
- <text class="fa fa-trash" style="font-size: 16; color: white;"></text>
|
|
|
+ <text class="fa fa-trash" style="font-size: 16; color: white;"></text>
|
|
|
</view>
|
|
|
<view class="info">
|
|
|
<view class="info-row uni-row">
|
|
@@ -93,18 +94,17 @@
|
|
|
text: "不合格",
|
|
|
type: "color: #ff0c2c"
|
|
|
}]
|
|
|
- const statusData = ref([
|
|
|
- {
|
|
|
- value:0,
|
|
|
- text:"待确认"
|
|
|
+ const statusData = ref([{
|
|
|
+ value: 0,
|
|
|
+ text: "待确认"
|
|
|
},
|
|
|
{
|
|
|
- value:1,
|
|
|
- text:"合格"
|
|
|
+ value: 1,
|
|
|
+ text: "合格"
|
|
|
},
|
|
|
{
|
|
|
- value:2,
|
|
|
- text:"不合格"
|
|
|
+ value: 2,
|
|
|
+ text: "不合格"
|
|
|
},
|
|
|
])
|
|
|
|
|
@@ -129,29 +129,44 @@
|
|
|
// }
|
|
|
// });
|
|
|
})
|
|
|
- onReachBottom(()=>{
|
|
|
- console.log(status.value)
|
|
|
- if(status.value) {
|
|
|
+ onReachBottom(() => {
|
|
|
+ console.log(status.value)
|
|
|
+ if (status.value) {
|
|
|
pageNum.value += 1
|
|
|
quer.value.pageNum = pageNum.value
|
|
|
quer.value.pageSize = pageSize.value
|
|
|
- getProcessInspecionList(quer.value).then(res =>{
|
|
|
- const existingIds = new Set(inspecionList.value.map(item => item.id));
|
|
|
-
|
|
|
- // 过滤出那些不在 existingIds 中的项,即新数据
|
|
|
- const newRows = res.rows.filter(row => !existingIds.has(row.id));
|
|
|
-
|
|
|
- // 如果有新数据,将其添加到 listData
|
|
|
- if (newRows.length > 0) {
|
|
|
- inspecionList.value = inspecionList.value.concat(newRows);
|
|
|
- original.value = original.value.concat(newRows);
|
|
|
- } else {
|
|
|
- // 如果没有新数据,更新状态表示没有更多数据
|
|
|
- status.value = false;
|
|
|
- }
|
|
|
+ getProcessInspecionList(quer.value).then(res => {
|
|
|
+ const existingIds = new Set(inspecionList.value.map(item => item.id));
|
|
|
+
|
|
|
+ // 过滤出那些不在 existingIds 中的项,即新数据
|
|
|
+ var newRows = res.rows.filter(row => !existingIds.has(row.id));
|
|
|
+
|
|
|
+ // 如果有新数据,将其添加到 listData
|
|
|
+ if (newRows.length > 0) {
|
|
|
+ newRows.forEach(v => {
|
|
|
+ if (v.type === "deliveryInspection") {
|
|
|
+ v.inspectionType = "交检"
|
|
|
+ } else if (v.type === "firstArticleInspection") {
|
|
|
+ v.inspectionType = "首件检"
|
|
|
+ } else if (v.type === "patrolInspection") {
|
|
|
+ v.inspectionType = "巡检"
|
|
|
+ } else if (v.type === "outsourcedInspector") {
|
|
|
+ v.inspectionType = "外协检"
|
|
|
+ } else if (v.type === "factoryInspection") {
|
|
|
+ v.inspectionType = "出厂检"
|
|
|
+ } else {
|
|
|
+ v.inspectionType = "仪器室"
|
|
|
+ }
|
|
|
+ });
|
|
|
+ inspecionList.value = inspecionList.value.concat(newRows);
|
|
|
+ original.value = original.value.concat(newRows);
|
|
|
+ } else {
|
|
|
+ // 如果没有新数据,更新状态表示没有更多数据
|
|
|
+ status.value = false;
|
|
|
+ }
|
|
|
})
|
|
|
- }
|
|
|
- })
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
/***************************** 定义了一些方法 *****************************/
|
|
|
|
|
@@ -188,11 +203,13 @@
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
function handleSearch() {
|
|
|
pageNum.value = 1
|
|
|
status.value = true
|
|
|
getList()
|
|
|
}
|
|
|
+
|
|
|
function handleChangeStatus() {
|
|
|
pageNum.value = 1
|
|
|
status.value = true
|
|
@@ -259,6 +276,7 @@
|
|
|
.uni-section-content {
|
|
|
width: 70%;
|
|
|
}
|
|
|
+
|
|
|
.time-controls {
|
|
|
.title {
|
|
|
margin: 20% auto 40% auto;
|
|
@@ -362,6 +380,7 @@
|
|
|
.value {
|
|
|
flex: 1;
|
|
|
}
|
|
|
+
|
|
|
.start-batch-btn {
|
|
|
flex: 1;
|
|
|
height: 80rpx;
|
|
@@ -373,7 +392,11 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- uni-app, uni-page, uni-page-wrapper, uni-page-body {
|
|
|
- height: 100%;
|
|
|
+
|
|
|
+ uni-app,
|
|
|
+ uni-page,
|
|
|
+ uni-page-wrapper,
|
|
|
+ uni-page-body {
|
|
|
+ height: 100%;
|
|
|
}
|
|
|
</style>
|