|
|
@@ -19,26 +19,26 @@
|
|
|
<uni-tr>
|
|
|
<uni-td class="grid-text">{{item.gxno}}</uni-td>
|
|
|
</uni-tr>
|
|
|
- <uni-tr class="section-title" @click="enterItem(item.pdid, 0)">
|
|
|
+ <uni-tr class="section-title" @click="enterItem(item.pdid, 0, item)">
|
|
|
<uni-td class="grid-text">拍照点</uni-td>
|
|
|
<uni-td class="grid-text">
|
|
|
<text :class="{
|
|
|
'bg-green bg-text': item.photoStatus == '已完成',
|
|
|
'bg-yellow bg-text': item.photoCount > 0 && item.photoCount < item.photoTotal,
|
|
|
- 'bg-black bg-text': item.photoCount == 0,
|
|
|
+ 'bg-black bg-text': item.photoCount == 0 && item.photoTotal > 0,
|
|
|
}">
|
|
|
{{item.photoCount}} / {{item.photoTotal}}
|
|
|
</text>
|
|
|
</uni-td>
|
|
|
<uni-td class="grid-text">{{item.photoStatus}}</uni-td>
|
|
|
</uni-tr>
|
|
|
- <uni-tr class="section-title" @click="enterItem(item.pdid, 1)">
|
|
|
+ <uni-tr class="section-title" @click="enterItem(item.pdid, 1, item)">
|
|
|
<uni-td class="grid-text">检验记录</uni-td>
|
|
|
<uni-td class="grid-text">
|
|
|
<text :class="{
|
|
|
'bg-green bg-text': item.recordCount == item.recordTotal,
|
|
|
'bg-yellow bg-text': item.recordCount > 0 && item.recordCount < item.recordTotal,
|
|
|
- 'bg-black bg-text': item.recordCount == 0,
|
|
|
+ 'bg-black bg-text': item.recordCount == 0 && item.recordTotal > 0,
|
|
|
}">
|
|
|
{{item.recordCount}} / {{item.recordTotal}}
|
|
|
</text>
|
|
|
@@ -47,13 +47,13 @@
|
|
|
'ft-red':item.recordStatus == '不合格'
|
|
|
}">{{item.recordStatus}}</text></uni-td>
|
|
|
</uni-tr>
|
|
|
- <uni-tr class="section-title" @click="enterItem(item.pdid, 2)">
|
|
|
+ <uni-tr class="section-title" @click="enterItem(item.pdid, 2, item)">
|
|
|
<uni-td class="grid-text">关键工序记录</uni-td>
|
|
|
<uni-td class="grid-text">
|
|
|
<text :class="{
|
|
|
'bg-green bg-text': item.keyCount == item.keyTotal,
|
|
|
'bg-yellow bg-text': item.keyCount > 0 && item.keyCount < item.keyTotal,
|
|
|
- 'bg-black bg-text': item.keyCount == 0,
|
|
|
+ 'bg-black bg-text': item.keyCount == 0 && item.keyTotal > 0,
|
|
|
}">
|
|
|
{{item.keyCount}} / {{item.keyTotal}}
|
|
|
</text>
|
|
|
@@ -162,13 +162,34 @@
|
|
|
uni.navigateBack()
|
|
|
}
|
|
|
|
|
|
- const enterItem = (id : string, type : number) => {
|
|
|
+ const enterItem = (id : string, type : number, item : TaskDetail) => {
|
|
|
let url = ''
|
|
|
if (type == 0) {
|
|
|
+ if(item.photoTotal == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无数据',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
url = `/pages/work/download/PhotoRecord?pdid=${id}`
|
|
|
} else if (type == 1) {
|
|
|
+ if(item.recordTotal == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无数据',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
url = `/pages/work/report/InspectionList?pdid=${id}`
|
|
|
} else if (type == 2) {
|
|
|
+ if(item.keyTotal == 0) {
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无数据',
|
|
|
+ icon: 'error'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
url = `/pages/work/process/ProcessList?pdid=${id}`
|
|
|
}
|
|
|
uni.navigateTo({
|