修改
This commit is contained in:
@@ -10,6 +10,7 @@ import com.alibaba.fastjson.JSONArray;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.common.utils.SecurityUtils;
|
import org.nl.modules.common.utils.SecurityUtils;
|
||||||
import org.nl.modules.wql.WQL;
|
import org.nl.modules.wql.WQL;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
@@ -88,12 +89,12 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
|
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("box_no", box_no);
|
map.put("box_no", box_no);
|
||||||
if (option.equals("3")) {
|
/*if (option.equals("3")) {
|
||||||
HashMap<String, String> sub_map = new HashMap<>();
|
HashMap<String, String> sub_map = new HashMap<>();
|
||||||
sub_map.put("box_type", material_code);
|
sub_map.put("box_type", material_code);
|
||||||
//如果是退货入库要更新子卷包装关系的木箱料号
|
//如果是退货入库要更新子卷包装关系的木箱料号
|
||||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(sub_map, "package_box_SN = '" + box_no + "'");
|
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(sub_map, "package_box_SN = '" + box_no + "'");
|
||||||
}
|
}*/
|
||||||
|
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getCurrentNickName();
|
String nickName = SecurityUtils.getCurrentNickName();
|
||||||
@@ -134,6 +135,14 @@ public class ProductInstorServiceImpl implements ProductInstorService {
|
|||||||
|
|
||||||
//判断是否虚拟
|
//判断是否虚拟
|
||||||
if (!is_virtual.equals("1")) {
|
if (!is_virtual.equals("1")) {
|
||||||
|
//判断是该包装计划是否存在长宽高
|
||||||
|
JSONObject sub_jo = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("package_box_SN = '" + box_no + "'").uniqueResult(0);
|
||||||
|
String box_length = sub_jo.getString("box_length");
|
||||||
|
String box_width = sub_jo.getString("box_width");
|
||||||
|
String box_high = sub_jo.getString("box_high");
|
||||||
|
if (StrUtil.isEmpty(box_length) || StrUtil.isEmpty(box_width) || StrUtil.isEmpty(box_high)){
|
||||||
|
throw new BadRequestException("该木箱没有长宽高信息,无法入库,请到子卷包装关系中维护!");
|
||||||
|
}
|
||||||
//创建二楼去一楼的任务
|
//创建二楼去一楼的任务
|
||||||
} else {
|
} else {
|
||||||
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
String task_id = IdUtil.getSnowflake(1, 1).nextId() + "";
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.wms.st.instor.rest;
|
package org.nl.wms.st.instor.rest;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -35,6 +36,7 @@ public class HandMoveStorController {
|
|||||||
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson){
|
public ResponseEntity<Object> getOutBillDtl(@RequestParam Map whereJson){
|
||||||
return new ResponseEntity<>(handMoveStorService.getOutBillDtl(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(handMoveStorService.getOutBillDtl(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log("删除移库单")
|
@Log("删除移库单")
|
||||||
@ApiOperation("删除移库单")
|
@ApiOperation("删除移库单")
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
@@ -50,6 +52,7 @@ public class HandMoveStorController {
|
|||||||
handMoveStorService.update(whereJson);
|
handMoveStorService.update(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping()
|
@PostMapping()
|
||||||
@Log("新增移库单")
|
@Log("新增移库单")
|
||||||
@ApiOperation("新增移库单")
|
@ApiOperation("新增移库单")
|
||||||
@@ -57,12 +60,21 @@ public class HandMoveStorController {
|
|||||||
handMoveStorService.insertDtl(whereJson);
|
handMoveStorService.insertDtl(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.CREATED);
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getStructIvt")
|
@GetMapping("/getStructIvt")
|
||||||
@Log("查询可分配库存")
|
@Log("查询可分配库存")
|
||||||
@ApiOperation("查询可分配库存")
|
@ApiOperation("查询可分配库存")
|
||||||
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page){
|
public ResponseEntity<Object> getStructIvt(@RequestParam Map whereJson, Pageable page){
|
||||||
return new ResponseEntity<>(handMoveStorService.getStructIvt(whereJson,page), HttpStatus.OK);
|
return new ResponseEntity<>(handMoveStorService.getStructIvt(whereJson,page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getBoxIvt")
|
||||||
|
@Log("查询箱内库存")
|
||||||
|
@ApiOperation("查询箱内库存")
|
||||||
|
public ResponseEntity<Object> getBoxIvt(@RequestBody JSONArray whereJson){
|
||||||
|
return new ResponseEntity<>(handMoveStorService.getBoxIvt(whereJson), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/confirm")
|
@PostMapping("/confirm")
|
||||||
@Log("移库单强制确认")
|
@Log("移库单强制确认")
|
||||||
@ApiOperation("移库单强制确认")
|
@ApiOperation("移库单强制确认")
|
||||||
@@ -70,12 +82,14 @@ public class HandMoveStorController {
|
|||||||
handMoveStorService.confirm(whereJson);
|
handMoveStorService.confirm(whereJson);
|
||||||
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/getInvTypes")
|
@GetMapping("/getInvTypes")
|
||||||
@Log("查询单据字段")
|
@Log("查询单据字段")
|
||||||
@ApiOperation("查询单据字段")
|
@ApiOperation("查询单据字段")
|
||||||
public ResponseEntity<Object> getInvTypes(){
|
public ResponseEntity<Object> getInvTypes(){
|
||||||
return new ResponseEntity<>(handMoveStorService.getInvTypes(), HttpStatus.OK);
|
return new ResponseEntity<>(handMoveStorService.getInvTypes(), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/handdown")
|
@PostMapping("/handdown")
|
||||||
@Log("移库单手动下发")
|
@Log("移库单手动下发")
|
||||||
@ApiOperation("移库单手动下发")
|
@ApiOperation("移库单手动下发")
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ public interface HandMoveStorService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getStructIvt(Map whereJson, Pageable page);
|
Map<String, Object> getStructIvt(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
JSONArray getBoxIvt(JSONArray whereJson);
|
||||||
/**
|
/**
|
||||||
* 出库单强制确认
|
* 出库单强制确认
|
||||||
* @param whereJson /
|
* @param whereJson /
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -634,6 +635,28 @@ public class HandMoveStorServiceImpl implements HandMoveStorService {
|
|||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONArray getBoxIvt(JSONArray whereJson) {
|
||||||
|
JSONArray total_rows = new JSONArray();
|
||||||
|
HashSet<String> set = new HashSet<>();
|
||||||
|
for (int i = 0; i < whereJson.size(); i++) {
|
||||||
|
JSONObject row = whereJson.getJSONObject(i);
|
||||||
|
String storagevehicle_code = row.getString("storagevehicle_code");
|
||||||
|
set.add(storagevehicle_code);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (String s : set) {
|
||||||
|
JSONArray rows = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||||
|
.addParam("flag", "5")
|
||||||
|
.addParam("storagevehicle_code", s).process().getResultJSONArray(0);
|
||||||
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
JSONObject mater = rows.getJSONObject(i);
|
||||||
|
total_rows.add(mater);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total_rows;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void confirm(JSONObject form) {
|
public void confirm(JSONObject form) {
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
输入.is_issued TYPEAS s_string
|
输入.is_issued TYPEAS s_string
|
||||||
输入.remark TYPEAS s_string
|
输入.remark TYPEAS s_string
|
||||||
输入.task_id TYPEAS s_string
|
输入.task_id TYPEAS s_string
|
||||||
|
输入.storagevehicle_code TYPEAS s_string
|
||||||
输入.struct_code TYPEAS s_string
|
输入.struct_code TYPEAS s_string
|
||||||
输入.ids TYPEAS f_string
|
输入.ids TYPEAS f_string
|
||||||
输入.deptIds TYPEAS f_string
|
输入.deptIds TYPEAS f_string
|
||||||
@@ -272,5 +273,44 @@
|
|||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "5"
|
||||||
|
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
|
||||||
|
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
|
||||||
|
WHERE
|
||||||
|
1 = 1
|
||||||
|
AND struct.lock_type = '1'
|
||||||
|
OPTION 输入.storagevehicle_code <> ""
|
||||||
|
struct.storagevehicle_code = 输入.storagevehicle_code
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
@@ -260,7 +260,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
@@ -289,6 +289,97 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
new LmsToSapServiceImpl().returnDelivery(param);
|
new LmsToSapServiceImpl().returnDelivery(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 销售出库
|
||||||
|
if (StrUtil.equals(bill_type, "1001")) {
|
||||||
|
// 1.回传sap
|
||||||
|
JSONArray paramSapMstArr = new JSONArray();
|
||||||
|
|
||||||
|
JSONObject paramSapMst = new JSONObject();
|
||||||
|
paramSapMst.put("ZACTION", "P");
|
||||||
|
paramSapMst.put("BUDAT", jo_mst.getString("biz_date"));
|
||||||
|
paramSapMst.put("ZZYGYF", jo_mst.getString("estimated_freight"));
|
||||||
|
paramSapMst.put("ZZYFGY", jo_mst.getString("trans_code"));
|
||||||
|
|
||||||
|
JSONArray paramDtlArr = new JSONArray();
|
||||||
|
JSONArray dtlArr = wo_dtl.query("iostorinv_id = '" + jo_mst.getString("iostorinv_id") + "'").getResultJSONArray(0);
|
||||||
|
for (int k = 0; k < dtlArr.size(); k++) {
|
||||||
|
JSONArray paramDisArr = new JSONArray();
|
||||||
|
JSONObject json = dtlArr.getJSONObject(k);
|
||||||
|
JSONObject jsonMater = materTab.query("material_id = '" + json.getString("material_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
|
// 明细
|
||||||
|
JSONObject jsonDtl = new JSONObject();
|
||||||
|
jsonDtl.put("VBELN", json.getString("vbeln")); // 交货
|
||||||
|
paramSapMst.put("VBELN", json.getString("vbeln")); // 主表交货
|
||||||
|
jsonDtl.put("POSNR", json.getString("posnr")); // 项目
|
||||||
|
jsonDtl.put("MATNR", jsonMater.getString("material_code"));
|
||||||
|
|
||||||
|
// 分配明细
|
||||||
|
JSONArray disArr = wo_dis.query("iostorinvdtl_id = '" + json.getString("iostorinvdtl_id") + "'").getResultJSONArray(0);
|
||||||
|
for (int j = 0; j < disArr.size(); j++) {
|
||||||
|
JSONObject json2 = disArr.getJSONObject(j);
|
||||||
|
JSONObject jsonDis = new JSONObject();
|
||||||
|
|
||||||
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
|
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
|
}
|
||||||
|
|
||||||
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
|
jsonDis.put("CHARG", jsonSub.getString("sap_pcsn")); // sap批次
|
||||||
|
}
|
||||||
|
jsonDis.put("VBELN", json.getString("vbeln")); // 交货
|
||||||
|
jsonDis.put("POSNR", json.getString("posnr")); // 项目
|
||||||
|
jsonDis.put("LFIMG", json2.getString("real_qty"));
|
||||||
|
jsonDis.put("VRKME", json.getString("qty_unit_name"));
|
||||||
|
jsonDis.put("PIKMG", json2.getString("real_qty"));
|
||||||
|
jsonDis.put("VRKMP", json2.getString("qty_unit_name"));
|
||||||
|
paramDisArr.add(jsonDis);
|
||||||
|
}
|
||||||
|
jsonDtl.put("CHARG_T", paramDisArr);
|
||||||
|
paramDtlArr.add(jsonDtl);
|
||||||
|
}
|
||||||
|
paramSapMst.put("ITEM", paramDtlArr);
|
||||||
|
paramSapMstArr.add(paramSapMst);
|
||||||
|
|
||||||
|
JSONObject param = new JSONObject();
|
||||||
|
param.put("HEAD", paramSapMstArr);
|
||||||
|
System.out.println(param.toString());
|
||||||
|
|
||||||
|
// 调用接口回传
|
||||||
|
new LmsToSapServiceImpl().returnDelivery(param);
|
||||||
|
|
||||||
|
// 2.回传mes
|
||||||
|
JSONObject paramMesMst = new JSONObject();
|
||||||
|
String userName = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MES_USERNAME").getValue();
|
||||||
|
String passWord = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("MES_PASSWORD").getValue();
|
||||||
|
|
||||||
|
paramMesMst.put("UserName", userName);
|
||||||
|
paramMesMst.put("Password", passWord);
|
||||||
|
paramMesMst.put("iOutboundOrderNum", jo_mst.getString("bill_code"));
|
||||||
|
paramMesMst.put("iOutboundUser", jo_mst.getString("confirm_optname"));
|
||||||
|
paramMesMst.put("iOutboundTime", jo_mst.getString("confirm_time"));
|
||||||
|
|
||||||
|
JSONArray boxArr = WQL.getWO("ST_OUTIVT02").addParam("flag", "2")
|
||||||
|
.addParam("iostorinv_id", jo_mst.getString("iostorinv_id"))
|
||||||
|
.process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
JSONArray paramArr = new JSONArray();
|
||||||
|
for (int j = 0; j < boxArr.size(); j++) {
|
||||||
|
JSONObject json = boxArr.getJSONObject(j);
|
||||||
|
JSONObject jsonBox = new JSONObject();
|
||||||
|
|
||||||
|
jsonBox.put("PackageBoxSN", json.getString("box_no"));
|
||||||
|
paramArr.add(jsonBox);
|
||||||
|
}
|
||||||
|
paramMesMst.put("item", paramArr);
|
||||||
|
|
||||||
|
// 调用接口回传
|
||||||
|
// JSONObject jsonObject = new LmsToMesServiceImpl().childRollFGOutboundComplete(paramMesMst);
|
||||||
|
}
|
||||||
|
|
||||||
// 改切出库
|
// 改切出库
|
||||||
if (StrUtil.equals(bill_type, "1003")) {
|
if (StrUtil.equals(bill_type, "1003")) {
|
||||||
JSONObject paramMst = new JSONObject();
|
JSONObject paramMst = new JSONObject();
|
||||||
@@ -319,7 +410,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json.getString("sect_id") + "'").uniqueResult(0);
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json.getString("sect_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
|
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 库存地点:库区外部标识
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 库存地点:库区外部标识
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 库存地点:库区外部标识
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json.getString("pcsn") + "'").uniqueResult(0);
|
||||||
@@ -446,7 +537,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
// jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
// jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
@@ -536,7 +627,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
JSONObject jsonSect = sectTab.query("sect_id = '" + json2.getString("sect_id") + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
if (ObjectUtil.isNotEmpty(jsonSect)) {
|
||||||
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
//jsonDtl.put("LGORT", jsonSect.getString("ext_id")); // 明細储存地点
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 明細储存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 明細储存地点
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
JSONObject jsonSub = subTab.query("container_name = '" + json2.getString("pcsn") + "'").uniqueResult(0);
|
||||||
@@ -614,7 +705,7 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
|||||||
jsonDtl.put("BWART", "311");
|
jsonDtl.put("BWART", "311");
|
||||||
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
|
jsonDtl.put("MENGE", json.getDoubleValue("plan_qty"));
|
||||||
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
|
jsonDtl.put("MEINS", json.getString("qty_unit_id"));
|
||||||
jsonDtl.put("LGORT", json.getString("remark")); // 库存地点
|
jsonDtl.put("LGORT", jo_mst.getString("remark")); // 库存地点
|
||||||
jsonDtl.put("CHARG", json.getString("pcsn"));
|
jsonDtl.put("CHARG", json.getString("pcsn"));
|
||||||
jsonDtl.put("UMLGO", ""); // 收货库存地点
|
jsonDtl.put("UMLGO", ""); // 收货库存地点
|
||||||
jsonDtl.put("UMCHA", json.getString("pcsn"));
|
jsonDtl.put("UMCHA", json.getString("pcsn"));
|
||||||
|
|||||||
@@ -446,10 +446,21 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
deleteRow(index, rows) {
|
deleteRow(index, rows) {
|
||||||
|
const storagevehicle_code = rows[index].storagevehicle_code
|
||||||
|
let len = rows.length
|
||||||
|
while (len--) {
|
||||||
|
const obj = rows[len]
|
||||||
|
if (storagevehicle_code === obj.storagevehicle_code) {
|
||||||
|
const index = rows.indexOf(obj)
|
||||||
|
if (index > -1) { // 移除找到的指定元素
|
||||||
|
this.form.total_qty = parseFloat(this.form.total_qty) - parseFloat(rows[index].qty)
|
||||||
rows.splice(index, 1)
|
rows.splice(index, 1)
|
||||||
this.nowindex = ''
|
this.nowindex = ''
|
||||||
this.nowrow = {}
|
this.nowrow = {}
|
||||||
this.form.detail_count = this.form.tableData.length
|
this.form.detail_count = this.form.tableData.length
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.beforeSubmit]() {
|
[CRUD.HOOK.beforeSubmit]() {
|
||||||
if (this.form.tableData.length === 0) {
|
if (this.form.tableData.length === 0) {
|
||||||
|
|||||||
@@ -93,6 +93,7 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
import crudSectattr from '@/views/wms/basedata/st/sect/sectattr'
|
||||||
|
import handmovestor from '@/views/wms/st/inStor/moveStor/handmovestor'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddDtl',
|
name: 'AddDtl',
|
||||||
@@ -179,14 +180,18 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
submit() {
|
submit() {
|
||||||
|
debugger
|
||||||
this.rows = this.$refs.table.selection
|
this.rows = this.$refs.table.selection
|
||||||
if (this.rows.length <= 0) {
|
if (this.rows.length <= 0) {
|
||||||
this.$message('请先勾选物料')
|
this.$message('请先勾选物料')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
|
handmovestor.getBoxIvt(this.rows).then(res => {
|
||||||
|
this.rows = res
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.$emit('tableChanged', this.rows)
|
this.$emit('tableChanged', this.rows)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,4 +65,12 @@ export function handdown(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
export default { add, edit, del, getOutBillDtl,getStructIvt,confirm,getInvTypes,handdown }
|
|
||||||
|
export function getBoxIvt(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/handmovestor/getBoxIvt',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export default { add, edit, del, getOutBillDtl,getStructIvt,confirm,getInvTypes,handdown, getBoxIvt }
|
||||||
|
|||||||
Reference in New Issue
Block a user