品质异常审核
This commit is contained in:
parent
ae754e2a71
commit
dabb6a5d7e
@ -185,6 +185,14 @@ public class UnqualifiedNotificationController {
|
||||
|
||||
return success(unqualifiedNotificationPage);
|
||||
}
|
||||
|
||||
@GetMapping("/detailWx")
|
||||
@Operation(summary = "获得品质异常通知单审核分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:query')")
|
||||
public CommonResult<UnqualifiedNotificationDO> detailWx(@Valid UnqualifiedNotificationPageReqVO pageReqVO) {
|
||||
return success(unqualifiedNotificationService.getUnqualifiedNotificationWxById(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出品质异常通知单审核 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('heli:unqualified-notification:export')")
|
||||
|
@ -17,6 +17,8 @@ import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_Y
|
||||
@ToString(callSuper = true)
|
||||
public class UnqualifiedNotificationPageReqVO extends PageParam {
|
||||
|
||||
private Long Id;
|
||||
|
||||
@Schema(description = "编号,唯一")
|
||||
private String code;
|
||||
|
||||
|
@ -146,6 +146,10 @@ public class UnqualifiedNotificationDO extends BaseDO {
|
||||
private String statisticAmount;
|
||||
@TableField(exist = false)
|
||||
private List<String> fileUrlList;
|
||||
@TableField(exist = false)
|
||||
private Integer isRepre;
|
||||
@TableField(exist = false)
|
||||
private Integer isQua;
|
||||
public boolean canSave(){
|
||||
return UnqualifiedNotificationStatusEnum.SAVE.getCode() == this.notificationStatus.intValue();
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 品质异常通知单审核 Mapper
|
||||
@ -72,6 +73,8 @@ public interface UnqualifiedNotificationMapper extends BaseMapperX<UnqualifiedNo
|
||||
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
UnqualifiedNotificationDO selectWxById(Map map);
|
||||
Long selectCountPageWx( @Param("queryType") Integer queryType,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("limit") Integer limit);
|
||||
|
@ -131,8 +131,10 @@ public class BgMasterLineServiceImpl implements BgMasterLineService {
|
||||
bgMasterLineDOs.setIsQua(createReqVO.getIsQua()==null ?null :createReqVO.getIsQua());
|
||||
bgMasterLineDOs.setIsRepre(createReqVO.getIsRepre()==null ?null :createReqVO.getIsRepre());
|
||||
bgMasterLineDOs.setRemark(createReqVO.getRemark()!=null && !createReqVO.getRemark().trim().equals("")?createReqVO.getRemark() :null);
|
||||
if (createReqVO.getIsQua() != null && createReqVO.getIsQua() == 1){
|
||||
bgMasterLineDOs.setNotificationStatus(2);
|
||||
}
|
||||
|
||||
bgMasterLineDOs.setNotificationStatus(1);
|
||||
//报工数量
|
||||
bgMasterLineDOs.setAmount(createReqVO.getAmount());
|
||||
return bgMasterLineMapper.updateById(bgMasterLineDOs);
|
||||
|
@ -29,6 +29,9 @@ public interface UnqualifiedNotificationService {
|
||||
*/
|
||||
void updateUnqualifiedNotification(@Valid UnqualifiedNotificationSaveReqVO updateReqVO);
|
||||
|
||||
|
||||
UnqualifiedNotificationDO getUnqualifiedNotificationWxById(@Valid UnqualifiedNotificationPageReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除品质异常通知单审核
|
||||
*
|
||||
|
@ -33,10 +33,13 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.chanko.yunxi.mes.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
@ -194,6 +197,13 @@ try {
|
||||
// 删除
|
||||
unqualifiedNotificationMapper.deleteById(id);
|
||||
}
|
||||
public UnqualifiedNotificationDO getUnqualifiedNotificationWxById( UnqualifiedNotificationPageReqVO updateReqVO){
|
||||
Map map = new HashMap();
|
||||
map.put("id", updateReqVO.getId());
|
||||
map.put("queryType",updateReqVO.getQueryType());
|
||||
map.put("type",updateReqVO.getType());
|
||||
return unqualifiedNotificationMapper.selectWxById(map);
|
||||
}
|
||||
|
||||
private void validateUnqualifiedNotificationExists(Long id) {
|
||||
if (unqualifiedNotificationMapper.selectById(id) == null) {
|
||||
|
@ -110,7 +110,9 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
zjBgMasterLineDO1.setIsQua(createReqVO.getIsQua()==null ?null :createReqVO.getIsQua());
|
||||
zjBgMasterLineDO1.setIsRepre(createReqVO.getIsRepre()==null ?null :createReqVO.getIsRepre());
|
||||
zjBgMasterLineDO1.setRemark(createReqVO.getRemark()!=null && !createReqVO.getRemark().trim().equals("")?createReqVO.getRemark() :null);
|
||||
zjBgMasterLineDO1.setNotificationStatus(1);
|
||||
if (createReqVO.getIsQua() != null && createReqVO.getIsQua() == 1){
|
||||
zjBgMasterLineDO1.setNotificationStatus(2);
|
||||
}
|
||||
return zjBgMasterLineMapper.updateById(zjBgMasterLineDO1);
|
||||
}
|
||||
}else{
|
||||
|
@ -109,17 +109,17 @@
|
||||
order by t.createTime desc
|
||||
</select>
|
||||
<select id="selectCountPageWx" parameterType="java.lang.Integer" resultType="java.lang.Long">
|
||||
SELECT count(gh.*)
|
||||
FROM (
|
||||
SELECT count(*) FROM (
|
||||
SELECT t.id as id, g.pg_number as code, g.project_sub_name as projectSubName,
|
||||
t.amount as amount, g.amount as totalAmount, '过程检' as typeName,
|
||||
t.ent_time as createTime,u.nickname as creatorName,g.project_sub_number as projectSubCode,
|
||||
g.project_name as projectName ,g.material_name as materialName,
|
||||
g.blueprint_no as blueprintNo, pr1.name as procedureName
|
||||
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 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 t.notification_status = #{queryType}
|
||||
@ -129,30 +129,70 @@
|
||||
SELECT zj.id as id, g1.pg_number as code, g1.project_sub_name as projectSubName,
|
||||
zj.amount as amount, g1.amount as totalAmount, '终检' as typeName,
|
||||
zj.ent_time as createTime,u1.nickname as creatorName,g1.project_sub_number as projectSubCode,
|
||||
g1.project_name as projectName , '' as materialName, '' as blueprintNo, '' as procedureName
|
||||
g1.project_name as projectName , u3.nickname as auditorName,zj.audit_opinion as auditOpinion,
|
||||
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 system_users u1 on u1.id = zj.bg_user
|
||||
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
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
</select>
|
||||
<select id="selectWxById" parameterType="java.util.Map" resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO">
|
||||
SELECT gh.id as id, gh.code as code, gh.projectSubName as projectSubName,
|
||||
gh.amount as amount, gh.totalAmount as totalAmount, gh.typeName as typeName,
|
||||
gh.createTime as createTime,gh.creatorName as creatorName,gh.projectSubCode as projectSubCode,
|
||||
gh.projectName as projectName, gh.auditorName as auditorName,gh.auditOpinion as auditOpinion,
|
||||
gh.auditTime as auditTime,gh.isRepre,gh.isQua,gh.notificationStatus as notificationStatus,
|
||||
gh.remark as remark ,gh.materialName as materialName,gh.blueprintNo as blueprintNo, gh.procedureName as procedureName
|
||||
FROM (
|
||||
SELECT t.id as id, g.pg_number as code, g.project_sub_name as projectSubName,
|
||||
t.amount as amount, g.amount as totalAmount, '过程检' as typeName,
|
||||
t.ent_time as createTime,u.nickname as creatorName,g.project_sub_number as projectSubCode,
|
||||
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
|
||||
|
||||
UNION ALL
|
||||
|
||||
SELECT zj.id as id, g1.pg_number as code, g1.project_sub_name as projectSubName,
|
||||
zj.amount as amount, g1.amount as totalAmount, '终检' as typeName,
|
||||
zj.ent_time as createTime,u1.nickname as creatorName,g1.project_sub_number as projectSubCode,
|
||||
g1.project_name as projectName , u3.nickname as auditorName,zj.audit_opinion as auditOpinion,
|
||||
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 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
|
||||
where gh.typeName = #{type} and gh.id = #{id}
|
||||
</select>
|
||||
<select id="selectPageWx" parameterType="java.lang.Integer" resultType="com.chanko.yunxi.mes.module.heli.dal.dataobject.unqualifiednotification.UnqualifiedNotificationDO">
|
||||
SELECT gh.id as id, gh.code as code, gh.projectSubName as projectSubName,
|
||||
gh.amount as amount, gh.totalAmount as totalAmount, gh.typeName as typeName,
|
||||
gh.createTime as createTime,gh.creatorName as creatorName,gh.projectSubCode as projectSubCode,
|
||||
gh.projectName as projectName, gh.materialName as materialName,
|
||||
gh.blueprintNo as blueprintNo, gh.procedureName as procedureName
|
||||
gh.projectName as projectName, gh.auditorName as auditorName,gh.auditOpinion as auditOpinion,
|
||||
gh.auditTime as auditTime,gh.isRepre,gh.isQua,gh.notificationStatus as notificationStatus,
|
||||
gh.remark as remark ,gh.materialName as materialName,gh.blueprintNo as blueprintNo, gh.procedureName as procedureName
|
||||
FROM (
|
||||
SELECT t.id as id, g.pg_number as code, g.project_sub_name as projectSubName,
|
||||
t.amount as amount, g.amount as totalAmount, '过程检' as typeName,
|
||||
t.ent_time as createTime,u.nickname as creatorName,g.project_sub_number as projectSubCode,
|
||||
g.project_name as projectName ,g.material_name as materialName,
|
||||
g.blueprint_no as blueprintNo, pr1.name as procedureName
|
||||
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 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 t.notification_status = #{queryType}
|
||||
@ -162,10 +202,12 @@
|
||||
SELECT zj.id as id, g1.pg_number as code, g1.project_sub_name as projectSubName,
|
||||
zj.amount as amount, g1.amount as totalAmount, '终检' as typeName,
|
||||
zj.ent_time as createTime,u1.nickname as creatorName,g1.project_sub_number as projectSubCode,
|
||||
g1.project_name as projectName , '' as materialName, '' as blueprintNo, '' as procedureName
|
||||
g1.project_name as projectName , u3.nickname as auditorName,zj.audit_opinion as auditOpinion,
|
||||
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 system_users u1 on u1.id = zj.bg_user
|
||||
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
|
||||
AND zj.notification_status = #{queryType}
|
||||
) gh
|
||||
|
@ -39,7 +39,13 @@
|
||||
{
|
||||
"path": "pages/unqualifiedNotification/unqualifiedNotification",
|
||||
"style": {
|
||||
"navigationBarTitleText": "品质异常通知单"
|
||||
"navigationBarTitleText": "异常通知审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/unqualifiedNotification/unqualifiedNotification-detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "品质异常通知审核"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -8,7 +8,10 @@ import { update } from 'XrFrame/kanata/lib/frontend'
|
||||
|
||||
const userStore = useLoginStore()
|
||||
const userId = userStore.userInfo.userId
|
||||
|
||||
const statusText = computed(() => {
|
||||
const text = props.orderState == '0' ? '审核' : '查看'
|
||||
return text
|
||||
})
|
||||
const dictInfo = userStore?.dictInfo || []
|
||||
const notificationOpinionDictData = dictInfo.filter(e => e.dictType == 'heli_unqualified_notification_opinion') || []
|
||||
const inspectionTypeDictData = dictInfo.filter(e => e.dictType == 'heli_inspection_type') || []
|
||||
@ -30,7 +33,7 @@ const isLoading = ref(false)
|
||||
const queryParams: Required<any> = {
|
||||
pageNo: 1,
|
||||
pageSize: 5,
|
||||
queryType: parseFloat(props.orderState) +1 ,
|
||||
queryType: parseFloat(props.orderState) +2 ,
|
||||
// creator: userId,
|
||||
minCreateTime: '',
|
||||
maxCreateTime: ''
|
||||
@ -110,13 +113,17 @@ const showpicture= (pictureArray:[])=>{
|
||||
url: './components/showpicture?picture=' + encodeURIComponent(picture)
|
||||
});
|
||||
}
|
||||
|
||||
const handleDetail = (item) => {
|
||||
var type = item.typeName == '终检'? 2:1
|
||||
const url = `/pages/unqualifiedNotification/unqualifiedNotification-detail?id=${item.id}&type=${type}`
|
||||
uni.navigateTo({ url })
|
||||
}
|
||||
</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">
|
||||
<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="num">检验单据:</view>
|
||||
<view class="statusLabel">(单号:{{ item.code }})</view>
|
||||
@ -187,6 +194,7 @@ const showpicture= (pictureArray:[])=>{
|
||||
</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' }">
|
||||
@ -271,6 +279,18 @@ const showpicture= (pictureArray:[])=>{
|
||||
|
||||
}
|
||||
}
|
||||
.statusText {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 100rpx;
|
||||
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;
|
||||
}
|
||||
.blue {
|
||||
color: #409EFF;
|
||||
}
|
||||
|
@ -0,0 +1,585 @@
|
||||
<script setup lang="ts">
|
||||
import { toRaw, ref, computed } from 'vue'
|
||||
import { formatDate } from '@/utils/index'
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
import { getNotificationDetailAPI } from '@/services/unqualifiedNotification'
|
||||
import { serviceDomain } from '@/services/constants'
|
||||
const popup = ref<UniHelper.UniPopupInstance>()
|
||||
const userStore = useLoginStore()
|
||||
const dictInfo = userStore?.dictInfo || []
|
||||
const unitDictData = dictInfo.filter(e => e.dictType == 'heli_material_unit') || []
|
||||
const userId = userStore.userInfo.userId
|
||||
const isShowStart = ref(false)
|
||||
const isShowEnd = ref(false)
|
||||
// const isShowStart = computed(() => {
|
||||
// let flag = true
|
||||
// if (historyList.value.length) {
|
||||
// const obj = historyList.value[0]
|
||||
// if (!obj?.endTime) {
|
||||
// flag = false
|
||||
// }
|
||||
// }
|
||||
// // // 派工数量和总报工数量相等了就不展示开始生产
|
||||
// // if (detailInfo.value.amount == detailInfo.value.totalReportAmount) {
|
||||
// // flag = false
|
||||
// // }
|
||||
// return flag
|
||||
// })
|
||||
// const isShowEnd = computed(() => {
|
||||
// let flag = true
|
||||
// if (historyList.value.length) {
|
||||
// const obj = historyList.value[0]
|
||||
// if (obj?.endTime) {
|
||||
// flag = false
|
||||
// }
|
||||
// } else {
|
||||
// flag = false
|
||||
// }
|
||||
// return flag
|
||||
// })
|
||||
const productionTitle = ref('开始生产')
|
||||
const amount = ref('')
|
||||
const workTime = ref('')
|
||||
// 详情数据
|
||||
const detailInfo = ref({})
|
||||
let isLoading = ref(false)
|
||||
const historyList = ref([])
|
||||
const formObj = ref({})
|
||||
// 历史明细
|
||||
const getData = async () => {
|
||||
// 发送请求
|
||||
isLoading.value = true
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
integerpageSize: 5,
|
||||
bgUser: userId,
|
||||
zjMxId: detailInfo.value.id,
|
||||
}
|
||||
const data = await getTaskRepotPageAPI(params)
|
||||
data.list.forEach((e) => {
|
||||
e.startTimeStr = e.startTime && formatDate(e.startTime, 'YYYY-MM-DD HH:mm')
|
||||
e.endTimeStr = e.endTime && formatDate(e.endTime, 'YYYY-MM-DD HH:mm')
|
||||
e.bgTime = e.bgTime && formatDate(e.bgTime, 'YYYY-MM-DD HH:mm')
|
||||
e.entTime = e.entTime && formatDate(e.entTime, 'YYYY-MM-DD HH:mm')
|
||||
})
|
||||
if (data.list[0]) {
|
||||
formObj.value = data.list[0]
|
||||
const time = formObj.value.endTime - formObj.value.startTime //时间差秒
|
||||
const leave1 = time % (24 * 3600 * 1000) //计算天数后剩余的毫秒数
|
||||
workTime.value = Math.floor(leave1 / (3600 * 1000))
|
||||
}
|
||||
historyList.value = data.list
|
||||
isShowEnd.value = true;
|
||||
isShowStart.value = true
|
||||
if (historyList.value.length) {
|
||||
const obj = historyList.value[0]
|
||||
if (obj.amount != null && obj.amount >= 0) {
|
||||
isShowStart.value = true
|
||||
|
||||
} else {
|
||||
isShowStart.value = false
|
||||
}
|
||||
}
|
||||
if (historyList.value.length) {
|
||||
const obj = historyList.value[0]
|
||||
if (obj.amount != null && obj.amount >= 0) {
|
||||
isShowEnd.value = false
|
||||
} else {
|
||||
isShowEnd.value = true
|
||||
detailId.value = obj.id
|
||||
}
|
||||
} else {
|
||||
isShowEnd.value = false
|
||||
}
|
||||
isLoading.value = false
|
||||
isLoading.value = false
|
||||
}
|
||||
// 详情
|
||||
const getDetailData = async (id, type) => {
|
||||
// 发送请求
|
||||
// isLoading.value = true
|
||||
// 请求参数
|
||||
const queryParams = {
|
||||
id: id,
|
||||
type: type
|
||||
}
|
||||
detailInfo.value = await getNotificationDetailAPI(queryParams)
|
||||
|
||||
}
|
||||
const idValue = ref()
|
||||
onLoad(async (options : any) => {
|
||||
idValue.value = options.id
|
||||
typeName.value = options.type == 2 ? '终检' : '过程检'
|
||||
await getDetailData(options.id, typeName.value)
|
||||
})
|
||||
|
||||
// 生产完成
|
||||
const handleComplate = async () => {
|
||||
try {
|
||||
isLoading.value = true;
|
||||
const params = {
|
||||
zjMxId: detailInfo.value?.id,
|
||||
bgUser: userId,
|
||||
type: 0,
|
||||
}
|
||||
const data = await postOperateAPIEnd(params)
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
duration: 3000,
|
||||
title: error.data.msg,
|
||||
})
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
// const url = `/pages/pgMaster/pgMaster-detail?id=${detailInfo.value.id}`
|
||||
// uni.redirectTo({
|
||||
// url,
|
||||
// })
|
||||
await initPage();
|
||||
const pages = getCurrentPages(); // 获取当前页面栈
|
||||
const currentPage = pages[pages.length - 1]; // 当前页面
|
||||
const url = `/${currentPage.route}?${Object.entries(currentPage.options).map(([key, val]) => `${key}=${val}`).join('&')}`;
|
||||
uni.reLaunch({ url }); // 重新加载当前页面
|
||||
}
|
||||
}
|
||||
|
||||
// 提交报工
|
||||
const submitForm = async (active) => {
|
||||
try {
|
||||
|
||||
|
||||
} catch (error) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
duration: 3000,
|
||||
title: error.data.msg,
|
||||
})
|
||||
} finally {
|
||||
isLoading.value = false;
|
||||
// const url = `/pages/pgMaster/pgMaster-detail?id=${detailInfo.value.id}`
|
||||
// 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 typeName = ref('')
|
||||
const initPage = async () => {
|
||||
await getDetailData(idValue.value, typeName.value)
|
||||
}
|
||||
|
||||
|
||||
|
||||
const detailId = ref()
|
||||
</script>
|
||||
<template>
|
||||
<view class="data-detail">
|
||||
<template v-if="!isLoading">
|
||||
<view class="module">
|
||||
<view class="module-info">
|
||||
<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="product-item">项目:{{detailInfo.projectName}}</view>
|
||||
|
||||
<view class="product-item">子项目:{{ detailInfo.projectSubCode || '' }}
|
||||
{{' ' + detailInfo.projectSubName }}
|
||||
</view>
|
||||
<view class="product-item">通知日期:{{detailInfo.createTime}}</view>
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">质检员:<text class="blue">{{ detailInfo.creatorName }}</text></view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">类型:<text class="blue">{{ detailInfo.typeName }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">检查数量:<text class="blue">{{ detailInfo.amount }}</text></view>
|
||||
</view>
|
||||
<view class="row-item">
|
||||
<view class="label">派工总数量:<text class="blue">{{ detailInfo.totalAmount }}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="product-item">预计生产日期:{{ detailInfo.startTime }} ~ {{ detailInfo.entTime }}</view> -->
|
||||
<!-- <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>
|
||||
<view class="module-list">
|
||||
<view class="module-title">异常明细</view>
|
||||
|
||||
<view class="history-list">
|
||||
|
||||
<view class="item">
|
||||
<view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">是否复检:</view>
|
||||
<view class="val high-color">{{ detailInfo.isRepre == 0 ?'否':'是' }}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-if="detailInfo.remark" class="product-item">异常描述:{{ detailInfo.remark }}</view>
|
||||
<view v-if="!detailInfo.fileUrlList">
|
||||
<text class="red">暂无图片</text>
|
||||
</view>
|
||||
<view v-else>
|
||||
<htz-image-upload v-model="detailInfo.fileUrlList" :max="9" :remove="false"
|
||||
:add="false"></htz-image-upload>
|
||||
</view>
|
||||
<viw></viw>
|
||||
</view>
|
||||
|
||||
|
||||
</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>
|
||||
</template>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
// 订单列表
|
||||
.data-detail {
|
||||
border-radius: 10rpx;
|
||||
padding-bottom: 200rpx;
|
||||
|
||||
.module {
|
||||
background: linear-gradient(178deg, #356899 7%, #356899 57%, #F4F6F9 94%);
|
||||
padding: 20rpx;
|
||||
|
||||
.module-info {
|
||||
padding: 20rpx 20rpx 80rpx;
|
||||
border-radius: 10rpx;
|
||||
min-height: 100rpx;
|
||||
font-size: 28rpx;
|
||||
border-bottom: 2rpx solid #F2F2F2;
|
||||
background: linear-gradient(215deg, #C7D3E5 8%, rgba(222, 228, 236, 0) 13%), linear-gradient(162deg, #FFFFFF 25%, #E4EFFD 106%);
|
||||
position: relative;
|
||||
border-top-right-radius: 100rpx;
|
||||
|
||||
.product-img {
|
||||
position: absolute;
|
||||
right: 0rpx;
|
||||
top: 0;
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.product-status {
|
||||
|
||||
width: 140rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 8rpx 12rpx;
|
||||
|
||||
&.had {
|
||||
background: #E8FFEA;
|
||||
color: #00B42A;
|
||||
}
|
||||
|
||||
&.unhad {
|
||||
background: #FFF7E8;
|
||||
color: #FF7D00;
|
||||
}
|
||||
}
|
||||
|
||||
.product-item {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #737D88
|
||||
}
|
||||
|
||||
.product-row {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
color: #737D88;
|
||||
|
||||
.row-item {
|
||||
flex: 1;
|
||||
|
||||
.label {
|
||||
margin-bottom: 10rpx;
|
||||
}
|
||||
|
||||
.val {
|
||||
color: #1D2129;
|
||||
|
||||
&.high-color {
|
||||
color: #00B42A
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.finish {
|
||||
position: absolute;
|
||||
right: 40rpx;
|
||||
bottom: 30rpx;
|
||||
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
||||
color: #fff;
|
||||
width: 200rpx;
|
||||
text-align: center;
|
||||
padding: 10rpx;
|
||||
border-radius: 31rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.complate-img {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.module-list {
|
||||
padding: 20rpx 20rpx;
|
||||
// box-shadow: 0px 0px 8px 0px rgba(161, 161, 177, 0.12);
|
||||
|
||||
.module-title {
|
||||
color: #0D0D26;
|
||||
font-size: 36rpx;
|
||||
margin: 20rpx 0;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.history-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-height: 200rpx;
|
||||
justify-content: center;
|
||||
padding: 0rpx 10rpx;
|
||||
|
||||
.item {
|
||||
margin: 10rpx 0;
|
||||
background: #EAEEF4;
|
||||
font-size: 28rpx;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
border-radius: 10rpx;
|
||||
color: #737D88;
|
||||
position: relative;
|
||||
|
||||
.product-item {
|
||||
margin: 10rpx 0;
|
||||
|
||||
.hight-color {
|
||||
color: #00B42A;
|
||||
}
|
||||
}
|
||||
|
||||
.product-row {
|
||||
margin: 20rpx 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
color: #737D88;
|
||||
|
||||
.row-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
.label {
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
&.high-color {
|
||||
color: #00B42A
|
||||
}
|
||||
}
|
||||
|
||||
.val {
|
||||
color: #1D2129;
|
||||
|
||||
&.high-color {
|
||||
color: #00B42A
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tip-index {
|
||||
position: absolute;
|
||||
top: 0rpx;
|
||||
right: 0rpx;
|
||||
|
||||
.icon-status {
|
||||
width: 100rpx;
|
||||
height: 72rpx;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.text {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
top: 4rpx;
|
||||
right: 30rpx;
|
||||
z-index: 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.no-data {
|
||||
font-size: 28rpx;
|
||||
color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
.table-cont {
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.button {
|
||||
color: #356899;
|
||||
}
|
||||
}
|
||||
|
||||
.action {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: fixed;
|
||||
bottom: 0rpx;
|
||||
border-radius: 18rpx;
|
||||
padding: 30rpx 30rpx;
|
||||
background: #FFFFFF;
|
||||
margin: 0 auto;
|
||||
width: 100vw;
|
||||
box-shadow: 0px -4px 10px 0px rgba(121, 153, 183, 0.2);
|
||||
|
||||
.action-item {
|
||||
width: 272rpx;
|
||||
height: 86rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: 0 20rpx;
|
||||
font-size: 40rpx;
|
||||
color: #fff;
|
||||
width: 272rpx;
|
||||
height: 86rpx;
|
||||
border-radius: 24rpx;
|
||||
|
||||
&.start {
|
||||
background: linear-gradient(157deg, #2EACE6 -3%, #356899 90%);
|
||||
}
|
||||
|
||||
&.stop {
|
||||
background: linear-gradient(167deg, #FEA97B -2%, #F75E40 87%);
|
||||
}
|
||||
&.danger {
|
||||
background: linear-gradient(167deg, #C00000 -2%,#E80000 87%);
|
||||
}
|
||||
&.finish {
|
||||
background: linear-gradient(142deg, #FEB34A 14%, #FE9B12 83%);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.loading-text {
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.popup {
|
||||
.title {
|
||||
line-height: 1;
|
||||
padding: 40rpx;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
border-bottom: 1rpx solid #ddd;
|
||||
color: #444;
|
||||
|
||||
.close {
|
||||
position: absolute;
|
||||
right: 24rpx;
|
||||
top: 40rpx;
|
||||
height: 60rpx;
|
||||
width: 60rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.cont {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 40rpx;
|
||||
height: 50vh;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 20rpx 0;
|
||||
color: #737D88;
|
||||
width: 94%;
|
||||
|
||||
.label {
|
||||
font-size: 32rpx;
|
||||
width: 260rpx;
|
||||
|
||||
.star {
|
||||
color: red
|
||||
}
|
||||
}
|
||||
|
||||
.val {
|
||||
flex: 1;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
|
||||
.unit {
|
||||
width: 100rpx;
|
||||
margin-left: 4rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.ok {
|
||||
font-size: 32rpx;
|
||||
margin: 20rpx auto 80rpx;
|
||||
text-align: center;
|
||||
width: 200rpx;
|
||||
border-radius: 10rpx;
|
||||
padding: 8rpx 0;
|
||||
background-color: #3C8AF7;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -77,9 +77,9 @@ const handlePopClose = (flag) => {
|
||||
<dataItem ref="childRef" v-if="item.isRender" :order-state="item.orderState" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="float-btn" :style="{bottom: btnTop + 'px', right: btnLeft + 'px'}" @click="handleAdd">
|
||||
<!-- <view class="float-btn" :style="{bottom: btnTop + 'px', right: btnLeft + 'px'}" @click="handleAdd">
|
||||
<image class="add" src="/static/images/unqualifiedNotification-add.png" mode="scaleToFill" />
|
||||
</view>
|
||||
</view> -->
|
||||
<!-- uni-ui 弹出层 -->
|
||||
<uni-popup ref="popup" :mask-click="false" type="bottom" background-color="#fff">
|
||||
<detailPanel v-if="isShowPop" @close="handlePopClose" />
|
||||
|
118
mes-ui/mini-app/src/pages/zjPgMaster/showpicture.vue
Normal file
118
mes-ui/mini-app/src/pages/zjPgMaster/showpicture.vue
Normal file
@ -0,0 +1,118 @@
|
||||
<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>
|
@ -17,6 +17,13 @@ export const getNotificationPageAPI = (data: Object) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const getNotificationDetailAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/unqualified-notification/detailWx',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取零件分页
|
||||
export const getBomPageAPI = (data: Object) => {
|
||||
|
Loading…
Reference in New Issue
Block a user