优化模具上报app界面,上报进度界面优化,增加历史进度上报界面

This commit is contained in:
think 2025-01-17 13:36:20 +08:00
parent 9ce9c02db2
commit 1c7a165bea
9 changed files with 208 additions and 79 deletions

View File

@ -1,5 +1,8 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.processdesign;
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLineRespVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.vo.WarningMessageVO;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -112,6 +115,14 @@ public class ProcessDesignController {
return success(processDesignService.getProcessDesignProgressListByProcessDesignId(processDesignId));
}
@GetMapping("/process-design-progress/page")
@Operation(summary = "获得工艺设计进度分页")
@PreAuthorize("@ss.hasPermission('heli:process-design:query')")
public CommonResult<PageResult<ProcessDesignProgressDO>> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
PageResult<ProcessDesignProgressDO> pageResult = processDesignService.getProcessPage(pageReqVO);
return success(BeanUtils.toBean(pageResult, ProcessDesignProgressDO.class));
}
@GetMapping("/warnings")
@Operation(summary = "获得工艺设计预警信息")
@PreAuthorize("@ss.hasPermission('heli:process-design:query')")

View File

@ -0,0 +1,38 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import static com.chanko.yunxi.mes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(description = "管理后台 - 工艺设计进度分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProcessDesignProgressPageReqVO extends PageParam {
@Schema(description = "工艺设计id", example = "30065")
private Long processDesignId;
@Schema(description = "进度百分比(%)")
private BigDecimal progress;
@Schema(description = "图纸链接")
private String blueprintLink;
@Schema(description = "备注", example = "你猜")
private String remark;
@Schema(description = "状态,1表示正常2表示禁用", example = "2")
private Integer status;
@Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
private LocalDateTime[] createTime;
}

View File

@ -1,7 +1,11 @@
package com.chanko.yunxi.mes.module.heli.dal.mysql.processdesign;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesignprogress.ProcessDesignProgressDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import org.apache.ibatis.annotations.Mapper;
@ -16,6 +20,19 @@ import java.util.List;
@Mapper
public interface ProcessDesignProgressMapper extends BaseMapperX<ProcessDesignProgressDO> {
default PageResult<ProcessDesignProgressDO> selectPage(ProcessDesignProgressPageReqVO pageReqVO) {
MPJLambdaWrapper<ProcessDesignProgressDO> query = new MPJLambdaWrapper<>();
query.selectAll(ProcessDesignProgressDO.class)
;
query.eq(ProcessDesignProgressDO::getProcessDesignId, pageReqVO.getProcessDesignId())
.orderByDesc(ProcessDesignProgressDO::getCreateTime);
return selectPage(pageReqVO,query);//selectPage("", query);
}
default ProcessDesignProgressDO selectSumJinDu(Long processDesignId) {
MPJLambdaWrapper<ProcessDesignProgressDO> query = new MPJLambdaWrapper<>();
query.select("progress as progress")

View File

@ -4,10 +4,12 @@ import java.math.BigDecimal;
import java.util.*;
import javax.validation.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.*;
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesignprogress.ProcessDesignProgressDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.vo.WarningMessageVO;
import org.springframework.web.bind.annotation.RequestParam;
@ -18,6 +20,9 @@ import org.springframework.web.bind.annotation.RequestParam;
*/
public interface ProcessDesignService {
PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO);
/**
* 创建工艺设计
*

View File

@ -6,9 +6,12 @@ import com.chanko.yunxi.mes.framework.common.util.object.BeanUtils;
import com.chanko.yunxi.mes.framework.common.util.object.ObjectUtils;
import com.chanko.yunxi.mes.framework.security.core.util.SecurityFrameworkUtils;
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignProgressPageReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.processdesign.vo.ProcessDesignSaveReqVO;
import com.chanko.yunxi.mes.module.heli.controller.admin.zjbgmasterline.vo.ZjBgMasterLinePageReqVO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesign.ProcessDesignDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processdesignprogress.ProcessDesignProgressDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.zjbgmasterline.ZjBgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processdesign.ProcessDesignMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processdesign.ProcessDesignProgressMapper;
import com.chanko.yunxi.mes.module.heli.enums.ProcessDesignTypeEnum;
@ -43,6 +46,12 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
@Resource
private ProcessDesignProgressMapper processDesignProgressMapper;
@Override
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
return processDesignProgressMapper.selectPage(pageReqVO);
}
@Override
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink){
//先取出主ID下的所有报工百分比判断不能报工不能超过100

View File

@ -130,13 +130,18 @@ onShow(async () => {
const handleDetail =async (item) => {
progress.value = 0;
imageLink.value = item.blueprintLink;
await nextTick(); // DOM
showPopup.value = true;
selectedId.value = item.id; // selectedId
/* const url = `/pages/zjPgMaster/zjPgMaster-detail?id=${item.id}`
uni.navigateTo({ url }) */
if(props.orderState == 0){
progress.value = 0;
imageLink.value = item.blueprintLink;
await nextTick(); // DOM
showPopup.value = true;
selectedId.value = item.id;
}else{
const url = `/pages/moJuSheJiReport/moJuSheJiReport-detail?id=${item.id}&jd=${item.progress}`
uni.navigateTo({ url })
}
// selectedId
/* */
}
/* const viewClick = (item) => {

View File

@ -2,9 +2,9 @@
<view class="popup-container" v-if="showPopup">
<view class="popup-mask" @click="onMaskClick"></view>
<view class="popup-content">
<text class="popup-title">进度百分比%:</text>
<text class="popup-title">进度百分比%:</text>
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
<view class="product-item">图纸链接</view>
<view class="product-item">图纸链接</view>
<input type="text" class="popup-input" v-model="imageLink" placeholder="请输入图片链接">
<button @click="onClose">确认上报</button>
</view>
@ -12,34 +12,46 @@
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted, watchEffect } from 'vue';
const props = defineProps({
showPopup: {
type: Boolean,
default: false
},
imageLink:{
type:String,
default:'123'
}
imageLink: {
type: String,
default: '123'
}
});
const progress = ref(0);
const imageLink = ref(0);
const imageLink = ref('');
const emit = defineEmits(['close']);
const onMaskClick = () => {
const onMaskClick = () => {
onClose();
};
const onClose = () => {
emit('close', progress.value, imageLink.value);
progress.value = 0;
};
emit('close', progress.value, imageLink.value);
progress.value = 0;
imageLink.value = '';
};
onMounted(() => {
imageLink.value = props.imageLink;
});
watchEffect(() => {
console.log('传入的值');
console.log(props.imageLink);
imageLink.value = props.imageLink;
});
</script>
<style scoped>
.popup-title {

View File

@ -3,7 +3,7 @@ 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 { getTaskRepotPageAPI, getTaskDetailAPI, postOperateAPI,postOperateAPIEnd } from '@/services/zjPgMaster'
import { getTaskRepotPageAPI, getTaskDetailAPI, postOperateAPI,postOperateAPIEnd } from '@/services/moJuSheJiReport'
const popup = ref<UniHelper.UniPopupInstance>()
const userStore = useLoginStore()
const dictInfo = userStore?.dictInfo || []
@ -51,15 +51,14 @@ const getData = async () => {
const params = {
pageNo: 1,
integerpageSize: 5,
bgUser: userId,
zjMxId: detailInfo.value.id,
processDesignId: 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.createTime = e.createTime && formatDate(e.createTime, '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')
e.entTime = e.entTime && formatDate(e.entTime, 'YYYY-MM-DD HH:mm') */
})
if (data.list[0]) {
formObj.value = data.list[0]
@ -77,18 +76,22 @@ const getDetailData = async (id) => {
const params = {
id,
}
const data = await getTaskDetailAPI(params)
data.startTime = formatDate(data.startTime, 'YYYY-MM-DD')
data.entTime = formatDate(data.entTime, 'YYYY-MM-DD')
const data = await getTaskDetailAPI(id)
data.twoDimDate = formatDate(data.twoDimDate, 'YYYY-MM-DD')
data.threeDimDate = formatDate(data.threeDimDate, 'YYYY-MM-DD')
//
const lineObj = unitDictData.find((q) => q.value == data.unit) || {}
data.unit = lineObj.label
const jd = detailInfo.value.progress
detailInfo.value = data || {}
detailInfo.value.progress = jd;
isLoading.value = false
}
onLoad(async (options: any) => {
detailInfo.value.progress = options.jd;
await getDetailData(options.id)
await getData()
const obj = historyList.value[0]
@ -171,41 +174,25 @@ const handleStop = async () => {
<template v-if="!isLoading">
<view class="module">
<view class="module-info">
<view class="product-item">项目{{detailInfo.projectName}}</view>
<image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill"></image>
<view :class="[detailInfo.pgType == 1 ? 'had' : 'unhad', 'product-status']">{{
detailInfo.pgType == 1 ? '已完成' : '未完成' }}</view>
<view class="product-item">子项目{{ detailInfo.projectSubCode || '' }} {{' ' + detailInfo.projectSubName }}
</view>
<view class="product-item">模具名称{{detailInfo.mouldName}}</view>
<view class="product-row">
<view class="row-item">
<view class="label">派工数量</view>
<view class="val">{{ detailInfo.amount }}</view>
</view>
<!-- <view class="row-item">
<view class="label">预计工时</view>
<view class="val">{{ detailInfo.gongShi }}</view>
</view> -->
</view>
<view class="product-row">
<view class="row-item">
<view class="label">总报工数量</view>
<view class="val high-color">{{ detailInfo.amounts }}</view>
<!-- <view class="statusTexthd" v-if="detailInfo.processDesignType == 'BLUEPRINT_2D'" > 2D设计 </view>
<view class="statusTexthd" v-else-if ="detailInfo.processDesignType == 'BLUEPRINT_3D'"> 3D设计 </view>
<view class="statusTexthd" v-else-if="detailInfo.processDesignType == 'BLUEPRINT_WORKBLANK'"> 毛坯设计 </view>
<view class="statusTexthd" v-else-if="detailInfo.processDesignType == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'"> 铸造设计 </view> -->
<view class="md">
<view class="product-item">项目{{detailInfo.projectName}}</view>
<image src="/static/images/productionReport-page.png" class="product-img" mode="scaleToFill"></image>
<view :class="[detailInfo.pgType == 1 ? 'had' : 'had', 'product-status']">{{
detailInfo.pgType == 1 ? '已完成' : '已完成' }}</view>
<view class="product-item">子项目{{ detailInfo.projectSubCode || '' }} {{' ' + detailInfo.projectSubName }}
</view>
<view class="product-item" v-if="detailInfo.processDesignType == 'BLUEPRINT_2D'" > 设计类型2D设计 </view><!-- -->
<view class="product-item" v-else-if ="detailInfo.processDesignType == 'BLUEPRINT_3D'"> 设计类型3D设计 </view>
<view class="product-item" v-else-if="detailInfo.processDesignType == 'BLUEPRINT_WORKBLANK'"> 设计类型毛坯设计 </view>
<view class="product-item" v-else-if="detailInfo.processDesignType == 'BLUEPRINT_FOUNDRY_TECHNOLOGY'"> 设计类型铸造设计 </view>
<view class="product-item">客户名称{{detailInfo.customerName}}</view>
<view class="product-item">工艺起止日期{{detailInfo.twoDimDate}} {{detailInfo.threeDimDate}} </view>
<view class="product-item">最新进度{{detailInfo.progress}}%</view>
</view>
<view class="row-item">
<view class="label">总报工工时</view>
<view class="val high-color">{{ detailInfo.workTime }}</view>
</view>
</view>
<!-- <view class="product-item">预计生产日期{{ detailInfo.startTime }} {{ detailInfo.entTime }}</view> -->
<view class="finish" v-if="isShowStart && detailInfo.procedureStatus !== 2 && detailInfo.totalWorkTime"
@click="handleComplate">
<image class="complate-img" src="/static/images/productionReport-detail-complate.png" mode="scaleToFill" />
生产完成
</view>
</view>
</view>
<view class="module-list">
@ -216,23 +203,23 @@ const handleStop = async () => {
</view>
<template v-else>
<view class="item" v-for="(item, index) in historyList" :key="item.id">
<view class="product-row">
<!-- <view class="product-row">
<view class="row-item">
<view class="label">报工人</view>
<view class="val high-color">{{ item.userName }}</view>
</view>
</view>
<view class="product-item">时间{{ item.bgTime }}~{{item.entTime}}</view>
</view> -->
<view class="product-item">报时间{{ item.createTime }}</view>
<!-- <view class="product-item">生产结束时间{{ item.endTimeStr }}</view> -->
<view class="product-row">
<view class="row-item">
<view class="label">报工工时</view>
<view class="val high-color">{{ item.workTime }}</view>
<view class="label">设计进度</view>
<view class="val high-color">{{ item.progress }}%</view>
</view>
<view class="row-item">
<view class="label">报工数量</view>
<view class="val high-color">{{ item.amount }}</view>
<view class="label">图纸链接</view>
<view class="val high-color">{{ item.blueprintLink }}</view>
</view>
</view>
<view class="tip-index">
@ -245,12 +232,10 @@ const handleStop = async () => {
</template>
</view>
</view>
<view class="action" v-if="detailInfo.pgType !== 1">
<!-- <view class="action" v-if="detailInfo.pgType !== 1">
<view class="action-item start" v-if="detailInfo.active != 'START'" @click="handleStart">开始报工</view>
<view class="action-item stop" v-if="detailInfo.active == 'START'" @click="handleStop">结束报工</view>
<!-- <view class="action-item start" v-if="detailInfo.pgType !== 1" @click="handleStart">终检报工</view>
<view class="action-item stop" v-if="isShowEnd" @click="handleStop">结束生产</view> -->
</view>
</view> -->
</template>
<view class="loading-text" v-else>加载中..</view>
<uni-popup class="popup" ref="popup" :mask-click="false" type="bottom" background-color="#fff">
@ -301,7 +286,54 @@ const handleStop = async () => {
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;
.md {
position: relative;
padding: 10rpx;
min-height: 100rpx;
font-size: 28rpx;
/* border-top: 2rpx solid #F2F2F2; */
.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
}
}
}
}
}
.statusTexthd {
position: absolute;
right: 75rpx;
top: 20rpx;
border-radius: 10rpx;
font-size: 24rpx;
padding: 10rpx 30rpx;
border-radius: 10rpx;
font-size: 24rpx;
background: #2d9ce6;
color: #fff;
}
.product-img {
position: absolute;
right: 0rpx;

View File

@ -36,16 +36,16 @@ export const updateBaoGong = (zid: String,progress: String,imageLink:String) =>
export const getTaskRepotPageAPI = (data: Object) => {
return http<any[]>({
method: 'GET',
url: "/heli/task-report/page",
url: "/heli/process-design/process-design-progress/page",
data,
})
}
// 派工任务详情
export const getTaskDetailAPI = (data: Object) => {
export const getTaskDetailAPI = (id: number) => {
return http<any[]>({
method: 'GET',
url: "/heli/task-dispatch/task-dispatch-detail/get",
data,
url: "/heli/process-design/get?id="+id
//data,
})
}