优化出库与入库任务下发后先执行入库任务造成出库双取问题;物料同步增加更新;
 拣选异常手动完成;
This commit is contained in:
2025-03-21 23:07:32 +08:00
parent 1f5cf5da0b
commit 0341568eb7
9 changed files with 217 additions and 71 deletions

View File

@@ -0,0 +1,28 @@
package org.nl.common.utils;
import org.springframework.beans.BeanUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
public class StructUtil {
public static String getZdPoint(int row,String source_code) {
if (row == 2 || row == 3) {
return source_code;
}
int blockRow = row == 1 ? 2 : 3;
String replace = source_code.replaceFirst("L0" + row, "L0%s");
return String.format(replace, blockRow);
}
public static String getDeepPoint(int row,String source_code) {
if (row == 1 || row == 4) {
return source_code;
}
int blockRow = row == 2 ? 1 : 4;
String replace = source_code.replaceFirst("L0" + row, "L0%s");
return String.format(replace, blockRow);
}
}

View File

@@ -1,15 +1,16 @@
package org.nl.wms.decision_manage.handler.decisioner.impl.diy; package org.nl.wms.decision_manage.handler.decisioner.impl.diy;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.nl.common.enums.StatusEnum;
import org.nl.common.utils.SpringContextHolder;
import org.nl.wms.decision_manage.handler.decisioner.Decisioner; import org.nl.wms.decision_manage.handler.decisioner.Decisioner;
import org.nl.wms.stor_manage.struct.service.IStIvtStructattrService;
import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr; import org.nl.wms.stor_manage.struct.service.dao.StIvtStructattr;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/* /*
@@ -20,6 +21,9 @@ import java.util.stream.Collectors;
@Service("depthPriority") @Service("depthPriority")
@Slf4j @Slf4j
public class DepthPriorityHandler extends Decisioner<StIvtStructattr, JSONObject> { public class DepthPriorityHandler extends Decisioner<StIvtStructattr, JSONObject> {
public DepthPriorityHandler() {
}
//现场1/4排深位 //现场1/4排深位
@Override @Override
public List<StIvtStructattr> handler(List<StIvtStructattr> list, JSONObject param) { public List<StIvtStructattr> handler(List<StIvtStructattr> list, JSONObject param) {
@@ -51,9 +55,54 @@ public class DepthPriorityHandler extends Decisioner<StIvtStructattr, JSONObject
log.info("获取深货位且浅货位有货仓位耗时:{}", System.currentTimeMillis() - startTime1); log.info("获取深货位且浅货位有货仓位耗时:{}", System.currentTimeMillis() - startTime1);
return depCollect; return depCollect;
} }
log.info("深位优先分配结果: 不存在深位库位,分配结果:" + list.get(0).getStruct_code()); //获取浅货位对应无锁的深货位
log.info("获取深货位有货且浅货位无货仓位:{}", System.currentTimeMillis() - startTime1); IStIvtStructattrService iStIvtStructattrService = SpringContextHolder.getBean(IStIvtStructattrService.class);
return list; if (list.get(0).getStor_code().equals(StatusEnum.STOCK_INFO.code("料箱库"))) {
List<StIvtStructattr> list1 = iStIvtStructattrService.list(new LambdaUpdateWrapper<StIvtStructattr>()
.in(StIvtStructattr::getRow_num, Arrays.asList(1, 4))
.eq(StIvtStructattr::getStor_code, StatusEnum.STOCK_INFO.code("料箱库"))
.eq(StIvtStructattr::getIs_used, 1)
.eq(StIvtStructattr::getLock_type, StatusEnum.LOCK.code("无锁")));
if (!list1.isEmpty()) {
List<StIvtStructattr> combinedResult = new ArrayList<>();
//1排
List<StIvtStructattr> deepCollect1 = list1.stream()
.filter(a -> a.getRow_num() == 1)
.collect(Collectors.toList());
List<StIvtStructattr> shallowCollect1 = list.stream()
.filter(a -> a.getRow_num() == 2)
.collect(Collectors.toList());
Set<String> deepCollect1Set = deepCollect1.stream()
.map(r -> r.getCol_num() + "_" + r.getLayer_num())
.collect(Collectors.toSet());
List<StIvtStructattr> intersection1 = shallowCollect1.stream()
.filter(r ->deepCollect1Set.contains(r.getCol_num() + "_" + r.getLayer_num()))
.collect(Collectors.toList());
if (!intersection1.isEmpty()) {
combinedResult.addAll(intersection1);
} else {
//4排
List<StIvtStructattr> deepCollect2 = list1.stream()
.filter(a -> a.getRow_num() == 4)
.collect(Collectors.toList());
List<StIvtStructattr> shallowCollect2 = list.stream()
.filter(a -> a.getRow_num() == 3)
.collect(Collectors.toList());
Set<String> deepCollect2Set = deepCollect2.stream()
.map(r -> r.getCol_num() + "_" + r.getLayer_num())
.collect(Collectors.toSet());
List<StIvtStructattr> intersection2 = shallowCollect2.stream()
.filter(r -> deepCollect2Set.contains(r.getCol_num() + "_" + r.getLayer_num()))
.collect(Collectors.toList());
combinedResult.addAll(intersection2);
}
log.info("获取深货位有货且浅货位无货仓位:{}", System.currentTimeMillis() - startTime1);
return combinedResult;
}
return list;
} else {
return list;
}
} }

View File

@@ -125,7 +125,7 @@ public class OutStorageTask extends AbstractTask {
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public String DoubleStor(StIvtStructattr struct) { public String DoubleStor(StIvtStructattr struct) {
String blockPoint = getZdPoint(struct.getRow_num(),struct.getStruct_code()); String blockPoint = StructUtil.getZdPoint(struct.getRow_num(),struct.getStruct_code());
//浅货位 //浅货位
log.info("1-----出库分配:{},当前货位:{}",blockPoint,struct.getStruct_code()); log.info("1-----出库分配:{},当前货位:{}",blockPoint,struct.getStruct_code());
if (blockPoint.equals(struct.getStruct_code())){ if (blockPoint.equals(struct.getStruct_code())){
@@ -193,12 +193,5 @@ public class OutStorageTask extends AbstractTask {
//更新起点终点状态 //更新起点终点状态
} }
private static String getZdPoint(int row,String source_code) {
if (row == 2 || row == 3) {
return source_code;
}
int blockRow = row == 1 ? 2 : 3;
String replace = source_code.replaceFirst("L0" + row, "L0%s");
return String.format(replace, blockRow);
}
} }

View File

@@ -59,6 +59,8 @@ public class GateWayService {
Integer h = vehicle.getH(); Integer h = vehicle.getH();
result.putAll(MapOf.of("height",h,"type",h)); result.putAll(MapOf.of("height",h,"type",h));
} }
if (service.equals("Device")){
}
if (service.equals("ErrorTask")){ if (service.equals("ErrorTask")){
AtomicReference<JSONObject> reference = new AtomicReference<>(new JSONObject()); AtomicReference<JSONObject> reference = new AtomicReference<>(new JSONObject());
RedissonUtils.lock(()->{ RedissonUtils.lock(()->{

View File

@@ -291,6 +291,9 @@ public class MdGruopDickServiceImpl extends ServiceImpl<MdGruopDickMapper, MdGru
} }
materialCode = mdMeMaterialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_code", material_code)); materialCode = mdMeMaterialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_code", material_code));
} }
if (materialCode == null) {
throw new BadRequestException("" + (i + 1) + "行," + material_code + "在ERP系统上检索存在重复物料ID物料信息有误请检查");
}
materialCode.setSingle_weight(new BigDecimal(single_weight)); materialCode.setSingle_weight(new BigDecimal(single_weight));
//更新单重 //更新单重
LambdaUpdateWrapper<MdMeMaterialbase> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<MdMeMaterialbase> updateWrapper = new LambdaUpdateWrapper<>();

View File

@@ -6,32 +6,25 @@ import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.kingdee.bos.webapi.sdk.K3CloudApi;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.nl.common.TableDataInfo; import org.nl.common.TableDataInfo;
import org.nl.common.anno.Log; import org.nl.common.anno.Log;
import org.nl.common.domain.entity.PageQuery; import org.nl.common.domain.entity.PageQuery;
import org.nl.common.domain.exception.BadRequestException; import org.nl.common.domain.exception.BadRequestException;
import org.nl.common.utils.FileUtil;
import org.nl.common.utils.MapOf;
import org.nl.common.utils.SecurityUtils; import org.nl.common.utils.SecurityUtils;
import org.nl.wms.base_manage.material.service.IMdMeMaterialbaseService;
import org.nl.wms.base_manage.material.service.dao.MdMeMaterialbase; import org.nl.wms.base_manage.material.service.dao.MdMeMaterialbase;
import org.nl.wms.external_system.erp.SyncErpService; import org.nl.wms.external_system.erp.SyncErpService;
import org.nl.wms.pm_manage.form_data.service.IPmFormDataService; import org.nl.wms.pm_manage.form_data.service.IPmFormDataService;
import org.nl.wms.pm_manage.form_data.service.dao.PmFormData; import org.nl.wms.pm_manage.form_data.service.dao.PmFormData;
import org.nl.wms.pm_manage.form_data.service.dao.mapper.PmFormDataMapper; import org.nl.wms.pm_manage.form_data.service.dao.mapper.PmFormDataMapper;
import org.nl.wms.sync_manage.service.field_mapping.dto.MappingQuery;
import org.nl.wms.sync_manage.service.form_mapping.ISyncFormMappingService; import org.nl.wms.sync_manage.service.form_mapping.ISyncFormMappingService;
import org.nl.wms.sync_manage.service.form_mapping.dao.SyncFormMapping; import org.nl.wms.sync_manage.service.form_mapping.dao.SyncFormMapping;
import org.nl.wms.sync_manage.service.form_mapping.dto.FormMappingQuery; import org.nl.wms.sync_manage.service.form_mapping.dto.FormMappingQuery;
import org.nl.wms.sync_manage.service.form_mapping.impl.SyncFormMappingServiceImpl; import org.nl.wms.sync_manage.service.form_mapping.impl.SyncFormMappingServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.expression.EvaluationContext;
import org.springframework.expression.Expression; import org.springframework.expression.Expression;
import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser;
import org.springframework.expression.spel.support.StandardEvaluationContext; import org.springframework.expression.spel.support.StandardEvaluationContext;
@@ -39,7 +32,9 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.*; import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
@@ -72,14 +67,17 @@ public class SyncFormMappingController {
private IPmFormDataService formDataService; private IPmFormDataService formDataService;
@Autowired @Autowired
private SyncErpService syncErpService; private SyncErpService syncErpService;
@Autowired
private IMdMeMaterialbaseService iMdMeMaterialbaseService;
public static void main(String[] args) { public static void main(String[] args) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
jsonObject.put("ddd","kkk"); jsonObject.put("ddd", "kkk");
SpelExpressionParser SPEL_PARSER = new SpelExpressionParser(); SpelExpressionParser SPEL_PARSER = new SpelExpressionParser();
StandardEvaluationContext context = new StandardEvaluationContext(); StandardEvaluationContext context = new StandardEvaluationContext();
context.setVariable("query1",jsonObject); context.setVariable("query1", jsonObject);
Expression expression = SPEL_PARSER.parseExpression("#query1['ddd']"); Expression expression = SPEL_PARSER.parseExpression("#query1['ddd']");
String value = expression.getValue(context, String.class); String value = expression.getValue(context, String.class);
System.out.println(value); System.out.println(value);
@@ -112,46 +110,74 @@ public class SyncFormMappingController {
@PostMapping("/syncAnalyse") @PostMapping("/syncAnalyse")
@Log("表同步测试") @Log("表同步测试")
public ResponseEntity<Object> syncAnalyse(@RequestBody JSONObject form){ public ResponseEntity<Object> syncAnalyse(@RequestBody JSONObject form) {
//参数判读,参数解析,调用参数入库 //参数判读,参数解析,调用参数入库
Object analyseData = form.remove("analyseData"); Object analyseData = form.remove("analyseData");
if (analyseData == null){ if (analyseData == null) {
throw new BadRequestException("解析数据不能为空"); throw new BadRequestException("解析数据不能为空");
} }
Object mappingJson = form.get("mapping_json"); Object mappingJson = form.get("mapping_json");
JSONArray array = JSONArray.parseArray(JSON.toJSONString(mappingJson)); JSONArray array = JSONArray.parseArray(JSON.toJSONString(mappingJson));
List<PmFormData> pmFormDatas = formDataService.syncAnalyse(array,form.getString("form_type"),false,(String) analyseData); List<PmFormData> pmFormDataList = formDataService.syncAnalyse(array, form.getString("form_type"), false, (String) analyseData);
//主单据Id if (pmFormDataList != null) {
final String mainId = pmFormDatas.get(0).getId(); if ("BD_MATERIAL".equals(form.getString("form_type"))) {
Set<String> exitFormDataList = pmFormDataMapper.existFormDataList(); String assistUint = "0";
for (PmFormData f : pmFormDatas) { // JSONArray uintJsonArray = JSONObject.parseObject(JSON.toJSONString(r)).getJSONArray("MaterialStock");
//存在ID主单据不新增不修改修改未出库单据的明细 // if (ObjectUtils.isNotEmpty(uintJsonArray)) {
String id = f.getId() + "$" + f.getForm_type(); // JSONObject u1 = JSONObject.parseObject(JSON.toJSONString(uintJsonArray.get(0)));
//实时扫描则同步修改未出库的用料清单单据 // JSONObject u2 = u1.getJSONObject("AuxUnitID");
if (exitFormDataList.contains(id)) { // assistUint = u2 != null ? u2.getString("Number") : "0";
//单据明细 // }
if (StringUtils.isBlank(f.getCode())) { PmFormData mainFormData = pmFormDataList.stream().filter(rs1 -> "BD_MATERIAL".equals(rs1.getForm_type())).collect(Collectors.toList()).get(0);
PmFormData existDtlData = formDataService.getOne(new QueryWrapper<PmFormData>().eq("id", id).select("qty")); JSONObject object = mainFormData.getForm_data();
if (existDtlData.getQty() != null) { String m_code = object.getString("m_code");
formDataService.update(new LambdaUpdateWrapper<PmFormData>() String m_name = object.getString("m_name");
.set(PmFormData::getMaterial_id, f.getMaterial_id()) String m_spec = object.getString("m_spec");
.set(PmFormData::getUnit_id, f.getUnit_id()) String m_unit = mainFormData.getUnit_id();
.set(PmFormData::getForm_data, JSON.toJSONString(f.getForm_data())) PmFormData formData = pmFormDataList.stream().filter(rs1 -> "BD_MATERIAL_1".equals(rs1.getForm_type())).collect(Collectors.toList()).get(0);
.set(PmFormData::getPlan_qty, f.getPlan_qty()) MdMeMaterialbase materialBase = new MdMeMaterialbase();
.set(PmFormData::getActual_qty, f.getActual_qty()) materialBase.setMaterial_id(mainFormData.getId());
.set(PmFormData::getBar_code, f.getBar_code()) materialBase.setMaterial_code(m_code);
.set(PmFormData::getUpdate_name, DateUtil.now()) materialBase.setMaterial_code(m_code);
.set(PmFormData::getUpdate_name, SecurityUtils.getCurrentNickName()) materialBase.setMaterial_name(m_name);
.eq(PmFormData::getId, id)); materialBase.setMaterial_spec(m_spec);
materialBase.setQty_unit_id(m_unit);
materialBase.setAssist_unit_id(assistUint);
materialBase.setPrint_no(formData.getPcsn());
iMdMeMaterialbaseService.save(materialBase);
}
//主单据Id
final String mainId = pmFormDataList.get(0).getId();
Set<String> exitFormDataList = pmFormDataMapper.existFormDataList();
for (PmFormData f : pmFormDataList) {
//存在ID主单据不新增不修改修改未出库单据的明细
String id = f.getId() + "$" + f.getForm_type();
//实时扫描则同步修改未出库的用料清单单据
if (exitFormDataList.contains(id)) {
//单据明细
if (StringUtils.isBlank(f.getCode())) {
PmFormData existDtlData = formDataService.getOne(new QueryWrapper<PmFormData>().eq("id", id).select("qty"));
if (existDtlData.getQty() != null) {
formDataService.update(new LambdaUpdateWrapper<PmFormData>()
.set(PmFormData::getMaterial_id, f.getMaterial_id())
.set(PmFormData::getUnit_id, f.getUnit_id())
.set(PmFormData::getForm_data, JSON.toJSONString(f.getForm_data()))
.set(PmFormData::getPlan_qty, f.getPlan_qty())
.set(PmFormData::getActual_qty, f.getActual_qty())
.set(PmFormData::getBar_code, f.getBar_code())
.set(PmFormData::getUpdate_name, DateUtil.now())
.set(PmFormData::getUpdate_name, SecurityUtils.getCurrentNickName())
.eq(PmFormData::getId, id));
}
} }
} else {
//单据明细
if (StringUtils.isBlank(f.getCode())) {
f.setParent_id(mainId + "$" + form.getString("form_type"));
}
f.setId(id);
formDataService.save(f);
} }
} else {
//单据明细
if (StringUtils.isBlank(f.getCode())) {
f.setParent_id(mainId + "$" + form.getString("form_type"));
}
f.setId(id);
formDataService.save(f);
} }
} }
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);

View File

@@ -381,7 +381,7 @@ public class SyncErpBillsScheduleService {
try { try {
JSONArray mappingJsonArray = JSONArray.parseArray(mappingJson); JSONArray mappingJsonArray = JSONArray.parseArray(mappingJson);
List<PmFormData> formDataList = formDataService.syncAnalyse(mappingJsonArray, formType, dtlSplit, JSON.toJSONString(r)); List<PmFormData> formDataList = formDataService.syncAnalyse(mappingJsonArray, formType, dtlSplit, JSON.toJSONString(r));
if (formDataList != null) { if (ObjectUtils.isNotEmpty(formDataList)) {
String assistUint = "0"; String assistUint = "0";
JSONArray uintJsonArray = JSONObject.parseObject(JSON.toJSONString(r)).getJSONArray("MaterialStock"); JSONArray uintJsonArray = JSONObject.parseObject(JSON.toJSONString(r)).getJSONArray("MaterialStock");
if (ObjectUtils.isNotEmpty(uintJsonArray)) { if (ObjectUtils.isNotEmpty(uintJsonArray)) {
@@ -396,16 +396,27 @@ public class SyncErpBillsScheduleService {
String m_spec = object.getString("m_spec"); String m_spec = object.getString("m_spec");
String m_unit = mainFormData.getUnit_id(); String m_unit = mainFormData.getUnit_id();
PmFormData formData = formDataList.stream().filter(rs1 -> "BD_MATERIAL_1".equals(rs1.getForm_type())).collect(Collectors.toList()).get(0); PmFormData formData = formDataList.stream().filter(rs1 -> "BD_MATERIAL_1".equals(rs1.getForm_type())).collect(Collectors.toList()).get(0);
MdMeMaterialbase materialBase = new MdMeMaterialbase(); MdMeMaterialbase materialInfo = iMdMeMaterialbaseService.getOne(new QueryWrapper<MdMeMaterialbase>().eq("material_code", m_code));
materialBase.setMaterial_id(mainFormData.getId()); if (materialInfo != null) {
materialBase.setMaterial_code(m_code); iMdMeMaterialbaseService.update(new LambdaUpdateWrapper<MdMeMaterialbase>()
materialBase.setMaterial_code(m_code); .set(MdMeMaterialbase::getMaterial_code, m_code)
materialBase.setMaterial_name(m_name); .set(MdMeMaterialbase::getMaterial_name, m_name)
materialBase.setMaterial_spec(m_spec); .set(MdMeMaterialbase::getMaterial_spec, m_spec)
materialBase.setQty_unit_id(m_unit); .set(MdMeMaterialbase::getQty_unit_id, m_unit)
materialBase.setAssist_unit_id(assistUint); .set(MdMeMaterialbase::getAssist_unit_id, assistUint)
materialBase.setPrint_no(formData.getPcsn()); .set(MdMeMaterialbase::getPrint_no, formData.getPcsn())
iMdMeMaterialbaseService.save(materialBase); .eq(MdMeMaterialbase::getMaterial_id, materialInfo.getMaterial_id()));
} else {
MdMeMaterialbase materialBase = new MdMeMaterialbase();
materialBase.setMaterial_id(mainFormData.getId());
materialBase.setMaterial_code(m_code);
materialBase.setMaterial_name(m_name);
materialBase.setMaterial_spec(m_spec);
materialBase.setQty_unit_id(m_unit);
materialBase.setAssist_unit_id(assistUint);
materialBase.setPrint_no(formData.getPcsn());
iMdMeMaterialbaseService.save(materialBase);
}
} }
} catch (Exception e) { } catch (Exception e) {
log.error("解析数据 [{}] 时出现异常: {}", JSON.toJSONString(r), e.getMessage()); log.error("解析数据 [{}] 时出现异常: {}", JSON.toJSONString(r), e.getMessage());

View File

@@ -90,6 +90,17 @@
> >
作业下发 作业下发
</el-button> </el-button>
<el-button
slot="right"
class="filter-item"
type="warning"
icon="el-icon-check"
size="mini"
:disabled="!currentRow"
@click="confirm"
>
处理完成
</el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- slot="right"--> <!-- slot="right"-->
<!-- class="filter-item"--> <!-- class="filter-item"-->
@@ -198,6 +209,7 @@ import crudPick from './pick'
// import UploadDialog from './UploadDialog' // import UploadDialog from './UploadDialog'
const defaultForm = { const defaultForm = {
currentRow: null,
id: null, id: null,
code: null, code: null,
proc_inst_id: null, proc_inst_id: null,
@@ -336,6 +348,21 @@ export default {
this.crud.toQuery() this.crud.toQuery()
this.dis_flag = true this.dis_flag = true
this.task_flag = true this.task_flag = true
}, confirm() {
if (this.currentRow.length === 0) {
this.crud.notify('请选择一行单据', CRUD.NOTIFICATION_TYPE.INFO)
return
}
const ids = Array.isArray(this.currentRow)
? this.currentRow.map(row => row.id)
: [this.currentRow.id];
const param = {
data: ids
}
crudPick.confirm(param).then(res => {
this.crud.notify('单据处理成功!', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
})
} }
} }
} }

View File

@@ -45,6 +45,13 @@ export function taskopen(data) {
data data
}) })
} }
export function confirm(data) {
return request({
url: '/api/pmFormData/confirmStatus',
method: 'post',
data
})
}
export function updateDtl(data) { export function updateDtl(data) {
return request({ return request({
@@ -54,4 +61,4 @@ export function updateDtl(data) {
}) })
} }
export default {add, edit, del, savePickTask, updateStatus, taskopen, updateDtl} export default {add, edit, del, savePickTask, updateStatus, taskopen, updateDtl,confirm}