siontion 5 months ago
commit 6fced02321

@ -397,7 +397,7 @@ const queryData = async (id?: number) => {
//
if (id) {
formLoading.value = true
try {
try {
formData.value = await UnqualifiedNotificationApi.getUnqualifiedNotification(id)

@ -67,7 +67,7 @@ const onScan = async () => {
assembleCode
}
const data = await getAssembleReportByCodeApi(params)
listReport.value.push(data)
listReport.value.unshift(data)
}
}
});
@ -100,7 +100,7 @@ const handleList = ()=> {
<view class="md listReport">
<view class="list-item" v-for="(item, index) in listReport" :key="item.dispatchId">
<view class="item-hd">
<view class="index">{{ index + 1 }}</view>
<view class="index">{{ listReport.length - index }}</view>
<view class="assembleCode">包装条形码{{ item.assembleCode}}</view>
<view class="del" @tap="onDel(index)"><uni-icons type="trash" size="26"></uni-icons></view>
</view>

@ -30,7 +30,7 @@ const getData = async () => {
const data = await getListAssembleReportApi(queryParams)
isLoading.value = false
data.list.forEach((e) => {
e.createTime = formatDate(e.createTime, 'YYYY-MM-DD')
e.createTime = formatDate(e.createTime, 'YYYY-MM-DD HH:mm')
})
//
dataList.value.push(...data.list)

@ -7,8 +7,8 @@ const loginStore = useLoginStore()
const formRef = ref<UniHelper.UniFormsInstance>()
//
const form = ref({
username: 'majoys000',
password: '123qwe',
username: '',
password: '',
// username: 'majoys000',
// password: '123qwe',
})

@ -222,7 +222,7 @@ page {
.foot {
position: absolute;
left: 50%;
bottom: 20rpx;
bottom: 17rpx;
width: 600rpx;
transform: translate(-50%, 0%);
text-align: center;

@ -98,6 +98,7 @@ const handleComplate = async () => {
if (isLoading.value) {
return
}
try{
isLoading.value = true
uni.showModal({
content: '此操作会将该任务的生产状态标记为已完成,后续无法再对该任务进行报工,是否确定继续?',
@ -117,6 +118,9 @@ const handleComplate = async () => {
}
}
})
}finally{
isLoading.value = false
}
}
//
@ -124,11 +128,12 @@ const handleOk = async (active) => {
if (isLoading.value) {
return
}
isLoading.value = true
const params = {
id: detailInfo.value?.id,
active: 'SUBMIT',
amount: amount.value,
amount:Math.round(amount.value) ,
workTime: workTime.value
}

@ -1,7 +1,8 @@
<script setup lang="ts">
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 { getFileAPI } from '@/services/approveOrder'
import { useLoginStore } from '@/stores/modules/login'
import { formatDate } from '@/utils/index'
import { update } from 'XrFrame/kanata/lib/frontend'
@ -9,10 +10,8 @@ const userStore = useLoginStore()
const userId = userStore.userInfo.userId
const dictInfo = userStore?.dictInfo || []
const notificationOpinionDictData = dictInfo.filter(e => e.dictType == 'biz_unqualified_notification_opinion') || []
const inspectionTypeDictData = dictInfo.filter(e => e.dictType == 'biz_inspection_type') || []
const notificationOpinionDictData = dictInfo.filter((e) => e.dictType == 'biz_unqualified_notification_opinion') || []
const inspectionTypeDictData = dictInfo.filter((e) => e.dictType == 'biz_inspection_type') || []
//
const isFinish = ref(false)
@ -44,13 +43,18 @@ const getListData = async () => {
//
const data = await getNotificationPageAPI(queryParams)
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) || {}
e.property = obj?.label
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
const obj3 = inspectionTypeDictData.find(q => q.value == e.type)
const obj3 = inspectionTypeDictData.find((q) => q.value == e.type)
e.type = obj3?.label
})
//
@ -73,7 +77,7 @@ const updateData = async () => {
}
onMounted(async () => {
const today = new Date() //
const timeVal = today.setMonth(today.getMonth()-3)//
const timeVal = today.setMonth(today.getMonth() - 3) //
if (props.orderState == '0') {
queryParams.minCreateTime = formatDate(timeVal)
delete queryParams.maxCreateTime
@ -85,6 +89,16 @@ onMounted(async () => {
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 () => {
//
@ -100,45 +114,59 @@ const onRefresherrefresh = async () => {
}
defineExpose({ updateData })
</script>
<template>
<view class="cont">
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered"
@refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<scroll-view enable-back-to-top scroll-y class="data-list" refresher-enabled :refresher-triggered="isTriggered" @refresherrefresh="onRefresherrefresh" @scrolltolower="getListData">
<view class="item" v-for="item in dataList" :key="item.id">
<view class="hd">
<view class="num">异常通知单</view>
<view class="statusLabel">单号{{ item.code }}</view>
</view>
<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="row-item">
<view class="label">质检员<text class="blue">{{ item.creatorName }}</text></view>
<view class="label"
>质检员<text class="blue">{{ item.creatorName }}</text></view
>
</view>
<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 class="product-item">生产订单号<text class="blue">{{ item.projectCode || '' }}</text></view>
<view class="product-item">产品信息<text class="blue">{{ item.projectSubName + ' ' +
item.spec }}</text></view>
<view class="product-item"
>生产订单号<text class="blue">{{ item.projectCode || '' }}</text></view
>
<view class="product-item"
>产品信息<text class="blue">{{ item.projectSubName + ' ' + item.spec }}</text></view
>
<view class="product-row">
<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 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 class="product-row">
<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 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>
@ -146,18 +174,27 @@ defineExpose({ updateData })
<view class="label">异常情况描述及原因分析</view>
<text class="blue">{{ item.remark }}</text>
</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="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 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>
<image v-if="item.notificationStatus == 3" src="/static/images/unqualifiedNotification-agree.png"
class="icon-status" mode="scaleToFit" />
<image v-if="item.notificationStatus == 3" src="/static/images/unqualifiedNotification-agree.png" class="icon-status" mode="scaleToFit" />
</view>
<!-- 底部提示文字 -->
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
@ -190,7 +227,7 @@ defineExpose({ updateData })
.statusLabel {
font-size: 28rpx;
color: #737D88;
color: #737d88;
}
}
@ -199,12 +236,12 @@ defineExpose({ updateData })
padding: 10rpx;
min-height: 100rpx;
font-size: 28rpx;
border-top: 2rpx solid #F2F2F2;
border-top: 2rpx solid #f2f2f2;
.product-item {
margin: 20rpx 0;
display: flex;
color: #737D88;
color: #737d88;
.label {
width: 390rpx;
}
@ -214,7 +251,7 @@ defineExpose({ updateData })
display: flex;
flex-direction: row;
justify-content: space-between;
color: #737D88;
color: #737d88;
.row-item {
flex: 1;
@ -222,28 +259,26 @@ defineExpose({ updateData })
flex-direction: row;
.label {
margin-bottom: 10rpx;
.high-color {
color: #1D2129;
color: #1d2129;
}
.auditOpinion {
color: #FF7D00;
color: #ff7d00;
}
}
.val {
color: #1D2129;
color: #1d2129;
.high-color {
color: #FF7D00;
color: #ff7d00;
}
}
}
}
}
.blue {
color: #409EFF;
color: #409eff;
}
.icon-status {
position: absolute;
@ -279,14 +314,14 @@ defineExpose({ updateData })
}
.secondary {
color: #3775F6;
border-color: #3775F6;
color: #3775f6;
border-color: #3775f6;
}
.primary {
color: #fff;
background-color: #3775F6;
border-color: #3775F6;
background-color: #3775f6;
border-color: #3775f6;
}
}
@ -297,4 +332,9 @@ defineExpose({ updateData })
padding: 20rpx 0;
}
}
.image {
width: 70rpx;
height: 70rpx;
margin-right:10rpx;
}
</style>

Loading…
Cancel
Save