1.过程检、终检 都生成两条数据修正(添加转圈)
6、下一页 提示 是否保存 6、派工单详情 显示信息错误没有转换 7、 移动端 报工 增加下一个工序
This commit is contained in:
parent
a1dfeda855
commit
95a2d2d783
@ -174,5 +174,7 @@ public class TaskDispatchDetailDO extends BaseDO {
|
||||
private String workerId;
|
||||
@TableField(exist = false)
|
||||
private String workerName;
|
||||
@TableField(exist = false)
|
||||
private String nextProcedureName;
|
||||
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ public class PgMasterServiceImpl implements PgMasterService {
|
||||
|
||||
@Override
|
||||
public Boolean insertPgList(Long task_id,Long project_id,Long bomMxId){
|
||||
//213 605
|
||||
//查询BOM明细
|
||||
List<ProcessBomDO> processBomDOList = processBomMapper.selectBomMx(task_id,project_id,bomMxId);
|
||||
List<PgMasterLineDO> pgMasterLineDOList = new ArrayList<>();
|
||||
|
@ -15,6 +15,7 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.bdgzsomthing.bdgzsomthing
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipManufactureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.serialnumber.SerialNumberDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
|
||||
@ -24,6 +25,7 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.bdgzsomthing.bdgzsomthingMappe
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.equipmanufacture.EquipManufactureMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.procedure.ProcedureMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.projectorder.ProjectOrderSubMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
|
||||
@ -86,6 +88,8 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
private PgMasterService pgMasterService;
|
||||
@Resource
|
||||
private bdgzsomthingMapper bdgzsomthingMapper;
|
||||
@Resource
|
||||
private ProcedureMapper procedureMapper;
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long createTaskDispatch(TaskDispatchSaveReqVO createReqVO) {
|
||||
@ -358,6 +362,30 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
|
||||
postIds.add(fpUserDetailDO.getPostId());
|
||||
}
|
||||
PageResult<TaskDispatchDetailDO> taskDispatchDetailDOPageResult = taskDispatchDetailMapper.selectPageWx(pageReqVO, postIds);
|
||||
List<TaskDispatchDetailDO> list = taskDispatchDetailDOPageResult.getList();
|
||||
HashMap<Long, String> hashMap = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(list)){
|
||||
for (TaskDispatchDetailDO taskDispatchDetailDO : list) {
|
||||
List<TaskDispatchDetailDO> taskDispatchDetailDOS = taskDispatchDetailMapper.selectList(new LambdaQueryWrapperX<TaskDispatchDetailDO>()
|
||||
.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDetailDO.getDispatchId())
|
||||
.eq(TaskDispatchDetailDO::getSort, taskDispatchDetailDO.getSort() + 1));
|
||||
if (CollUtil.isNotEmpty(taskDispatchDetailDOS)){
|
||||
TaskDispatchDetailDO taskDispatchDetailDO1 = taskDispatchDetailDOS.get(0);
|
||||
Long procedureId = taskDispatchDetailDO1.getProcedureId();
|
||||
if (hashMap.get(procedureId)==null){
|
||||
ProcedureDO procedureDO = procedureMapper.selectById(procedureId);
|
||||
if (procedureDO != null){
|
||||
hashMap.put(procedureId, procedureDO.getName());
|
||||
taskDispatchDetailDO.setNextProcedureName(procedureDO.getName());
|
||||
}
|
||||
}else{
|
||||
taskDispatchDetailDO.setNextProcedureName(hashMap.get(procedureId));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//非空遍历找下一道工序Id
|
||||
}
|
||||
return taskDispatchDetailDOPageResult;
|
||||
}
|
||||
@Override
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" :before-close="handleClose" title="编辑页" style="width: 70%">
|
||||
<Dialog v-model="dialogVisible" :before-close="handleClose" :title="totalTital" style="width: 70%">
|
||||
<el-card class="hl-card">
|
||||
<el-form ref="formRef" label-width="140px" :rules="formRules" :model="formData" v-loading="formLoading">
|
||||
<!-- 基础信息 横向布局 -->
|
||||
@ -516,6 +516,7 @@ import {
|
||||
ElButton
|
||||
} from 'element-plus';
|
||||
import { error } from 'console';
|
||||
import { title } from 'process';
|
||||
const centerDialogVisible = ref(false);
|
||||
const queryParams = {
|
||||
pageNo: 1,
|
||||
@ -550,7 +551,7 @@ const active = toRef(commonStore.getStore('active'))
|
||||
const currentId = toRef(commonStore.getStore('id'))
|
||||
const dispatchType = toRef(commonStore.getStore("dispatchType"));
|
||||
|
||||
|
||||
const totalTital = ref('')
|
||||
const formLoading = ref(false)
|
||||
const dialogTitle = ref('')
|
||||
const detailDisabled = ref(false)
|
||||
@ -860,8 +861,10 @@ const open = async (id ,actives,dispatchParamss,ownerId,taskCode) => {
|
||||
dispatchParams.value.taskCode = taskCode;
|
||||
dispatchParams.value.id = id;
|
||||
active.value = actives;
|
||||
totalTital.value = '编辑页'
|
||||
if ('detail' == actives) {
|
||||
detailDisabled.value = true
|
||||
totalTital.value = '详情页'
|
||||
}
|
||||
queryData(id)
|
||||
fetchAllProcedurePages();
|
||||
@ -870,6 +873,14 @@ const open = async (id ,actives,dispatchParamss,ownerId,taskCode) => {
|
||||
const showNext = ref(0)
|
||||
const showBefore = ref(0)
|
||||
const nextItem = async (type) => {
|
||||
if(formData.value.dispatchStatus == 1 && !(!formData.value.taskDispatchDetails || formData.value.taskDispatchDetails.length == 0)){
|
||||
ElMessageBox.confirm('单据尚未保存,是否保存?',{
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
})
|
||||
.then( async() => {
|
||||
await submitForm('SAVE')
|
||||
dispatchParams.value.pageType = type;
|
||||
try{
|
||||
const data = await getTaskDispatchList()
|
||||
@ -896,7 +907,39 @@ const nextItem = async (type) => {
|
||||
}catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
console.log(tsk_id.value)
|
||||
})
|
||||
.catch(() => {
|
||||
})
|
||||
}else{
|
||||
dispatchParams.value.pageType = type;
|
||||
try{
|
||||
const data = await getTaskDispatchList()
|
||||
dispatchlist.value = data;
|
||||
if(dispatchlist.value != null){
|
||||
tsk_id.value = dispatchlist.value[0].id;
|
||||
dispatchParams.value.id = tsk_id.value;
|
||||
if(dispatchlist.value.length == 2){
|
||||
showBefore.value = 0;
|
||||
showNext.value = 0;
|
||||
}else{
|
||||
if(type == 1){
|
||||
showNext.value = 0;
|
||||
showBefore.value = 1;
|
||||
}else{
|
||||
showNext.value = 1;
|
||||
showBefore.value = 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
queryData(tsk_id.value)
|
||||
fetchAllProcedurePages();
|
||||
}catch(error){
|
||||
console.log(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// tsk_id.value = id;
|
||||
// if(type == 1){
|
||||
// for(var i = 0 ; i <dispatchlist.value.length;i++){
|
||||
@ -1137,12 +1180,14 @@ const submitForm = async (operate) => {
|
||||
if( formData.value.taskDispatchDetails[i].postId == undefined || formData.value.taskDispatchDetails[i].postId == null ||formData.value.taskDispatchDetails[i].postId == ''){
|
||||
message.error('请选择岗位!')
|
||||
ownerIsNull = true;
|
||||
throw new Error('Validation failed');
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
if( formData.value.taskDispatchDetails[i].owner == undefined || formData.value.taskDispatchDetails[i].owner == null ||formData.value.taskDispatchDetails[i].owner == ''){
|
||||
message.error('请选择责任人!')
|
||||
ownerIsNull = true;
|
||||
throw new Error('Validation failed');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@
|
||||
<el-button link type="primary" @click="openDispatching('update',scope.row.id,scope.row.ownerId,scope.row.taskCode)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button link type="primary" @click="openDetail('detail', scope.row.id)">
|
||||
<el-button link type="primary" @click="openDispatching('detail',scope.row.id,scope.row.ownerId,scope.row.taskCode)">
|
||||
查看详情
|
||||
</el-button>
|
||||
</template>
|
||||
|
@ -133,11 +133,13 @@ onLoad(async (options: any) => {
|
||||
|
||||
// 生产完成
|
||||
const handleComplate = async () => {
|
||||
isLoading.value = true
|
||||
const params = {
|
||||
id: detailInfo.value?.id,
|
||||
active: 'FINISH',
|
||||
}
|
||||
const data = await postOperateAPI(params)
|
||||
isLoading.value = false
|
||||
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
uni.redirectTo({
|
||||
url,
|
||||
@ -325,7 +327,7 @@ const handleStop = async () => {
|
||||
.product-status {
|
||||
|
||||
width: 140rpx;
|
||||
border-raduis: 10rpx;
|
||||
border-radius: 10rpx;
|
||||
text-align: center;
|
||||
padding: 8rpx 12rpx;
|
||||
|
||||
|
@ -136,7 +136,9 @@ const onRefresherrefresh = async () => {
|
||||
<view class="item" v-for="item in dataList" :key="item.id" @click="handleDetail(item)">
|
||||
<view class="hd">
|
||||
<view class="num">派工单:</view>
|
||||
<view class="statusLabel">( 单号:{{ item.dispatchCode }} )</view>
|
||||
<view class="statusLabel">{{ '(单号:'+ item.dispatchCode+') '}}</view>
|
||||
<view class="num">下一道工序:</view>
|
||||
<view class="statusLabel " >{{ item.nextProcedureName == null ? '无':item.nextProcedureName}}</view>
|
||||
</view>
|
||||
<view class="md">
|
||||
<view class="product-item">项目名称:{{ item.projectCode + ' ' + item.projectName }}</view>
|
||||
|
@ -126,11 +126,13 @@ onLoad(async (options: any) => {
|
||||
|
||||
// 生产完成
|
||||
const handleComplate = async () => {
|
||||
isLoading.value = true;
|
||||
const params = {
|
||||
id: detailInfo.value?.id,
|
||||
active: 'FINISH',
|
||||
}
|
||||
const data = await postOperateAPI(params)
|
||||
isLoading.value = false
|
||||
const url = `/pages/productionReport/productionReport-detail?id=${detailInfo.value.id}`
|
||||
uni.redirectTo({
|
||||
url,
|
||||
|
Loading…
Reference in New Issue
Block a user