新购流程修改
This commit is contained in:
parent
7cb36cbbcb
commit
f4d2a37cfe
|
|
@ -69,7 +69,7 @@ public class SysLoginService {
|
|||
throw new ServiceException("用户名不在指定范围");
|
||||
}
|
||||
// IP黑名单校验
|
||||
isBlackIp(username);
|
||||
// isBlackIp(username);
|
||||
// 查询用户信息
|
||||
R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER);
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ public class NwRegisterServiceImpl implements NwRegisterService {
|
|||
if (StringUtils.isEmpty(registerForms.getMobilePhone())) {
|
||||
throw new BaseException(NwLoginConstants.PHONE_NOT_NULL_CODE, NwLoginConstants.PHONE_NOT_NULL_MSG);
|
||||
}
|
||||
if (!this.checkPhone(registerForms.getMobilePhone())) {
|
||||
if (!checkPhone(registerForms.getMobilePhone())) {
|
||||
throw new BaseException(NwLoginConstants.MOBILE_FORMAT_ERROR_CODE, NwLoginConstants.MOBILE_FORMAT_ERROR_CODE_MSG);
|
||||
}
|
||||
if (StringUtils.isBlank(registerForms.getUserAccount())) {
|
||||
|
|
|
|||
|
|
@ -73,6 +73,16 @@ public class PurchaseCheckDetailsController extends BaseController
|
|||
return success(purchaseCheckDetailsService.selectPurchaseCheckDetailsByTaskId(taskId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新购验收提交审核
|
||||
*/
|
||||
@ApiOperation(value = "新购验收提交审核")
|
||||
@GetMapping(value = "/submitCheck/{taskId}")
|
||||
public AjaxResult submitCheck(@PathVariable("taskId") Long taskId)
|
||||
{
|
||||
return purchaseCheckDetailsService.submitCheck(taskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增新购验收任务详细
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,21 +44,8 @@ public class PurchaseCheckInfoController extends BaseController {
|
|||
@ApiOperation("查询新购入库任务列表")
|
||||
@GetMapping("/putInList")
|
||||
public TableDataInfo putInList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||
List<PurchaseCheckInfo> list = new ArrayList<>();
|
||||
//判断该组织是否开启综合服务中心审核
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
int re = purchaseCheckServiceCenterService.selectExamineType(companyId);
|
||||
startPage();
|
||||
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
||||
/*if (re > 0) {
|
||||
//若依框架多个查询会导致分页失效,需分批处理
|
||||
startPage();
|
||||
list = purchaseCheckInfoService.selectPutInListExamine(purchaseCheckInfo);
|
||||
} else {
|
||||
startPage();
|
||||
list = purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo);
|
||||
}*/
|
||||
return getDataTable(list);
|
||||
return getDataTable(purchaseCheckInfoService.selectPutInListList(purchaseCheckInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -163,6 +150,10 @@ public class PurchaseCheckInfoController extends BaseController {
|
|||
@Log(title = "新购验收任务", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{taskId}")
|
||||
public AjaxResult remove(@PathVariable Long taskId) {
|
||||
return toAjax(purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId));
|
||||
try {
|
||||
return purchaseCheckInfoService.deletePurchaseCheckInfoByTaskId(taskId);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("删除失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,14 +47,7 @@ public class PurchaseCheckServiceCenterController extends BaseController
|
|||
public TableDataInfo putInList(PurchaseCheckInfo purchaseCheckInfo)
|
||||
{
|
||||
startPage();
|
||||
List<PurchaseCheckInfo> list=new ArrayList<>();
|
||||
//判断该组织是否开启综合服务中心审核
|
||||
Long companyId = SecurityUtils.getLoginUser().getSysUser().getCompanyId();
|
||||
int re =purchaseCheckServiceCenterService.selectExamineType(companyId);
|
||||
if (re>0){
|
||||
list = purchaseCheckServiceCenterService.selectPutInListList(purchaseCheckInfo);
|
||||
}
|
||||
return getDataTable(list);
|
||||
return getDataTable(purchaseCheckServiceCenterService.selectPutInListList(purchaseCheckInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -73,8 +66,14 @@ public class PurchaseCheckServiceCenterController extends BaseController
|
|||
*/
|
||||
@ApiOperation(value = "综合服务中心审核")
|
||||
@PutMapping("/manageStatus")
|
||||
public AjaxResult modifyManageStatus(@RequestBody MaInputVO maInputVO) throws Exception {
|
||||
return toAjax(purchaseCheckServiceCenterService.modifyManageStatus(maInputVO));
|
||||
public AjaxResult modifyManageStatus(@RequestBody MaInputVO maInputVO){
|
||||
try {
|
||||
return purchaseCheckServiceCenterService.modifyManageStatus(maInputVO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,12 @@ public class PurchaseMacodeInfoController extends BaseController {
|
|||
@Log(title = "新购验收任务", businessType = BusinessType.MATERIAL)
|
||||
@PutMapping("/manageStatus")
|
||||
public AjaxResult modifyManageStatus(@RequestBody MaInputVO maInputVO) throws Exception {
|
||||
try {
|
||||
return toAjax(purchaseMacodeInfoService.modifyManageStatus(maInputVO));
|
||||
} catch (Exception e){
|
||||
e.printStackTrace();
|
||||
return AjaxResult.error("审核失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -123,6 +123,18 @@ public class PurchaseCheckInfo extends BaseEntity
|
|||
@ApiModelProperty(value = "新购验收任务详情")
|
||||
private List<PurchaseCheckDetails> checkDetailsList;
|
||||
|
||||
/**
|
||||
* 通过数量
|
||||
*/
|
||||
@ApiModelProperty(value = "通过数量")
|
||||
private Integer passNum;
|
||||
|
||||
/**
|
||||
* 未通过数量
|
||||
*/
|
||||
@ApiModelProperty(value = "未通过数量")
|
||||
private Integer noPassNum;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -133,6 +145,22 @@ public class PurchaseCheckInfo extends BaseEntity
|
|||
private Integer taskStatus;
|
||||
private String keyWord;
|
||||
|
||||
public Integer getPassNum() {
|
||||
return passNum;
|
||||
}
|
||||
|
||||
public void setPassNum(Integer passNum) {
|
||||
this.passNum = passNum;
|
||||
}
|
||||
|
||||
public Integer getNoPassNum() {
|
||||
return noPassNum;
|
||||
}
|
||||
|
||||
public void setNoPassNum(Integer noPassNum) {
|
||||
this.noPassNum = noPassNum;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.MaInputRecord;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckDetails;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
@ -151,4 +152,11 @@ public interface PurchaseCheckDetailsMapper {
|
|||
int updateStatusByTaskIdTypeId(PurchaseCheckDetails purchaseCheckDetails);
|
||||
|
||||
int updateByTaskId(@Param("taskId") Long taskId,@Param("typeId") Long typeId);
|
||||
|
||||
/**
|
||||
* 修改purchase_check_details表设备状态
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
int updatePuchaseCheckDetailsStatus(MaInputRecord maInputRecord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,4 +122,20 @@ public interface PurchaseCheckInfoMapper {
|
|||
List<PurchaseCheckInfo> selectTypeNameAndManageTypeByTaskId(Long taskId);
|
||||
|
||||
List<MachinePart> getWholeSetDetails(PurchaseCheckInfo purchaseCheckInfo);
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
List<PurchaseCheckInfo> selectPurchaseMacodeInfoByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
int deletePurchaseMacodeInfoByTaskId(String code);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -206,4 +206,25 @@ public interface PurchaseCheckServiceCenterMapper
|
|||
* @return
|
||||
*/
|
||||
int selectPurchaseCheckDetailsStatus(Long taskId);
|
||||
|
||||
/**
|
||||
* 修改purchase_macode_info表设备状态
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
int updatePurchaseMacodeInfoStatus(MaInputRecord maInputRecord);
|
||||
|
||||
/**
|
||||
* 判断该任务该类型是否全部操作
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
int isOperateAllPurchaseMacodeInfo(MaInputRecord maInputRecord);
|
||||
|
||||
/**
|
||||
* 判断该任务该类型是否全部不通过
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
int isOperateAllNot(MaInputRecord maInputRecord);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ import com.bonus.sgzb.base.api.domain.MaLabelBind;
|
|||
import com.bonus.sgzb.base.api.domain.MaMachine;
|
||||
import com.bonus.sgzb.base.api.domain.MaMachineLabel;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.material.domain.InputApplyDetails;
|
||||
import com.bonus.sgzb.material.domain.MaInputRecord;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
@ -282,4 +279,25 @@ public interface PurchaseMacodeInfoMapper {
|
|||
int updateMaTypeNum(MachinePart wholeSetDetail);
|
||||
|
||||
List<PurchaseMacodeInfo> selectPurchaseMacodeInfoListDetails(PurchaseMacodeInfo purchaseMacodeInfo);
|
||||
|
||||
/**
|
||||
* 判断该任务该类型是否全部操作
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
int isOperateAllPurchaseMacodeInfo(MaInputRecord maInputRecord);
|
||||
|
||||
/**
|
||||
* 判断该任务该类型是否全部操作
|
||||
* @param maInputRecord
|
||||
* @return
|
||||
*/
|
||||
PurchaseCheckInfo selectPassAndNoPassNum(MaInputRecord maInputRecord);
|
||||
|
||||
/**
|
||||
* 判断是全通过还是部分通过
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
int isOperateAllPass(Long taskId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckDetails;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -59,4 +60,12 @@ public interface IPurchaseCheckDetailsService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseCheckDetailsByTaskId(Long id);
|
||||
|
||||
/**
|
||||
* 新购验收提交审核
|
||||
*
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
AjaxResult submitCheck(Long taskId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
|
|
@ -62,7 +63,7 @@ public interface IPurchaseCheckInfoService
|
|||
* @param taskId 新购验收任务purchase_check_info主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePurchaseCheckInfoByTaskId(Long taskId);
|
||||
public AjaxResult deletePurchaseCheckInfoByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 验收通知
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
|
|
@ -115,7 +116,7 @@ public interface PurchaseCheckServiceCenterService
|
|||
* @param maInputVO
|
||||
* @return
|
||||
*/
|
||||
int modifyManageStatus(MaInputVO maInputVO);
|
||||
AjaxResult modifyManageStatus(MaInputVO maInputVO);
|
||||
|
||||
/**
|
||||
* 查询组织是否开启审核
|
||||
|
|
|
|||
|
|
@ -1,11 +1,17 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckDetails;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckInfoMapper;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseMacodeInfoMapper;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
import com.bonus.sgzb.material.service.IPurchaseCheckDetailsService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
|
|
@ -26,6 +32,12 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
@Resource
|
||||
private PurchaseCheckDetailsMapper purchaseCheckDetailsMapper;
|
||||
|
||||
@Resource
|
||||
private PurchaseMacodeInfoMapper purchaseMacodeInfoMapper;
|
||||
|
||||
@Resource
|
||||
private PurchaseCheckInfoMapper purchaseCheckInfoMapper;
|
||||
|
||||
@Resource
|
||||
private TaskMapper taskMapper;
|
||||
|
||||
|
|
@ -75,7 +87,13 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
for (PurchaseCheckDetails purchaseCheckDetails : purchaseCheckDetailsList) {
|
||||
taskId = purchaseCheckDetails.getTaskId();
|
||||
if ("通过".equals(purchaseCheckDetails.getCheckResult())) {
|
||||
//前端去除驳回操作,验收数量为0即为驳回
|
||||
if (purchaseCheckDetails.getCheckNum() == null || purchaseCheckDetails.getCheckNum().compareTo(BigDecimal.ZERO) == 0){
|
||||
purchaseCheckDetails.setStatus(3);
|
||||
purchaseCheckDetails.setCheckResult("不通过");
|
||||
}else {
|
||||
purchaseCheckDetails.setStatus(1);
|
||||
}
|
||||
} else if ("不通过".equals(purchaseCheckDetails.getCheckResult())) {
|
||||
purchaseCheckDetails.setStatus(3);
|
||||
} else {
|
||||
|
|
@ -131,4 +149,57 @@ public class PurchaseCheckDetailsServiceImpl implements IPurchaseCheckDetailsSer
|
|||
public int deletePurchaseCheckDetailsByTaskId(Long id) {
|
||||
return purchaseCheckDetailsMapper.deletePurchaseCheckDetailsByTaskId(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult submitCheck(Long taskId) {
|
||||
//查询该任务中是否有编码设备
|
||||
List<PurchaseCheckInfo> taskInfoList = purchaseCheckInfoMapper.selectTypeNameAndManageTypeByTaskId(taskId);
|
||||
if (taskInfoList.size() > 0){
|
||||
if (taskInfoList.get(0).getManageType().contains("0")){
|
||||
//有编码设备判断是否绑定
|
||||
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
|
||||
purchaseMacodeInfo.setTaskId(taskId);
|
||||
List<PurchaseMacodeInfo> purchaseMacodeInfoList = purchaseMacodeInfoMapper.selectPurchaseMacodeInfoList(purchaseMacodeInfo);
|
||||
if (purchaseMacodeInfoList.size() > 0){
|
||||
for (PurchaseMacodeInfo purchaseMacodeInfo1 : purchaseMacodeInfoList) {
|
||||
// 将Integer转换为BigDecimal
|
||||
BigDecimal bindNumDecimal = new BigDecimal(purchaseMacodeInfo1.getBindNum());
|
||||
// 使用compareTo方法进行比较
|
||||
int comparisonResult = bindNumDecimal.compareTo(purchaseMacodeInfo1.getCheckNum());
|
||||
if (comparisonResult<0){
|
||||
//有未绑定设备
|
||||
return AjaxResult.error("该任务有未绑定的编码设备,请先绑定");
|
||||
}
|
||||
}
|
||||
//全部已绑定,提交审核
|
||||
return updateTaskStatus(taskId,122);
|
||||
}else {
|
||||
//提交审核失败
|
||||
return AjaxResult.error("提交审核失败");
|
||||
}
|
||||
}else {
|
||||
//无编码设备,提交审核
|
||||
return updateTaskStatus(taskId,122);
|
||||
}
|
||||
}else {
|
||||
return AjaxResult.error("提交审核失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务状态
|
||||
*/
|
||||
public AjaxResult updateTaskStatus(Long taskId,int taskStatus){
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(taskStatus);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
int i =taskMapper.updateTmTask(task);
|
||||
if (i>0){
|
||||
return AjaxResult.success("提交审核成功");
|
||||
}else {
|
||||
return AjaxResult.error("提交审核失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.sgzb.material.service.impl;
|
|||
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||
|
|
@ -66,7 +67,7 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
public List<PurchaseCheckInfo> selectPutInListList(PurchaseCheckInfo purchaseCheckInfo) {
|
||||
List<PurchaseCheckInfo> purchaseCheckInfos = purchaseCheckInfoMapper.selectPutInListList(purchaseCheckInfo);
|
||||
for (PurchaseCheckInfo checkInfo : purchaseCheckInfos) {
|
||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "2");
|
||||
String typeName = purchaseCheckInfoMapper.selectTypeNameByTaskId(checkInfo.getTaskId(), "3");
|
||||
checkInfo.setPurchasingTypeName(typeName);
|
||||
}
|
||||
return purchaseCheckInfos;
|
||||
|
|
@ -250,20 +251,38 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePurchaseCheckInfoByTaskId(Long taskId) {
|
||||
int result = 0;
|
||||
try {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult deletePurchaseCheckInfoByTaskId(Long taskId) {
|
||||
int result = 1;
|
||||
// 第一步:删除验收任务表
|
||||
purchaseCheckInfoMapper.deletePurchaseCheckInfoByTaskId(taskId);
|
||||
// 第二步:删除验收任务详情表
|
||||
purchaseCheckDetailsMapper.deleteCheckDetailsByTaskId(taskId);
|
||||
// 第三步:删除任务表
|
||||
taskMapper.deleteTmTaskByTaskId(taskId);
|
||||
result = 1;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
result = purchaseCheckInfoMapper.deletePurchaseCheckInfoByTaskId(taskId);
|
||||
if (result <= 0) {
|
||||
throw new RuntimeException("删除验收任务表失败");
|
||||
}
|
||||
return result;
|
||||
// 第二步:删除验收任务详情表
|
||||
result = purchaseCheckDetailsMapper.deleteCheckDetailsByTaskId(taskId);
|
||||
if (result <= 0) {
|
||||
throw new RuntimeException("删除验收任务详情表失败");
|
||||
}
|
||||
// 第三步:删除任务表
|
||||
result = taskMapper.deleteTmTaskByTaskId(taskId);
|
||||
if (result <= 0) {
|
||||
throw new RuntimeException("删除任务表失败");
|
||||
}
|
||||
//先查询该任务下purchase_macode_info表是否有数据
|
||||
List<PurchaseCheckInfo> purchaseCheckInfoList = purchaseCheckInfoMapper.selectPurchaseMacodeInfoByTaskId(taskId);
|
||||
if (purchaseCheckInfoList.size() > 0) {
|
||||
for (PurchaseCheckInfo purchaseCheckInfo : purchaseCheckInfoList) {
|
||||
//删除ma_machine、ma_machine_label、ma_label_bind、purchase_macode_info等表
|
||||
result = purchaseCheckInfoMapper.deletePurchaseMacodeInfoByTaskId(purchaseCheckInfo.getCode());
|
||||
if (result <= 0) {
|
||||
throw new RuntimeException("删除ma_machine、ma_machine_label、ma_label_bind、purchase_macode_info等表失败");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
result = 1;
|
||||
}
|
||||
return result > 0 ? AjaxResult.success() : AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.sgzb.base.api.domain.MaMachine;
|
|||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.PurchaseCheckDetailsMapper;
|
||||
|
|
@ -140,65 +141,106 @@ public class PurchaseCheckServiceCenterServiceImpl implements PurchaseCheckServi
|
|||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int modifyManageStatus(MaInputVO maInputVO) {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public AjaxResult modifyManageStatus(MaInputVO maInputVO) {
|
||||
Long taskId = maInputVO.getTaskId();
|
||||
String checkResult = maInputVO.getCheckResult();
|
||||
List<MaInputRecord> inputRecordList = maInputVO.getInputRecordList();
|
||||
for (MaInputRecord maInputRecord : inputRecordList) {
|
||||
Long typeId = maInputRecord.getTypeId();
|
||||
|
||||
//修改编码管理表入库状态
|
||||
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
|
||||
purchaseMacodeInfo.setTaskId(taskId);
|
||||
purchaseMacodeInfo.setTypeId(typeId);
|
||||
purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode());
|
||||
|
||||
// 修改验收任务详细表入库数量
|
||||
if ("1".equals(checkResult)) {
|
||||
//修改机具状态为在库
|
||||
PurchaseCheckDetails purchaseCheckDetails = new PurchaseCheckDetails();
|
||||
purchaseCheckDetails.setStatus(6);
|
||||
purchaseCheckDetails.setTaskId(taskId);
|
||||
purchaseCheckDetails.setTypeId(typeId);
|
||||
checkDetailsMapper.updateStatusByTaskIdTypeId(purchaseCheckDetails);
|
||||
//判断是编码设备还是数量
|
||||
if (StringHelper.isNotEmpty(maInputRecord.getMaCode())) {
|
||||
//编码设备先修改purchase_macode_info表设备状态
|
||||
int i = updatePurchaseMacodeInfoStatus(maInputRecord, checkResult);
|
||||
if (i > 0) {
|
||||
//再判断该任务该类型是否全部操作,全部操作后修改purchase_check_details表状态
|
||||
if (purchaseCheckServiceCenterMapper.isOperateAllPurchaseMacodeInfo(maInputRecord) <= 0) {
|
||||
//判断是否全部不通过
|
||||
if (purchaseCheckServiceCenterMapper.isOperateAllNot(maInputRecord) <= 0) {
|
||||
//修改purchase_check_details表状态 综合服务中心-不通过
|
||||
i = updatePuchaseCheckDetails(maInputRecord, "7");
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
} else {
|
||||
//删除ma_machine表
|
||||
purchaseCheckServiceCenterMapper.deleteMaMachineInfoByMaId(maInputRecord.getMaId());
|
||||
//删除ma_machine_label表
|
||||
purchaseCheckServiceCenterMapper.deleteMaMachineLabelByMaId(maInputRecord.getMaId());
|
||||
//删除ma_label_bind表
|
||||
purchaseCheckServiceCenterMapper.deleteMaLabelBindByMaId(maInputRecord.getMaId());
|
||||
//修改purchase_macode_info表
|
||||
purchaseCheckServiceCenterMapper.updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(taskId,typeId,maInputRecord.getMaCode());
|
||||
//修改purchase_check_details表
|
||||
checkDetailsMapper.updateByTaskId(taskId,typeId);
|
||||
//修改purchase_check_details表状态 综合服务中心-通过
|
||||
i = updatePuchaseCheckDetails(maInputRecord, "6");
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
} else {
|
||||
//直接修改purchase_check_details表设备状态
|
||||
if ("1".equals(checkResult)){
|
||||
int i = updatePuchaseCheckDetails(maInputRecord, "6");
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
}else {
|
||||
int i = updatePuchaseCheckDetails(maInputRecord, "7");
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//判断是否全部已操作(通过或不通过)
|
||||
int count = purchaseCheckServiceCenterMapper.isOperateAll(taskId);
|
||||
if (count <= 0) {
|
||||
//是否为全部不通过
|
||||
int count1 = purchaseCheckServiceCenterMapper.selectPurchaseCheckDetailsStatus(taskId);
|
||||
if (count1 <= 0) {
|
||||
//是则将任务状态改为验收不通过
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(106);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
taskMapper.updateTmTask(task);
|
||||
//全部不通过,任务状态改为综合服务中心审核不通过
|
||||
int i = updateTaskStatus(taskId, 106);
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
} else {
|
||||
// 当全部操作,修改任务为验收状态
|
||||
// 否则,任务状态改为综合服务中心审核通过
|
||||
int i = updateTaskStatus(taskId, 105);
|
||||
if (i <= 0) {
|
||||
throw new RuntimeException("状态修改失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success("审核成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务状态
|
||||
*/
|
||||
public int updateTaskStatus(Long taskId, int taskStatus) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(105);
|
||||
task.setTaskStatus(taskStatus);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
taskMapper.updateTmTask(task);
|
||||
return taskMapper.updateTmTask(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改purchase_check_details表设备状态
|
||||
*/
|
||||
private int updatePuchaseCheckDetails(MaInputRecord maInputRecord, String state) {
|
||||
maInputRecord.setStatus(state);
|
||||
return checkDetailsMapper.updatePuchaseCheckDetailsStatus(maInputRecord);
|
||||
}
|
||||
return 1;
|
||||
|
||||
/**
|
||||
* 修改purchase_macode_info表设备状态
|
||||
*/
|
||||
private int updatePurchaseMacodeInfoStatus(MaInputRecord maInputRecord ,String checkResult) {
|
||||
if ("1".equals(checkResult)){
|
||||
//综合服务中心通过
|
||||
maInputRecord.setStatus("3");
|
||||
}else {
|
||||
//综合服务中心不通过
|
||||
maInputRecord.setStatus("4");
|
||||
}
|
||||
return purchaseCheckServiceCenterMapper.updatePurchaseMacodeInfoStatus(maInputRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import java.util.stream.Collectors;
|
|||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.bonus.sgzb.base.api.domain.*;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
|
|
@ -296,31 +297,53 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
* 通过/不通过
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int modifyManageStatus(MaInputVO maInputVO) {
|
||||
Long taskId = maInputVO.getTaskId();
|
||||
String checkResult = maInputVO.getCheckResult();
|
||||
List<MaInputRecord> inputRecordList = maInputVO.getInputRecordList();
|
||||
for (MaInputRecord maInputRecord : inputRecordList) {
|
||||
int i;
|
||||
Long typeId = maInputRecord.getTypeId();
|
||||
// 修改机具入库状态
|
||||
MaMachine maMachine = new MaMachine();
|
||||
maMachine.setMaId(maInputRecord.getMaId());
|
||||
maMachine.setMaCode(maInputRecord.getMaCode());
|
||||
|
||||
//修改编码管理表入库状态
|
||||
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
|
||||
purchaseMacodeInfo.setTaskId(taskId);
|
||||
purchaseMacodeInfo.setTypeId(typeId);
|
||||
purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode());
|
||||
|
||||
// 修改验收任务详细表入库数量
|
||||
//判断是编码设备还是数量设备
|
||||
if (StringHelper.isNotEmpty(maInputRecord.getMaCode())){
|
||||
//编码设备--修改机具状态
|
||||
i = updataMaMachineStatus(maInputRecord,checkResult);
|
||||
if (i>0){
|
||||
//修改purchase_macode_info表设备状态
|
||||
i = updatePurchaseMacodeInfoStatus(maInputRecord,checkResult);
|
||||
if (i>0){
|
||||
//判断该任务该类型是否全部操作,全部操作后修改purchase_check_details表状态
|
||||
if (purchaseMacodeInfoMapper.isOperateAllPurchaseMacodeInfo(maInputRecord) <= 0) {
|
||||
//查询通过和未通过数量
|
||||
PurchaseCheckInfo purchaseCheckInfo = purchaseMacodeInfoMapper.selectPassAndNoPassNum(maInputRecord);
|
||||
if (purchaseCheckInfo != null && purchaseCheckInfo.getPassNum()==0){
|
||||
//修改purchase_check_details表状态--全部未通过
|
||||
updatePuchaseCheckDetails(maInputRecord,"5");
|
||||
}else if (purchaseCheckInfo != null && purchaseCheckInfo.getNoPassNum()==0){
|
||||
//修改purchase_check_details表状态--全部通过
|
||||
updatePuchaseCheckDetails(maInputRecord,"4");
|
||||
}else if (purchaseCheckInfo != null && purchaseCheckInfo.getPassNum()>0 && purchaseCheckInfo.getNoPassNum()>0){
|
||||
//修改purchase_check_details表状态--部分通过(状态暂时给通过)
|
||||
updatePuchaseCheckDetails(maInputRecord,"4");
|
||||
}
|
||||
}
|
||||
}else {
|
||||
throw new RuntimeException("修改purchase_macode_info表设备状态失败");
|
||||
}
|
||||
}else {
|
||||
throw new RuntimeException("修改ma_machine机具状态失败");
|
||||
}
|
||||
}else {
|
||||
//修改purchase_check_details表状态
|
||||
if ("1".equals(checkResult)){
|
||||
//修改机具状态为在库
|
||||
maMachine.setMaStatus("15");
|
||||
purchaseMacodeInfoMapper.updateMaMachine(maMachine);
|
||||
updatePuchaseCheckDetails(maInputRecord,"4");
|
||||
}else {
|
||||
updatePuchaseCheckDetails(maInputRecord,"5");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 修改编码管理的入库状态
|
||||
if ("1".equals(checkResult)){
|
||||
MaType maType = purchaseMacodeInfoMapper.selectTypeByTypeId(typeId);
|
||||
// 库存添加
|
||||
maType.setNum((maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum())
|
||||
|
|
@ -343,7 +366,6 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
purchaseCheckDetails.setTaskId(taskId);
|
||||
purchaseCheckDetails.setTypeId(typeId);
|
||||
purchaseCheckDetails.setInputNum(inputNum.add(maInputRecord.getInputNum() == null ? new BigDecimal(0) : maInputRecord.getInputNum()));
|
||||
purchaseCheckDetails.setStatus(4);
|
||||
checkDetailsMapper.updateByTaskIdTypeId(purchaseCheckDetails);
|
||||
|
||||
// 新增入库任务详细表
|
||||
|
|
@ -358,38 +380,99 @@ public class PurchaseMacodeInfoServiceImpl implements IPurchaseMacodeInfoService
|
|||
applyDetails.setCompanyId(maInputRecord.getCompanyId());
|
||||
purchaseMacodeInfoMapper.insertInputApplyDetails(applyDetails);
|
||||
|
||||
purchaseMacodeInfo.setStatus("1");
|
||||
purchaseMacodeInfoMapper.updateMacodeByType(purchaseMacodeInfo);
|
||||
|
||||
// 新增入库记录
|
||||
purchaseMacodeInfoMapper.insertMaInputRecord(maInputRecord);
|
||||
}else {
|
||||
//删除ma_machine表
|
||||
purchaseMacodeInfoMapper.deleteMaMachineInfoByMaId(maInputRecord.getMaId());
|
||||
//删除ma_machine_label表
|
||||
purchaseMacodeInfoMapper.deleteMaMachineLabelByMaId(maInputRecord.getMaId());
|
||||
//删除ma_label_bind表
|
||||
purchaseMacodeInfoMapper.deleteMaLabelBindByMaId(maInputRecord.getMaId());
|
||||
//修改purchase_macode_info表
|
||||
purchaseMacodeInfoMapper.updatetePurchaseMaCodeInfoByMaCodeAndTaskIdAndTypeId(taskId, typeId, maInputRecord.getMaCode());
|
||||
//修改purchase_check_details表
|
||||
checkDetailsMapper.updatePurchaseCheckDetailsByTaskId(taskId, typeId);
|
||||
}
|
||||
}
|
||||
//判断是否全部已操作(通过或不通过)
|
||||
int count=purchaseMacodeInfoMapper.isOperateAll(taskId);
|
||||
if (count<=0){
|
||||
//全部审核任务状态改为已审核
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(28);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
taskMapper.updateTmTask(task);
|
||||
int i;
|
||||
//是否为全部不通过
|
||||
int count1 = purchaseMacodeInfoMapper.selectPurchaseCheckDetailsStatus(taskId);
|
||||
if (count1<=0){
|
||||
//全不通过
|
||||
i=updateTaskStatus(taskId,107);
|
||||
if (i<=0){
|
||||
throw new RuntimeException("修改任务状态失败");
|
||||
}
|
||||
}else {
|
||||
//判断是全通过还是部分通过
|
||||
int count2 = purchaseMacodeInfoMapper.isOperateAllPass(taskId);
|
||||
if (count2>0){
|
||||
//部分通过
|
||||
i=updateTaskStatus(taskId,123);
|
||||
if (i<=0){
|
||||
throw new RuntimeException("修改任务状态失败");
|
||||
}
|
||||
}else {
|
||||
//全部通过
|
||||
i=updateTaskStatus(taskId,28);
|
||||
if (i<=0){
|
||||
throw new RuntimeException("修改任务状态失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务状态
|
||||
*/
|
||||
public int updateTaskStatus(Long taskId, int taskStatus) {
|
||||
TmTask task = new TmTask();
|
||||
task.setTaskId(taskId);
|
||||
task.setTaskStatus(taskStatus);
|
||||
task.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
task.setUpdateTime(DateUtils.getNowDate());
|
||||
return taskMapper.updateTmTask(task);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改purchase_check_details表设备状态
|
||||
*/
|
||||
private int updatePuchaseCheckDetails(MaInputRecord maInputRecord, String state) {
|
||||
maInputRecord.setStatus(state);
|
||||
return checkDetailsMapper.updatePuchaseCheckDetailsStatus(maInputRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改ma_machine表设备状态
|
||||
*/
|
||||
private int updataMaMachineStatus(MaInputRecord maInputRecord, String checkResult) {
|
||||
int i=1;
|
||||
if ("1".equals(checkResult)){
|
||||
//修改机具状态为在库
|
||||
MaMachine maMachine = new MaMachine();
|
||||
maMachine.setMaId(maInputRecord.getMaId());
|
||||
maMachine.setMaCode(maInputRecord.getMaCode());
|
||||
maMachine.setMaStatus("15");
|
||||
i= purchaseMacodeInfoMapper.updateMaMachine(maMachine);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改purchase_macode_info表设备状态
|
||||
*/
|
||||
private int updatePurchaseMacodeInfoStatus(MaInputRecord maInputRecord ,String checkResult) {
|
||||
//修改编码管理表入库状态
|
||||
PurchaseMacodeInfo purchaseMacodeInfo = new PurchaseMacodeInfo();
|
||||
purchaseMacodeInfo.setTaskId(maInputRecord.getTaskId());
|
||||
purchaseMacodeInfo.setTypeId(maInputRecord.getTypeId());
|
||||
purchaseMacodeInfo.setMaCode(maInputRecord.getMaCode());
|
||||
if ("1".equals(checkResult)){
|
||||
//入库通过
|
||||
purchaseMacodeInfo.setStatus("1");
|
||||
}else {
|
||||
//入库不通过
|
||||
purchaseMacodeInfo.setStatus("2");
|
||||
}
|
||||
return purchaseMacodeInfoMapper.updateMacodeByType(purchaseMacodeInfo);
|
||||
}
|
||||
|
||||
private List<PurchaseMacodeInfo> selectPutinDetailsAddTypeId(PurchaseMacodeInfo purchaseMacodeInfo) {
|
||||
return purchaseMacodeInfoMapper.selectPutinDetailsAddTypeId(purchaseMacodeInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<update id="updateByTaskIdTypeId">
|
||||
update purchase_check_details set check_num = #{inputNum},status = #{status},input_num=#{inputNum},input_status='1',input_time=NOW() where task_id = #{taskId} and type_id = #{typeId}
|
||||
update purchase_check_details set check_num = #{inputNum},input_num=#{inputNum},input_status='1',input_time=NOW() where task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updateCheckDetails">
|
||||
update purchase_check_details set status = '0' where task_id = #{taskId}
|
||||
|
|
@ -267,4 +267,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<update id="updateByTaskId">
|
||||
update purchase_check_details set bind_num = bind_num - 1 , status='7' where task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updatePuchaseCheckDetailsStatus">
|
||||
update purchase_check_details set status = #{status} where task_id = #{taskId} and type_id = #{typeId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_user su on pci.purchaser = su.user_id
|
||||
LEFT JOIN purchase_check_details pcd on pcd.task_id=pci.task_id
|
||||
where task_type = 23
|
||||
<if test="taskStatus != null">and tk.task_status = #{taskStatus}</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (tk.code like concat('%',#{keyWord},'%') or
|
||||
su.nick_name like concat('%',#{keyWord},'%')
|
||||
|
|
@ -50,8 +51,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND ((pci.purchase_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))
|
||||
or (pci.arrival_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')))
|
||||
AND (pci.purchase_time BETWEEN #{startTime} AND #{endTime})
|
||||
or (pci.arrival_time BETWEEN #{startTime} AND #{endTime})
|
||||
</if>
|
||||
GROUP BY pcd.task_id
|
||||
order by pci.create_time desc
|
||||
|
|
@ -119,6 +120,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{taskId}
|
||||
</foreach>
|
||||
</delete>
|
||||
<delete id="deletePurchaseMacodeInfoByTaskId">
|
||||
DELETE
|
||||
ma_machine, ma_label_bind, ma_machine_label, purchase_macode_info
|
||||
FROM ma_machine
|
||||
LEFT JOIN ma_label_bind ON ma_machine.ma_id = ma_label_bind.ma_id
|
||||
LEFT JOIN ma_machine_label ON ma_machine.ma_id = ma_machine_label.ma_id
|
||||
LEFT JOIN purchase_macode_info ON ma_machine.ma_code = purchase_macode_info.ma_code
|
||||
WHERE ma_machine.ma_code =
|
||||
#{code}
|
||||
</delete>
|
||||
|
||||
<select id="selectTypeNameByTaskId" resultType="java.lang.String">
|
||||
select GROUP_CONCAT(type_name) typeName from
|
||||
|
|
@ -172,12 +183,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
CASE tk.task_status
|
||||
WHEN 28 THEN
|
||||
tk.update_time
|
||||
WHEN 123 THEN
|
||||
tk.update_time
|
||||
ELSE
|
||||
''
|
||||
END as inputTime,
|
||||
CASE tk.task_status
|
||||
WHEN 28 THEN
|
||||
us.user_name
|
||||
WHEN 123 THEN
|
||||
us.user_name
|
||||
ELSE
|
||||
''
|
||||
END as inputUser
|
||||
|
|
@ -186,7 +201,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join (select id,name from sys_dic where p_id = 50) dict on tk.task_status = dict.id
|
||||
left join sys_user su on pci.purchaser = su.user_id
|
||||
LEFT JOIN sys_user us on us.user_id = tk.update_by
|
||||
where task_type = 23 and tk.task_status in (26,28,107)
|
||||
where task_type = 23
|
||||
<if test="taskStatus != null">and tk.task_status = #{taskStatus}</if>
|
||||
<if test="taskStatus == null">and tk.task_status in (28,105,107,123)</if>
|
||||
<if test="keyWord != null and keyWord != ''">and tk.code like concat('%',#{keyWord},'%')</if>
|
||||
<if test="purchaseTime != null and purchaseTime != ''">and pci.purchase_time = #{purchaseTime}</if>
|
||||
<if test="arrivalTime != null and arrivalTime != ''">and pci.arrival_time = #{arrivalTime}</if>
|
||||
|
|
@ -198,7 +215,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||
WHERE pcd.task_id = pci.task_id
|
||||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND (pci.purchase_time BETWEEN #{startTime} AND #{endTime})
|
||||
or (pci.arrival_time BETWEEN #{startTime} AND #{endTime})
|
||||
</if></if>
|
||||
order by pci.id desc
|
||||
</select>
|
||||
<select id="exportList" resultType="com.bonus.sgzb.material.domain.PurchaseCheckInfo">
|
||||
|
|
@ -334,4 +354,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
or mt3.type_name like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectPurchaseMacodeInfoByTaskId"
|
||||
resultType="com.bonus.sgzb.material.domain.PurchaseCheckInfo">
|
||||
SELECT
|
||||
ma_code as code
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id=#{taskId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -129,6 +129,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and task_id = #{taskId}
|
||||
and type_id = #{typeId}
|
||||
</update>
|
||||
<update id="updatePurchaseMacodeInfoStatus">
|
||||
update purchase_macode_info set status = #{status} where task_id = #{taskId} and ma_code = #{maCode} and type_id = #{typeId}
|
||||
</update>
|
||||
|
||||
<delete id="deletePurchaseCheckInfoByTaskId" parameterType="Long">
|
||||
delete from purchase_check_info where task_id = #{taskId}
|
||||
|
|
@ -276,7 +279,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_user su on pci.purchaser = su.user_id
|
||||
LEFT JOIN sys_user us on us.user_id = tk.update_by
|
||||
LEFT JOIN purchase_check_details pcd on pcd.task_id=pci.task_id
|
||||
where task_type = 23 and tk.task_status in (26,28,105,106,107)
|
||||
where task_type = 23
|
||||
<if test="taskStatus != null"> and tk.task_status = #{taskStatus}</if>
|
||||
<if test="taskStatus == null"> and tk.task_status in (28,105,106,107,122,123)</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
and (tk.code like concat('%',#{keyWord},'%') or
|
||||
su.user_name like concat('%',#{keyWord},'%')
|
||||
|
|
@ -294,8 +299,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND ((pci.purchase_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59'))
|
||||
or (pci.arrival_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')))
|
||||
AND (pci.purchase_time BETWEEN #{startTime} AND #{endTime})
|
||||
or (pci.arrival_time BETWEEN #{startTime} AND #{endTime})
|
||||
</if>
|
||||
GROUP BY pcd.task_id
|
||||
order by pci.id desc
|
||||
|
|
@ -436,4 +441,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
task_id = #{taskId} and status != 7 and `status` !=3
|
||||
</select>
|
||||
<select id="isOperateAllPurchaseMacodeInfo" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND type_id = #{typeId}
|
||||
AND `status` = '0'
|
||||
</select>
|
||||
<select id="isOperateAllNot" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND type_id = #{typeId}
|
||||
AND `status` != '4'
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -366,6 +366,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
CASE
|
||||
WHEN pmi.ma_code is null THEN
|
||||
CASE
|
||||
WHEN pcd.status = 6 THEN 0
|
||||
WHEN pcd.status = 4 THEN 1
|
||||
WHEN pcd.status = 5 THEN 2
|
||||
ELSE 0
|
||||
|
|
@ -376,7 +377,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mm.ma_id maId,
|
||||
if(pmi.ma_code is not null, 1, pcd.check_num) checkNum
|
||||
from purchase_check_details pcd
|
||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id
|
||||
left join purchase_macode_info pmi on pmi.task_id = pcd.task_id and pmi.type_id = pcd.type_id and pmi.`status`!='4'
|
||||
left join ma_machine mm on pmi.ma_code = mm.ma_code
|
||||
left join ma_type mt on pcd.type_id = mt.type_id
|
||||
left join ma_type mt1 on mt.parent_id = mt1.type_id
|
||||
|
|
@ -439,7 +440,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
WHERE
|
||||
pcd.task_id = #{taskId}
|
||||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != '3' and pcd.`status`!='7'
|
||||
<if test="dictName != null and dictName != ''">
|
||||
and (mt.type_name like concat('%',#{dictName},'%') or
|
||||
mt1.type_name like concat('%',#{dictName},'%'))
|
||||
|
|
@ -448,8 +449,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
STATUS
|
||||
) aa
|
||||
WHERE
|
||||
`status` != 0
|
||||
AND `status` !=2
|
||||
`status` ='1'
|
||||
</select>
|
||||
<select id="selectPutinDetailsAddTypeId" resultType="com.bonus.sgzb.material.domain.PurchaseMacodeInfo">
|
||||
select pcd.production_time productionTime,
|
||||
|
|
@ -488,29 +488,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by status
|
||||
</select>
|
||||
<select id="isOperateAll" resultType="java.lang.Integer">
|
||||
SELECT count(*)
|
||||
FROM (SELECT CASE
|
||||
|
||||
WHEN
|
||||
pmi.ma_code IS NOT NULL THEN
|
||||
CASE
|
||||
|
||||
WHEN pmi.STATUS = 0 THEN
|
||||
1
|
||||
WHEN pmi.STATUS = 1 THEN
|
||||
4
|
||||
WHEN pmi.STATUS = 2 THEN
|
||||
5
|
||||
ELSE 1
|
||||
END
|
||||
ELSE pcd.STATUS
|
||||
END AS STATUS
|
||||
FROM purchase_check_details pcd
|
||||
LEFT JOIN purchase_macode_info pmi ON pmi.task_id = pcd.task_id
|
||||
AND pmi.type_id = pcd.type_id
|
||||
LEFT JOIN ma_machine mm ON pmi.ma_code = mm.ma_code
|
||||
WHERE pcd.task_id = #{taskId}) aa
|
||||
WHERE (STATUS = 1 OR STATUS = 6)
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_check_details
|
||||
WHERE
|
||||
`status` = '6'
|
||||
</select>
|
||||
<select id="selectPurchaseCheckDetailsStatus" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
|
|
@ -540,6 +523,37 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
AND pcd.`status` != 3
|
||||
AND pcd.`status` != 5
|
||||
</select>
|
||||
<select id="isOperateAllPurchaseMacodeInfo" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND type_id = #{typeId}
|
||||
AND `status` = '3'
|
||||
</select>
|
||||
<select id="selectPassAndNoPassNum" resultType="com.bonus.sgzb.material.domain.PurchaseCheckInfo">
|
||||
SELECT
|
||||
COUNT(pmi.id) as passNum,
|
||||
COUNT(pmi2.id) as noPassNum
|
||||
FROM
|
||||
purchase_macode_info pmi
|
||||
LEFT JOIN purchase_macode_info pmi2 on pmi.task_id=pmi2.task_id and pmi.type_id=pmi2.type_id and pmi2.`status`='2'
|
||||
WHERE
|
||||
pmi.task_id = #{taskId}
|
||||
and pmi.type_id = #{typeId}
|
||||
and pmi.`status`='1'
|
||||
</select>
|
||||
<select id="isOperateAllPass" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
FROM
|
||||
purchase_macode_info
|
||||
WHERE
|
||||
task_id = #{taskId}
|
||||
AND `status` = '2'
|
||||
</select>
|
||||
|
||||
<update id="updateTypeByTypeId">
|
||||
update ma_type set num = #{num} where type_id = #{typeId}
|
||||
|
|
|
|||
|
|
@ -323,6 +323,15 @@ export function purchaseCheckInfoRemove(maCode) {
|
|||
method: 'delete',
|
||||
})
|
||||
}
|
||||
|
||||
//提交审核
|
||||
export function submitCheck(taskId) {
|
||||
return request({
|
||||
url: `/material/purchaseCheckDetails/submitCheck/${taskId}`,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
//新增计划管理
|
||||
export function addPlanManagement(data) {
|
||||
return request({
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<el-table v-loading="loading" :data="equipmentList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :selectable="selectable" />
|
||||
<el-table-column label="序号" align="center" type="index" />
|
||||
<el-table-column label="机具类型名称" align="center" prop="machineTypeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="设备类型" align="center" prop="machineTypeName" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="规格型号" align="center" prop="specificationType" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="管理模式" align="center" prop="manageType" :show-overflow-tooltip="true">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -56,7 +56,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="机具厂家" align="center" prop="supplier" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="采购数量" align="center" prop="purchaseNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="验收数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="验收通过数量" align="center" prop="checkNum" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="验收图片" align="center" prop="checkUrlName">
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
|
|
@ -76,10 +76,10 @@
|
|||
<span v-if="scope.row.status == 1">已验收</span>
|
||||
<span v-if="scope.row.status == 2">待通知</span>
|
||||
<span v-if="scope.row.status == 3">验收不通过</span>
|
||||
<span v-if="scope.row.status == 4">已审核</span>
|
||||
<span v-if="scope.row.status == 5">已审核</span>
|
||||
<span v-if="scope.row.status == 4">已入库</span>
|
||||
<span v-if="scope.row.status == 5">入库驳回</span>
|
||||
<span v-if="scope.row.status == 6">入库待审核</span>
|
||||
<span v-if="scope.row.status == 7">已审核</span>
|
||||
<span v-if="scope.row.status == 7">综合服务中心未通过</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150" v-if="!isView">
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
v-model="form.checkNum"
|
||||
style="width: 100%"
|
||||
controls-position="right"
|
||||
:min="1"
|
||||
:min="0"
|
||||
:max="form.purchaseNum"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
|
|||
|
|
@ -38,6 +38,23 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskState"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskState"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskState"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
|
|
@ -219,12 +236,8 @@
|
|||
type="success"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.purchasingStatus != '已入库' &&
|
||||
scope.row.purchasingStatus != '已审核' &&
|
||||
scope.row.purchasingStatus != '已验收合格' &&
|
||||
scope.row.purchasingStatus != '待审核' &&
|
||||
scope.row.purchasingStatus != '验收不通过' &&
|
||||
scope.row.purchasingStatus != '驳回'
|
||||
scope.row.purchasingStatus == '待通知' ||
|
||||
scope.row.purchasingStatus == '待验收'
|
||||
"
|
||||
@click="handleAccept(scope.row)"
|
||||
>验收</el-button
|
||||
|
|
@ -234,23 +247,34 @@
|
|||
type="warning"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
(scope.row.purchasingStatus == '已验收合格' ||
|
||||
scope.row.purchasingStatus == '待审核') &&
|
||||
(scope.row.purchasingStatus == '验收合格') &&
|
||||
scope.row.manageType != '1'
|
||||
"
|
||||
@click="handleCode(scope.row)"
|
||||
v-hasPermi="['coding:manage']"
|
||||
>编码管理</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
(scope.row.purchasingStatus == '验收合格')
|
||||
"
|
||||
@click="handleSubmit(scope.row)"
|
||||
>提交审核</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="info"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.purchasingStatus == '已验收合格' ||
|
||||
scope.row.purchasingStatus == '已入库' ||
|
||||
scope.row.purchasingStatus == '已审核' ||
|
||||
scope.row.purchasingStatus == '待审核'
|
||||
scope.row.purchasingStatus == '验收合格' ||
|
||||
scope.row.purchasingStatus == '综合服务中心审核中' ||
|
||||
scope.row.purchasingStatus == '入库审核中' ||
|
||||
scope.row.purchasingStatus == '入库审核未通过' ||
|
||||
scope.row.purchasingStatus == '部分已入库' ||
|
||||
scope.row.purchasingStatus == '已全部入库'
|
||||
"
|
||||
@click="handlePrint(scope.row)"
|
||||
>验收单</el-button
|
||||
|
|
@ -261,10 +285,10 @@
|
|||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
v-if="
|
||||
scope.row.purchasingStatus != '已入库' &&
|
||||
scope.row.purchasingStatus != '已审核' &&
|
||||
scope.row.purchasingStatus != '已验收合格' &&
|
||||
scope.row.purchasingStatus != '待审核'
|
||||
scope.row.purchasingStatus == '待通知' ||
|
||||
scope.row.purchasingStatus == '验收未通过' ||
|
||||
scope.row.purchasingStatus == '综合服务中心未通过' ||
|
||||
scope.row.purchasingStatus == '入库审核未通过'
|
||||
"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button
|
||||
|
|
@ -494,6 +518,7 @@ import {
|
|||
getPurchaseCheckInfo,
|
||||
getAcceptanceForm,
|
||||
purchaseCheckInfoRemove,
|
||||
submitCheck,
|
||||
} from '@/api/store/newBuy'
|
||||
import {
|
||||
getRepairedList,
|
||||
|
|
@ -525,6 +550,20 @@ export default {
|
|||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskState: null },
|
||||
{ label: '待通知', taskState: 24 },
|
||||
{ label: '待验收', taskState: 25 },
|
||||
{ label: '验收合格', taskState: 26 },
|
||||
{ label: '验收未通过', taskState: 27 },
|
||||
{ label: '综合服务中心审核中', taskState: 122 },
|
||||
{ label: '综合服务中心未通过', taskState: 106 },
|
||||
{ label: '入库审核中', taskState: 105 },
|
||||
{ label: '入库审核未通过', taskState: 107 },
|
||||
{ label: '部分已入库', taskState: 123 },
|
||||
{ label: '已全部入库', taskState: 28 }
|
||||
],
|
||||
// 字典表格数据
|
||||
typeList: [],
|
||||
// 弹出层标题
|
||||
|
|
@ -538,6 +577,7 @@ export default {
|
|||
time: null, //申请时间
|
||||
name: undefined,
|
||||
typeId: '',
|
||||
taskState: null,
|
||||
keyWord: '',
|
||||
},
|
||||
openPrint: false,
|
||||
|
|
@ -566,6 +606,7 @@ export default {
|
|||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
typeId: this.queryParams.typeId,
|
||||
taskStatus: this.queryParams.taskState,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
}
|
||||
|
|
@ -643,6 +684,24 @@ export default {
|
|||
})
|
||||
},
|
||||
|
||||
//提交审核
|
||||
handleSubmit(row) {
|
||||
const taskId = row.taskId
|
||||
this.$modal
|
||||
.confirm('是否确认提交审核?')
|
||||
.then(() => {
|
||||
return submitCheck(taskId)
|
||||
})
|
||||
.then((res) => {
|
||||
this.getList()
|
||||
this.$modal.msgSuccess(res.msg)
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err)
|
||||
// this.$modal.msgError(err)
|
||||
})
|
||||
},
|
||||
|
||||
//获取验收单数据
|
||||
getPrintTable(taskId) {
|
||||
getAcceptanceForm({ taskId: taskId }).then((response) => {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
placeholder="请选择设备类型"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="typeItem in typeList"
|
||||
|
|
@ -37,12 +37,29 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskState"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 210px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskState"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskState"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
style="width: 210px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
|
@ -111,7 +128,7 @@
|
|||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="采购机具设备"
|
||||
label="设备类型"
|
||||
align="center"
|
||||
prop="purchasingTypeName"
|
||||
:show-overflow-tooltip="true"
|
||||
|
|
@ -133,11 +150,12 @@
|
|||
|
||||
<el-table-column label="采购状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.taskStatus == '26'">已验收合格</span>
|
||||
<span v-if="scope.row.taskStatus == '105'">入库待审核</span>
|
||||
<span v-if="scope.row.taskStatus == '122'">待审核</span>
|
||||
<span v-if="scope.row.taskStatus == '105'">入库审核中</span>
|
||||
<span v-if="scope.row.taskStatus == '106'">已驳回</span>
|
||||
<span v-if="scope.row.taskStatus == '28'">已审核</span>
|
||||
<span v-if="scope.row.taskStatus == '107'">已审核</span>
|
||||
<span v-if="scope.row.taskStatus == '28'">已全部入库</span>
|
||||
<span v-if="scope.row.taskStatus == '107'">入库审核未通过</span>
|
||||
<span v-if="scope.row.taskStatus == '123'">部分已入库</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
|
@ -164,7 +182,7 @@
|
|||
size="mini"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.taskStatus == '26'"
|
||||
v-if="scope.row.taskStatus == '122'"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>审核</el-button
|
||||
>
|
||||
|
|
@ -554,6 +572,16 @@ export default {
|
|||
//搜索下拉数据
|
||||
typeList: [],
|
||||
modelList: [],
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskState: null },
|
||||
{ label: '待审核', taskState: 122 },
|
||||
{ label: '入库审核中', taskState: 105 },
|
||||
{ label: '已驳回', taskState: 106 },
|
||||
{ label: '入库审核未通过', taskState: 107 },
|
||||
{ label: '部分已入库', taskState: 123 },
|
||||
{ label: '已全部入库', taskState: 28 }
|
||||
],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
|
|
@ -573,6 +601,7 @@ export default {
|
|||
pageSize: 10,
|
||||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
taskState: null,
|
||||
status: undefined,
|
||||
},
|
||||
query: {
|
||||
|
|
@ -622,6 +651,7 @@ export default {
|
|||
startTime: this.queryParams.time && this.queryParams.time[0],
|
||||
endTime: this.queryParams.time && this.queryParams.time[1],
|
||||
typeId: this.queryParams.typeId,
|
||||
taskStatus: this.queryParams.taskState,
|
||||
pageSize: this.queryParams.pageSize,
|
||||
pageNum: this.queryParams.pageNum,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,16 +8,7 @@
|
|||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="设备类型" prop="typeId">
|
||||
<el-select
|
||||
v-model="queryParams.typeId"
|
||||
|
|
@ -34,6 +25,35 @@
|
|||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="采购状态" prop="taskState">
|
||||
<el-select
|
||||
v-model="queryParams.taskStatus"
|
||||
placeholder="请选择采购状态"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="statusItem in statusList"
|
||||
:key="statusItem.taskStatus"
|
||||
:label="statusItem.label"
|
||||
:value="statusItem.taskStatus"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="关键字" prop="keyWord">
|
||||
<el-input
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入关键字"
|
||||
clearable
|
||||
maxlength="50"
|
||||
style="width: 240px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
|
|
@ -111,13 +131,13 @@
|
|||
<el-table-column
|
||||
label="入库人员"
|
||||
align="center"
|
||||
prop="updateBy"
|
||||
prop="inputUser"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="入库时间"
|
||||
align="center"
|
||||
prop="updateTime"
|
||||
prop="inputTime"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
|
|
@ -134,29 +154,29 @@
|
|||
/>
|
||||
<el-table-column label="状态" align="center" prop="taskStatus">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '26'"
|
||||
>已验收合格</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="primary"
|
||||
v-if="scope.row.taskStatus == '28'"
|
||||
>已审核</el-tag
|
||||
>已全部入库</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="warning"
|
||||
v-if="scope.row.taskStatus == '105'"
|
||||
>待审核</el-tag
|
||||
>入库审核中</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="danger"
|
||||
v-if="scope.row.taskStatus == '107'"
|
||||
>已驳回</el-tag
|
||||
>入库审核未通过</el-tag
|
||||
>
|
||||
<el-tag
|
||||
size="mini"
|
||||
type="success"
|
||||
v-if="scope.row.taskStatus == '123'"
|
||||
>部分已入库</el-tag
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
@ -176,7 +196,6 @@
|
|||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="
|
||||
scope.row.taskStatus == '26' ||
|
||||
scope.row.taskStatus == '105'
|
||||
"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
|
@ -187,7 +206,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
v-if="scope.row.taskStatus == '28'"
|
||||
v-if="scope.row.taskStatus == '28' || scope.row.taskStatus == '123'"
|
||||
@click="handlePrint(scope.row)"
|
||||
>入库单</el-button
|
||||
>
|
||||
|
|
@ -335,9 +354,10 @@
|
|||
<!-- <el-table-column label="不通过原因" align="center" prop="remark" show-overflow-tooltip /> -->
|
||||
<el-table-column label="状态" align="center" prop="status">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status == '0'">未入库</span>
|
||||
<span v-if="scope.row.status == '0'">待审核</span>
|
||||
<span v-if="scope.row.status == '1'">已入库</span>
|
||||
<span v-if="scope.row.status == '2'">已驳回</span>
|
||||
<span v-if="scope.row.status == '3'">待审核</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
|
@ -359,14 +379,14 @@
|
|||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
v-if="scope.row.status == '0' || scope.row.status == '3'"
|
||||
@click="pass(scope.row)"
|
||||
>通过</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == '0'"
|
||||
v-if="scope.row.status == '0' || scope.row.status == '3'"
|
||||
@click="refused(scope.row)"
|
||||
>不通过</el-button
|
||||
>
|
||||
|
|
@ -554,6 +574,14 @@ export default {
|
|||
//搜索下拉数据
|
||||
typesList: [],
|
||||
modelList: [],
|
||||
// 采购状态下拉数据
|
||||
statusList: [
|
||||
{ label: '全部', taskStatus: null },
|
||||
{ label: '入库审核中', taskStatus: 105 },
|
||||
{ label: '入库审核未通过', taskStatus: 107 },
|
||||
{ label: '部分已入库', taskStatus: 123 },
|
||||
{ label: '已全部入库', taskStatus: 28 }
|
||||
],
|
||||
// 表格数据
|
||||
tableList: [],
|
||||
detailTableList: [],
|
||||
|
|
@ -574,6 +602,7 @@ export default {
|
|||
dictName: undefined,
|
||||
dictType: undefined,
|
||||
status: undefined,
|
||||
taskStatus: null,
|
||||
keyWord: '',
|
||||
typeId: '',
|
||||
},
|
||||
|
|
@ -666,7 +695,7 @@ export default {
|
|||
//是否可用勾选框
|
||||
selectable(row) {
|
||||
console.log(row)
|
||||
if (row.status == '0') {
|
||||
if (row.status == '0' || row.status == '3') {
|
||||
if (
|
||||
(row.manageType == '0' && row.maCode) ||
|
||||
row.manageType == '1'
|
||||
|
|
|
|||
Loading…
Reference in New Issue