siontion 5 months ago
commit 6fced02321

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

@ -30,7 +30,7 @@ const getData = async () => {
const data = await getListAssembleReportApi(queryParams) const data = await getListAssembleReportApi(queryParams)
isLoading.value = false isLoading.value = false
data.list.forEach((e) => { 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) dataList.value.push(...data.list)

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

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

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

@ -2,6 +2,7 @@
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
}) })
// //
@ -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;
@ -224,26 +261,24 @@ defineExpose({ updateData })
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>

Loading…
Cancel
Save