优化王工剩余工作
This commit is contained in:
parent
3975d8885a
commit
646e866fc8
@ -27,10 +27,10 @@ public class PageParam implements Serializable {
|
||||
@Min(value = 1, message = "页码最小值为 1")
|
||||
private Integer pageNo = PAGE_NO;
|
||||
|
||||
@Schema(description = "每页条数,最大值为 100", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@Schema(description = "每页条数,最大值为 999", requiredMode = Schema.RequiredMode.REQUIRED, example = "10")
|
||||
@NotNull(message = "每页条数不能为空")
|
||||
@Min(value = 1, message = "每页条数最小值为 1")
|
||||
@Max(value = 100, message = "每页条数最大值为 100")
|
||||
@Max(value = 999, message = "每页条数最大值为 999")
|
||||
private Integer pageSize = PAGE_SIZE;
|
||||
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ public class ProcessDesignController {
|
||||
@Operation(summary = "报工")
|
||||
@PreAuthorize("@ss.hasPermission('heli:process-design:create')")
|
||||
public CommonResult<Long> updateBaoGong(@Valid @RequestBody ProcessDesignSaveReqSubVO processDesignSaveReqSubVO) {
|
||||
|
||||
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink()));
|
||||
return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO));
|
||||
// return success(processDesignService.updateBaoGong(processDesignSaveReqSubVO.getZid(),processDesignSaveReqSubVO.getProgress(),processDesignSaveReqSubVO.getImageLink(),processDesignSaveReqSubVO.getRemark()));
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
|
@ -22,7 +22,8 @@ public class ProcessDesignSaveReqSubVO {
|
||||
|
||||
@Schema(description = "图纸链接", example = "随便")
|
||||
private String imageLink;
|
||||
|
||||
@Schema(description = "备注", example = "随便")
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
|
@ -150,6 +150,13 @@ public class ProjectOrderController {
|
||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||
}
|
||||
@GetMapping("/pageWX")
|
||||
@Operation(summary = "获得项目订单分页")
|
||||
@PreAuthorize("@ss.hasPermission('heli:project-order:query')")
|
||||
public CommonResult<PageResult<ProjectOrderRespVO>> getProjectOrderPageWX(@Valid ProjectOrderPageReqVO pageReqVO) {
|
||||
PageResult<ProjectOrderDO> pageResult = projectOrderService.getProjectOrderPageWx(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProjectOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出项目订单 Excel")
|
||||
|
@ -269,7 +269,8 @@ public class ProjectOrderDO extends BaseDO {
|
||||
@TableField(exist = false)
|
||||
private String projectSubName;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private String unitName;
|
||||
/**
|
||||
* 变更的字段列表
|
||||
* */
|
||||
|
@ -80,10 +80,14 @@ public interface PgMasterLineMapper extends BaseMapperX<PgMasterLineDO> {
|
||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||
.leftJoin(ProjectOrderSubDO.class,"pos",ProjectOrderSubDO::getId,PgMasterLineDO::getProjectSubId)
|
||||
.leftJoin(PlanDO.class,"pl",PlanDO::getProjectId,ProjectOrderSubDO::getProjectOrderId)
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.orderByDesc(PlanDO::getId)
|
||||
.disableSubLogicDel();
|
||||
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.disableSubLogicDel();
|
||||
if (reqVO.getPgType() == 1){
|
||||
query.orderByDesc(PgMasterLineDO::getPgNumber);
|
||||
}else{
|
||||
query.orderByDesc(PlanDO::getId);
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, PgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, PgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
.eq(reqVO.getDispatchStatus() != null, PgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
|
@ -6,6 +6,7 @@ import com.chanko.yunxi.mes.framework.mybatis.core.mapper.BaseMapperX;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderCostPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.controller.admin.projectorder.vo.ProjectOrderPageReqVO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.customer.CustomerDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.plan.PlanDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderDO;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.dataobject.projectorder.ProjectOrderSubDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.dept.DeptDO;
|
||||
@ -79,7 +80,34 @@ public interface ProjectOrderMapper extends BaseMapperX<ProjectOrderDO> {
|
||||
;
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
|
||||
default PageResult<ProjectOrderDO> selectPageWx(ProjectOrderPageReqVO reqVO) {
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
.select("u.nickname as businessManName", "d.name as businessDeptName", "e.name as customerName")
|
||||
.leftJoin(AdminUserDO.class, "u", AdminUserDO::getId, ProjectOrderDO::getBusinessMan)
|
||||
.leftJoin(DeptDO.class, "d", DeptDO::getId, ProjectOrderDO::getBusinessDeptId)
|
||||
.leftJoin(CustomerDO.class, "e", CustomerDO::getId, ProjectOrderDO::getCustomerId)
|
||||
.leftJoin(PlanDO.class,"p",PlanDO::getProjectId,ProjectOrderDO::getId)
|
||||
.eq(PlanDO::getStatus,2)
|
||||
.disableSubLogicDel()
|
||||
.orderByDesc(ProjectOrderDO::getId);
|
||||
query.like(!StringUtils.isEmpty(reqVO.getCode()), ProjectOrderDO::getCode, reqVO.getCode())
|
||||
.like(!StringUtils.isEmpty(reqVO.getCustomerName()), "e.name", reqVO.getCustomerName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getBusinessManName()), "u.nickname", reqVO.getBusinessManName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getProjectName()), ProjectOrderDO::getProjectName, reqVO.getProjectName())
|
||||
.like(!StringUtils.isEmpty(reqVO.getContractNo()), ProjectOrderDO::getContractNo, reqVO.getContractNo())
|
||||
.eq(reqVO.getHasPrice() != null, ProjectOrderDO::getHasPrice, reqVO.getHasPrice())
|
||||
.eq(reqVO.getOrderStatus() != null, ProjectOrderDO::getOrderStatus, reqVO.getOrderStatus())
|
||||
.eq(reqVO.getDeliveryStatus() != null, ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatus())
|
||||
.in(reqVO.getOrderStatusList() != null && !reqVO.getOrderStatusList().isEmpty(), ProjectOrderDO::getOrderStatus, reqVO.getOrderStatusList())
|
||||
.in(reqVO.getDeliveryStatusList() != null && !reqVO.getDeliveryStatusList().isEmpty(), ProjectOrderDO::getDeliveryStatus, reqVO.getDeliveryStatusList())
|
||||
.eq(reqVO.getIsSnapshot() != null, ProjectOrderDO::getIsSnapshot, reqVO.getIsSnapshot())
|
||||
.eq(reqVO.getHasAlter() != null, ProjectOrderDO::getHasAlter, reqVO.getHasAlter())
|
||||
.like(!StringUtils.isEmpty(reqVO.getSnapshotCode()), ProjectOrderDO::getSnapshotCode, reqVO.getSnapshotCode())
|
||||
.in(CollUtil.isNotEmpty(reqVO.getIdList()), ProjectOrderDO::getId, reqVO.getIdList())
|
||||
;
|
||||
return selectPage(reqVO, query);
|
||||
}
|
||||
default ProjectOrderDO selectById(Long id) {
|
||||
MPJLambdaWrapper<ProjectOrderDO> query = new MPJLambdaWrapper<>();
|
||||
query.selectAll(ProjectOrderDO.class)
|
||||
|
@ -105,9 +105,12 @@ public interface ZjPgMasterLineMapper extends BaseMapperX<ZjPgMasterLineDO> {
|
||||
query.selectAll(ZjPgMasterLineDO.class)
|
||||
.select("d.amounts,d.workTime")
|
||||
.leftJoin("(select SUM(c.amount) as amounts ,SUM(c.work_time) as workTime,c.zj_mx_id from quality_zj_bg_master_line c group by c.zj_mx_id) d on d.zj_mx_id = t.id")
|
||||
.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber)
|
||||
.disableSubLogicDel();
|
||||
|
||||
if(reqVO.getPgType() == 1){
|
||||
query.orderByDesc(ZjPgMasterLineDO::getPgNumber);
|
||||
}else {
|
||||
query.orderByAsc(ZjPgMasterLineDO::getTaskNo,ZjPgMasterLineDO::getPgNumber);
|
||||
}
|
||||
query.eq(reqVO.getDetilUser() != null&&reqVO.getDetilUser() != 0, ZjPgMasterLineDO::getDetilUser, reqVO.getDetilUser())
|
||||
.eq(reqVO.getPgType() != null, ZjPgMasterLineDO::getPgType, reqVO.getPgType())
|
||||
.eq(reqVO.getDispatchStatus()!=null,ZjPgMasterLineDO::getDispatchStatus, reqVO.getDispatchStatus())
|
||||
|
@ -31,8 +31,8 @@ public interface ProcessDesignService {
|
||||
*/
|
||||
Long createProcessDesign(@Valid ProcessDesignSaveReqVO createReqVO);
|
||||
|
||||
|
||||
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink);
|
||||
Long updateBaoGong( ProcessDesignSaveReqSubVO processDesignSaveReqSubVO);
|
||||
Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark);
|
||||
|
||||
/**
|
||||
* 更新工艺设计
|
||||
|
@ -7,6 +7,7 @@ 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.ProcessDesignSaveReqSubVO;
|
||||
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;
|
||||
@ -51,9 +52,57 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
||||
public PageResult<ProcessDesignProgressDO> getProcessPage(ProcessDesignProgressPageReqVO pageReqVO) {
|
||||
return processDesignProgressMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink){
|
||||
public Long updateBaoGong(ProcessDesignSaveReqSubVO reqVO){
|
||||
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(reqVO.getZid());
|
||||
BigDecimal value1 = reqVO.getProgress();
|
||||
BigDecimal threshold = new BigDecimal("100");
|
||||
if(processDesignProgressDOS != null){
|
||||
//相加判断是否大于100,大于时返回前端并给用户提示
|
||||
|
||||
BigDecimal value2 = processDesignProgressDOS.getProgress();
|
||||
BigDecimal sum = value1.add(value2);
|
||||
|
||||
if (value1.compareTo(threshold) > 0) {
|
||||
//大于100时不执行,并返回给用户,提示设计进度不能超过100
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||
} else {
|
||||
if(processDesignProgressDOS.getProgress().compareTo(value1)>0){
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORSJBG);
|
||||
}else{
|
||||
//反之插入数据库数据
|
||||
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||
if (reqVO.getRemark() != null && !reqVO.getRemark().trim().equals("")){
|
||||
processDesignProgressDO.setRemark(reqVO.getRemark());
|
||||
}
|
||||
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(value1.compareTo(threshold) > 0){
|
||||
throw exception(TASK_REPORT_PARAMS_ERRORJD);
|
||||
}else{
|
||||
//反之插入数据库数据
|
||||
ProcessDesignProgressDO processDesignProgressDO = new ProcessDesignProgressDO();
|
||||
processDesignProgressDO.setProcessDesignId(reqVO.getZid());
|
||||
processDesignProgressDO.setProgress(reqVO.getProgress());
|
||||
processDesignProgressDO.setBlueprintLink(reqVO.getImageLink());
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public Long updateBaoGong(Long zid, BigDecimal progress, String imageLink,String remark){
|
||||
//先取出主ID下的所有报工百分比判断不能报工不能超过100
|
||||
ProcessDesignProgressDO processDesignProgressDOS = processDesignProgressMapper.selectSumJinDu(zid);
|
||||
BigDecimal value1 = progress;
|
||||
@ -76,6 +125,7 @@ public class ProcessDesignServiceImpl implements ProcessDesignService {
|
||||
processDesignProgressDO.setProcessDesignId(zid);
|
||||
processDesignProgressDO.setProgress(progress);
|
||||
processDesignProgressDO.setBlueprintLink(imageLink);
|
||||
processDesignProgressDO.setRemark(remark);
|
||||
processDesignProgressMapper.insert(processDesignProgressDO);
|
||||
}
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ public interface ProjectOrderService {
|
||||
* @return 项目订单分页
|
||||
*/
|
||||
PageResult<ProjectOrderDO> getProjectOrderPage(ProjectOrderPageReqVO pageReqVO);
|
||||
PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO);
|
||||
PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO);
|
||||
|
||||
ProjectOrderDO getProjectOrderCost(Long id,Long projectSubId);
|
||||
|
@ -367,7 +367,10 @@ public class ProjectOrderServiceImpl implements ProjectOrderService {
|
||||
return projectOrderMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectOrderDO> getProjectOrderPageWx(ProjectOrderPageReqVO pageReqVO) {
|
||||
return projectOrderMapper.selectPageWx(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProjectOrderDO> getProjectOrderCostPage(ProjectOrderCostPageReqVO pageReqVO) {
|
||||
|
@ -12,6 +12,8 @@ import com.chanko.yunxi.mes.module.heli.dal.mysql.plan.PlanMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.dal.mysql.zjbgmasterline.ZjBgMasterLineMapper;
|
||||
import com.chanko.yunxi.mes.module.heli.enums.TaskDispatchTypeEnum;
|
||||
import com.chanko.yunxi.mes.module.heli.service.serialnumber.SerialNumberService;
|
||||
import com.chanko.yunxi.mes.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import com.chanko.yunxi.mes.module.system.dal.mysql.user.AdminUserMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -57,11 +59,15 @@ public class ZjPgMasterServiceImpl implements ZjPgMasterService {
|
||||
|
||||
@Resource
|
||||
private MouldTypeMapper mouldTypeMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserMapper adminUserMapper;
|
||||
|
||||
@Override
|
||||
public ZjPgMasterLineDO getLine(Integer id) {
|
||||
return zjPgMasterLineMapper.selectById(id);
|
||||
ZjPgMasterLineDO zjPgMasterLineDO = zjPgMasterLineMapper.selectById(id);
|
||||
AdminUserDO adminUserDO = adminUserMapper.selectById(zjPgMasterLineDO.getDetilUser());
|
||||
zjPgMasterLineDO.setNickName(adminUserDO.getNickname());
|
||||
return zjPgMasterLineDO;
|
||||
}
|
||||
@Override
|
||||
public ZjPgMasterLineDO getTaskDispatchDetail(ZjPgMasterLinePageReqVO pageReqVO){
|
||||
|
@ -70,7 +70,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="材质" prop="compositionId">
|
||||
<el-input v-model="formData.compositionId" placeholder="" />
|
||||
<!-- <el-input v-model="formData.compositionId" placeholder="" /> -->
|
||||
<CompositionSelect v-model="formData.compositionId" disabled @update:new-value="(val) => { formData.compositionId = val.id; }" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -80,7 +81,8 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="请输入单位" />
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||
<!-- <el-input v-model="formData.unit" placeholder="请输入单位" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -98,7 +100,7 @@
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<el-input v-model="formData.detilUser" placeholder="" />
|
||||
<el-input disabled v-model="formData.nickName" placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -119,12 +121,14 @@
|
||||
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" />
|
||||
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.startTime" type="date" value-format="x" placeholder="" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结束日期" prop="entTime">
|
||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
||||
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@ -158,6 +162,7 @@
|
||||
<script setup lang="ts">
|
||||
import * as PgMasterApi from '@/api/heli/pgmaster'
|
||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||
import CompositionSelect from '../hlvuestyle/compositionSelect.vue'
|
||||
const {
|
||||
t
|
||||
} = useI18n() // 国际化
|
||||
@ -198,12 +203,24 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
projectName: undefined,
|
||||
pgNumber: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
})
|
||||
const formRules = reactive({})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
const year = d.getFullYear();
|
||||
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
const hours = d.getHours().toString().padStart(2, '0');
|
||||
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id ? : number) => {
|
||||
const open = async (type: string, nickName :string,id ? : number) => {
|
||||
dialogVisible.value = true
|
||||
dialogTitle.value = t('action.' + type)
|
||||
formType.value = type
|
||||
@ -213,9 +230,12 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await PgMasterApi.getPgMasterLineListByZlPgIdLine(id)
|
||||
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
formData.value.nickName = nickName;
|
||||
}
|
||||
}
|
||||
defineExpose({
|
||||
@ -279,6 +299,9 @@ import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@
|
||||
projectName: undefined,
|
||||
pgNumber: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||
@ -158,14 +158,15 @@
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||
<el-table-column v-if="false" label="主键" align="center" prop="id" />
|
||||
<el-table-column v-if="false"
|
||||
<el-table-column
|
||||
v-if="false"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200" />
|
||||
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200" />
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" />
|
||||
<el-table-column label="物料名称" align="center" prop="materialName" />
|
||||
@ -210,12 +211,12 @@
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column label="操作" align="center" width="140" fixed="right">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
@click="openForm('update', scope.row.id)"
|
||||
@click="openForm('update', scope.row.nickName,scope.row.id)"
|
||||
v-hasPermi="['heli:pg-master-line:update']"
|
||||
>
|
||||
查看
|
||||
@ -324,8 +325,8 @@ const resetQuery = () => {
|
||||
|
||||
/** 添加/修改操作 */
|
||||
const formRef = ref()
|
||||
const openForm = (type: string, id?: number) => {
|
||||
formRef.value.open(type, id)
|
||||
const openForm = (type: string,nickName:string, id?: number) => {
|
||||
formRef.value.open(type, nickName,id)
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
|
@ -52,24 +52,27 @@
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="formData.unit" placeholder="" />
|
||||
<dict-tag :type="DICT_TYPE.HELI_MATERIAL_UNIT" :value="formData.unit"/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<el-input v-model="formData.detilUser" placeholder="" />
|
||||
<el-input v-model="formData.nickName" disabled placeholder="" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="开始日期" prop="startTime">
|
||||
<el-date-picker v-model="formData.startTime" type="date" value-format="x"
|
||||
placeholder="选择开始日期" />
|
||||
<el-input v-model="formData.finalStartTime" disabled="true"/>
|
||||
<!-- <el-date-picker
|
||||
v-model="formData.startTime" type="date" value-format="x"
|
||||
placeholder="选择开始日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="结束日期" prop="entTime">
|
||||
<el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" />
|
||||
<el-input v-model="formData.finalEndTime" disabled="true"/>
|
||||
<!-- <el-date-picker v-model="formData.entTime" type="date" value-format="x" placeholder="选择结束日期" /> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -78,7 +81,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="单据状态" prop="pgType">
|
||||
<el-form-item label="单据状态" prop="pgType" >
|
||||
<el-select v-model="formData.pgType" placeholder="">
|
||||
<el-option
|
||||
v-for="dict in getIntDictOptions(DICT_TYPE.HELI_PGTYPE)"
|
||||
@ -130,6 +133,7 @@
|
||||
<script setup lang="ts">
|
||||
import * as ZjPgMasterApi from '@/api/heli/zjpgmaster'
|
||||
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
|
||||
import { string } from 'vue-types'
|
||||
const {
|
||||
t
|
||||
} = useI18n() // 国际化
|
||||
@ -163,10 +167,22 @@
|
||||
projectName: undefined,
|
||||
dispatchStatus: undefined,
|
||||
active: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
})
|
||||
const formRules = reactive({})
|
||||
const formRef = ref() // 表单 Ref
|
||||
|
||||
const formatDate = (date) => {
|
||||
const d = new Date(date);
|
||||
const year = d.getFullYear();
|
||||
const month = (d.getMonth() + 1).toString().padStart(2, '0');
|
||||
const day = d.getDate().toString().padStart(2, '0');
|
||||
const hours = d.getHours().toString().padStart(2, '0');
|
||||
const minutes = d.getMinutes().toString().padStart(2, '0');
|
||||
const seconds = d.getSeconds().toString().padStart(2, '0');
|
||||
return `${year}-${month}-${day}${hours}:${minutes}:${seconds}`;
|
||||
}
|
||||
/** 打开弹窗 */
|
||||
const open = async (type: string, id ? : number) => {
|
||||
dialogVisible.value = true
|
||||
@ -178,6 +194,8 @@
|
||||
formLoading.value = true
|
||||
try {
|
||||
formData.value = await ZjPgMasterApi.getZjPgMasterLineListByZlPgIdLine(id)
|
||||
formData.value.finalStartTime = formatDate(formData.value.startTime);
|
||||
formData.value.finalEndTime = formatDate(formData.value.entTime);
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@ -230,6 +248,9 @@
|
||||
compositionName: undefined,
|
||||
mouldId: undefined,
|
||||
mouldName: undefined,
|
||||
finalStartTime:'',
|
||||
finalEndTime:'',
|
||||
nickName:'',
|
||||
}
|
||||
formRef.value?.resetFields()
|
||||
}
|
||||
|
@ -51,7 +51,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="检验人" prop="detilUser">
|
||||
<UserSelect v-model="queryParams.detilUser" @update:newValue="handleSelectedUser1" class="!w-265px"/>
|
||||
<UserSelect v-model="queryParams.detilUser" @update:new-value="handleSelectedUser1" class="!w-265px"/>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="检验人" prop="detilUser">
|
||||
@ -94,17 +94,18 @@
|
||||
<ContentWrap>
|
||||
<el-table v-loading="loading" :data="list" :stripe="true" class="hl-table" :show-overflow-tooltip="true">
|
||||
<el-table-column v-if = "false" label="主键" align="center" prop="id" />
|
||||
<el-table-column v-if = "false"
|
||||
<el-table-column
|
||||
v-if = "false"
|
||||
label="创建时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
:formatter="dateFormatter"
|
||||
width="180px"
|
||||
/>
|
||||
<el-table-column label="生产计划单号" align="center" prop="taskNo" width="200"/>
|
||||
<el-table-column label="生产计划单号" fixed="left" align="center" prop="taskNo" width="200"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="200"/>
|
||||
<el-table-column label="子项目名称" align="center" prop="projectSubName" width="200"/>
|
||||
<el-table-column label="模具名称" align="center" prop="mouldName" />
|
||||
<el-table-column label="模具名称" align="center" prop="mouldName" min-width="105" />
|
||||
<el-table-column label="材质" align="center" prop="compositionName" />
|
||||
|
||||
<el-table-column label="单位" align="center" prop="unit" >
|
||||
@ -116,7 +117,7 @@
|
||||
<el-table-column label="检验人" align="center" prop="nickName" />
|
||||
|
||||
|
||||
<el-table-column label="材质名称" align="center" prop="compositionName" />
|
||||
<el-table-column label="材质名称" align="center" prop="compositionName" min-width="100" />
|
||||
|
||||
<el-table-column label="派工单号" align="center" prop="pgNumber" width="220"/>
|
||||
|
||||
@ -134,20 +135,20 @@
|
||||
:formatter="dateFormatter"
|
||||
width="240"
|
||||
/>
|
||||
<el-table-column label="派工状态" min-width="80">
|
||||
<el-table-column label="派工状态" min-width="105">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_DISPATCH_STATUS" :value="scope.row.dispatchStatus" />
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" min-width="80">
|
||||
<el-table-column label="单据状态" min-width="105" fixed="right" style="text-align: center;">
|
||||
<template #default="scope">
|
||||
<dict-tag :type="DICT_TYPE.HELI_PGTYPE" :value="scope.row.pgType" />
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" width="140">
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
|
@ -17,7 +17,7 @@ const isFinish = ref(false)
|
||||
const isTriggered = ref(false)
|
||||
const progress = ref(0)
|
||||
const imageLink = ref(0)
|
||||
|
||||
const remark = ref('')
|
||||
const selectedId = ref(null); // 定义 selectedId 变量
|
||||
|
||||
// 定义 porps
|
||||
@ -47,14 +47,14 @@ const queryParams: Required<any> = {
|
||||
const dataList = ref([])
|
||||
const showPopup = ref(false);
|
||||
|
||||
const onPopupClose = (progress, imageLink) => {
|
||||
const onPopupClose = (progress, imageLink,remark) => {
|
||||
|
||||
// 这里可以添加关闭弹出框时的逻辑,例如重置某些状态
|
||||
showPopup.value = false;
|
||||
|
||||
console.log(remark)
|
||||
|
||||
const zid = selectedId.value;
|
||||
callApi(zid,progress,imageLink)
|
||||
callApi(zid,progress,imageLink,remark)
|
||||
|
||||
|
||||
|
||||
@ -63,11 +63,11 @@ const onPopupClose = (progress, imageLink) => {
|
||||
/* */
|
||||
|
||||
};
|
||||
const callApi = async (zid: Number,progress :Number,imageLink: String) => {
|
||||
const callApi = async (zid: Number,progress :Number,imageLink: String,remark:String) => {
|
||||
console.log(progress);
|
||||
if(progress>0){
|
||||
//调用报工接口,将录入的进度、图片链接和id传入进去
|
||||
await updateBaoGong(zid,progress,imageLink);
|
||||
await updateBaoGong(zid,progress,imageLink,remark);
|
||||
isFinish.value = false;
|
||||
isLoading.value = false;
|
||||
queryParams.pageNo = 1;
|
||||
@ -133,6 +133,7 @@ const handleDetail =async (item) => {
|
||||
if(props.orderState == 0){
|
||||
progress.value = 0;
|
||||
imageLink.value = item.blueprintLink;
|
||||
remark.value = item.remark;
|
||||
await nextTick(); // 等待数据更新和DOM渲染
|
||||
showPopup.value = true;
|
||||
selectedId.value = item.id;
|
||||
@ -226,7 +227,7 @@ const onRefresherrefresh = async () => {
|
||||
</view>
|
||||
</scroll-view>
|
||||
<!-- <popup :show="showPopup" :progress="0.0" :imageLink="''" @close="onPopupClose" /> -->
|
||||
<popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" @close="onPopupClose" />
|
||||
<popup :showPopup="showPopup" :progress="progress" :imageLink="imageLink" :remark="remark" @close="onPopupClose" />
|
||||
</view>
|
||||
</template>
|
||||
|
||||
|
@ -6,7 +6,9 @@
|
||||
<input type="number" class="popup-input" v-model="progress" placeholder="请输入进度">
|
||||
<view class="product-item">图纸链接</view>
|
||||
<input type="text" class="popup-input" v-model="imageLink" placeholder="请输入图片链接">
|
||||
<button @click="onClose">确认上报</button>
|
||||
<view class="product-item">备注</view>
|
||||
<uni-easyinput type="textarea" class="popup-input" v-model="remark" placeholder="请输入备注"/>
|
||||
<button style="margin-top: 5%;" size="10px" type="primary" @click="onClose">确认上报</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -22,12 +24,16 @@ const props = defineProps({
|
||||
imageLink: {
|
||||
type: String,
|
||||
default: '123'
|
||||
}
|
||||
},
|
||||
remark: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
});
|
||||
|
||||
const progress = ref(0);
|
||||
const imageLink = ref('');
|
||||
|
||||
const remark = ref('');
|
||||
const emit = defineEmits(['close']);
|
||||
|
||||
const onMaskClick = () => {
|
||||
@ -35,19 +41,20 @@ const onMaskClick = () => {
|
||||
};
|
||||
|
||||
const onClose = () => {
|
||||
emit('close', progress.value, imageLink.value);
|
||||
emit('close', progress.value, imageLink.value,remark.value);
|
||||
progress.value = 0;
|
||||
imageLink.value = '';
|
||||
imageLink.value = '';
|
||||
remark.value = '';
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
imageLink.value = props.imageLink;
|
||||
remark.value = props.remark;
|
||||
});
|
||||
|
||||
watchEffect(() => {
|
||||
console.log('传入的值');
|
||||
console.log(props.imageLink);
|
||||
imageLink.value = props.imageLink;
|
||||
remark.value = props.remark;
|
||||
});
|
||||
</script>
|
||||
|
||||
|
@ -211,8 +211,8 @@ const handleStop = async () => {
|
||||
</view> -->
|
||||
<view class="product-item">上报时间:{{ item.createTime }}</view>
|
||||
<!-- <view class="product-item">生产结束时间:{{ item.endTimeStr }}</view> -->
|
||||
|
||||
<view class="product-row">
|
||||
<view class="product-item">报工进度:{{ item.progress+'%' }}</view>
|
||||
<!-- <view class="product-row">
|
||||
<view class="row-item">
|
||||
<view class="label">设计进度:</view>
|
||||
<view class="val high-color">{{ item.progress }}%</view>
|
||||
@ -221,7 +221,9 @@ const handleStop = async () => {
|
||||
<view class="label">图纸链接:</view>
|
||||
<view class="val high-color">{{ item.blueprintLink }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="product-item">图纸链接:{{item.blueprintLink }}</view>
|
||||
<view class="product-item">备注:{{ item.remark }}</view>
|
||||
<view class="tip-index">
|
||||
<image src="/static/images/productionReport-detail-index.png" class="icon-status" mode="scaleToFit">
|
||||
</image>
|
||||
|
@ -163,6 +163,25 @@ const handleStart = async () => {
|
||||
}
|
||||
// 结束生产
|
||||
const handleStop = async () => {
|
||||
|
||||
//算时间和数量
|
||||
//算时间
|
||||
var lastIndex = historyList.value.length-1;
|
||||
var lastItem = historyList.value[lastIndex];
|
||||
console.log( historyList.value)
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value = 0;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = 0 ; i < historyList.value.length-1;i++){
|
||||
beforeAmount += historyList.value[i].amount
|
||||
}
|
||||
var finalamount = detailInfo.value.amount -beforeAmount
|
||||
if(finalamount < 0){finalamount = 0}
|
||||
amount.value = finalamount.toString();
|
||||
}
|
||||
popup.value.open();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { toRaw, ref, onMounted } from 'vue'
|
||||
import { formatDate } from '@/utils/index'
|
||||
import { getApproveOrderAPI, getChildProductAPI } from '@/services/approveOrder'
|
||||
import { getApproveOrderAPI, getChildProductAPI ,getApproveOrderAPIWx} from '@/services/approveOrder'
|
||||
import { getBomPageAPI, getProcedurePageAPI, getUserPageAPI, postAddAPI } from '@/services/unqualifiedNotification'
|
||||
import { onLoad } from '@dcloudio/uni-app'
|
||||
import { useLoginStore } from '@/stores/modules/login'
|
||||
@ -33,16 +33,16 @@
|
||||
})
|
||||
}
|
||||
// 项目
|
||||
let projectData = []
|
||||
const projectData = ref([])
|
||||
const getProjectData = async () => {
|
||||
const params = {
|
||||
pageNo: 1,
|
||||
pageSize: 99,
|
||||
pageSize: 999,
|
||||
orderStatusList: '32',
|
||||
isSnapshot: 0,
|
||||
deliveryStatusList: '1,2' // 发货状态1|2|3 未发货 部分发货 全部发货
|
||||
}
|
||||
const data = await getApproveOrderAPI(params)
|
||||
const data = await getApproveOrderAPIWx(params)
|
||||
const arr = []
|
||||
data.list.forEach(e => {
|
||||
const obj = {
|
||||
@ -51,7 +51,8 @@
|
||||
}
|
||||
arr.push(obj)
|
||||
})
|
||||
projectData = arr
|
||||
console.log(arr)
|
||||
projectData.value = arr
|
||||
}
|
||||
const projectChildData = ref([])
|
||||
const getProjectChildData = async (projectOrderId) => {
|
||||
@ -140,7 +141,7 @@
|
||||
await getTypeDictData()
|
||||
await getProjectData()
|
||||
await getBomData()
|
||||
await getProcedurePage()
|
||||
// await getProcedurePage()
|
||||
await getOwnerDataData()
|
||||
// isLoading.value = false
|
||||
})
|
||||
|
@ -162,6 +162,23 @@ const handleStart = async () => {
|
||||
}
|
||||
// 结束生产
|
||||
const handleStop = async () => {
|
||||
// var lastIndex = historyList.value.length-1;
|
||||
var lastItem = historyList.value[0];
|
||||
console.log(historyList.value)
|
||||
workTime.value = Math.floor(Math.abs(lastItem.createTime - Date.now()) / (1000 * 60 * 60)).toString();
|
||||
//算数量
|
||||
if(historyList.value.length == 1){
|
||||
amount.value = 0;
|
||||
}else{
|
||||
var beforeAmount = 0;
|
||||
for (var i = historyList.value.length-1 ; i >0;i--){
|
||||
console.log( historyList.value[i])
|
||||
beforeAmount += historyList.value[i].amount
|
||||
}
|
||||
var finalamount = detailInfo.value.amount -beforeAmount
|
||||
if(finalamount < 0){finalamount = 0}
|
||||
amount.value = finalamount.toString();
|
||||
}
|
||||
popup.value.open();
|
||||
/* const params = {
|
||||
id: detailInfo.value?.id,
|
||||
|
@ -15,7 +15,13 @@ export const getApproveOrderAPI = (data: Object) => {
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export const getApproveOrderAPIWx = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
url: '/heli/project-order/pageWX',
|
||||
data,
|
||||
})
|
||||
}
|
||||
export const getApproveOrderDetailAPI = (data: Object) => {
|
||||
return http<any[]>({
|
||||
method: 'GET',
|
||||
|
@ -10,5 +10,5 @@
|
||||
// export const serviceDomain = 'https://star.hz-hl.com'
|
||||
// export const serviceDomain = 'http://222.71.165.187:9010'
|
||||
|
||||
// export const serviceDomain = 'http://localhost:8080'
|
||||
export const serviceDomain = 'https://nxhs.cjyx.cc'
|
||||
// export const serviceDomain = 'http://localhost:8080'
|
||||
export const serviceDomain = 'https://nxhs.cjyx.cc'
|
||||
|
@ -19,11 +19,12 @@ export const getListAPI = (data: Object) => {
|
||||
/**
|
||||
* 操作生产任务(开始/结束/提交/完成)
|
||||
*/
|
||||
export const updateBaoGong = (zid: String,progress: String,imageLink:String) => {
|
||||
export const updateBaoGong = (zid: String,progress: String,imageLink:String,remark:String) => {
|
||||
const data = {
|
||||
zid: zid,
|
||||
progress: progress,
|
||||
imageLink: imageLink
|
||||
imageLink: imageLink,
|
||||
remark:remark
|
||||
};
|
||||
return http<any[]>({
|
||||
method: 'POST',
|
||||
|
Loading…
Reference in New Issue
Block a user