add:临时通道移库
This commit is contained in:
@@ -25,4 +25,8 @@ public interface AutoRiKuService {
|
||||
* */
|
||||
JSONObject getAllPoint();
|
||||
|
||||
/**
|
||||
* 获取发货区
|
||||
* */
|
||||
JSONObject queryNum(JSONObject whereJson);
|
||||
}
|
||||
|
||||
@@ -209,4 +209,22 @@ public class AutoRiKuServiceImpl implements AutoRiKuService {
|
||||
return jsonAll;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject queryNum(JSONObject whereJson) {
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||
|
||||
String layer_num = whereJson.getString("layer_num");
|
||||
|
||||
// 有货个数
|
||||
JSONArray haveMoney = pointTab.query("layer_num = '" + layer_num + "' and point_type = '9' and IFNULL(vehicle_code,'')<>'' and is_delete = '0' and is_used = '1'").getResultJSONArray(0);
|
||||
|
||||
// 无货个数
|
||||
JSONArray unMoney = pointTab.query("layer_num = '" + layer_num + "' and point_type = '9' and IFNULL(vehicle_code,'')='' and is_delete = '0' and is_used = '1'").getResultJSONArray(0);
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
result.put("haveMoney",haveMoney.size());
|
||||
result.put("unMoney",unMoney.size());
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -37,4 +37,11 @@ public class AutoWebSocketRiKu {
|
||||
|
||||
return new ResponseEntity<>(data, HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/queryNum")
|
||||
@Log("查询发货区")
|
||||
@ApiOperation("查询发货区")
|
||||
public ResponseEntity<Object> queryNum(@RequestBody JSONObject whereJson){
|
||||
return new ResponseEntity<>(autoRiKuService.queryNum(whereJson), HttpStatus.OK);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,6 +325,18 @@ public class StructattrServiceImpl implements StructattrService {
|
||||
.addParamMap(MapOf.of("struct_id", struct_id, "flag", "2"))
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
|
||||
// 计算子卷净重
|
||||
JSONObject json = array.getJSONObject(0);
|
||||
if (ObjectUtil.isNotEmpty(json.getString("net_weight"))) {
|
||||
BigDecimal container_weight = array.stream().map(row -> ((JSONObject) row).getBigDecimal("net_weight")).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
|
||||
for (int j = 0; j < array.size(); j++) {
|
||||
JSONObject jsonObject = array.getJSONObject(j);
|
||||
jsonObject.put("container_weight",container_weight);
|
||||
}
|
||||
}
|
||||
|
||||
// 获取仓位表中的信息
|
||||
JSONObject strInfo = attrTab
|
||||
.query("point_id = '" + struct_id + "'")
|
||||
|
||||
@@ -170,7 +170,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
result.put("message", "下发成功,但未连接ACS!");
|
||||
result.put("data", new JSONArray());
|
||||
|
||||
// 测试数据
|
||||
/* // 测试数据
|
||||
JSONArray data = result.getJSONArray("data");
|
||||
JSONObject a = new JSONObject();
|
||||
a.put("electricity", "86");
|
||||
@@ -218,7 +218,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
}
|
||||
nowJson.put("jsonA1",ArrA1);
|
||||
nowJson.put("jsonLK",ArrLk);
|
||||
result.put("data", nowJson);
|
||||
result.put("data", nowJson);*/
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.point_code TYPEAS s_string
|
||||
输入.row_num TYPEAS s_string
|
||||
输入.block_num TYPEAS s_string
|
||||
输入.sql_str TYPEAS f_string
|
||||
输入.in_stor_id TYPEAS f_string
|
||||
|
||||
@@ -805,6 +806,13 @@
|
||||
AND sa.lock_type = '1'
|
||||
AND sa.is_delete = '0'
|
||||
AND sa.is_used = '1'
|
||||
OPTION 输入.block_num <> ""
|
||||
sa.block_num <> 输入.block_num
|
||||
ENDOPTION
|
||||
OPTION 输入.row_num <> ""
|
||||
sa.row_num <> 输入.row_num
|
||||
ENDOPTION
|
||||
|
||||
GROUP BY
|
||||
sa.block_num,
|
||||
sa.row_num,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package org.nl.wms.st.instor.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -17,19 +18,20 @@ import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.modules.wql.util.WqlUtil;
|
||||
import org.nl.wms.basedata.st.service.impl.UserStorServiceImpl;
|
||||
import org.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.st.inbill.service.RawAssistIStorService;
|
||||
import org.nl.wms.st.inbill.service.StorPublicService;
|
||||
import org.nl.wms.st.instor.service.HandMoveStorService;
|
||||
import org.nl.wms.st.instor.task.EmpMoveTask;
|
||||
import org.nl.wms.st.instor.task.HandMoveStorAcsTask;
|
||||
import org.nl.wms.st.outbill.service.impl.CheckOutBillServiceImpl;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* PC端出入库新增
|
||||
@@ -40,6 +42,7 @@ import java.util.Map;
|
||||
public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
private final StorPublicService storPublicService;
|
||||
private final HandMoveStorAcsTask handMoveStorAcsTask;
|
||||
private final EmpMoveTask empMoveTask;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> pageQuery(Map whereJson, Pageable page) {
|
||||
@@ -153,39 +156,205 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void insertDtl(Map map) {
|
||||
//主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
|
||||
ArrayList<HashMap> rows = (ArrayList<HashMap>) map.get("tableData");
|
||||
map.remove("tableData");
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
String moveinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
String bill_code = CodeUtil.getNewCode("MOVE_CODE");
|
||||
String biz_date = (String) map.get("biz_date");
|
||||
biz_date = biz_date.substring(0, 10);
|
||||
map.put("moveinv_id", moveinv_id);
|
||||
map.put("bill_code", bill_code);
|
||||
map.put("buss_type", "");
|
||||
map.put("create_mode", "01");
|
||||
map.put("input_optid", currentUserId + "");
|
||||
map.put("input_optname", nickName);
|
||||
map.put("input_time", now);
|
||||
map.put("update_optid", currentUserId + "");
|
||||
map.put("update_optname", nickName);
|
||||
map.put("update_time", now);
|
||||
map.put("is_delete", "0");
|
||||
map.put("is_upload", "0");
|
||||
map.put("biz_date", biz_date);
|
||||
Long deptId = SecurityUtils.getDeptId();
|
||||
map.put("sysdeptid", deptId);
|
||||
map.put("syscompanyid", deptId);
|
||||
JSONObject jo_mst = JSONObject.parseObject(JSON.toJSONString(map));
|
||||
//调用明细处理方法
|
||||
JSONObject ret = this.insertDtlByRows(jo_mst, rows);
|
||||
map.put("detail_count", ret.getString("detail_count"));
|
||||
map.put("total_qty", ret.getString("total_qty"));
|
||||
wo_mst.insert(map);
|
||||
String bill_type = MapUtil.getStr(map, "bill_type");
|
||||
|
||||
if (StrUtil.equals(bill_type, "30")) {
|
||||
// 辅道移库: 调用辅道出库方法
|
||||
map = roadInsertDtl(map);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(map.get("tableData"))) {
|
||||
//主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
|
||||
ArrayList<Map> rows = (ArrayList<Map>) map.get("tableData");
|
||||
map.remove("tableData");
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
String now = DateUtil.now();
|
||||
String moveinv_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||
String bill_code = CodeUtil.getNewCode("MOVE_CODE");
|
||||
String biz_date = (String) map.get("biz_date");
|
||||
biz_date = biz_date.substring(0, 10);
|
||||
map.put("moveinv_id", moveinv_id);
|
||||
map.put("bill_code", bill_code);
|
||||
map.put("buss_type", "");
|
||||
map.put("create_mode", "01");
|
||||
map.put("input_optid", currentUserId + "");
|
||||
map.put("input_optname", nickName);
|
||||
map.put("input_time", now);
|
||||
map.put("update_optid", currentUserId + "");
|
||||
map.put("update_optname", nickName);
|
||||
map.put("update_time", now);
|
||||
map.put("is_delete", "0");
|
||||
map.put("is_upload", "0");
|
||||
map.put("biz_date", biz_date);
|
||||
Long deptId = SecurityUtils.getDeptId();
|
||||
map.put("sysdeptid", deptId);
|
||||
map.put("syscompanyid", deptId);
|
||||
JSONObject jo_mst = JSONObject.parseObject(JSON.toJSONString(map));
|
||||
//调用明细处理方法
|
||||
JSONObject ret = this.insertDtlByRows(jo_mst, rows);
|
||||
map.put("detail_count", ret.getString("detail_count"));
|
||||
map.put("total_qty", ret.getString("total_qty"));
|
||||
wo_mst.insert(map);
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Map roadInsertDtl(Map map) {
|
||||
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
/*
|
||||
1.货位上是空托盘:直接生成点对点任务
|
||||
2.货位上是木箱:走正常流程
|
||||
*/
|
||||
RawAssistIStorService rawAssistIStorService = SpringContextHolder.getBean(RawAssistIStorService.class);
|
||||
// 1.找出此区域 第 7 排所有有货货位
|
||||
String block_num = MapUtil.getStr(map, "block_num");
|
||||
|
||||
// 判断此区有没有被锁住的货位
|
||||
JSONArray resultJSONArray = attrTab.query("block_num = '" + block_num + "' and is_used = '1' and is_delete = '0' and row_num = '7' and lock_type <> '1'").getResultJSONArray(0);
|
||||
if (ObjectUtil.isNotEmpty(resultJSONArray)) throw new BadRequestException("有正在运行的任务或已锁定未生成任务");
|
||||
|
||||
// 找出所有货位
|
||||
JSONArray boxArr = attrTab.query("block_num = '" + block_num + "' and is_used = '1' and is_delete = '0' and IFNULL(storagevehicle_code,'') <> '' and lock_type = '1' and row_num = '7' order by out_order_seq DESC").getResultJSONArray(0);
|
||||
|
||||
// 判断是否是空托盘区
|
||||
boolean is_ktp = boxArr.stream()
|
||||
.map(row -> (JSONObject) row)
|
||||
.anyMatch(row -> StrUtil.equals(row.getString("sect_code"), "KTP01"));
|
||||
|
||||
ArrayList<Map> dtlArr = new ArrayList<>();
|
||||
|
||||
if (is_ktp) {
|
||||
// 空托盘
|
||||
for (int i = 0; i < boxArr.size(); i++) {
|
||||
JSONObject json = boxArr.getJSONObject(i);
|
||||
// 调用空托盘入库
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("block_num", json.getString("block_num"));
|
||||
param.put("row_num", json.getString("row_num"));
|
||||
JSONObject jsonEmp = queryEmp(param);
|
||||
|
||||
// 生成空托盘移库任务
|
||||
JSONObject param2 = new JSONObject();
|
||||
param2.put("task_type", "010505");
|
||||
param2.put("task_name", "空托盘转库任务");
|
||||
param2.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||
param2.put("point_code1", json.getString("struct_code"));
|
||||
param2.put("point_code2", jsonEmp.getString("struct_code"));
|
||||
String task_id = empMoveTask.createTask(param2);
|
||||
|
||||
// 下发任务
|
||||
empMoveTask.immediateNotifyAcs(task_id);
|
||||
}
|
||||
} else {
|
||||
// 货位
|
||||
for (int i = 0; i < boxArr.size(); i++) {
|
||||
JSONObject json = boxArr.getJSONObject(i);
|
||||
|
||||
// 找到一个移入货位
|
||||
JSONObject moveParam = new JSONObject();
|
||||
moveParam.put("box_no", json.getString("storagevehicle_code"));
|
||||
moveParam.put("sect_id", RegionTypeEnum.ZZ01.getId());
|
||||
moveParam.put("layer_num", json.getString("layer_num"));
|
||||
|
||||
JSONObject jsonMove = rawAssistIStorService.autoDisMove(moveParam);
|
||||
|
||||
if (ObjectUtil.isEmpty(jsonMove)) throw new BadRequestException("没有可用暂存位");
|
||||
|
||||
// 组织明细
|
||||
|
||||
JSONArray jsonIvt = WQL.getWO("QST_IVT_HANDMOVESTOR").addParam("flag", "35").addParam("package_box_sn", json.getString("storagevehicle_code")).process().getResultJSONArray(0);
|
||||
List<Map> collect = jsonIvt.stream().map(row -> (Map) row).collect(Collectors.toList());
|
||||
collect.forEach(row -> {
|
||||
row.put("wrok_status", "10");
|
||||
row.put("turnin_sect_id", jsonMove.getString("sect_id"));
|
||||
row.put("turnin_sect_code", jsonMove.getString("sect_code"));
|
||||
row.put("turnin_sect_name", jsonMove.getString("sect_name"));
|
||||
row.put("turnin_struct_id", jsonMove.getString("struct_id"));
|
||||
row.put("turnin_struct_code", jsonMove.getString("struct_code"));
|
||||
row.put("turnin_struct_name", jsonMove.getString("struct_name"));
|
||||
dtlArr.add(row);
|
||||
});
|
||||
jsonMove.put("lock_type", "7");
|
||||
attrTab.update(jsonMove);
|
||||
}
|
||||
}
|
||||
map.put("tableData",dtlArr);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public JSONObject queryEmp(JSONObject whereJson) {
|
||||
whereJson.put("flag", "21");
|
||||
|
||||
JSONArray emptyArr = WQL.getWO("QST_IVT_RAWASSISTISTOR").addParamMap(whereJson).process().getResultJSONArray(0);
|
||||
|
||||
JSONObject struct_jo = new JSONObject();
|
||||
for (int i = 0; i < emptyArr.size(); i++) {
|
||||
JSONObject empty_row = emptyArr.getJSONObject(i);
|
||||
|
||||
String block_num = empty_row.getString("block_num");
|
||||
String row_num = empty_row.getString("row_num");
|
||||
String placement_type = empty_row.getString("placement_type");
|
||||
|
||||
JSONArray isLock = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type in ('4','5') AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1'").getResultJSONArray(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(isLock)) {
|
||||
|
||||
if (placement_type.equals("03")) {
|
||||
// 右通
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq desc").uniqueResult(0);
|
||||
break;
|
||||
} else if (placement_type.equals("02")) {
|
||||
// 左通
|
||||
struct_jo = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq").uniqueResult(0);
|
||||
break;
|
||||
} else {
|
||||
// 双通
|
||||
|
||||
// 先倒序找到第一个托盘、判断上一个是否有货位
|
||||
JSONObject jsonDescStruct = new JSONObject();
|
||||
JSONObject jsonDescBox = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq DESC").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonDescBox)) {
|
||||
String out_order_seq = jsonDescBox.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
jsonDescStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq > '" + out_order_seq + "' order by out_order_seq ASC").uniqueResult(0);
|
||||
} else {
|
||||
// 倒序找到第一个空位
|
||||
jsonDescStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq DESC").uniqueResult(0);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonDescStruct)) {
|
||||
struct_jo = jsonDescStruct;
|
||||
break;
|
||||
} else {
|
||||
// 没有就正序找到第一个托盘、判断上一个是否有货位
|
||||
JSONObject jsonAscStruct = new JSONObject();
|
||||
JSONObject jsonAscBox = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') <> '' order by out_order_seq ASC").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonAscBox)) {
|
||||
String out_order_seq2 = jsonAscBox.getString("out_order_seq");
|
||||
// 上一个货位顺序号
|
||||
jsonAscStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' and out_order_seq < '" + out_order_seq2 + "' order by out_order_seq DESC").uniqueResult(0);
|
||||
} else {
|
||||
jsonAscStruct = WQLObject.getWQLObject("st_ivt_structattr").query("lock_type = '1' AND block_num = '" + block_num + "'AND placement_type = '" + placement_type + "' AND row_num = '" + row_num + "' AND is_delete = '0' AND is_used = '1' AND IFNULL(storagevehicle_code,'') = '' order by out_order_seq ASC").uniqueResult(0);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isNotEmpty(jsonAscStruct)) {
|
||||
struct_jo = jsonAscStruct;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(struct_jo)) {
|
||||
throw new BadRequestException("未查询到可用的空载具存放点位!");
|
||||
}
|
||||
return struct_jo;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,7 +363,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
* @param rows
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
JSONObject insertDtlByRows(JSONObject jo_mst, ArrayList<HashMap> rows) {
|
||||
JSONObject insertDtlByRows(JSONObject jo_mst, ArrayList<Map> rows) {
|
||||
//明细表
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_MoveInvDtl");
|
||||
//主表
|
||||
@@ -213,9 +382,9 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
HashMap<String, JSONObject> Struct_map = new HashMap<String, JSONObject>();
|
||||
StringBuffer ids = new StringBuffer();
|
||||
for (int i = 0; i < rows.size(); i++) {
|
||||
HashMap<String, String> row = rows.get(i);
|
||||
Map row = rows.get(i);
|
||||
JSONObject jo_row = (JSONObject) JSONObject.toJSON(row);
|
||||
String storagevehicle_code = row.get("storagevehicle_code");
|
||||
String storagevehicle_code = (String) row.get("storagevehicle_code");
|
||||
if (i == 0) {
|
||||
ids.append("'");
|
||||
}
|
||||
@@ -522,7 +691,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
//调用删除明细,还原库存方法
|
||||
this.deleteById(moveinv_id + "");
|
||||
//获取明细
|
||||
ArrayList<HashMap> rows = (ArrayList<HashMap>) whereJson.get("tableData");
|
||||
ArrayList<Map> rows = (ArrayList<Map>) whereJson.get("tableData");
|
||||
//调用明细处理方法
|
||||
JSONObject ret = this.insertDtlByRows(jo_mst, rows);
|
||||
jo_mst.put("remark", whereJson.get("remark"));
|
||||
@@ -987,6 +1156,7 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
String now = DateUtil.now();
|
||||
|
||||
String moveinv_id = whereJson.getString("moveinv_id");
|
||||
String bill_type = whereJson.getString("bill_type");
|
||||
//查询所有载具的库存
|
||||
JSONArray ja = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||
.addParam("flag", "4")
|
||||
@@ -999,11 +1169,13 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
||||
JSONObject jo = ja.getJSONObject(i);
|
||||
String task_id = jo.getString("task_id");
|
||||
|
||||
// 判断起点是否被挡
|
||||
JSONObject jsonTask = wo_Task.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
JSONObject jsonAttr = wo_attr.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
// 调用共用判断是否阻挡并生成任务、移库单
|
||||
this.isBlock(jsonAttr);
|
||||
if (!StrUtil.equals(bill_type, "30")) {
|
||||
// 判断起点是否被挡
|
||||
JSONObject jsonTask = wo_Task.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
JSONObject jsonAttr = wo_attr.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
|
||||
// 调用共用判断是否阻挡并生成任务、移库单
|
||||
this.isBlock(jsonAttr);
|
||||
}
|
||||
|
||||
JSONObject result = handMoveStorAcsTask.immediateNotifyAcs(task_id);
|
||||
JSONObject task = wo_Task.query("task_id='" + task_id + "'").uniqueResult(0);
|
||||
|
||||
@@ -0,0 +1,199 @@
|
||||
package org.nl.wms.st.instor.task;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.st.instor.service.impl.HandMoveStorServiceImpl;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
public class EmpMoveTask extends AbstractAcsTask {
|
||||
private final String THIS_CLASS = EmpMoveTask.class.getName();
|
||||
|
||||
@Override
|
||||
public List<AcsTaskDto> addTask() {
|
||||
/*
|
||||
* 下发给ACS时需要特殊处理
|
||||
*/
|
||||
JSONArray arr = WQLObject.getWQLObject("SCH_BASE_Task").query("handle_class = '" + THIS_CLASS + "' and task_status = '" + TaskStatusEnum.START_AND_POINT.getCode() + "' and is_delete ='0'").getResultJSONArray(0);
|
||||
|
||||
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
|
||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length()-1);
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.ext_task_id(json.getString("task_id"))
|
||||
.task_code(json.getString("task_code"))
|
||||
.task_type(json.getString("acs_task_type"))
|
||||
.start_device_code(json.getString("point_code1"))
|
||||
.next_device_code(json.getString("point_code2"))
|
||||
.vehicle_code(json.getString("vehicle_code"))
|
||||
.priority(json.getString("priority"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.remark(json.getString("remark"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param taskObj 代表一条任务对象
|
||||
* @param status 代表wcs任务完成状态: //1:执行中,2:完成 ,3:acs取消
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||
|
||||
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task"); //任务表
|
||||
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr"); // 仓位表
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||
|
||||
|
||||
String task_id = taskObj.getString("task_id");
|
||||
if (StrUtil.isEmpty(task_id)) {
|
||||
throw new BadRequestException("任务id不能为空!");
|
||||
}
|
||||
|
||||
JSONObject jsonTask = wo_Task.query("task_id='"+task_id+"'").uniqueResult(0);
|
||||
|
||||
if(jsonTask==null){
|
||||
throw new BadRequestException("查询不到操作的任务记录!");
|
||||
}
|
||||
|
||||
if(TaskStatusEnum.EXECUTING.getCode().equals(status)){
|
||||
// 执行中
|
||||
jsonTask.put("task_status", TaskStatusEnum.EXECUTING.getCode());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
wo_Task.update(jsonTask);
|
||||
|
||||
}else if(TaskStatusEnum.FINISHED.getCode().equals(status)){
|
||||
// 完成
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
JSONObject param = new JSONObject();
|
||||
|
||||
// 更新仓位
|
||||
param.put("lock_type", "1");
|
||||
param.put("storagevehicle_code", "");
|
||||
attrTab.update(param,"struct_code = '"+jsonTask.getString("point_code1")+"'");
|
||||
|
||||
param.put("storagevehicle_code",jsonTask.getString("vehicle_code"));
|
||||
attrTab.update(param,"struct_code = '"+jsonTask.getString("point_code2")+"'");
|
||||
|
||||
// 更新点位
|
||||
JSONObject param2 = new JSONObject();
|
||||
param2.put("lock_type", "1");
|
||||
param2.put("vehicle_code", "");
|
||||
param2.put("point_status", "1");
|
||||
pointTab.update(param2,"point_code = '"+jsonTask.getString("point_code1")+"'");
|
||||
|
||||
param2.put("vehicle_code", jsonTask.getString("vehicle_code"));
|
||||
param2.put("point_status", "3");
|
||||
pointTab.update(param2,"point_code = '"+jsonTask.getString("point_code2")+"'");
|
||||
|
||||
// 更新任务为完成
|
||||
jsonTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||
jsonTask.put("update_optid", currentUserId);
|
||||
jsonTask.put("update_optname", currentUsername);
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
wo_Task.update(jsonTask);
|
||||
|
||||
}else if("0".equals(status)){
|
||||
// 取消
|
||||
if (jsonTask.getIntValue("task_status") > Integer.valueOf(TaskStatusEnum.START_AND_POINT.getCode())) {
|
||||
throw new BadRequestException("任务:" + jsonTask.getString("task_code") + "已下发,不可取消");
|
||||
}
|
||||
|
||||
// 更新删除字段
|
||||
jsonTask.put("is_delete", "1");
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
wo_Task.update(jsonTask);
|
||||
|
||||
// 更新仓位
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("lock_type", "1");
|
||||
attrTab.update(param,"struct_code = '"+jsonTask.getString("point_code1")+"'");
|
||||
attrTab.update(param,"struct_code = '"+jsonTask.getString("point_code2")+"'");
|
||||
|
||||
}else{
|
||||
throw new BadRequestException("任务状态更新异常!");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param form 创建任务需要的参数
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String createTask(JSONObject form) {
|
||||
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
|
||||
String currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
|
||||
|
||||
json.put("task_type", form.getString("task_type"));
|
||||
json.put("vehicle_code", form.getString("vehicle_code"));
|
||||
json.put("task_name", form.getString("task_name"));
|
||||
json.put("point_code1", form.getString("point_code1"));
|
||||
json.put("point_code2", form.getString("point_code2"));
|
||||
json.put("material_id", form.getString("material_id"));
|
||||
json.put("task_group_id", form.getString("task_group_id"));
|
||||
json.put("sort_seq", form.getString("sort_seq"));
|
||||
|
||||
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("create_id", currentUserId);
|
||||
json.put("create_name", currentUsername);
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("acs_task_type", "7");
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
|
||||
|
||||
// 锁定起点
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("lock_type", "4");
|
||||
attrTab.update(param,"struct_code = '"+form.getString("point_code1")+"'");
|
||||
|
||||
// 锁定终点
|
||||
param.put("lock_type", "5");
|
||||
attrTab.update(param,"struct_code = '"+form.getString("point_code2")+"'");
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void forceFinish(String task_id) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
this.updateTaskStatus(taskObj, TaskStatusEnum.FINISHED.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void cancel(String task_id) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
this.updateTaskStatus(taskObj, "0");
|
||||
}
|
||||
}
|
||||
@@ -219,6 +219,48 @@
|
||||
ENDPAGEQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "35"
|
||||
QUERY
|
||||
SELECT
|
||||
ivt2.stockrecord_id,
|
||||
ivt2.material_id,
|
||||
ivt2.pcsn,
|
||||
ivt2.quality_scode,
|
||||
ivt2.qty_unit_id,
|
||||
ivt2.ivt_qty AS qty,
|
||||
mb.material_code,
|
||||
mb.material_name,
|
||||
struct.struct_id AS turnout_struct_id,
|
||||
struct.struct_code AS turnout_struct_code,
|
||||
struct.struct_name AS turnout_struct_name,
|
||||
struct.sect_id AS turnout_sect_id,
|
||||
struct.sect_name AS turnout_sect_name,
|
||||
struct.sect_code AS turnout_sect_code,
|
||||
struct.storagevehicle_id,
|
||||
struct.storagevehicle_code,
|
||||
mu.unit_name AS qty_unit_name,
|
||||
sub.sale_order_name,
|
||||
sub.customer_name,
|
||||
sub.customer_description,
|
||||
sub.sap_pcsn
|
||||
FROM
|
||||
st_ivt_structattr struct
|
||||
INNER JOIN ST_IVT_StructIvt ivt2 ON struct.struct_id = ivt2.struct_id
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = ivt2.material_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = ivt2.qty_unit_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.container_name = ivt2.pcsn AND sub.package_box_sn = struct.storagevehicle_code
|
||||
WHERE
|
||||
1 = 1
|
||||
AND struct.lock_type = '1'
|
||||
|
||||
OPTION 输入.package_box_sn <> ""
|
||||
sub.package_box_sn = 输入.package_box_sn
|
||||
ENDOPTION
|
||||
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "33"
|
||||
QUERY
|
||||
SELECT
|
||||
|
||||
@@ -30,3 +30,11 @@ export function autoWeb() { // 查询立库监控数据
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
|
||||
export function queryNum(data) { // 获取个数
|
||||
return request({
|
||||
url: 'api/autoWeb/queryNum',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
@@ -146,6 +146,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.query.is_fault = '1'
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
|
||||
@@ -1,5 +1,47 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row style="padding-top: 10px;padding-left: 10px;padding-bottom: 30px">
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="100px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="发货区层数">
|
||||
<el-select
|
||||
v-model="stageParam"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
@change="changeStage"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in layerList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="有货点位">
|
||||
<el-input
|
||||
v-model="numData.haveMoney"
|
||||
disabled
|
||||
style="width: 80px"
|
||||
size="mini"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="无货点位">
|
||||
<el-input
|
||||
v-model="numData.unMoney"
|
||||
disabled
|
||||
style="width: 80px"
|
||||
size="mini"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div id="container" className="container" />
|
||||
</el-row>
|
||||
@@ -56,7 +98,7 @@ import '@logicflow/extension/lib/style/index.css'
|
||||
|
||||
import { LogicFlow } from '@logicflow/core'
|
||||
import { registerCustomElement } from '@/views/system/logicflow/editor/components/node'
|
||||
import { getStructByCodesFs, unLockPoint } from '@/views/system/monitor/device/structStage'
|
||||
import { getStructByCodesFs, unLockPoint, queryNum } from '@/views/system/monitor/device/structStage'
|
||||
let data = {}
|
||||
let lf = ''
|
||||
export default {
|
||||
@@ -82,11 +124,21 @@ export default {
|
||||
},
|
||||
allStructMsg: [],
|
||||
msgTop: '200px',
|
||||
msgLeft: '200px'
|
||||
msgLeft: '200px',
|
||||
layerList: [
|
||||
{ 'label': '发货1层', 'value': 'FS_1' },
|
||||
{ 'label': '发货2层', 'value': 'FS_2' }
|
||||
],
|
||||
numData: {
|
||||
haveMoney: null,
|
||||
unMoney: null
|
||||
},
|
||||
layerNum: '1'
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
this.queryNum()
|
||||
},
|
||||
beforeDestroy() {
|
||||
// js提供的clearInterval方法用来清除定时器
|
||||
@@ -176,10 +228,12 @@ export default {
|
||||
this.timer = setInterval(() => { // 定时刷新设备的状态信息
|
||||
console.log('定时器启动')
|
||||
this.initStatus()
|
||||
this.queryNum()
|
||||
}, 10000)
|
||||
},
|
||||
initStatus() { // 初始化数据
|
||||
let resion = {}
|
||||
debugger
|
||||
resion = lf.getGraphData().nodes.map(item => ({ id: item.id, struct_id: item.properties.struct_id }))
|
||||
getStructByCodesFs(resion).then(res => {
|
||||
this.allStructMsg = res
|
||||
@@ -231,6 +285,10 @@ export default {
|
||||
const obj = { name: '木箱总重', value: data1[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
if (val === 'container_weight' && data1.container_weight) {
|
||||
const obj = { name: '子卷净重', value: data1[val] }
|
||||
this.arr.push(obj)
|
||||
}
|
||||
}
|
||||
if (data.length > 1) { // 显示子卷
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
@@ -264,11 +322,27 @@ export default {
|
||||
unLockPoint(this.form).then(res => {
|
||||
this.dialogFormVisible1 = false
|
||||
this.initStageData()
|
||||
this.queryNum()
|
||||
this.$message({
|
||||
message: '解绑成功',
|
||||
type: 'success'
|
||||
})
|
||||
})
|
||||
},
|
||||
changeStage(value) {
|
||||
if (value === 'FS_1') {
|
||||
this.layerNum = '1'
|
||||
} else if (value === 'FS_2') {
|
||||
this.layerNum = '2'
|
||||
}
|
||||
this.initStageData()
|
||||
this.queryNum()
|
||||
},
|
||||
queryNum() {
|
||||
queryNum({ 'layer_num': this.layerNum }).then(res => {
|
||||
this.numData.haveMoney = res.haveMoney
|
||||
this.numData.unMoney = res.unMoney
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,6 +117,22 @@
|
||||
:disabled="crud.status.view > 0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="form.bill_type === '30'" label="所属区域" prop="block_num">
|
||||
<el-select
|
||||
v-model="form.block_num"
|
||||
clearable
|
||||
placeholder="所属区域"
|
||||
class="filter-item"
|
||||
:disabled="crud.status.view > 0"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in blockList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<label slot="label">备 注:</label>
|
||||
<el-input
|
||||
@@ -137,6 +153,7 @@
|
||||
<slot name="left" />
|
||||
<el-button
|
||||
slot="left"
|
||||
v-if="form.bill_type !== '30'"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@@ -244,8 +261,9 @@ import crudUserStor from '@/views/wms/basedata/st/userStor/userStor'
|
||||
const defaultForm = {
|
||||
bill_code: '',
|
||||
stor_id: '1582991156504039424',
|
||||
stor_code: '',
|
||||
stor_name: '',
|
||||
stor_code: 'AC01',
|
||||
stor_name: '兰州仓库',
|
||||
block_num: null,
|
||||
bill_status: '10',
|
||||
total_qty: '0',
|
||||
detail_count: '0',
|
||||
@@ -279,6 +297,41 @@ export default {
|
||||
storlist: [],
|
||||
invtypelist: [],
|
||||
layer_num: null,
|
||||
blockList: [
|
||||
{ 'label': '101', 'value': '101' },
|
||||
{ 'label': '103', 'value': '103' },
|
||||
{ 'label': '105', 'value': '105' },
|
||||
{ 'label': '107', 'value': '107' },
|
||||
{ 'label': '109', 'value': '109' },
|
||||
{ 'label': '111', 'value': '111' },
|
||||
{ 'label': '113', 'value': '113' },
|
||||
{ 'label': '115', 'value': '115' },
|
||||
{ 'label': '117', 'value': '117' },
|
||||
{ 'label': '119', 'value': '119' },
|
||||
{ 'label': '121', 'value': '121' },
|
||||
{ 'label': '201', 'value': '201' },
|
||||
{ 'label': '203', 'value': '203' },
|
||||
{ 'label': '205', 'value': '205' },
|
||||
{ 'label': '207', 'value': '207' },
|
||||
{ 'label': '209', 'value': '209' },
|
||||
{ 'label': '211', 'value': '211' },
|
||||
{ 'label': '213', 'value': '213' },
|
||||
{ 'label': '215', 'value': '215' },
|
||||
{ 'label': '217', 'value': '217' },
|
||||
{ 'label': '219', 'value': '219' },
|
||||
{ 'label': '221', 'value': '221' },
|
||||
{ 'label': '301', 'value': '301' },
|
||||
{ 'label': '303', 'value': '303' },
|
||||
{ 'label': '305', 'value': '305' },
|
||||
{ 'label': '307', 'value': '307' },
|
||||
{ 'label': '309', 'value': '309' },
|
||||
{ 'label': '311', 'value': '311' },
|
||||
{ 'label': '313', 'value': '313' },
|
||||
{ 'label': '315', 'value': '315' },
|
||||
{ 'label': '317', 'value': '317' },
|
||||
{ 'label': '319', 'value': '319' },
|
||||
{ 'label': '321', 'value': '321' }
|
||||
],
|
||||
rules: {
|
||||
stor_id: [
|
||||
{ required: true, message: '仓库不能为空', trigger: 'blur' }
|
||||
@@ -320,7 +373,6 @@ export default {
|
||||
})
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
debugger
|
||||
handmovestor.getOutBillDtl({ 'moveinv_id': this.form.moveinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
@@ -332,7 +384,6 @@ export default {
|
||||
})
|
||||
},
|
||||
bill_statusFormat(row) {
|
||||
debugger
|
||||
return this.dict.label.work_status[row.work_status]
|
||||
},
|
||||
quality_scodeFormat(row) {
|
||||
@@ -470,13 +521,20 @@ export default {
|
||||
}
|
||||
},
|
||||
[CRUD.HOOK.beforeSubmit]() {
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (!this.form.tableData[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
|
||||
if (this.form.bill_type !== '30') {
|
||||
if (this.form.tableData.length === 0) {
|
||||
this.crud.notify('请至少选择一条明细', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
if (!this.form.tableData[i].edit) {
|
||||
this.crud.notify('尚有未完成编辑的物料明细序号' + (i + 1) + ',请检查!')
|
||||
return false
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (!this.form.block_num) {
|
||||
this.crud.notify('请选择所属区域', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,6 +303,17 @@ export default {
|
||||
return row.bill_status !== '99'
|
||||
},
|
||||
taskOpen() {
|
||||
this.loadingConfirm = true
|
||||
debugger
|
||||
const a = this.currentRow
|
||||
handmovestor.handdown({ 'moveinv_id': this.currentRow.moveinv_id, 'bill_type': this.currentRow.bill_type }).then(res => {
|
||||
this.querytable()
|
||||
this.loadingConfirm = false
|
||||
}).catch(() => {
|
||||
this.loadingConfirm = false
|
||||
})
|
||||
},
|
||||
taskOpen2() {
|
||||
this.loadingConfirm = true
|
||||
handmovestor.handdown({ 'moveinv_id': this.currentRow.moveinv_id }).then(res => {
|
||||
this.querytable()
|
||||
|
||||
Reference in New Issue
Block a user