|
|
@ -1,7 +1,8 @@
|
|
|
|
<script setup lang="ts">
|
|
|
|
<script setup lang="ts">
|
|
|
|
import { onMounted, computed, ref } from 'vue'
|
|
|
|
import { onMounted, computed, ref } from 'vue'
|
|
|
|
import { onShow, onLoad} from '@dcloudio/uni-app'
|
|
|
|
import { onShow, onLoad } from '@dcloudio/uni-app'
|
|
|
|
import { getNotificationPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
|
|
|
import { getNotificationPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
|
|
|
|
|
|
|
import { getFileAPI } from '@/services/approveOrder'
|
|
|
|
import { useLoginStore } from '@/stores/modules/login'
|
|
|
|
import { useLoginStore } from '@/stores/modules/login'
|
|
|
|
import { formatDate } from '@/utils/index'
|
|
|
|
import { formatDate } from '@/utils/index'
|
|
|
|
import { update } from 'XrFrame/kanata/lib/frontend'
|
|
|
|
import { update } from 'XrFrame/kanata/lib/frontend'
|
|
|
@ -9,10 +10,8 @@ const userStore = useLoginStore()
|
|
|
|
const userId = userStore.userInfo.userId
|
|
|
|
const userId = userStore.userInfo.userId
|
|
|
|
|
|
|
|
|
|
|
|
const dictInfo = userStore?.dictInfo || []
|
|
|
|
const dictInfo = userStore?.dictInfo || []
|
|
|
|
const notificationOpinionDictData = dictInfo.filter(e => e.dictType == 'biz_unqualified_notification_opinion') || []
|
|
|
|
const notificationOpinionDictData = dictInfo.filter((e) => e.dictType == 'biz_unqualified_notification_opinion') || []
|
|
|
|
const inspectionTypeDictData = dictInfo.filter(e => e.dictType == 'biz_inspection_type') || []
|
|
|
|
const inspectionTypeDictData = dictInfo.filter((e) => e.dictType == 'biz_inspection_type') || []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 是否分页结束
|
|
|
|
// 是否分页结束
|
|
|
|
const isFinish = ref(false)
|
|
|
|
const isFinish = ref(false)
|
|
|
@ -44,13 +43,18 @@ const getListData = async () => {
|
|
|
|
// 发送请求
|
|
|
|
// 发送请求
|
|
|
|
const data = await getNotificationPageAPI(queryParams)
|
|
|
|
const data = await getNotificationPageAPI(queryParams)
|
|
|
|
isLoading.value = false
|
|
|
|
isLoading.value = false
|
|
|
|
data.list.forEach((e) => {
|
|
|
|
data.list.forEach(async (e) => {
|
|
|
|
|
|
|
|
console.log(e,'eeeeeeeeeeeeeeeee');
|
|
|
|
|
|
|
|
//附件信息
|
|
|
|
|
|
|
|
// e.attachments = (await getFileAPI({ pageNo: 1, pageSize: 99, businessId: e.id, businessType: 'errorOrderPhoto' })).list
|
|
|
|
|
|
|
|
// console.log(e.attachments,'eeeeeeeeeeeeeeeee');
|
|
|
|
|
|
|
|
e.attachments= e.fileUrl.split(',')
|
|
|
|
const obj = userStore.dictInfo.find((q) => q.value == e.property) || {}
|
|
|
|
const obj = userStore.dictInfo.find((q) => q.value == e.property) || {}
|
|
|
|
e.property = obj?.label
|
|
|
|
e.property = obj?.label
|
|
|
|
e.createTime = formatDate(e.createTime, 'YYYY-MM-DD')
|
|
|
|
e.createTime = formatDate(e.createTime, 'YYYY-MM-DD')
|
|
|
|
const obj2 = notificationOpinionDictData.find(q => q.value == e.auditOpinion)
|
|
|
|
const obj2 = notificationOpinionDictData.find((q) => q.value == e.auditOpinion)
|
|
|
|
e.auditOpinion = obj2?.label
|
|
|
|
e.auditOpinion = obj2?.label
|
|
|
|
const obj3 = inspectionTypeDictData.find(q => q.value == e.type)
|
|
|
|
const obj3 = inspectionTypeDictData.find((q) => q.value == e.type)
|
|
|
|
e.type = obj3?.label
|
|
|
|
e.type = obj3?.label
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// 数组追加
|
|
|
|
// 数组追加
|
|
|
@ -73,7 +77,7 @@ const updateData = async () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onMounted(async () => {
|
|
|
|
onMounted(async () => {
|
|
|
|
const today = new Date() //当天
|
|
|
|
const today = new Date() //当天
|
|
|
|
const timeVal = today.setMonth(today.getMonth()-3)//三个月前,时间戳
|
|
|
|
const timeVal = today.setMonth(today.getMonth() - 3) //三个月前,时间戳
|
|
|
|
if (props.orderState == '0') {
|
|
|
|
if (props.orderState == '0') {
|
|
|
|
queryParams.minCreateTime = formatDate(timeVal)
|
|
|
|
queryParams.minCreateTime = formatDate(timeVal)
|
|
|
|
delete queryParams.maxCreateTime
|
|
|
|
delete queryParams.maxCreateTime
|
|
|
@ -85,6 +89,16 @@ onMounted(async () => {
|
|
|
|
await getListData()
|
|
|
|
await getListData()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const previewImage = (url: any,index:any) => {
|
|
|
|
|
|
|
|
console.log(url,index,'url图片预览功能')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 使用 uni-api 的图片预览功能
|
|
|
|
|
|
|
|
uni.previewImage({
|
|
|
|
|
|
|
|
current: url[index], // 当前显示图片的http链接
|
|
|
|
|
|
|
|
urls: url // 需要预览的图片http链接列表
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 自定义下拉刷新被触发
|
|
|
|
// 自定义下拉刷新被触发
|
|
|
|
const onRefresherrefresh = async () => {
|
|
|
|
const onRefresherrefresh = async () => {
|
|
|
|
// 开始动画
|
|
|
|
// 开始动画
|
|
|
@ -100,45 +114,59 @@ const onRefresherrefresh = async () => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({ updateData })
|
|
|
|
defineExpose({ updateData })
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<view class="cont">
|
|
|
|
<view class="cont">
|
|
|
|
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
|
|
|
|
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered" @refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
|
|
|
|
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
|
|
|
|
|
|
|
|
<view class="item" v-for="item in dataList" :key="item.id">
|
|
|
|
<view class="item" v-for="item in dataList" :key="item.id">
|
|
|
|
<view class="hd">
|
|
|
|
<view class="hd">
|
|
|
|
<view class="num">异常通知单:</view>
|
|
|
|
<view class="num">异常通知单:</view>
|
|
|
|
<view class="statusLabel">(单号:{{ item.code }})</view>
|
|
|
|
<view class="statusLabel">(单号:{{ item.code }})</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="md">
|
|
|
|
<view class="md">
|
|
|
|
<view class="product-item">通知日期:<text class="">{{ item.createTime }}</text></view>
|
|
|
|
<view class="product-item"
|
|
|
|
|
|
|
|
>通知日期:<text class="">{{ item.createTime }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">质检员:<text class="blue">{{ item.creatorName }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>质检员:<text class="blue">{{ item.creatorName }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">类型:<text class="blue">{{ item.type }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>类型:<text class="blue">{{ item.type }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="product-item">生产订单号:<text class="blue">{{ item.projectCode || '' }}</text></view>
|
|
|
|
<view class="product-item"
|
|
|
|
<view class="product-item">产品信息:<text class="blue">{{ item.projectSubName + ' ' +
|
|
|
|
>生产订单号:<text class="blue">{{ item.projectCode || '' }}</text></view
|
|
|
|
item.spec }}</text></view>
|
|
|
|
>
|
|
|
|
|
|
|
|
<view class="product-item"
|
|
|
|
|
|
|
|
>产品信息:<text class="blue">{{ item.projectSubName + ' ' + item.spec }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">生产车间:<text class="blue">{{ item.workshopName }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>生产车间:<text class="blue">{{ item.workshopName }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">责任工序:<text class="blue">{{ item.procedureName }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>责任工序:<text class="blue">{{ item.procedureName }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">异常数量:<text class="blue">{{ item.amount }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>异常数量:<text class="blue">{{ item.amount }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">责任人:<text class="blue">{{ item.ownerName }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>责任人:<text class="blue">{{ item.ownerName }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
@ -146,18 +174,27 @@ defineExpose({ updateData })
|
|
|
|
<view class="label">异常情况描述及原因分析:</view>
|
|
|
|
<view class="label">异常情况描述及原因分析:</view>
|
|
|
|
<text class="blue">{{ item.remark }}</text>
|
|
|
|
<text class="blue">{{ item.remark }}</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="product-item">
|
|
|
|
|
|
|
|
<view>照片:</view>
|
|
|
|
|
|
|
|
<view v-for="(attachment,index) in item.attachments" :key="attachment.id">
|
|
|
|
|
|
|
|
<image :src="attachment" mode="aspectFill" class="image" @click="previewImage(item.attachments,index)"></image>
|
|
|
|
|
|
|
|
<!-- <uni-file-picker limit="5" v-model="attachment.url" fileMediatype="image" mode="grid" :auto-upload="false" /> -->
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="product-row">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">审核人:<text class="high-color">{{ item.auditorName }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>审核人:<text class="high-color">{{ item.auditorName }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="row-item">
|
|
|
|
<view class="label">审核意见:<text class="auditOpinion">{{ item.auditOpinion }}</text></view>
|
|
|
|
<view class="label"
|
|
|
|
|
|
|
|
>审核意见:<text class="auditOpinion">{{ item.auditOpinion }}</text></view
|
|
|
|
|
|
|
|
>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<image v-if="item.notificationStatus == 3" src="/static/images/unqualifiedNotification-agree.png"
|
|
|
|
<image v-if="item.notificationStatus == 3" src="/static/images/unqualifiedNotification-agree.png" class="icon-status" mode="scaleToFit" />
|
|
|
|
class="icon-status" mode="scaleToFit" />
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<!-- 底部提示文字 -->
|
|
|
|
<!-- 底部提示文字 -->
|
|
|
|
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
|
|
|
|
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
|
|
|
@ -190,7 +227,7 @@ defineExpose({ updateData })
|
|
|
|
|
|
|
|
|
|
|
|
.statusLabel {
|
|
|
|
.statusLabel {
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #737D88;
|
|
|
|
color: #737d88;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -199,12 +236,12 @@ defineExpose({ updateData })
|
|
|
|
padding: 10rpx;
|
|
|
|
padding: 10rpx;
|
|
|
|
min-height: 100rpx;
|
|
|
|
min-height: 100rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
font-size: 28rpx;
|
|
|
|
border-top: 2rpx solid #F2F2F2;
|
|
|
|
border-top: 2rpx solid #f2f2f2;
|
|
|
|
|
|
|
|
|
|
|
|
.product-item {
|
|
|
|
.product-item {
|
|
|
|
margin: 20rpx 0;
|
|
|
|
margin: 20rpx 0;
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
color: #737D88;
|
|
|
|
color: #737d88;
|
|
|
|
.label {
|
|
|
|
.label {
|
|
|
|
width: 390rpx;
|
|
|
|
width: 390rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -214,7 +251,7 @@ defineExpose({ updateData })
|
|
|
|
display: flex;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
flex-direction: row;
|
|
|
|
justify-content: space-between;
|
|
|
|
justify-content: space-between;
|
|
|
|
color: #737D88;
|
|
|
|
color: #737d88;
|
|
|
|
|
|
|
|
|
|
|
|
.row-item {
|
|
|
|
.row-item {
|
|
|
|
flex: 1;
|
|
|
|
flex: 1;
|
|
|
@ -222,28 +259,26 @@ defineExpose({ updateData })
|
|
|
|
flex-direction: row;
|
|
|
|
flex-direction: row;
|
|
|
|
.label {
|
|
|
|
.label {
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
margin-bottom: 10rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.high-color {
|
|
|
|
.high-color {
|
|
|
|
color: #1D2129;
|
|
|
|
color: #1d2129;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.auditOpinion {
|
|
|
|
.auditOpinion {
|
|
|
|
color: #FF7D00;
|
|
|
|
color: #ff7d00;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.val {
|
|
|
|
.val {
|
|
|
|
color: #1D2129;
|
|
|
|
color: #1d2129;
|
|
|
|
.high-color {
|
|
|
|
.high-color {
|
|
|
|
color: #FF7D00;
|
|
|
|
color: #ff7d00;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.blue {
|
|
|
|
.blue {
|
|
|
|
color: #409EFF;
|
|
|
|
color: #409eff;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.icon-status {
|
|
|
|
.icon-status {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
@ -279,14 +314,14 @@ defineExpose({ updateData })
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.secondary {
|
|
|
|
.secondary {
|
|
|
|
color: #3775F6;
|
|
|
|
color: #3775f6;
|
|
|
|
border-color: #3775F6;
|
|
|
|
border-color: #3775f6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.primary {
|
|
|
|
.primary {
|
|
|
|
color: #fff;
|
|
|
|
color: #fff;
|
|
|
|
background-color: #3775F6;
|
|
|
|
background-color: #3775f6;
|
|
|
|
border-color: #3775F6;
|
|
|
|
border-color: #3775f6;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -297,4 +332,9 @@ defineExpose({ updateData })
|
|
|
|
padding: 20rpx 0;
|
|
|
|
padding: 20rpx 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.image {
|
|
|
|
|
|
|
|
width: 70rpx;
|
|
|
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
|
|
|
margin-right:10rpx;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|