Compare commits

..

No commits in common. "0a33a0a252d4da885abe8d8ba3d6883b23064981" and "3e04b66e057dfac7176fc8101985d879a3f89d38" have entirely different histories.

17 changed files with 105 additions and 217 deletions

View File

@ -1,7 +1,6 @@
package com.chanko.yunxi.mes.module.heli.controller.admin.pgmaster; package com.chanko.yunxi.mes.module.heli.controller.admin.pgmaster;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.PlanSubRespVO; import com.chanko.yunxi.mes.module.heli.controller.admin.plansub.vo.PlanSubRespVO;
@ -10,12 +9,10 @@ import com.chanko.yunxi.mes.module.heli.controller.admin.zjpgmaster.vo.ZjPgMaste
import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.bgmasterline.BgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.procedure.ProcedureDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.processbom.ProcessBomDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.bgmasterline.BgMasterLineMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.procedure.ProcedureMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.processbom.ProcessBomDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.taskdispatch.TaskDispatchMapper;
@ -34,7 +31,6 @@ import javax.servlet.http.*;
import java.util.*; import java.util.*;
import java.io.IOException; import java.io.IOException;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.chanko.yunxi.mes.framework.common.pojo.PageParam; import com.chanko.yunxi.mes.framework.common.pojo.PageParam;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
@ -72,8 +68,6 @@ public class PgMasterController {
@Resource @Resource
private BgMasterLineMapper bgMasterLineMapper; private BgMasterLineMapper bgMasterLineMapper;
@Resource
private ProcedureMapper procedureMapper;
@GetMapping("/getBomMx") @GetMapping("/getBomMx")
@ -176,7 +170,7 @@ public class PgMasterController {
wrapper.eq(TaskDispatchDetailDO::getCheckYn,0); wrapper.eq(TaskDispatchDetailDO::getCheckYn,0);
List<TaskDispatchDetailDO> detailDOS = taskDispatchDetailMapper.selectList(wrapper); List<TaskDispatchDetailDO> detailDOS = taskDispatchDetailMapper.selectList(wrapper);
if (ObjectUtil.isEmpty(detailDOS)){ if (ObjectUtil.isEmpty(detailDOS)){
return error(400,"该零件所有工序都没有过程检"); return error(400,"该零件没有需要检验工序");
}else { }else {
LambdaQueryWrapper<TaskDispatchDetailDO> wrapper1 = new LambdaQueryWrapper<>(); LambdaQueryWrapper<TaskDispatchDetailDO> wrapper1 = new LambdaQueryWrapper<>();
wrapper1.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDO.getId()); wrapper1.eq(TaskDispatchDetailDO::getDispatchId, taskDispatchDO.getId());
@ -185,22 +179,8 @@ public class PgMasterController {
List<TaskDispatchDetailDO> list = taskDispatchDetailMapper.selectList(wrapper1); List<TaskDispatchDetailDO> list = taskDispatchDetailMapper.selectList(wrapper1);
if (ObjectUtil.isNotEmpty( list)){ if (ObjectUtil.isNotEmpty( list)){
if (list.size()==detailDOS.size()){ if (list.size()==detailDOS.size()){
return error(400,"零件已全部检验完成"); return error(400,"零件已全部检验完成");
}else{ }else{
List<TaskDispatchDetailDO> collect1 = detailDOS.stream().filter(item -> item.getProcedureStatus() != 2).collect(Collectors.toList());
List<Long> collect = collect1.stream().map(TaskDispatchDetailDO::getProcedureId).collect(Collectors.toList());
LambdaQueryWrapper<ProcedureDO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(ProcedureDO::getId, collect);
List<ProcedureDO> procedureDOS = procedureMapper.selectList(lambdaQueryWrapper);
// 转换为 Map<id, name>
Map<Long, String> procedureNameMap = procedureDOS.stream()
.collect(Collectors.toMap(
ProcedureDO::getId,
ProcedureDO::getName,
(existing, replacement) -> existing
));
List<TaskDispatchDetailDO> collect2 = collect1.stream().filter(item -> item.getReportProcess() == 1).collect(Collectors.toList());
List<TaskDispatchDetailDO> collect3 = collect1.stream().filter(item -> item.getReportProcess() != 1).collect(Collectors.toList());
return error(400,"该零件没有报工完成,请联系报工人员!"); return error(400,"该零件没有报工完成,请联系报工人员!");
} }
}else{ }else{

View File

@ -111,6 +111,4 @@ public class ProcessDesignPageReqVO extends PageParam {
private Integer isOverProcess; private Integer isOverProcess;
@Schema(description = "状态") @Schema(description = "状态")
private Integer isOverPro; private Integer isOverPro;
@Schema(description = "设计日期")
private String designDate;
} }

View File

@ -109,8 +109,8 @@ public class TaskInReportController {
@PostMapping("/add") @PostMapping("/add")
@Operation(summary = "小程序下料报工") @Operation(summary = "小程序下料报工")
@PreAuthorize("@ss.hasPermission('heli:task-in-report:create')") @PreAuthorize("@ss.hasPermission('heli:task-in-report:create')")
public CommonResult<Boolean> addTaskInReport(@Valid @RequestBody TaskInReportSaveReqVO createReqVO) { public CommonResult<Long> addTaskInReport(@Valid @RequestBody TaskInReportSaveReqVO createReqVO) {
return taskInReportService.addTaskInReport(createReqVO); return success(taskInReportService.addTaskInReport(createReqVO));
} }
} }

View File

@ -314,6 +314,4 @@ public class TaskDispatchDetailDO extends BaseDO {
private BigDecimal reportPrice; private BigDecimal reportPrice;
@TableField(exist = false) @TableField(exist = false)
private BigDecimal price; private BigDecimal price;
@TableField(exist = false)
private Long compositionId;
} }

View File

@ -21,7 +21,6 @@ import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.time.LocalDateTime;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -296,20 +295,6 @@ public interface ProcessDesignMapper extends BaseMapperX<ProcessDesignDO> {
.or() .or()
.apply("u6.nickname like concat('%', {0}, '%') and t.process_design_type = {1}", reqVO.getOwnerName(), ProcessDesignTypeEnum.CASTING_DRAWING.name()); .apply("u6.nickname like concat('%', {0}, '%') and t.process_design_type = {1}", reqVO.getOwnerName(), ProcessDesignTypeEnum.CASTING_DRAWING.name());
} }
if ( ObjectUtil.isNotEmpty(reqVO.getDesignDate())) {
String designDate = reqVO.getDesignDate();
query.and(q -> {
q.apply("(t.process_design_type = {0} AND (a.craft_start_date >= {1} or a.craft_end_date >= {2}))", ProcessDesignTypeEnum.BLUEPRINT_FOUNDRY_TECHNOLOGY.name(), designDate, designDate)
.or()
.apply("(t.process_design_type = {0} AND( b.start_blank_date >= {1} or b.blank_date >= {2}))", ProcessDesignTypeEnum.BLUEPRINT_WORKBLANK.name(), designDate, designDate)
.or()
.apply("(t.process_design_type = {0} AND (b.start_two_dim_Date >= {1} or b.two_dim_date >= {2}))", ProcessDesignTypeEnum.BLUEPRINT_2D.name(), designDate, designDate)
.or()
.apply("(t.process_design_type = {0} AND (b.start_three_dim_date >= {1} or b.three_dim_date >= {2}))", ProcessDesignTypeEnum.BLUEPRINT_3D.name(), designDate, designDate)
.or()
.apply("(t.process_design_type = {0} AND (a.cast_start_date >= {1} or a.cast_end_date >= {2}))", ProcessDesignTypeEnum.CASTING_DRAWING.name(), designDate, designDate);
});
}
return selectPage(reqVO, query); return selectPage(reqVO, query);
} }
default PageResult<ProcessDesignDO> getExportExcel(ProcessDesignPageReqVO reqVO){ default PageResult<ProcessDesignDO> getExportExcel(ProcessDesignPageReqVO reqVO){

View File

@ -1022,7 +1022,6 @@ public interface TaskDispatchDetailMapper extends BaseMapperX<TaskDispatchDetail
.select("e.name as procedureName") .select("e.name as procedureName")
.select("g.name as compositionName","g.density as density") .select("g.name as compositionName","g.density as density")
.select("g.price as price") .select("g.price as price")
.select("g.id as compositionId")
.selectSum(TaskInReportDO::getWeight, "weight") .selectSum(TaskInReportDO::getWeight, "weight")
.selectSum(TaskInReportDO::getReportPrice, "reportPrice") .selectSum(TaskInReportDO::getReportPrice, "reportPrice")
.leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId) .leftJoin(TaskDispatchDO.class, "a", TaskDispatchDO::getId, TaskDispatchDetailDO::getDispatchId)

View File

@ -21,7 +21,6 @@ import com.chanko.yunxi.mes.module.heli.dal.dataobject.equipmanufacture.EquipMan
import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.fpuserdetail.FpUserDetailDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplan.MaterialPlanDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.materialplanboom.MaterialPlanBoomDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.pgmaster.PgMasterLineDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plansub.PlanSubDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.plantask.PlanTaskDO;
@ -43,8 +42,6 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.equipmanufacture.EquipManufact
import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.fpuserdetail.FpUserDetailMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplan.MaterialPlanMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.materialplanboom.MaterialPlanBoomMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.pgmaster.PgMasterLineMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.pgmaster.PgMasterMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plansub.PlanSubMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plansub.PlanSubMapper;
import com.chanko.yunxi.mes.module.heli.dal.mysql.plantask.PlanTaskMapper; import com.chanko.yunxi.mes.module.heli.dal.mysql.plantask.PlanTaskMapper;
@ -152,8 +149,6 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
private CustomerMapper customerMapper; private CustomerMapper customerMapper;
@Resource @Resource
private CompositionMapper compositionMapper; private CompositionMapper compositionMapper;
@Resource
private PgMasterLineMapper pgMasterLineMapper;
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Long createTaskDispatch(TaskDispatchSaveReqVO createReqVO) { public Long createTaskDispatch(TaskDispatchSaveReqVO createReqVO) {
@ -1073,11 +1068,7 @@ public class TaskDispatchServiceImpl implements TaskDispatchService {
// bdgzsomthingMapper.updateById(bdgzsomthingDO); // bdgzsomthingMapper.updateById(bdgzsomthingDO);
// } // }
// } // }
LambdaQueryWrapper<PgMasterLineDO> wrapper = new LambdaQueryWrapper<>(); if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && taskDispatchDetailDO.getTestYn().equals("N")&&taskDispatchDetailDO.getCheckYn()==0){
wrapper.eq(PgMasterLineDO::getDispatchDetailId, taskDispatchDetailDO.getId());
wrapper.last("limit 1");
PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectOne(wrapper);
if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && taskDispatchDetailDO.getTestYn().equals("N")&&taskDispatchDetailDO.getCheckYn()==0&&ObjectUtil.isEmpty(pgMasterLineDO)){
pgMasterService.insertPgList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getBomDetailId(),taskDispatchDetailDO); pgMasterService.insertPgList(planDO.getId(),planDO.getProjectId(),taskDispatchDO.getBomDetailId(),taskDispatchDetailDO);
} }
// if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && isBomDetailProductionOver){ // if (taskDispatchDO.getDispatchType().equals("PRODUCTION") && isBomDetailProductionOver){

View File

@ -2,8 +2,6 @@ package com.chanko.yunxi.mes.module.heli.service.taskinreport;
import java.util.*; import java.util.*;
import javax.validation.*; import javax.validation.*;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.module.heli.controller.admin.taskinreport.vo.*; import com.chanko.yunxi.mes.module.heli.controller.admin.taskinreport.vo.*;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskinreport.TaskInReportDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskinreport.TaskInReportDO;
import com.chanko.yunxi.mes.framework.common.pojo.PageResult; import com.chanko.yunxi.mes.framework.common.pojo.PageResult;
@ -63,5 +61,5 @@ public interface TaskInReportService {
List<TaskInReportDO> getList(TaskInReportPageReqVO pageReqVO); List<TaskInReportDO> getList(TaskInReportPageReqVO pageReqVO);
CommonResult<Boolean> addTaskInReport(TaskInReportSaveReqVO createReqVO); Long addTaskInReport(TaskInReportSaveReqVO createReqVO);
} }

View File

@ -3,7 +3,6 @@ package com.chanko.yunxi.mes.module.heli.service.taskinreport;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.chanko.yunxi.mes.framework.common.pojo.CommonResult;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.composition.CompositionDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.formal.FormalDO;
import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO; import com.chanko.yunxi.mes.module.heli.dal.dataobject.taskdispatch.TaskDispatchDetailDO;
@ -133,10 +132,7 @@ public class TaskInReportServiceImpl implements TaskInReportService {
} }
@Override @Override
public CommonResult<Boolean> addTaskInReport(TaskInReportSaveReqVO createReqVO) { public Long addTaskInReport(TaskInReportSaveReqVO createReqVO) {
TaskDispatchDetailDO taskDispatchDetailDO = taskDispatchDetailMapper.selectById(createReqVO.getDispatchDetailId());
if (ObjectUtil.isEmpty(taskDispatchDetailDO)) return CommonResult.error(400,"该派工单不存在,请退出刷新界面!");
if (2==taskDispatchDetailDO.getInReportProcess()) return CommonResult.error(400,"该派工单已报工完成,请刷新界面!");
TaskInReportDO taskInReport = BeanUtils.toBean(createReqVO, TaskInReportDO.class); TaskInReportDO taskInReport = BeanUtils.toBean(createReqVO, TaskInReportDO.class);
taskInReport.setOwner(getLoginUser().getId()); taskInReport.setOwner(getLoginUser().getId());
taskInReport.setReportTime(LocalDateTime.now()); taskInReport.setReportTime(LocalDateTime.now());

View File

@ -4,14 +4,14 @@ NODE_ENV=production
VITE_DEV=false VITE_DEV=false
# 请求路径https://nxhs.cjyx.cc/admin-api http://192.168.1.87:8080 https://star.hz-hl.com # 请求路径https://nxhs.cjyx.cc/admin-api http://192.168.1.87:8080 https://star.hz-hl.com
VITE_BASE_URL='http://192.168.1.87:8080' VITE_BASE_URL='https://nxhs.cjyx.cc'
# 上传路径 http://218.75.46.166:8080 # 上传路径 http://218.75.46.166:8080
VITE_UPLOAD_URL='http://192.168.1.87:8080/admin-api/infra/file/upload' VITE_UPLOAD_URL='https://nxhs.cjyx.cc/admin-api/infra/file/upload'
# 上传路径 # 上传路径
VITE_UPLOAD_BATCH_URL='http://192.168.1.87:8080/admin-api/infra/file/uploadBatch' VITE_UPLOAD_BATCH_URL='https://nxhs.cjyx.cc/admin-api/infra/file/uploadBatch'
# 接口前缀 # 接口前缀
VITE_API_BASEPATH= VITE_API_BASEPATH=

View File

@ -12,15 +12,6 @@
:inline="true" :inline="true"
label-width="110px" label-width="110px"
> >
<el-form-item label="设计日期" prop="designDate" >
<el-date-picker
v-model="queryParams.designDate"
type="date"
value-format="x"
class="!w-240px"
placeholder="选择设计日期"
/>
</el-form-item>
<el-form-item label="项目编号" prop="projectCode"> <el-form-item label="项目编号" prop="projectCode">
<el-input <el-input
v-model="queryParams.projectCode" v-model="queryParams.projectCode"
@ -186,7 +177,6 @@ import * as ProcessDesignApi from '@/api/heli/processdesign'
import {useCommonStateWithOut} from "@/store/modules/common"; import {useCommonStateWithOut} from "@/store/modules/common";
import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict"; import {DICT_TYPE, getIntDictOptions, getStrDictOptions} from "@/utils/dict";
import {ref} from "vue"; import {ref} from "vue";
import dayjs from "dayjs";
defineOptions({ name: 'ProcessDesign3D' }) defineOptions({ name: 'ProcessDesign3D' })
@ -216,7 +206,6 @@ const queryParams = reactive({
ownerName:undefined, ownerName:undefined,
processDesignType:undefined, processDesignType:undefined,
isOverProcess:undefined, isOverProcess:undefined,
designDate:undefined
}) })
const queryFormRef = ref() // const queryFormRef = ref() //
const exportLoading = ref(false) // const exportLoading = ref(false) //
@ -333,13 +322,8 @@ const handleExport = async () => {
// return {} // // return {} //
// } // }
// } // }
const setDefaultDate = () => {
queryParams.designDate = dayjs().startOf('day').format('YYYY-MM-DD')
}
/** 初始化 **/ /** 初始化 **/
onMounted(() => { onMounted(() => {
setDefaultDate()
getList() getList()
}) })
</script> </script>

View File

@ -792,43 +792,22 @@ const open = async (id: number,propertynew :number) => {
businessType: 'PROJECT_ORDER' businessType: 'PROJECT_ORDER'
} }
formData.value.operateLogs = (await getOperateLogPage(logParams)).list formData.value.operateLogs = (await getOperateLogPage(logParams)).list
console.log(formData.value.operateLogs) if (formData.value.operateLogs && formData.value.operateLogs.length >= 2) {
// if (formData.value.operateLogs && formData.value.operateLogs.length >= 2) { if(formData.value.operateLogs.length ==2){
// if(formData.value.operateLogs.length ==2){ const approveLog = formData.value.operateLogs[0]
// const approveLog = formData.value.operateLogs[0] formData.value.approveTime = approveLog.startTime
// formData.value.approveTime = approveLog.startTime formData.value.approveUserName = approveLog.userNickname
// formData.value.approveUserName = approveLog.userNickname }else{
// }else if(formData.value.operateLogs.length ==3){ const auditLog = formData.value.operateLogs[0]
// const auditLog = formData.value.operateLogs[1] formData.value.auditTime = auditLog.startTime
formData.value.auditUserName = auditLog.userNickname
const approveLog = formData.value.operateLogs[1]
formData.value.approveTime = approveLog.startTime
formData.value.approveUserName = approveLog.userNickname
}
// const auditLog = formData.value.operateLogs[3]
// formData.value.auditTime = auditLog.startTime // formData.value.auditTime = auditLog.startTime
// formData.value.auditUserName = auditLog.userNickname // formData.value.auditUserName = auditLog.userNickname
// const approveLog = formData.value.operateLogs[2]
// formData.value.approveTime = approveLog.startTime
// formData.value.approveUserName = approveLog.userNickname
// }
// // const auditLog = formData.value.operateLogs[3]
// // formData.value.auditTime = auditLog.startTime
// // formData.value.auditUserName = auditLog.userNickname
// }
if (formData.value.operateLogs){
const filteredLogs = formData.value.operateLogs
?.filter(item => item.type == 9)
?.sort((a, b) => new Date(b.startTime) - new Date(a.startTime))
?.[0]; // undefined
console.log(filteredLogs)
const logs = formData.value.operateLogs
?.filter(item => item.type == 10)
?.sort((a, b) => new Date(b.startTime) - new Date(a.startTime))
?.[0]; // undefined
if (logs){
formData.value.auditTime = logs.startTime
formData.value.auditUserName = logs.userNickname
}
if (filteredLogs){
formData.value.approveTime = filteredLogs.startTime
formData.value.approveUserName = filteredLogs.userNickname
}
} }
formData.value.propertynew = propertynew; formData.value.propertynew = propertynew;
// loading .value = false; // loading .value = false;

View File

@ -267,7 +267,7 @@ class="!w-260px" v-model="formData.requiredCompletedDate" type="date" value-form
<el-table-column fixed label="外协" align="center" width="60"> <el-table-column fixed label="外协" align="center" width="60">
<template #default="{ row }"> <template #default="{ row }">
<el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)||row.statusFlag"/> <el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)||row.flag"/>
<!-- <el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)"/>--> <!-- <el-checkbox class="large-checkbox" v-model="row.isOutsourcing" @change="handleOutsourcingChange(row)" :disabled="getDisabledState2(row)"/>-->
</template> </template>
</el-table-column> </el-table-column>
@ -482,7 +482,7 @@ v-model="row.deviceModel"
<!-- v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!flag" link type="danger"--> <!-- v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!flag" link type="danger"-->
<el-button <el-button
v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!scope.row.statusFlag" link type="danger" v-if="'detail' != active && ((scope.row.purchaseNo ==null || scope.row.purchaseNo=='') && scope.row.reportProcess == 0&&formData.dispatchStatus != 2)&&!scope.row.flag" link type="danger"
size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)"> size="small" @click.prevent="onDeleteItem(scope.row,scope.$index)">
删除 删除
</el-button> </el-button>
@ -1318,7 +1318,7 @@ const resetForm = () => {
} }
const subFormLoading = ref(false) // const subFormLoading = ref(false) //
const statusFlag = ref(false) // const flag = ref(false) //
const subFormRules = reactive({ const subFormRules = reactive({
procedureName: [{ procedureName: [{
required: true, required: true,
@ -1399,7 +1399,7 @@ const queryData = async (id?: number) => {
checkList.value.push(items.name) checkList.value.push(items.name)
disabledLabels.value.push(items.name) disabledLabels.value.push(items.name)
if ((items.name=='下料1'||items.name=='下料2')&&item.inReportProcess!=0&& !item.isOutsourcing){ if ((items.name=='下料1'||items.name=='下料2')&&item.inReportProcess!=0&& !item.isOutsourcing){
item.statusFlag=true item.flag=true
} }
} }
}) })

View File

@ -93,7 +93,7 @@ const getListData = async () => {
// //
dataList.value.push(...data.list) dataList.value.push(...data.list)
// //
if (queryParams.pageNo < data.pageNo) { if (queryParams.pageNo < data.total) {
// //
queryParams.pageNo++ queryParams.pageNo++
isFinish.value = false isFinish.value = false
@ -102,7 +102,9 @@ const getListData = async () => {
// //
isFinish.value = true isFinish.value = true
} }
if (data.msg){
isFinish.value = false
}
} catch (e){ } catch (e){
// if(e.data.data==null && e.data.msg){ 2025/11/17 // if(e.data.data==null && e.data.msg){ 2025/11/17
// // // //
@ -111,7 +113,6 @@ const getListData = async () => {
// }, delay.value * 1000); // }, delay.value * 1000);
// } // }
} finally { } finally {
isFinish.value = true
isLoading.value = false isLoading.value = false
queryParams.type=0 queryParams.type=0
} }

View File

@ -99,19 +99,7 @@ onMounted(async () => {
queryParams.subOrDetailName=getStoredSearchValue() queryParams.subOrDetailName=getStoredSearchValue()
await getListData(); await getListData();
}); });
// onShow(async () => {
// const today = new Date();
// const year = today.getFullYear();
// const month = String(today.getMonth() + 1).padStart(2, "0");
// const day = String(today.getDate()).padStart(2, "0");
// isFinish.value = false;
// isLoading.value = false;
// queryParams.pageNo = 1;
// todayStr.value = `${year}-${month}-${day}`;
// searchVal.value=getStoredSearchValue()
// queryParams.subOrDetailName=getStoredSearchValue()
// await getListData();
// });
const isScanning = ref(false) const isScanning = ref(false)
const handleDetail = async (item) => { const handleDetail = async (item) => {
@ -265,7 +253,7 @@ const handleSearch = async (e) => {
<view class="label">零件名称: {{ item.materialName }}</view> <view class="label">零件名称: {{ item.materialName }}</view>
</view> </view>
<view class="row-item"> <view class="row-item">
<view class="label" >派工工序: {{ item.procedureName }}</view> <view class="label" >派工工序: <span style="font-weight: bold;">{{ item.procedureName }}</span></view>
</view> </view>
</view> </view>
@ -292,7 +280,7 @@ const handleSearch = async (e) => {
<view <view
class="product-item" class="product-item"
:style=" :style="
item.endTime < todayStr && props.orderState != '2' item.endTime < todayStr
? 'color:red' ? 'color:red'
: null : null
" "

View File

@ -8,7 +8,7 @@
getTaskDetailAPI, getTaskDetailAPI,
postOperateAPI, postOperateAPI,
getListWxAPI, getListWxAPI,
getXLTaskDetailAPI, getTaskInRepotPageAPI, verificationAPI, handleOkAPI, productionCompletedAPI, getCompositionAPI getXLTaskDetailAPI, getTaskInRepotPageAPI, verificationAPI, handleOkAPI, productionCompletedAPI
} from '@/services/productionReport' } from '@/services/productionReport'
const popup = ref<UniHelper.UniPopupInstance>() const popup = ref<UniHelper.UniPopupInstance>()
const userStore = useLoginStore() const userStore = useLoginStore()
@ -19,10 +19,12 @@
text: item.label text: item.label
})) }))
const userId = userStore.userInfo.userId
const isShowStart = ref(false)
const isCancel = ref(true) const isCancel = ref(true)
const isShowEnd = ref(false)
const length = ref() const length = ref()
const widht = ref() const widht = ref()
@ -35,6 +37,7 @@
let isLoading = ref(false) let isLoading = ref(false)
const historyList = ref([]) const historyList = ref([])
const formObj = ref({})
// //
const getData = async () => { const getData = async () => {
// //
@ -55,7 +58,7 @@
// //
const getDetailData = async (id) => { const getDetailData = async (id) => {
// //
isLoading.value = true // isLoading.value = true
const params = { const params = {
id, id,
} }
@ -69,18 +72,15 @@
onLoad(async (options : any) => { onLoad(async (options : any) => {
await getDetailData(options.id) await getDetailData(options.id)
await getData() await getData()
const obj = historyList.value[0]
//
if (obj && obj?.workTime == null && obj.endTime) {
popupShow.value = true
}
}) })
// //
const handleComplate = async () => { const handleComplate = async () => {
// if (historyList.value.length<=0){
// uni.showToast({
// icon: 'none',
// duration: 3000,
// title: ',',
// })
// return
// }
isLoading.value = true; isLoading.value = true;
const params = { const params = {
id: detailInfo.value?.id, id: detailInfo.value?.id,
@ -100,58 +100,54 @@
} }
// //
const handleOk = async () => { const handleOk = async () => {
if (length.value==null||length.value=='' ||length.value<=0){ if (length.value==null||length.value==''){
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
duration: 3000, duration: 3000,
title: '长(直径)不能为空,请确认', title: '请输入长度',
}) })
return return
} }
if (hight.value==null||hight.value=='' ||hight.value<=0){
uni.showToast({
icon: 'none',
duration: 3000,
title: '高度不能为空,请确认!',
})
return
}
if (weight.value==null||weight.value=='' ||weight.value<=0 ){
uni.showToast({
icon: 'none',
duration: 3000,
title: '重量不能为空,请确认!',
})
return
}
if (reportPrice.value==null||reportPrice.value=='' || reportPrice.value<=0){
uni.showToast({
icon: 'none',
duration: 3000,
title: '总价不能为空,请确认!',
})
return
}
// if (matType.value==null||matType.value==''){
// uni.showToast({
// icon: 'none',
// duration: 3000,
// title: '',
// })
// return
// }
if (matType.value=='1'||matType.value=='3'){
if (widht.value==null||widht.value==''){ if (widht.value==null||widht.value==''){
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
duration: 3000, duration: 3000,
title: '物料类型是块料或方料,宽度不能为空,请确认! ', title: '请输入宽度',
}) })
return return
} }
if (hight.value==null||hight.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入高度',
})
return
}
if (weight.value==null||weight.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入重量',
})
return
}
if (reportPrice.value==null||reportPrice.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请输入总价',
})
return
}
if (matType.value==null||matType.value==''){
uni.showToast({
icon: 'none',
duration: 3000,
title: '请选择物料类型',
})
return
} }
const params = { const params = {
dispatchDetailId: detailInfo.value?.id, dispatchDetailId: detailInfo.value?.id,
length: length.value, length: length.value,
@ -173,6 +169,17 @@
matType.value = '1' matType.value = '1'
await getDetailData(detailInfo.value.id) await getDetailData(detailInfo.value.id)
await getData() await getData()
}
const handleStart = async () => {
const params = {
id: detailInfo.value.id,
}
const data = await postOperateAPI(params)
// 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 popupShow = ref(false) const popupShow = ref(false)
const cancel = () => { const cancel = () => {
@ -193,11 +200,9 @@
}); });
} }
const handleLengthChange =async (val) => { const handleLengthChange =async (val) => {
if (val){ console.log(val)
if (val) {
length.value = parseFloat(val).toFixed(2) length.value = parseFloat(val).toFixed(2)
var newPrice = await getCompositionAPI(detailInfo.value.compositionId);
console.log(newPrice)
console.log(newPrice.price)
if (matType.value == '1' || matType.value == '3') { if (matType.value == '1' || matType.value == '3') {
if (widht.value > 0 && hight.value > 0) { if (widht.value > 0 && hight.value > 0) {
var rawResult = length.value * widht.value * hight.value * detailInfo.value.density / 1000000; var rawResult = length.value * widht.value * hight.value * detailInfo.value.density / 1000000;
@ -205,7 +210,7 @@
var price = weight.value * detailInfo.value.price; var price = weight.value * detailInfo.value.price;
reportPrice.value = price.toFixed(2) reportPrice.value = price.toFixed(2)
} }
} else if (matType.value=='2'){ } else {
if (hight.value > 0) { if (hight.value > 0) {
const radius = length.value / 2; const radius = length.value / 2;
const radiusSquared = radius * radius; const radiusSquared = radius * radius;
@ -218,10 +223,12 @@
reportPrice.value = price.toFixed(2) reportPrice.value = price.toFixed(2)
} }
} }
}else {
weight.value=0.00
reportPrice.value=0.00
} }
} }
const handleWidhtChange =async (val) => { const handleWidhtChange =async (val) => {
if (val){
widht.value=parseFloat(val).toFixed(2) widht.value=parseFloat(val).toFixed(2)
if (matType.value=='1'||matType.value=='3'){ if (matType.value=='1'||matType.value=='3'){
if (length.value>0&&hight.value>0){ if (length.value>0&&hight.value>0){
@ -232,9 +239,7 @@
} }
} }
} }
}
const handleHightChange =async (val) => { const handleHightChange =async (val) => {
if (val){
hight.value=parseFloat(val).toFixed(2) hight.value=parseFloat(val).toFixed(2)
if (matType.value=='1'||matType.value=='3'){ if (matType.value=='1'||matType.value=='3'){
if (widht.value>0&&length.value>0){ if (widht.value>0&&length.value>0){
@ -243,7 +248,7 @@
var price = weight.value * detailInfo.value.price; var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2) reportPrice.value= price.toFixed(2)
} }
}else if (matType.value=='2') { }else {
if (length.value>0){ if (length.value>0){
const radius = length.value / 2; const radius = length.value / 2;
const radiusSquared = radius * radius; const radiusSquared = radius * radius;
@ -256,25 +261,17 @@
reportPrice.value= price.toFixed(2) reportPrice.value= price.toFixed(2)
} }
} }
}
} }
const handleWeightChange =async (val) => { const handleWeightChange =async (val) => {
if (val){
weight.value=parseFloat(val).toFixed(2) weight.value=parseFloat(val).toFixed(2)
var price = weight.value * detailInfo.value.price; var price = weight.value * detailInfo.value.price;
reportPrice.value= price.toFixed(2) reportPrice.value= price.toFixed(2)
} }
}
const onClear= async (type)=>{ const onClear= async (type)=>{
if (type=='weight'){ console.log(type)
reportPrice.value=parseFloat("0").toFixed(2)
} else{
weight.value=parseFloat("0").toFixed(2)
reportPrice.value=parseFloat("0").toFixed(2)
}
uni.hideKeyboard() uni.hideKeyboard()
weight.value=0.00
reportPrice.value= 0.00
} }
// //
const handleAdd = async () => { const handleAdd = async () => {
@ -286,6 +283,7 @@
popup.value?.open() popup.value?.open()
} }
const handleClose =async ()=>{ const handleClose =async ()=>{
// uni.hideKeyboard() //
length.value = '' length.value = ''
widht.value = '' widht.value = ''
hight.value = '' hight.value = ''
@ -366,41 +364,41 @@
<view class="product-row"> <view class="product-row">
<view class="row-item"> <view class="row-item">
<view class="label">报工日期</view> <view class="label">报工日期</view>
<view class="val">{{ item.reportTimeStr }}</view> <view class="val high-color">{{ item.reportTimeStr }}</view>
</view> </view>
<view class="row-item"> <view class="row-item">
<view class="label">报工人</view> <view class="label">报工人</view>
<view class="val ">{{ item.ownerName }}</view> <view class="val high-color">{{ item.ownerName }}</view>
</view> </view>
</view> </view>
<view class="product-row"> <view class="product-row">
<view class="row-item"> <view class="row-item">
<view class="label">物料类型</view> <view class="label">物料类型</view>
<view class="val">{{ item.matType }}</view> <view class="val high-color">{{ item.matType }}</view>
</view> </view>
<view class="row-item"> <view class="row-item">
<view class="label">(直径)</view> <view class="label">(直径)</view>
<view class="val ">{{ item.length }} mm</view> <view class="val high-color">{{ item.length }} mm</view>
</view> </view>
</view> </view>
<view class="product-row"> <view class="product-row">
<view class="row-item"> <view class="row-item">
<view class="label">宽度</view> <view class="label">宽度</view>
<view class="val">{{ item.widht }} mm</view> <view class="val high-color">{{ item.widht }} mm</view>
</view> </view>
<view class="row-item"> <view class="row-item">
<view class="label">高度</view> <view class="label">高度</view>
<view class="val">{{ item.hight }} mm</view> <view class="val high-color">{{ item.hight }} mm</view>
</view> </view>
</view> </view>
<view class="product-row"> <view class="product-row">
<view class="row-item"> <view class="row-item">
<view class="label">重量</view> <view class="label">重量</view>
<view class="val high-color">{{ item.weight }} <span class="val">Kg</span></view> <view class="val high-color">{{ item.weight }} Kg</view>
</view> </view>
<view class="row-item"> <view class="row-item">
<view class="label">总价</view> <view class="label">总价</view>
<view class="val high-color">{{ item.reportPrice }} <span class="val"></span></view> <view class="val high-color">{{ item.reportPrice }} </view>
</view> </view>
</view> </view>
<view class="tip-index"> <view class="tip-index">
@ -433,7 +431,7 @@
<view class="cont"> <view class="cont">
<view class="item"> <view class="item">
<view class="label"><span class="star">*</span>物料类型</view> <view class="label"><span class="star">*</span>物料类型</view>
<uni-data-select class="val" v-model="matType" clearable <uni-data-select class="val" v-model="matType" :clearable="false"
:localdata="unitDict" placeholder="请选择物料类型"> :localdata="unitDict" placeholder="请选择物料类型">
</uni-data-select> </uni-data-select>
<view class="unit" ></view> <view class="unit" ></view>
@ -459,18 +457,18 @@
</view> </view>
<view class="item"> <view class="item">
<view class="label"><span class="star">*</span>重量</view> <view class="label"><span class="star">*</span>重量</view>
<uni-easyinput class="val" type="number" v-model="weight" clearable @change="handleWeightChange" @clear="onClear('weight')" <uni-easyinput class="val" type="number" v-model="weight" clearable @change="handleWeightChange"
placeholder="请输入重量"></uni-easyinput> placeholder="请输入重量"></uni-easyinput>
<view class="unit" >Kg</view> <view class="unit" >Kg</view>
</view> </view>
<view class="item"> <view class="item">
<view class="label"><span class="star">*</span>总价</view> <view class="label"><span class="star">*</span>总价</view>
<uni-easyinput class="val" type="number" v-model="reportPrice" clearable @clear="onClear('reportPrice')" <uni-easyinput class="val" type="number" v-model="reportPrice" clearable
placeholder="请输入总价"></uni-easyinput> placeholder="请输入总价"></uni-easyinput>
<view class="unit" ></view> <view class="unit" ></view>
</view> </view>
</view> </view>
<view class="ok" @click="handleOk">保存</view> <view class="ok" @click="handleOk">确定</view>
</uni-popup> </uni-popup>
</view> </view>
</view> </view>

View File

@ -118,10 +118,3 @@ export const productionCompletedAPI = (data: Object) => {
data, data,
}) })
} }
// 派工任务详情
export const getCompositionAPI = (id: number) => {
return http<any[]>({
method: 'GET',
url: `/heli/composition/get/?id=${id}`,
})
}