修改
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
输入.storagevehicle_type TYPEAS s_string
|
||||
输入.is_used TYPEAS s_string
|
||||
输入.is_delete TYPEAS s_string
|
||||
输入.have_vehicle TYPEAS s_string
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
@@ -68,7 +69,7 @@
|
||||
OPTION 输入.lock_type <> ""
|
||||
struct.lock_type = 输入.lock_type
|
||||
ENDOPTION
|
||||
OPTION 输入.lock_type = "00"
|
||||
OPTION 输入.lock_type = "1"
|
||||
(struct.storagevehicle_code is null or struct.storagevehicle_code = '')
|
||||
ENDOPTION
|
||||
ENDSELECT
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
IF 输入.flag = "1"
|
||||
QUERY
|
||||
SELECT
|
||||
SELECT DISTINCT
|
||||
sub.package_box_SN,
|
||||
sub.container_name,
|
||||
sub.product_name,
|
||||
@@ -50,7 +50,7 @@
|
||||
FROM
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_SN = dis.box_no AND sub.container_name = dis.pcsn
|
||||
WHERE
|
||||
mst.bill_type = '1002'
|
||||
AND
|
||||
|
||||
@@ -47,7 +47,7 @@ public class SubpackagerelationDto implements Serializable {
|
||||
private String product_description;
|
||||
|
||||
/** 入库日期 */
|
||||
private String date_of_FG_inbound;
|
||||
private String date_of_fg_inbound;
|
||||
|
||||
/** 子卷号 */
|
||||
private String container_name;
|
||||
@@ -98,10 +98,10 @@ public class SubpackagerelationDto implements Serializable {
|
||||
private String status;
|
||||
|
||||
/** 是否需要重打外包装标签 */
|
||||
private String isRePrintPackageBoxLabel;
|
||||
private String isreprintpackageboxlabel;
|
||||
|
||||
/** 是否需要拆包重打子卷标签 */
|
||||
private String isUnPackBox;
|
||||
private String isunpackbox;
|
||||
|
||||
/** 木箱料号 */
|
||||
private String box_type;
|
||||
|
||||
@@ -204,7 +204,11 @@ public class RawAssistIStorServiceImpl implements RawAssistIStorService {
|
||||
//将包装关系中对应的记录状态改为包装
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("status", "1");
|
||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis.getString("box_no") + "' AND status = '0'");
|
||||
if (whereJson.get("bill_type").equals("0003")){
|
||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis.getString("box_no") + "' AND status = '3'");
|
||||
}else {
|
||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelation").update(map, "package_box_SN = '" + dis.getString("box_no") + "' AND status = '0'");
|
||||
}
|
||||
}
|
||||
io_mst.put("total_qty", total_qty);
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").insert(io_mst);
|
||||
|
||||
@@ -63,17 +63,14 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过moveinv_id删除明细,还原库存等操作
|
||||
*
|
||||
* @param moveinv_id
|
||||
* 通过changeinv_id删除明细
|
||||
* @param changeinv_id
|
||||
*/
|
||||
void deleteById(String moveinv_id) {
|
||||
void deleteById(String changeinv_id) {
|
||||
//明细表
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("ST_IVT_MoveInvDtl");
|
||||
WQLObject wo_dtl = WQLObject.getWQLObject("st_ivt_structivtchangedtl");
|
||||
//主表
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("ST_IVT_MoveInv");
|
||||
//任务表
|
||||
WQLObject wo_Task = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
WQLObject wo_mst = WQLObject.getWQLObject("st_ivt_structivtchange");
|
||||
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getCurrentNickName();
|
||||
@@ -83,43 +80,16 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
map.put("update_optid", currentUserId + "");
|
||||
map.put("update_optname", nickName);
|
||||
map.put("update_time", now);
|
||||
JSONObject jo_mst = wo_mst.query("moveinv_id='" + moveinv_id + "'").uniqueResult(0);
|
||||
JSONArray ja = wo_dtl.query("moveinv_id='" + moveinv_id + "'").getResultJSONArray(0);
|
||||
JSONObject jo_mst = wo_mst.query("changeinv_id='" + changeinv_id + "'").uniqueResult(0);
|
||||
JSONArray ja = wo_dtl.query("changeinv_id='" + changeinv_id + "'").getResultJSONArray(0);
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
JSONObject jo = ja.getJSONObject(i);
|
||||
//删除任务
|
||||
HashMap<String, String> task_map = new HashMap<>();
|
||||
task_map.put("is_delete", "1");
|
||||
wo_Task.update(task_map, "task_id='" + jo.getString("task_id") + "'");
|
||||
//解锁起点点位、仓位
|
||||
JSONObject from_start = new JSONObject();
|
||||
from_start.put("lock_type", "1");
|
||||
from_start.put("struct_id", jo.getString("turnout_struct_id"));
|
||||
storPublicService.updateStructAndPoint(from_start);
|
||||
//解锁终点点位、仓位
|
||||
from_start.put("struct_id", jo.getString("turnin_struct_id"));
|
||||
storPublicService.updateStructAndPoint(from_start);
|
||||
|
||||
//更新移出库存
|
||||
jo.put("struct_id", jo.getString("turnout_struct_id"));
|
||||
jo.put("change_qty", jo.getDoubleValue("qty"));
|
||||
jo.put("bill_type_scode", jo_mst.getString("bill_type"));
|
||||
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
||||
jo.put("bill_code", jo_mst.getString("bill_code"));
|
||||
jo.put("bill_table", "ST_IVT_MoveInv");
|
||||
storPublicService.IOStor(jo, "12");
|
||||
//更新移入库存
|
||||
jo.put("struct_id", jo.getString("turnin_struct_id"));
|
||||
jo.put("bill_type_scode", jo_mst.getString("bill_type"));
|
||||
jo.put("inv_id", jo.getString("moveinvdtl_id"));
|
||||
jo.put("bill_code", jo_mst.getString("bill_code"));
|
||||
jo.put("bill_table", "ST_IVT_MoveInv");
|
||||
storPublicService.IOStor(jo, "32");
|
||||
//删除明细
|
||||
wo_dtl.delete("moveinvdtl_id='" + jo.getString("moveinvdtl_id") + "'");
|
||||
wo_dtl.delete("changeinvdtl_id='" + jo.getString("changeinvdtl_id") + "'");
|
||||
}
|
||||
//更新主表
|
||||
wo_mst.update(map, "moveinv_id='" + moveinv_id + "'");
|
||||
wo_mst.update(map, "changeinv_id='" + changeinv_id + "'");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,6 +170,9 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
change_jo.put("customer_name", CustomerName);
|
||||
//查询对应的客户
|
||||
JSONObject customer_jo = WQLObject.getWQLObject("md_cs_customerbase").query("cust_code = '" + CustomerName + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(customer_jo)){
|
||||
throw new BadRequestException("未查询到对应客户编码为:"+CustomerName);
|
||||
}
|
||||
change_jo.put("customer_description", customer_jo.getString("cust_name"));
|
||||
change_jo.put("isRePrintPackageBoxLabel", isRePrintPackageBoxLabel);
|
||||
change_jo.put("isUnPackBox", isUnPackBox);
|
||||
@@ -289,7 +262,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
}
|
||||
ids.append("'");
|
||||
//查询所有载具的库存
|
||||
JSONArray ja = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||
JSONArray ja = WQL.getWO("QST_IVT_CHANGE")
|
||||
.addParam("flag", "33")
|
||||
.addParam("ids", ids.toString())
|
||||
.process().getResultJSONArray(0);
|
||||
@@ -391,7 +364,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
@Override
|
||||
public JSONArray getOutBillDtl(Map whereJson) {
|
||||
whereJson.put("flag", "2");
|
||||
JSONArray jo = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||
JSONArray jo = WQL.getWO("QST_IVT_CHANGE")
|
||||
.addParamMap((HashMap) whereJson)
|
||||
.process()
|
||||
.getResultJSONArray(0);
|
||||
@@ -546,7 +519,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
if (StrUtil.isNotEmpty(map.get("pcsn"))) {
|
||||
map.put("pcsn", "%" + map.get("pcsn") + "%");
|
||||
}
|
||||
JSONObject jo = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||
JSONObject jo = WQL.getWO("QST_IVT_CHANGE")
|
||||
.addParam("flag", "3")
|
||||
.addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "ivt2.struct_id");
|
||||
return jo;
|
||||
@@ -575,12 +548,12 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
for (int i = 0; i < ja.size(); i++) {
|
||||
JSONObject jo = ja.getJSONObject(i);
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("mfg_order_name",jo.getString("mfg_order_name"));
|
||||
map.put("sale_order_name",jo.getString("mfg_order_name"));
|
||||
map.put("customer_name",jo.getString("customer_name"));
|
||||
map.put("customer_description",jo.getString("customer_description"));
|
||||
map.put("isRePrintPackageBoxLabel",jo.getString("isRePrintPackageBoxLabel"));
|
||||
map.put("isUnPackBox",jo.getString("isUnPackBox"));
|
||||
String UpdatedDateOfProduction = jo.getString("isUnPackBox");
|
||||
map.put("isRePrintPackageBoxLabel",jo.getString("isreprintpackageboxlabel"));
|
||||
map.put("isUnPackBox",jo.getString("isunpackbox"));
|
||||
String UpdatedDateOfProduction = jo.getString("updateddateofproduction");
|
||||
String pcsn = jo.getString("pcsn");
|
||||
|
||||
JSONObject old_sub = WQLObject.getWQLObject("pdm_bi_subpackagerelation").query("container_name = '"+pcsn+"' AND status = '2'").uniqueResult(0);
|
||||
@@ -594,7 +567,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelationChangeFlow").insert(old_sub);
|
||||
|
||||
if (StrUtil.isNotEmpty(UpdatedDateOfProduction)){
|
||||
map.put("date_of_FG_inbound",jo.getString("date_of_FG_inbound"));
|
||||
map.put("date_of_FG_inbound",UpdatedDateOfProduction);
|
||||
}
|
||||
WQLObject.getWQLObject("pdm_bi_subpackagerelation").update(map,"container_name = '"+pcsn+"' AND status = '2'");
|
||||
|
||||
@@ -605,7 +578,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
new_sub.put("create_id",currentUserId);
|
||||
new_sub.put("create_name",nickName);
|
||||
new_sub.put("change_time",DateUtil.now());
|
||||
old_sub.put("workorder_id",IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||
new_sub.put("workorder_id",IdUtil.getSnowflake(1, 1).nextId() + "");
|
||||
WQLObject.getWQLObject("PDM_BI_SubPackageRelationChangeFlow").insert(new_sub);
|
||||
}
|
||||
HashMap<String, String> map_mst = new HashMap<>();
|
||||
@@ -827,7 +800,7 @@ public class ChangeServiceImpl implements ChangeService {
|
||||
|
||||
String moveinv_id = whereJson.getString("moveinv_id");
|
||||
//查询所有载具的库存
|
||||
JSONArray ja = WQL.getWO("QST_IVT_HANDMOVESTOR")
|
||||
JSONArray ja = WQL.getWO("QST_IVT_CHANGE")
|
||||
.addParam("flag", "4")
|
||||
.addParam("moveinv_id", moveinv_id)
|
||||
.process().getResultJSONArray(0);
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
输入.create_mode TYPEAS s_string
|
||||
输入.bill_type TYPEAS s_string
|
||||
输入.stor_id TYPEAS s_string
|
||||
输入.moveinv_id TYPEAS s_string
|
||||
输入.changeinv_id TYPEAS s_string
|
||||
输入.buss_type TYPEAS s_string
|
||||
输入.work_status TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
@@ -31,7 +31,7 @@
|
||||
输入.ivt_level TYPEAS s_string
|
||||
输入.is_active TYPEAS s_string
|
||||
输入.sect_id TYPEAS s_string
|
||||
输入.moveinvdtl_id TYPEAS s_string
|
||||
输入.changeinvdtl_id TYPEAS s_string
|
||||
输入.struct_id TYPEAS s_string
|
||||
输入.is_issued TYPEAS s_string
|
||||
输入.remark TYPEAS s_string
|
||||
@@ -100,29 +100,29 @@
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
MoveInvDtl.*,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
FROM
|
||||
ST_IVT_MoveInvDtl MoveInvDtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = MoveInvDtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.moveinv_id <> ""
|
||||
MoveInvDtl.moveinv_id = 输入.moveinv_id
|
||||
ENDOPTION
|
||||
OPTION 输入.moveinvdtl_id <> ""
|
||||
MoveInvDtl.moveinvdtl_id = 输入.moveinvdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.work_status <> ""
|
||||
MoveInvDtl.work_status <= 输入.work_status
|
||||
ENDOPTION
|
||||
order by MoveInvDtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
QUERY
|
||||
SELECT
|
||||
dtl.*,
|
||||
mb.material_code,
|
||||
mb.material_name
|
||||
FROM
|
||||
st_ivt_structivtchangedtl dtl
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
WHERE
|
||||
1 = 1
|
||||
OPTION 输入.changeinv_id <> ""
|
||||
dtl.changeinv_id = 输入.changeinv_id
|
||||
ENDOPTION
|
||||
OPTION 输入.changeinvdtl_id <> ""
|
||||
dtl.changeinvdtl_id = 输入.changeinvdtl_id
|
||||
ENDOPTION
|
||||
OPTION 输入.work_status <> ""
|
||||
dtl.work_status <= 输入.work_status
|
||||
ENDOPTION
|
||||
order by dtl.seq_no
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
PAGEQUERY
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.wms.st.returns.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
@@ -7,6 +8,8 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.modules.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.utils.dto.CurrentUser;
|
||||
import org.nl.modules.system.service.impl.ParamServiceImpl;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
@@ -173,6 +176,16 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
if (StrUtil.equals(bill_type, "0001")) {
|
||||
//1.回传MES
|
||||
|
||||
//查询该入库单下的所有箱子回传
|
||||
JSONArray box_rows = WQL.getWO("QST_IVT_INANDOUTRETRUN").addParam("iostorinv_id",jo_mst.getString("iostorinv_id")).addParam("flag","2").process().getResultJSONArray(0);
|
||||
for (int j = 0; j < box_rows.size(); j++) {
|
||||
JSONObject box_row = box_rows.getJSONObject(j);
|
||||
// 调用接口回传
|
||||
JSONObject paramMesMst = new JSONObject();
|
||||
paramMesMst.put("PackageBoxSN",box_row.getString("box_no"));
|
||||
paramMesMst.put("User",box_row.getString("confirm_optname"));
|
||||
new LmsToMesServiceImpl().childRollFGInboundComplete(paramMesMst);
|
||||
}
|
||||
}
|
||||
|
||||
//退货入库
|
||||
@@ -388,6 +401,10 @@ public class InAndOutRetrunServiceImpl implements InAndOutReturnService {
|
||||
}
|
||||
|
||||
}
|
||||
jo_mst.put("is_upload", "1");
|
||||
jo_mst.put("upload_optid", SecurityUtils.getCurrentUserId());
|
||||
jo_mst.put("upload_time", DateUtil.now());
|
||||
WQLObject.getWQLObject("ST_IVT_IOStorInv").update(jo_mst);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
输入.is_upload TYPEAS s_string
|
||||
输入.begin_time TYPEAS s_string
|
||||
输入.end_time TYPEAS s_string
|
||||
输入.iostorinv_id TYPEAS s_string
|
||||
输入.bill_code TYPEAS s_string
|
||||
输入.bill_type TYPEAS s_string
|
||||
输入.io_type TYPEAS s_string
|
||||
@@ -32,6 +33,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
[临时表]
|
||||
--这边列出来的临时表就会在运行期动态创建
|
||||
|
||||
@@ -67,8 +69,6 @@
|
||||
INNER JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
WHERE
|
||||
mst.bill_status = '99'
|
||||
AND
|
||||
mst.bill_type not in ('000401','010201','010202','010401','010601')
|
||||
OPTION 输入.stor_id <> ""
|
||||
mst.stor_id = 输入.stor_id
|
||||
ENDOPTION
|
||||
@@ -119,225 +119,14 @@
|
||||
|
||||
IF 输入.flag = "2"
|
||||
QUERY
|
||||
SELECT
|
||||
proc.PK_DEPT,
|
||||
proc.VEND_ID,
|
||||
proc.CEMPLOYEEID,
|
||||
proc.PK_DEPT_V,
|
||||
proc.VBILLCODE,
|
||||
dtl.pcsn,
|
||||
dtl.material_id,
|
||||
proc.PRICE,
|
||||
proc.PRICE_TAX,
|
||||
(case when mst.bill_type not in ('000601','000501','010701') then dtl.real_qty else concat('-',dtl.plan_qty) end) AS real_qty,
|
||||
proc.TAX,
|
||||
proc.PURCHASE_ID_B,
|
||||
proc.PURCHASE_ID,
|
||||
proc.ITEM_ID,
|
||||
proc.CROWNO,
|
||||
proc.QTY,
|
||||
mb.material_name,
|
||||
proc.F_UNIT_ID,
|
||||
proc.M_UNIT_ID,
|
||||
userper.ext_id AS make_ext_id,
|
||||
userper.extuser_id AS create_user_id,
|
||||
mb.measrate AS vchangerate,
|
||||
dict.label
|
||||
SELECT DISTINCT
|
||||
dis.box_no,
|
||||
mst.confirm_optname
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN sys_dict_detail dict ON dict.`value` = mst.bill_type AND dict.name = 'IO_BUSS_TYPE'
|
||||
INNER JOIN pcs_if_purchaseorderproc proc ON proc.id = dtl.base_billdtl_id
|
||||
LEFT JOIN sys_user userper ON userper.user_id = mst.input_optid
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
WHERE
|
||||
dtl.iostorinv_id = 输入.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "3"
|
||||
QUERY
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
md_pb_materialtypeerpstorage erp
|
||||
WHERE
|
||||
erp.material_type_id IN 输入.material_type_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "4"
|
||||
QUERY
|
||||
SELECT
|
||||
*,
|
||||
(
|
||||
CASE
|
||||
|
||||
WHEN a.bill_type NOT IN ( '000601', '000501', '010701' ) THEN
|
||||
a.num ELSE concat( '-', a.num )
|
||||
END
|
||||
) AS real_qty
|
||||
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
MAX( erpuser.ext_id ) AS create_id,
|
||||
erpuser.extuser_id AS create_user_id,
|
||||
MAX( dept.ext_id ) AS dept_ext_id,
|
||||
MAX( dept.version_id ) AS version_id,
|
||||
MAX( mst.input_time ) AS input_time,
|
||||
MAX( mst.biz_date ) AS biz_date,
|
||||
dtl.material_id,
|
||||
MAX( mb.ext_id ) AS material_ext_id,
|
||||
MAX( mu.ext_id ) AS unit_ext_id,
|
||||
MAX( mb.material_name ) AS material_name,
|
||||
SUM( dtl.real_qty ) AS num,
|
||||
dtl.pcsn,
|
||||
MAX( mst.bill_type ) AS bill_type,
|
||||
MAX(IFNULL(mb.measrate,'1/1')) AS vchangerate,
|
||||
MAX(dict.label) AS label
|
||||
FROM
|
||||
st_ivt_iostorinvdis dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN sys_user erpuser ON erpuser.user_id = mst.input_optid
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = mst.sysdeptid
|
||||
LEFT JOIN sys_dict_detail dict ON dict.`value` = mst.bill_type AND dict.name = 'IO_BUSS_TYPE'
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = mb.ass_unit_id
|
||||
WHERE
|
||||
dtl.iostorinv_id = 输入.iostorinv_id
|
||||
GROUP BY
|
||||
material_id,
|
||||
dtl.pcsn,
|
||||
extuser_id
|
||||
) a
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "5"
|
||||
QUERY
|
||||
SELECT
|
||||
MAX(proc.PK_DEPT) AS PK_DEPT,
|
||||
MAX(proc.VEND_ID) AS VEND_ID,
|
||||
MAX(proc.CEMPLOYEEID) AS CEMPLOYEEID,
|
||||
MAX(proc.PK_DEPT_V) AS PK_DEPT_V,
|
||||
proc.VBILLCODE,
|
||||
dtl.pcsn,
|
||||
dtl.material_id,
|
||||
MAX(proc.PRICE) AS PRICE,
|
||||
MAX(proc.PRICE_TAX) AS PRICE_TAX,
|
||||
SUM(dtl.real_qty) AS real_qty,
|
||||
MAX(proc.TAX) AS TAX,
|
||||
MAX(proc.PURCHASE_ID_B) AS PURCHASE_ID_B,
|
||||
MAX(proc.PURCHASE_ID) AS PURCHASE_ID,
|
||||
MAX(proc.ITEM_ID) AS ITEM_ID,
|
||||
MAX(proc.CROWNO) AS CROWNO,
|
||||
MAX(proc.QTY) AS QTY,
|
||||
MAX(mb.material_name) AS material_name,
|
||||
MAX(proc.F_UNIT_ID) AS F_UNIT_ID,
|
||||
MAX(proc.M_UNIT_ID) AS M_UNIT_ID,
|
||||
MAX(userper.ext_id) AS make_ext_id,
|
||||
userper.extuser_id AS create_user_id,
|
||||
MAX(IFNULL(mb.measrate,'1/1')) AS vchangerate,
|
||||
MAX(dict.label) AS label
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
INNER JOIN pcs_if_purchaseorderproc proc ON proc.id = dtl.base_billdtl_id
|
||||
LEFT JOIN sys_user userper ON userper.user_id = mst.input_optid
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN sys_dict_detail dict ON dict.`value` = mst.bill_type AND dict.name = 'IO_BUSS_TYPE'
|
||||
st_ivt_iostorinvdis dis
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dis.iostorinv_id
|
||||
WHERE
|
||||
dtl.iostorinv_id IN 输入.ids
|
||||
GROUP BY
|
||||
material_id,pcsn,extuser_id,VBILLCODE,CROWNO
|
||||
dis.iostorinv_id = 输入.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "6"
|
||||
QUERY
|
||||
SELECT
|
||||
MAX(erpuser.ext_id) AS create_id,
|
||||
erpuser.extuser_id AS create_user_id,
|
||||
MAX(dept.ext_id) AS dept_ext_id,
|
||||
MAX(dept.version_id) AS version_id,
|
||||
MAX(mst.input_time) AS input_time,
|
||||
MAX(mst.biz_date) AS biz_date,
|
||||
dtl.material_id,
|
||||
MAX(mb.ext_id) AS material_ext_id,
|
||||
MAX(mu.ext_id) AS unit_ext_id,
|
||||
MAX(mb.material_name) AS material_name,
|
||||
SUM(dtl.real_qty) AS real_qty,
|
||||
dtl.pcsn,
|
||||
MAX(IFNULL(mb.measrate,'1/1')) AS vchangerate,
|
||||
MAX(dict.label) AS label
|
||||
FROM
|
||||
st_ivt_iostorinvdis dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN sys_user erpuser ON erpuser.user_id = mst.input_optid
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = mst.sysdeptid
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = mb.ass_unit_id
|
||||
LEFT JOIN sys_dict_detail dict ON dict.`value` = mst.bill_type AND dict.name = 'IO_BUSS_TYPE'
|
||||
WHERE
|
||||
dtl.iostorinv_id IN 输入.ids
|
||||
GROUP BY
|
||||
material_id,dtl.pcsn,extuser_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "7"
|
||||
QUERY
|
||||
SELECT
|
||||
inv.*
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv inv ON inv.iostorinv_id = dtl.iostorinv_id
|
||||
WHERE
|
||||
dtl.material_id = 输入.material_id
|
||||
AND
|
||||
dtl.pcsn = 输入.pcsn
|
||||
AND
|
||||
inv.is_upload = '0'
|
||||
AND
|
||||
inv.iostorinv_id not IN 输入.ids
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
IF 输入.flag = "8"
|
||||
QUERY
|
||||
SELECT
|
||||
erpuser.ext_id AS create_id,
|
||||
erpuser.extuser_id AS create_user_id,
|
||||
dept.ext_id AS dept_ext_id,
|
||||
dept.version_id,
|
||||
mst.input_time,
|
||||
mst.biz_date,
|
||||
dtl.material_id,
|
||||
mb.ext_id AS material_ext_id,
|
||||
mu.ext_id AS unit_ext_id,
|
||||
mb.material_name,
|
||||
dtl.seq_no,
|
||||
(case when mst.bill_type not in ('000601','000501','010701') then dtl.real_qty else concat('-',dtl.plan_qty) end) AS real_qty,
|
||||
dtl.pcsn,
|
||||
IFNULL(mb.measrate,'1/1') AS vchangerate,
|
||||
dict.label
|
||||
FROM
|
||||
st_ivt_iostorinvdtl dtl
|
||||
LEFT JOIN st_ivt_iostorinv mst ON mst.iostorinv_id = dtl.iostorinv_id
|
||||
LEFT JOIN sys_dict_detail dict ON dict.`value` = mst.bill_type AND dict.name = 'IO_BUSS_TYPE'
|
||||
LEFT JOIN sys_user erpuser ON erpuser.user_id = mst.input_optid
|
||||
LEFT JOIN sys_dept dept ON dept.dept_id = mst.sysdeptid
|
||||
LEFT JOIN md_me_materialbase mb ON mb.material_id = dtl.material_id
|
||||
LEFT JOIN md_pb_measureunit mu ON mu.measure_unit_id = mb.ass_unit_id
|
||||
WHERE
|
||||
dtl.iostorinv_id = 输入.iostorinv_id
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入库日期">
|
||||
<el-input v-model="form.date_of_FG_inbound" style="width: 300px;" />
|
||||
<el-input v-model="form.date_of_fg_inbound" style="width: 300px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@@ -221,12 +221,12 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否重打外包装标签">
|
||||
<el-input v-model="form.isRePrintPackageBoxLabel" style="width: 300px;" />
|
||||
<el-input v-model="form.isreprintpackageboxlabel" style="width: 300px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="是否拆包重打子卷标签">
|
||||
<el-input v-model="form.isUnPackBox" style="width: 300px;" />
|
||||
<el-input v-model="form.isunpackbox" style="width: 300px;" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -259,7 +259,7 @@
|
||||
<el-table-column prop="customer_description" label="客户名称" :min-width="flexWidth('customer_description',crud.data,'客户名称')" />
|
||||
<el-table-column v-if="false" prop="product_name" label="产品编码" :min-width="flexWidth('product_name',crud.data,'产品编码')" />
|
||||
<el-table-column prop="product_description" label="产品描述" :min-width="flexWidth('product_description',crud.data,'产品描述')"/>
|
||||
<el-table-column prop="date_of_FG_inbound" label="入库日期" :min-width="flexWidth('date_of_FG_inbound',crud.data,'入库日期')" />
|
||||
<el-table-column prop="date_of_fg_inbound" label="入库日期" :min-width="flexWidth('date_of_fg_inbound',crud.data,'入库日期')" />
|
||||
<el-table-column prop="container_name" label="子卷号" :min-width="flexWidth('container_name',crud.data,'子卷号')" />
|
||||
<el-table-column prop="sap_pcsn" label="sap批次" :min-width="flexWidth('sap_pcsn',crud.data,'SAP批次')" />
|
||||
<el-table-column prop="width" label="产品规格(幅宽)" :min-width="flexWidth('width',crud.data,'产品规格(幅宽)')" />
|
||||
@@ -285,8 +285,8 @@
|
||||
{{ dict.label.sub_package_relation[scope.row.status] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="isRePrintPackageBoxLabel" label="是否需要重打外包装标签" :min-width="flexWidth('isRePrintPackageBoxLabel',crud.data,'是否需要重打外包装标签')" />
|
||||
<el-table-column prop="isUnPackBox" label="是否需要拆包重打子卷标签" :min-width="flexWidth('isUnPackBox',crud.data,'是否需要拆包重打子卷标签')" />
|
||||
<el-table-column prop="isreprintpackageboxlabel" label="是否需要重打外包装标签" :min-width="flexWidth('isreprintpackageboxlabel',crud.data,'是否需要重打外包装标签')" />
|
||||
<el-table-column prop="isunpackbox" label="是否需要拆包重打子卷标签" :min-width="flexWidth('isunpackbox',crud.data,'是否需要拆包重打子卷标签')" />
|
||||
<el-table-column v-permission="[]" label="操作" align="center" fixed="right" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<udOperation
|
||||
@@ -310,7 +310,7 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { workorder_id: null, package_box_sn: null, quanlity_in_box: null, box_weight: null, quality_guaran_period: null, sale_order_name: null, customer_name: null, customer_description: null, product_name: null, product_description: null, date_of_FG_inbound: null, container_name: null, width: null, thickness: null, mass_per_unit_area: null, net_weight: null, length: null, date_of_production: null, is_un_plan_production: null, un_plan_product_property1: null, un_plan_product_property2: null, un_plan_product_property3: null, box_type: null, sap_pcsn: null, remark: null, create_id: null, create_name: null, create_time: null, status: null, isRePrintPackageBoxLabel: null, isUnPackBox: null }
|
||||
const defaultForm = { workorder_id: null, package_box_sn: null, quanlity_in_box: null, box_weight: null, quality_guaran_period: null, sale_order_name: null, customer_name: null, customer_description: null, product_name: null, product_description: null, date_of_fg_inbound: null, container_name: null, width: null, thickness: null, mass_per_unit_area: null, net_weight: null, length: null, date_of_production: null, is_un_plan_production: null, un_plan_product_property1: null, un_plan_product_property2: null, un_plan_product_property3: null, box_type: null, sap_pcsn: null, remark: null, create_id: null, create_name: null, create_time: null, status: null, isreprintpackageboxlabel: null, isunpackbox: null }
|
||||
export default {
|
||||
name: 'Subpackagerelation',
|
||||
dicts: ['sub_package_relation', 'IS_OR_NOT'],
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
<span v-show="scope.row.edit">{{ scope.row.demand_date }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column key="21" width="150" show-overflow-tooltip prop="date_of_FG_inbound" label="制作日期-新">
|
||||
<el-table-column key="24" width="150" show-overflow-tooltip prop="date_of_FG_inbound" label="制作日期-新">
|
||||
<template scope="scope">
|
||||
<el-input v-show="!scope.row.edit" v-model="scope.row.date_of_FG_inbound" class="input-with-select">
|
||||
</el-input>
|
||||
@@ -342,7 +342,7 @@ export default {
|
||||
this.$emit('AddChanged')
|
||||
},
|
||||
[CRUD.HOOK.afterToEdit]() {
|
||||
handmovestor.getOutBillDtl({ 'moveinv_id': this.form.moveinv_id }).then(res => {
|
||||
handmovestor.getOutBillDtl({ 'changeinv_id': this.form.changeinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
@@ -354,7 +354,7 @@ export default {
|
||||
},
|
||||
[CRUD.HOOK.afterToView]() {
|
||||
debugger
|
||||
handmovestor.getOutBillDtl({ 'moveinv_id': this.form.moveinv_id }).then(res => {
|
||||
handmovestor.getOutBillDtl({ 'changeinv_id': this.form.changeinv_id }).then(res => {
|
||||
this.form.tableData = res
|
||||
// 将明细变成不可编辑
|
||||
for (let i = 0; i < this.form.tableData.length; i++) {
|
||||
|
||||
@@ -193,7 +193,7 @@ export default {
|
||||
name: 'Change',
|
||||
components: { AddDialog, crudOperation, rrOperation, udOperation, pagination },
|
||||
cruds() {
|
||||
return CRUD({ title: '库存变更', idField: 'moveinv_id', url: 'api/change', crudMethod: { ...change },
|
||||
return CRUD({ title: '库存变更', idField: 'changeinv_id', url: 'api/change', crudMethod: { ...change },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
<el-table-column show-overflow-tooltip prop="plan_qty" :formatter="crud.formatNum3" label="重量" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="point_code" label="入库点" align="center" />
|
||||
<el-table-column show-overflow-tooltip prop="struct_code" label="货位" align="center" />
|
||||
<el-table-column align="center" label="操作" width="190" fixed="right">
|
||||
<!--<el-table-column align="center" label="操作" width="190" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-popover v-model="scope.row.pop" placement="top" width="180" trigger="manual">
|
||||
<p>{{ '是否确认删除桶明细?' }}</p>
|
||||
@@ -213,7 +213,7 @@
|
||||
<el-button slot="reference" :disabled="scope.row.struct_code !== '' && scope.row.struct_code" type="danger" icon="el-icon-delete" size="mini" @click="toDelete(scope.row)" />
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>-->
|
||||
</el-table>
|
||||
</el-card>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user