品质异常审核
This commit is contained in:
parent
dabb6a5d7e
commit
48a3315fe1
@ -122,7 +122,15 @@ public class UnqualifiedNotificationController {
|
||||
unqualifiedNotificationService.operate(operateReqVO);
|
||||
return success(operateReqVO.getId());
|
||||
}
|
||||
|
||||
@PostMapping("/operateWx")
|
||||
@Operation(summary = "操作更新品质异常通知单")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:update')")
|
||||
@OperateLog(enable = false)
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public CommonResult<Long> operateWx(@Valid @RequestBody UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||
unqualifiedNotificationService.operateWx(operateReqVO);
|
||||
return success(operateReqVO.getId());
|
||||
}
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除品质异常通知单审核")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@ -167,21 +175,28 @@ public class UnqualifiedNotificationController {
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<PageResult<UnqualifiedNotificationDO>> getUnqualifiedNotificationPageWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
int i = pageReqVO.getPageNo() * pageReqVO.getPageSize();
|
||||
if (pageReqVO.getPageNo() == 1) i = 0;
|
||||
pageReqVO.setPageNum(i);
|
||||
PageResult<UnqualifiedNotificationDO> unqualifiedNotificationPage = unqualifiedNotificationService.getUnqualifiedNotificationPageWx(pageReqVO);
|
||||
// List<UnqualifiedNotificationDO> list = unqualifiedNotificationPage.getList();
|
||||
// if(CollUtil.isNotEmpty(list)){
|
||||
// for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
// List<String> fileUrlList = new ArrayList<>();
|
||||
// List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),0);
|
||||
// if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
// for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
// fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
// }
|
||||
// unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
List<UnqualifiedNotificationDO> list = unqualifiedNotificationPage.getList();
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (UnqualifiedNotificationDO unqualifiedNotificationDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
Integer type = 0;
|
||||
if (unqualifiedNotificationDO.getTypeName().equals("过程检")){
|
||||
type = 2;
|
||||
}else if (unqualifiedNotificationDO.getTypeName().equals("终检")){
|
||||
type = 1;
|
||||
}
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(unqualifiedNotificationDO.getId(),type);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
}
|
||||
unqualifiedNotificationDO.setFileUrlList(fileUrlList);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return success(unqualifiedNotificationPage);
|
||||
}
|
||||
|
@ -57,6 +57,6 @@ public interface UnqualifiedNotificationService {
|
||||
PageResult<UnqualifiedNotificationDO> getUnqualifiedNotificationPageWx(UnqualifiedNotificationPageReqVO pageReqVO);
|
||||
|
||||
void operate(UnqualifiedNotificationSaveReqVO operateReqVO);
|
||||
|
||||
void operateWx(UnqualifiedNotificationSaveReqVO operateReqVO);
|
||||
PageResult<QualityStatistics> getUnqualifiedNotificationStatisticPage(UnqualifiedNotificationPageReqVO pageReqVO);
|
||||
}
|
||||
|
@ -254,7 +254,39 @@ try {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void operateWx(UnqualifiedNotificationSaveReqVO operateReqVO) {
|
||||
if(operateReqVO.getId() == null){
|
||||
createUnqualifiedNotification(operateReqVO);
|
||||
}else{
|
||||
if (operateReqVO.getType().equals("过程检")){
|
||||
//过程检
|
||||
BgMasterLineDO bgMasterLineDO = bgMasterLineMapper.selectById(operateReqVO.getId());
|
||||
bgMasterLineDO.setNotificationStatus(3);
|
||||
bgMasterLineDO.setAuditor(operateReqVO.getAuditor().intValue());
|
||||
bgMasterLineDO.setAudit_time(LocalDateTime.now());
|
||||
bgMasterLineDO.setAuditOpinion(operateReqVO.getAuditOpinion());
|
||||
bgMasterLineDO.setConStatus(2);
|
||||
bgMasterLineMapper.updateById(bgMasterLineDO);
|
||||
}else {
|
||||
//终检
|
||||
ZjBgMasterLineDO bgMasterLineDO = zjBgMasterLineMapper.selectById(operateReqVO.getId());
|
||||
bgMasterLineDO.setNotificationStatus(3);
|
||||
bgMasterLineDO.setAuditor(operateReqVO.getAuditor().intValue());
|
||||
bgMasterLineDO.setAudit_time(LocalDateTime.now());
|
||||
bgMasterLineDO.setAuditOpinion(operateReqVO.getAuditOpinion());
|
||||
bgMasterLineDO.setConStatus(2);
|
||||
zjBgMasterLineMapper.updateById(bgMasterLineDO);
|
||||
}
|
||||
// if(operateReqVO.getActive().equals("AUDIT")){
|
||||
// //质检预警
|
||||
// bdgzsomthingDO abc= new bdgzsomthingDO();
|
||||
// abc.setThingname("质检通知单");
|
||||
// abc.setAttr3(operateReqVO.getCode());//改成单独查询的
|
||||
// bdgzsomthingMapper.updateok(abc);
|
||||
// }
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public PageResult<QualityStatistics> getUnqualifiedNotificationStatisticPage(UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
Page<QualityStatistics> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize());
|
||||
|
@ -225,7 +225,7 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
if(CollUtil.isNotEmpty(list)){
|
||||
for (ZjBgMasterLineDO bgMasterLineDO : list) {
|
||||
List<String> fileUrlList = new ArrayList<>();
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(bgMasterLineDO.getId(),1);
|
||||
List<UnqualifiedNotificationFileDO> unqualifiedNotificationFileDOS = unqualifiedNotificationFileService.queryUnqualifiedNotificationFileBySuperId(bgMasterLineDO.getId(),2);
|
||||
if(CollUtil.isNotEmpty(unqualifiedNotificationFileDOS)){
|
||||
for (UnqualifiedNotificationFileDO unqualifiedNotificationFileDO : unqualifiedNotificationFileDOS) {
|
||||
fileUrlList.add(unqualifiedNotificationFileDO.getFileUrl());
|
||||
|
@ -121,7 +121,7 @@
|
||||
LEFT JOIN base_procedure pr1 ON pr1.id = g.procedure_id
|
||||
left join system_users u on u.id = t.bg_user left join system_users u2 on u2.id = t.auditor
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2 and t.is_qua = 1
|
||||
AND t.notification_status = #{queryType}
|
||||
|
||||
UNION ALL
|
||||
@ -135,7 +135,7 @@
|
||||
FROM quality_zj_bg_master_line zj
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id
|
||||
left join system_users u1 on u1.id = zj.bg_user left join system_users u3 on u3.id = zj.auditor
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2 and zj.is_qua = 1
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
</select>
|
||||
@ -157,7 +157,7 @@
|
||||
LEFT JOIN quality_pg_master_line g ON t.zj_mx_id = g.id
|
||||
LEFT JOIN base_procedure pr1 ON pr1.id = g.procedure_id
|
||||
left join system_users u on u.id = t.bg_user left join system_users u2 on u2.id = t.auditor
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2 and t.is_qua = 1
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2
|
||||
|
||||
UNION ALL
|
||||
@ -169,7 +169,7 @@
|
||||
zj.audit_time as auditTime,zj.is_repre as isRepre,zj.is_qua as isQua,zj.notification_status as notificationStatus,
|
||||
zj.remark as remark ,'' as materialName, '' as blueprintNo, '' as procedureName
|
||||
FROM quality_zj_bg_master_line zj
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id and zj.is_qua = 1
|
||||
left join system_users u1 on u1.id = zj.bg_user left join system_users u3 on u3.id = zj.auditor
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2
|
||||
) gh
|
||||
@ -189,12 +189,13 @@
|
||||
g.project_name as projectName ,u2.nickname as auditorName,t.audit_opinion as auditOpinion,
|
||||
t.audit_time as auditTime,t.is_repre as isRepre,t.is_qua as isQua,t.notification_status as notificationStatus,
|
||||
t.remark as remark, g.material_name as materialName,g.blueprint_no as blueprintNo, pr1.name as procedureName
|
||||
|
||||
FROM quality_bg_master_line t
|
||||
LEFT JOIN quality_pg_master_line g ON t.zj_mx_id = g.id
|
||||
LEFT JOIN base_procedure pr1 ON pr1.id = g.procedure_id
|
||||
left join system_users u on u.id = t.bg_user left join system_users u2 on u2.id = t.auditor
|
||||
WHERE t.deleted = 0 AND t.tenant_id = 2 AND g.deleted = 0 AND g.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2
|
||||
AND pr1.deleted = 0 AND pr1.tenant_id = 2 and t.is_qua = 1
|
||||
AND t.notification_status = #{queryType}
|
||||
|
||||
UNION ALL
|
||||
@ -208,7 +209,7 @@
|
||||
FROM quality_zj_bg_master_line zj
|
||||
LEFT JOIN quality_zj_pg_master_line g1 ON zj.zj_mx_id = g1.id
|
||||
left join system_users u1 on u1.id = zj.bg_user left join system_users u3 on u3.id = zj.auditor
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2
|
||||
WHERE zj.deleted = 0 AND zj.tenant_id = 2 AND g1.deleted = 0 AND g1.tenant_id = 2 and zj.is_qua = 1
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
ORDER BY gh.createTime DESC LIMIT #{offset}, #{limit}
|
||||
|
@ -102,12 +102,6 @@
|
||||
"navigationBarTitleText": "过程检报工"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/pgMaster/components/showpicture",
|
||||
"style": {
|
||||
"navigationBarTitleText": "过程检图片"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/pgMaster/pgMaster-detail",
|
||||
"style": {
|
||||
|
@ -1,118 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <image v-for="(item, index) in src" :key="index" :src="item" @click="preview(item)" mode="aspectFill" @error="imageError"></image> -->
|
||||
<htz-image-upload v-model="src" :max="9" :remove="false" :add="false"></htz-image-upload>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs,nextTick,onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
||||
const title = ref('图片预览');
|
||||
const src = ref([]);
|
||||
const route = useRoute();
|
||||
const picture = ref('');
|
||||
const previewImage = ref(null);
|
||||
|
||||
const imageError = (event) => {
|
||||
console.error('Image load error:', event.detail.errMsg);
|
||||
};
|
||||
const preview = (url) => {
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$nextTick(()=>{
|
||||
previewImage.value.open(url);
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
previewImage.value.open(url);
|
||||
// #endif
|
||||
};
|
||||
|
||||
const onLongpress = e =>{
|
||||
console.log('当前长按的图片是' + e);
|
||||
uni.showActionSheet({
|
||||
itemList: ['转发给朋友', '保存到手机'],
|
||||
success: function (res) {
|
||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onLoad( (options) => {
|
||||
picture.value = options.picture;
|
||||
console.log(picture.value)
|
||||
if (picture.value) {
|
||||
try {
|
||||
var fileUrlList = decodeURIComponent(picture.value);
|
||||
src.value = JSON.parse(fileUrlList);
|
||||
console.log(src.value)
|
||||
} catch (error) {
|
||||
console.error('Error parsing picture data:', error);
|
||||
}
|
||||
}
|
||||
})
|
||||
// const previewImage = (index) => {
|
||||
// const urls = src.value.map(item => item.url);
|
||||
// uni.previewImage({
|
||||
// current: index,
|
||||
// urls: urls,
|
||||
// longPressActions: {
|
||||
// itemList: ['保存图片'],
|
||||
// success: (data) => {
|
||||
// saveImage(urls[data.index]);
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.error(err);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
const saveImage = (url) => {
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存成功',
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* ... other styles ... */
|
||||
.thumbnail-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* Other styles */
|
||||
}
|
||||
.thumbnail-wrapper {
|
||||
margin: 10px;
|
||||
/* Other styles */
|
||||
}
|
||||
.clickable-image {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -412,7 +412,7 @@
|
||||
id: detailId.value,
|
||||
Authorization: token,
|
||||
'Tenant-Id': 2,
|
||||
'type':2,
|
||||
'type':1,
|
||||
},
|
||||
success: async (uploadFileRes) => {
|
||||
uni.hideLoading();
|
||||
@ -498,7 +498,7 @@
|
||||
<view class="finish" v-if="isShowStart && historyList.length &&detailInfo.pgType != 1" @click="handleComplate">
|
||||
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
|
||||
mode="scaleToFill" />
|
||||
生产完成
|
||||
质检完成
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -529,10 +529,10 @@
|
||||
<view class="val high-color">{{ item.amount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-row">
|
||||
<view class="product-row" v-if="item.workTime">
|
||||
<view class="row-item">
|
||||
<view class="label">是否复检:</view>
|
||||
<view class="val high-color">{{ item.isRepre == 0 ? '是':'否' }}</view>
|
||||
<view class="val high-color">{{ item.isRepre == 1 ? '是':'否' }}</view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">是否合格:</view>
|
||||
|
@ -281,7 +281,7 @@
|
||||
@click="handleComplate">
|
||||
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
|
||||
mode="scaleToFill" />
|
||||
生产完成
|
||||
质检结束
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -123,10 +123,13 @@ const handleDetail = (item) => {
|
||||
<view class="cont">
|
||||
<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="item" @click="handleDetail(item)" v-for="item in dataList" :key="item.id" >
|
||||
<view class="hd">
|
||||
<view class="num">检验单据:</view>
|
||||
<view class="statusLabel">(单号:{{ item.code }})</view>
|
||||
<view class="statusLabelzf" @click="handleDetail(item)" >
|
||||
{{ statusText }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="md">
|
||||
|
||||
@ -183,7 +186,7 @@ const handleDetail = (item) => {
|
||||
<text class="blue">{{ item.remark }}</text>
|
||||
</view> -->
|
||||
|
||||
<view class="product-row">
|
||||
<view class="product-row" v-if="item.auditorName">
|
||||
<view class="row-item">
|
||||
<view class="label">审核人:<text class="high-color">{{ item.auditorName }}</text></view>
|
||||
</view>
|
||||
@ -194,7 +197,6 @@ const handleDetail = (item) => {
|
||||
</view>
|
||||
<image v-if="item.notificationStatus == 3" src="/static/images/unqualifiedNotification-agree.png"
|
||||
class="icon-status" mode="scaleToFit" />
|
||||
<view class="statusText" @click="handleDetail(item)">{{ statusText }}</view>
|
||||
</view>
|
||||
<!-- 底部提示文字 -->
|
||||
<view class="loading-text" :style="{ paddingBottom: safeAreaInsets?.bottom + 'px' }">
|
||||
@ -229,6 +231,20 @@ const handleDetail = (item) => {
|
||||
font-size: 28rpx;
|
||||
color: #737D88;
|
||||
}
|
||||
.statusLabelzf {
|
||||
font-size: 24rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
background: linear-gradient(149deg, #2DACE6 4%, #356899 98%);
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.md {
|
||||
|
@ -3,7 +3,7 @@
|
||||
import { formatDate } from '@/utils/index'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { getNotificationDetailAPI } from '@/services/unqualifiedNotification'
|
||||
import { getNotificationDetailAPI,operateWx } from '@/services/unqualifiedNotification'
|
||||
import { serviceDomain } from '@/services/constants'
|
||||
const popup = ref<UniHelper.UniPopupInstance>()
|
||||
const userStore = useLoginStore()
|
||||
@ -147,8 +147,17 @@
|
||||
// 提交报工
|
||||
const submitForm = async (active) => {
|
||||
try {
|
||||
|
||||
|
||||
const params = {
|
||||
id: detailInfo.value?.id,
|
||||
type: typeName.value,
|
||||
auditOpinion: active,
|
||||
auditor: userId,
|
||||
projectId: 0,
|
||||
projectSubId:0,
|
||||
status: 1,
|
||||
notificationStatus:3
|
||||
}
|
||||
await operateWx(params);
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
@ -161,11 +170,11 @@
|
||||
// uni.redirectTo({
|
||||
// url,
|
||||
// })
|
||||
// const pages = getCurrentPages(); // 获取当前页面栈
|
||||
// await initPage();
|
||||
// const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
// const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
// uni.reLaunch({ url }); // 重新加载当前页面
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
await initPage();
|
||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
uni.reLaunch({ url }); // 重新加载当前页面
|
||||
|
||||
}
|
||||
|
||||
@ -190,8 +199,8 @@
|
||||
<view class="product-item">检验单据:{{detailInfo.code}}</view>
|
||||
<image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill">
|
||||
</image>
|
||||
<view :class="[detailInfo.notificationStatus == 2 ? 'had' : 'unhad', 'product-status']">{{
|
||||
detailInfo.notificationStatus == 1 ? '未审核' : '已审核' }}</view>
|
||||
<view :class="[detailInfo.notificationStatus == 3 ? 'had' : 'unhad', 'product-status']">{{
|
||||
detailInfo.notificationStatus == 2 ? '未审核' : '已审核' }}</view>
|
||||
<view class="product-item">项目:{{detailInfo.projectName}}</view>
|
||||
|
||||
<view class="product-item">子项目:{{ detailInfo.projectSubCode || '' }}
|
||||
@ -250,10 +259,10 @@
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="action" v-if="detailInfo.notificationStatus !== 2">
|
||||
<view class="action-item danger" v-if="detailInfo.notificationStatus !== 2" @click="submitForm(3)">报废</view>
|
||||
<view class="action-item start" v-if="detailInfo.notificationStatus !== 2" @click="submitForm(1)">返修</view>
|
||||
<view class="action-item stop" v-if="detailInfo.notificationStatus !== 2" @click="submitForm(2)">让步接收</view>
|
||||
<view class="action" v-if="detailInfo.notificationStatus !== 3">
|
||||
<view class="action-item danger" v-if="detailInfo.notificationStatus !== 3" @click="submitForm(3)">报废</view>
|
||||
<view class="action-item start" v-if="detailInfo.notificationStatus !== 3" @click="submitForm(1)">返修</view>
|
||||
<view class="action-item stop" v-if="detailInfo.notificationStatus !== 3" @click="submitForm(2)">让步接收</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
@ -265,7 +274,20 @@
|
||||
.data-detail {
|
||||
border-radius: 10rpx;
|
||||
padding-bottom: 200rpx;
|
||||
.statusLabelzf {
|
||||
font-size: 24rpx;
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 15rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
font-size: 24rpx;
|
||||
background: linear-gradient(149deg, #ffff00 4%, #cfcf00 98%);
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
.module {
|
||||
background: linear-gradient(178deg, #356899 7%, #356899 57%, #F4F6F9 94%);
|
||||
padding: 20rpx;
|
||||
|
@ -1,118 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<!-- <image v-for="(item, index) in src" :key="index" :src="item" @click="preview(item)" mode="aspectFill" @error="imageError"></image> -->
|
||||
<htz-image-upload v-model="src" :max="9" :remove="false" :add="false"></htz-image-upload>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { reactive, ref, toRefs,nextTick,onMounted } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import htzImageUpload from '@/components/htz-image-upload/htz-image-upload.vue'
|
||||
const title = ref('图片预览');
|
||||
const src = ref([]);
|
||||
const route = useRoute();
|
||||
const picture = ref('');
|
||||
const previewImage = ref(null);
|
||||
|
||||
const imageError = (event) => {
|
||||
console.error('Image load error:', event.detail.errMsg);
|
||||
};
|
||||
const preview = (url) => {
|
||||
|
||||
// #ifdef MP-WEIXIN
|
||||
this.$nextTick(()=>{
|
||||
previewImage.value.open(url);
|
||||
})
|
||||
// #endif
|
||||
|
||||
// #ifndef MP-WEIXIN
|
||||
previewImage.value.open(url);
|
||||
// #endif
|
||||
};
|
||||
|
||||
const onLongpress = e =>{
|
||||
console.log('当前长按的图片是' + e);
|
||||
uni.showActionSheet({
|
||||
itemList: ['转发给朋友', '保存到手机'],
|
||||
success: function (res) {
|
||||
console.log('选中了第' + (res.tapIndex + 1) + '个按钮');
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log(res.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
onLoad( (options) => {
|
||||
picture.value = options.picture;
|
||||
console.log(picture.value)
|
||||
if (picture.value) {
|
||||
try {
|
||||
var fileUrlList = decodeURIComponent(picture.value);
|
||||
src.value = JSON.parse(fileUrlList);
|
||||
console.log(src.value)
|
||||
} catch (error) {
|
||||
console.error('Error parsing picture data:', error);
|
||||
}
|
||||
}
|
||||
})
|
||||
// const previewImage = (index) => {
|
||||
// const urls = src.value.map(item => item.url);
|
||||
// uni.previewImage({
|
||||
// current: index,
|
||||
// urls: urls,
|
||||
// longPressActions: {
|
||||
// itemList: ['保存图片'],
|
||||
// success: (data) => {
|
||||
// saveImage(urls[data.index]);
|
||||
// },
|
||||
// fail: (err) => {
|
||||
// console.error(err);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// };
|
||||
|
||||
const saveImage = (url) => {
|
||||
uni.downloadFile({
|
||||
url: url,
|
||||
success: (res) => {
|
||||
if (res.statusCode === 200) {
|
||||
uni.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存成功',
|
||||
icon: 'success'
|
||||
});
|
||||
},
|
||||
fail: () => {
|
||||
uni.showToast({
|
||||
title: '图片保存失败',
|
||||
icon: 'none'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* ... other styles ... */
|
||||
.thumbnail-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* Other styles */
|
||||
}
|
||||
.thumbnail-wrapper {
|
||||
margin: 10px;
|
||||
/* Other styles */
|
||||
}
|
||||
.clickable-image {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -474,7 +474,7 @@
|
||||
@click="handleComplate">
|
||||
<image class="complate-img" src="/static/images/productionReport-detail-complate.png"
|
||||
mode="scaleToFill" />
|
||||
生产完成
|
||||
质检结束
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -24,7 +24,13 @@ export const getNotificationDetailAPI = (data: Object) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export const operateWx = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
url: '/heli/unqualified-notification/operateWx',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 获取零件分页
|
||||
export const getBomPageAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 383 KiB |
Loading…
Reference in New Issue
Block a user