过程检和终检增加管控,报工不能为空
This commit is contained in:
parent
d6b7f2316f
commit
595315b149
@ -103,6 +103,7 @@ public interface ErrorCodeConstants {
|
||||
ErrorCode TASK_REPORT_PARAMS_ERRORBG = new ErrorCode(1_009_009, "开始报工和结束报工操作人员不同,无法报工");
|
||||
ErrorCode TASK_REPORT_PARAMS_ERRORJD = new ErrorCode(1_009_010, "报工进度不能超过100%");
|
||||
ErrorCode TASK_REPORT_PARAMS_ERRORSJBG = new ErrorCode(1_009_011, "报工进度不能小于上次报工进度");
|
||||
|
||||
ErrorCode TASK_DISPATCH_TASK_NOT_EXISTS = new ErrorCode(1_009_004, "任务不存在或已完成");
|
||||
ErrorCode TASK_DISPATCH_TASK_NO_PERMISSION_FOR_OPERATE = new ErrorCode(1_009_005, "任务不满足操作条件");
|
||||
ErrorCode TASK_DISPATCH_TASK_REPORT_AMOUNT_EXCESS = new ErrorCode(1_009_006, "无法超额报工");
|
||||
|
@ -38,6 +38,10 @@ public class BgMasterLineServiceImpl implements BgMasterLineService {
|
||||
//结束本次报工
|
||||
@Override
|
||||
public Integer updateBgMasterLines(BgMasterLineSaveReqVO createReqVO){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
}
|
||||
|
||||
//先取出总的派工数量和预计工时
|
||||
PgMasterLineDO pgMasterLineDO = pgMasterLineMapper.selectById(createReqVO.getZjMxId());
|
||||
//然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
|
@ -50,6 +50,9 @@ public class ZjBgMasterLineServiceImpl implements ZjBgMasterLineService {
|
||||
//结束本次报工
|
||||
@Override
|
||||
public Integer updateBgMasterLines(ZjBgMasterLineSaveReqVO createReqVO){
|
||||
if(createReqVO.getAmount() == null || createReqVO.getWorkTime() == null){
|
||||
throw exception(TASK_REPORT_PARAMS_ERROR);
|
||||
}
|
||||
//先取出总的派工数量和预计工时
|
||||
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(createReqVO.getZjMxId());
|
||||
//然后再取出这条ID明细ID下的所有工时和报工数量相加
|
||||
|
@ -113,6 +113,7 @@ const handleComplate = async () => {
|
||||
}
|
||||
// 提交报工
|
||||
const handleOk = async (active) => {
|
||||
if(amount.value>0&&workTime.value>0){
|
||||
const params = {
|
||||
zjMxId: detailInfo.value?.id,
|
||||
amount: amount.value,
|
||||
@ -124,6 +125,14 @@ const handleOk = async (active) => {
|
||||
uni.redirectTo({
|
||||
url,
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '报工数量或报工时间必须大于0,请检查!',
|
||||
icon: 'none', // 显示纯文本时icon设为none
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
// 开始生产
|
||||
const handleStart = async () => {
|
||||
@ -248,14 +257,14 @@ const handleStop = async () => {
|
||||
<!-- <view class="close" @click="handleClose">X</view> -->
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="item">
|
||||
<!-- <view class="item">
|
||||
<view class="label">过程检开始时间:</view>
|
||||
<view class="val">{{ formObj.startTime }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">过程检结束时间:</view>
|
||||
<view class="val">{{ formObj.endTime }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>本次报工工时:</view>
|
||||
<uni-easyinput class="val" type="digit" v-model="workTime" placeholder="请输入本次报工工时"></uni-easyinput>
|
||||
|
@ -113,6 +113,7 @@ const handleComplate = async () => {
|
||||
}
|
||||
// 提交报工
|
||||
const handleOk = async (active) => {
|
||||
if(amount.value>0&&workTime.value>0){
|
||||
const params = {
|
||||
zjMxId: detailInfo.value?.id,
|
||||
amount: amount.value,
|
||||
@ -124,6 +125,15 @@ const handleOk = async (active) => {
|
||||
uni.redirectTo({
|
||||
url,
|
||||
})
|
||||
}else{
|
||||
uni.showToast({
|
||||
title: '报工数量或报工时间必须大于0,请检查!',
|
||||
icon: 'none', // 显示纯文本时icon设为none
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// 开始生产
|
||||
const handleStart = async () => {
|
||||
@ -259,14 +269,14 @@ const handleStop = async () => {
|
||||
<!-- <view class="close" @click="handleClose">X</view> -->
|
||||
</view>
|
||||
<view class="cont">
|
||||
<view class="item">
|
||||
<!-- <view class="item">
|
||||
<view class="label">终检开始时间:</view>
|
||||
<view class="val">{{ formObj.startTime }}</view>
|
||||
</view>
|
||||
<view class="item">
|
||||
<view class="label">终检结束时间:</view>
|
||||
<view class="val">{{ formObj.endTime }}</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="item">
|
||||
<view class="label"><span class="star">*</span>本次报工工时:</view>
|
||||
<uni-easyinput class="val" type="digit" v-model="workTime" placeholder="请输入本次报工工时"></uni-easyinput>
|
||||
|
Loading…
Reference in New Issue
Block a user