From 5b09ad04e3e1ac1468e3b008fdc8bc84fbdced41 Mon Sep 17 00:00:00 2001 From: Rui_Li <877258667@qq.com> Date: Wed, 25 Mar 2026 10:35:51 +0800 Subject: [PATCH] =?UTF-8?q?sap=20=E5=85=B6=E4=BB=96=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E7=9A=84=E6=93=8D=E4=BD=9C=20=20=E5=85=B6=E4=BB=96=E7=9A=84?= =?UTF-8?q?=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../finishedProduct/sap/dao/SapViewDao.java | 17 ++ .../sap/dao/impl/SapViewDaoImpl.java | 29 ++ .../sap/service/SapRollService.java | 32 +++ .../sap/service/impl/SapRollServiceImpl.java | 193 +++++++++++++ .../js/productwarehouse/sap/sap_outbound.js | 135 ++++++++++ .../js/productwarehouse/sap/sap_storage.js | 253 ++++++++++++++++++ .../productwarehouse/sap/sap_outbound.ftl | 121 +++++++++ .../productwarehouse/sap/sap_storage.ftl | 150 +++++++++++ 8 files changed, 930 insertions(+) create mode 100644 src/main/java/com/gaotao/modules/finishedProduct/sap/dao/SapViewDao.java create mode 100644 src/main/java/com/gaotao/modules/finishedProduct/sap/dao/impl/SapViewDaoImpl.java create mode 100644 src/main/java/com/gaotao/modules/finishedProduct/sap/service/SapRollService.java create mode 100644 src/main/java/com/gaotao/modules/finishedProduct/sap/service/impl/SapRollServiceImpl.java create mode 100644 src/main/resources/static/pda/js/productwarehouse/sap/sap_outbound.js create mode 100644 src/main/resources/static/pda/js/productwarehouse/sap/sap_storage.js create mode 100644 src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl create mode 100644 src/main/resources/templates/productwarehouse/sap/sap_storage.ftl diff --git a/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/SapViewDao.java b/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/SapViewDao.java new file mode 100644 index 0000000..ace188c --- /dev/null +++ b/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/SapViewDao.java @@ -0,0 +1,17 @@ +package com.gaotao.modules.finishedProduct.sap.dao; + +import java.util.List; +import java.util.Map; + +public interface SapViewDao { + + /** + * 查询 UFD_OIGN 视图(SAP入库原因) + */ + List> getOignOptions(); + + /** + * 查询 UFD_OIGE 视图(SAP出库原因) + */ + List> getOigeOptions(); +} diff --git a/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/impl/SapViewDaoImpl.java b/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/impl/SapViewDaoImpl.java new file mode 100644 index 0000000..50ea78a --- /dev/null +++ b/src/main/java/com/gaotao/modules/finishedProduct/sap/dao/impl/SapViewDaoImpl.java @@ -0,0 +1,29 @@ +package com.gaotao.modules.finishedProduct.sap.dao.impl; + +import com.gaotao.modules.finishedProduct.sap.dao.SapViewDao; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate; +import org.springframework.stereotype.Repository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Repository +public class SapViewDaoImpl implements SapViewDao { + + @Autowired + private NamedParameterJdbcTemplate parameterJdbcTemplate; + + @Override + public List> getOignOptions() { + String sql = "SELECT FLDValue, Descr FROM UFD_OIGN"; + return parameterJdbcTemplate.queryForList(sql, new HashMap<>()); + } + + @Override + public List> getOigeOptions() { + String sql = "SELECT FLDValue, Descr FROM UFD_OIGE"; + return parameterJdbcTemplate.queryForList(sql, new HashMap<>()); + } +} diff --git a/src/main/java/com/gaotao/modules/finishedProduct/sap/service/SapRollService.java b/src/main/java/com/gaotao/modules/finishedProduct/sap/service/SapRollService.java new file mode 100644 index 0000000..bf89dac --- /dev/null +++ b/src/main/java/com/gaotao/modules/finishedProduct/sap/service/SapRollService.java @@ -0,0 +1,32 @@ +package com.gaotao.modules.finishedProduct.sap.service; + +import com.gaotao.common.utils.R; +import com.gaotao.modules.finishedProduct.entity.CRollinfoEntity; +import com.gaotao.modules.finishedProduct.vo.CRollInfoStorageVo; + +import java.util.List; +import java.util.Map; + +public interface SapRollService { + + /** + * SAP出库扫卷查询(只查sourcetype="SAP成品入库"的卷) + */ + R sapOutRollno(CRollinfoEntity rollno); + + /** + * SAP成品入库 + */ + R sapRollToStorage(CRollInfoStorageVo cRollInfoStorageVo); + + /** + * SAP成品出库 + */ + R sapBatchRollOutbound(List cRollinfoList); + + /** + * 获取SAP下拉选项(根据类型查询不同视图) + * @param type "IN"=入库(UFD_OIGN), "OUT"=出库(UFD_OIGE) + */ + List> getSapUfdOptions(String type); +} diff --git a/src/main/java/com/gaotao/modules/finishedProduct/sap/service/impl/SapRollServiceImpl.java b/src/main/java/com/gaotao/modules/finishedProduct/sap/service/impl/SapRollServiceImpl.java new file mode 100644 index 0000000..15f7bbd --- /dev/null +++ b/src/main/java/com/gaotao/modules/finishedProduct/sap/service/impl/SapRollServiceImpl.java @@ -0,0 +1,193 @@ +package com.gaotao.modules.finishedProduct.sap.service.impl; + +import com.gaotao.common.constant.SysMsgConstant; +import com.gaotao.common.utils.DateUtils; +import com.gaotao.common.utils.R; +import com.gaotao.common.utils.RandomUtil; +import com.gaotao.modules.finishedProduct.entity.CRollinfoEntity; +import com.gaotao.modules.finishedProduct.entity.Part; +import com.gaotao.modules.finishedProduct.sap.dao.SapViewDao; +import com.gaotao.modules.finishedProduct.sap.service.SapRollService; +import com.gaotao.modules.finishedProduct.service.CRollinfoService; +import com.gaotao.modules.finishedProduct.service.PartService; +import com.gaotao.modules.finishedProduct.service.TransheaderService; +import com.gaotao.modules.finishedProduct.vo.CRollInfoStorageVo; +import com.gaotao.modules.schedule.mapper.ProcedureMapper; +import com.gaotao.modules.sys.entity.SysUserEntity; +import com.gaotao.modules.sys.service.SysMsgService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang.StringUtils; +import org.apache.shiro.SecurityUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.CollectionUtils; + +import java.util.*; + +@Slf4j +@Service +@SuppressWarnings("all") +public class SapRollServiceImpl implements SapRollService { + + private static final String SAP_SOURCE_TYPE = "SAP成品入库"; + private static final String SAP_TRANS_TYPE_IN = "SOI"; + private static final String SAP_TRANS_TYPE_OUT = "SOC"; + + @Autowired + private CRollinfoService cRollinfoService; + + @Autowired + private TransheaderService transheaderService; + + @Autowired + private PartService partService; + + @Autowired + private ProcedureMapper procedureMapper; + + @Autowired + private SysMsgService sysMsgService; + + @Autowired + private SapViewDao sapViewDao; + + @Override + public R sapOutRollno(CRollinfoEntity rollno) { + SysUserEntity user = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); + CRollinfoEntity cRollInfo = cRollinfoService.lambdaQuery() + .eq(StringUtils.isNotEmpty(rollno.getRollno()), CRollinfoEntity::getRollno, rollno.getRollno()) + .eq(CRollinfoEntity::getSite, user.getSite()) + .eq(CRollinfoEntity::getSourcetype, SAP_SOURCE_TYPE) + .one(); + if (cRollInfo == null) { + return R.error(sysMsgService.getLanguageMsg(SysMsgConstant.OBJECT_ID_200105)); + } + if (!"I".equals(cRollInfo.getStatusDb())) { + return R.error(sysMsgService.getLanguageMsg(SysMsgConstant.OBJECT_ID_200106) + cRollInfo.getStatus()); + } + return R.ok().put("cRollinfo", cRollInfo); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public R sapRollToStorage(CRollInfoStorageVo cRollInfoStorageVo) { + SysUserEntity user = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); + List cRollinfoList = new ArrayList<>(); + Integer num = (int) Math.ceil(cRollInfoStorageVo.getStorageNumber() / cRollInfoStorageVo.getRollNumber()); + Double y = cRollInfoStorageVo.getStorageNumber() % cRollInfoStorageVo.getRollNumber(); + Date date = new Date(); + Part part = partService.getPart(cRollInfoStorageVo.getPartNo()); + Date expDate = null; + if (part != null && part.getToexpiredays() != null && "Y".equals(part.getExpiredatecontrolflag())) { + expDate = DateUtils.addDateDays(date, part.getToexpiredays().intValue()); + } + for (int i = 0; i < num; i++) { + CRollinfoEntity cRollinfoEntity = new CRollinfoEntity(); + String rollNo = RandomUtil.getOtherOrderNoByAtomic(cRollInfoStorageVo.getOrderref1(), cRollInfoStorageVo.getOrderref2()); + cRollinfoEntity.setRollno(rollNo); + if (i == num - 1 && y > 0) { + cRollinfoEntity.setRollqty(y); + } else { + cRollinfoEntity.setRollqty(cRollInfoStorageVo.getRollNumber()); + } + cRollinfoEntity.setRemark(cRollInfoStorageVo.getDisplay()); + cRollinfoEntity.setOrderref1(cRollInfoStorageVo.getOrderref1()); + cRollinfoEntity.setOrderref2(cRollInfoStorageVo.getOrderref2()); + cRollinfoEntity.setWarehouseid(cRollInfoStorageVo.getWarehouseId()); + cRollinfoEntity.setCreatedby(user.getUserDisplay()); + cRollinfoEntity.setRolldate(date); + cRollinfoEntity.setCreateddate(date); + cRollinfoEntity.setStatusDb("I"); + cRollinfoEntity.setStatus("已入库"); + cRollinfoEntity.setSourcetype(SAP_SOURCE_TYPE); + cRollinfoEntity.setPartno(cRollInfoStorageVo.getPartNo()); + cRollinfoEntity.setRolltype("合格卷"); + cRollinfoEntity.setRolltypeDb("0"); + cRollinfoEntity.setParttypeFlag("F"); + cRollinfoEntity.setNeedsynchronizeflag("N"); + cRollinfoEntity.setOriginalrollno(rollNo); + if (expDate != null) { + cRollinfoEntity.setExpireddate(expDate); + } + cRollinfoEntity.setSite(user.getSite()); + cRollinfoList.add(cRollinfoEntity); + } + + transheaderService.saveTransInfo(cRollinfoList, SAP_TRANS_TYPE_IN); + cRollinfoService.saveBatch(cRollinfoList); + + // TODO 调用SAP存储过程(入库) + // List params = new ArrayList<>(); + // params.add(...); + // List> resultList = procedureMapper.getProcedureData("存储过程名", params); + // Map resultMap = resultList.get(0); + // String resultCode = String.valueOf(resultMap.get("resultCode")); + // if (!"200".equalsIgnoreCase(resultCode)) { + // throw new XJException(resultMap.get("resultMsg").toString()); + // } + + return R.ok().put("inRollList", cRollinfoList); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public R sapBatchRollOutbound(List cRollinfoList) { + if (CollectionUtils.isEmpty(cRollinfoList)) { + return R.error("请扫描卷再出库"); + } + SysUserEntity user = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); + + for (CRollinfoEntity item : cRollinfoList) { + CRollinfoEntity dbRoll = cRollinfoService.lambdaQuery() + .eq(CRollinfoEntity::getRollno, item.getRollno()) + .eq(CRollinfoEntity::getSite, user.getSite()) + .eq(CRollinfoEntity::getSourcetype, SAP_SOURCE_TYPE) + .eq(CRollinfoEntity::getStatusDb, "I") + .one(); + if (dbRoll == null) { + return R.error("卷号 " + item.getRollno() + " 不存在或状态不正确"); + } + item.setStatus("已耗用"); + item.setStatusDb("D"); + item.setSite(user.getSite()); + item.setPartno(dbRoll.getPartno()); + item.setRollqty(dbRoll.getRollqty()); + } + + transheaderService.saveTransInfo(cRollinfoList, SAP_TRANS_TYPE_OUT); + + cRollinfoList.forEach(rollInfo -> { + cRollinfoService.lambdaUpdate() + .set(CRollinfoEntity::getStatus, rollInfo.getStatus()) + .set(CRollinfoEntity::getStatusDb, rollInfo.getStatusDb()) + .set(CRollinfoEntity::getNeedsynchronizeflag, "N") + .set(StringUtils.isNotEmpty(rollInfo.getRemark()), CRollinfoEntity::getRemark, rollInfo.getRemark()) + .eq(CRollinfoEntity::getSite, rollInfo.getSite()) + .eq(CRollinfoEntity::getRollno, rollInfo.getRollno()) + .update(); + }); + + // TODO 调用SAP存储过程(出库) + // List params = new ArrayList<>(); + // params.add(...); + // List> resultList = procedureMapper.getProcedureData("存储过程名", params); + // Map resultMap = resultList.get(0); + // String resultCode = String.valueOf(resultMap.get("resultCode")); + // if (!"200".equalsIgnoreCase(resultCode)) { + // throw new XJException(resultMap.get("resultMsg").toString()); + // } + + return R.ok("出库成功"); + } + + @Override + public List> getSapUfdOptions(String type) { + if ("IN".equals(type)) { + return sapViewDao.getOignOptions(); + } else if ("OUT".equals(type)) { + return sapViewDao.getOigeOptions(); + } + return Collections.emptyList(); + } +} diff --git a/src/main/resources/static/pda/js/productwarehouse/sap/sap_outbound.js b/src/main/resources/static/pda/js/productwarehouse/sap/sap_outbound.js new file mode 100644 index 0000000..06fdb2c --- /dev/null +++ b/src/main/resources/static/pda/js/productwarehouse/sap/sap_outbound.js @@ -0,0 +1,135 @@ +$(function () { + +}); + +$("#rollNo").bind("keydown", function (event) { + if (event.keyCode == 13) { + var rollNo = $("#rollNo").val(); + if (null == rollNo || rollNo == "") { + layer.alert("卷号不能为空!"); + } else { + getRollInfo(rollNo); + return false; + } + } + return true; +}); + +var rollList = [] +var rollInfoData = {} + +function getRollInfo(rollNo) { + let roll = { + "rollno": rollNo + } + $.ajax({ + url: "/finishedProduct/crollinfo/sapOutRollno", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(roll), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.code == 0) { + rollInfoData = data.cRollinfo; + if (rollInfoData) { + if(rollInfoData.statusDb != 'I'){ + layer.alert("该卷的状态为: "+rollInfoData.status); + $("#rollNo").val(''); + $("#rollNo").focus(); + return; + } + var rollBool = rollList.some(item => item.rollno === rollInfoData.rollno) + if (rollBool) { + layer.alert('该卷号已存在'); + $("#rollNo").val(''); + $("#rollNo").focus(); + return + } + rollList.push(rollInfoData) + var str = '' + + '' + + '' + + '' + + '' + rollInfoData.rollno + '' + + '' + + '' + rollInfoData.partno + '' + + '' + + '' + rollInfoData.rollqty + '' + + ''; + $("#roll_table").append(str); + $("#rollNo").val(''); + $("#rollNo").focus(); + } else { + layer.alert('该卷不存在'); + $("#rollNo").val(''); + $("#rollNo").focus(); + } + } else { + layer.alert(data.msg || '该卷不存在'); + } + if (data.code == 500) { + layer.alert(data.msg); + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + }, + error: function (data) { + } + }); +} + +function removeRoll(rollNo) { + $table = $("#roll_table tr"); + $("tr[id='" + rollNo + "']").remove(); + rollList = rollList.filter(item => item.rollno != rollNo) + $("#rollNo").val(''); + $("#rollNo").focus(); +} + +function sapOutbound() { + if(rollList.length == 0){ + layer.alert("请扫描卷再出库") + return + } + var reasonCode = $("#reasonCode").val() + if(!reasonCode){ + layer.alert("请选择-原因") + return + } + var submitList = rollList.map(function(item) { + return Object.assign({}, item, { remark: reasonCode }) + }) + $.ajax({ + url: "/finishedProduct/crollinfo/sapBatchRollOutbound", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(submitList), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.code == 0) { + $("#rollNo").val(''); + $("#reasonCode").val(''); + $("tr[id]").remove(); + rollList = [] + layer.alert('出库成功'); + } else { + layer.alert(data.msg || '出库失败'); + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + }, + error: function (data) { + } + }); +} diff --git a/src/main/resources/static/pda/js/productwarehouse/sap/sap_storage.js b/src/main/resources/static/pda/js/productwarehouse/sap/sap_storage.js new file mode 100644 index 0000000..8ef443c --- /dev/null +++ b/src/main/resources/static/pda/js/productwarehouse/sap/sap_storage.js @@ -0,0 +1,253 @@ +var rollList = [] + +// if (window.AndroidBridge) { +// AndroidBridge.setSoftKeyboardAllowed(false); +// +// }else { +// alert("AndroidBridge is undefined"); +// } +// setTimeout(function () { +// document.getElementById('rollNo').focus(); +// if (window.AndroidBridge) AndroidBridge.hideKeyboardAfterFocus(); +// }, 0); + +function getPartName(partNo) { + let part = {"partno": partNo} + $.ajax({ + url: "/part/getPart", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(part), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.data) { + var partName = data.data.partDesc; + var orderNo = data.data.orderNo; + $("#partName").val(partName) + $("#storageNumber").val("") + $("#rollNumber").val("") + $("#reasonCode").val("") + $("#orderRef1").val(orderNo) + $("#orderRef2").val("") + $("#rollNo").val("") + } else { + $("#partName").val('') + $("#partNo").val("") + $("#storageNumber").val("") + $("#rollNumber").val("") + $("#reasonCode").val("") + $("#orderRef1").val("") + $("#orderRef2").val("") + layer.alert('该物料不存在'); + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + $("#roll_table").html('') + }, + error: function (data) { + } + }); +} + +function getPartNo(rollno) { + var roll = { + rollno: rollno + } + $.ajax({ + url: "/finishedProduct/crollinfo/getPartByRollno", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(roll), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.cRollinfo) { + $("#partNo").val(data.cRollinfo.partno) + $("#partName").val(data.cRollinfo.partDescription) + $("#orderRef1").val(data.cRollinfo.orderref1) + $("#orderRef2").val(data.cRollinfo.orderref2) + } else { + layer.alert('该卷不存在') + $("#partNo").val('') + $("#rollNo").val('') + $("#partName").val('') + $("#orderRef1").val('') + $("#orderRef2").val('') + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + $("#roll_table").html('') + }, + error: function (data) { + } + }); +} + +$("#partNo").bind("keydown", function (event) { + if (event.keyCode == 13) { + var partNo = $("#partNo").val(); + if (null == partNo || partNo == "") { + layer.alert("物料编码不能为空!"); + return false; + } else { + getPartName(partNo); + } + } + return true; +}); + +$("#rollNo").bind("keydown", function (event) { + if (event.keyCode == 13) { + var rollNo = $("#rollNo").val(); + if (null == rollNo || rollNo == "") { + layer.alert("卷号不能为空!"); + return + } else { + //layer.alert("卷号:"+ rollNo); + getPartNo(rollNo); + } + } + return true; +}); + +function submitToStorage() { + var partNo = $("#partNo").val().trim(); + var storageNumber = $("#storageNumber").val().trim() + var rollNumber = $("#rollNumber").val().trim() + var warehouseId = $("#warehouseId").val().trim() + var reasonCode = $("#reasonCode").val() + var orderref1 = $("#orderRef1").val().trim() + var orderref2 = $("#orderRef2").val().trim() + + if (partNo.length == 0) { + layer.alert("物料编号-不能为空") + return + } + if (storageNumber.length == 0 || storageNumber == 0) { + layer.alert("入库数量-不能为0,或者为空") + return + } + if (rollNumber.length == 0 || rollNumber == 0) { + layer.alert("单卷数量-不能为0,或者为空") + return + } + if (!warehouseId) { + layer.alert("仓库编号-不能为空") + return + } + if (orderref1.length == 0) { + layer.alert("请填写-生产单号") + return + } + if (orderref2.length == 0) { + layer.alert("请填写-工序号") + return + } + if (!reasonCode) { + layer.alert("请选择-原因") + return + } + + let saveRollStorage = { + partNo: partNo, + storageNumber: storageNumber, + rollNumber: rollNumber, + warehouseId: warehouseId, + display: reasonCode, + orderref1: orderref1, + orderref2: orderref2, + } + + $.ajax({ + url: "/finishedProduct/crollinfo/sapRollToStorage", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(saveRollStorage), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.code == 0) { + $("#partNo").val(''); + $("#rollNo").val(''); + $("#storageNumber").val('') + $("#rollNumber").val('') + $("#reasonCode").val('') + $("#partName").val('') + $("#orderRef1").val('') + $("#orderRef2").val('') + layer.alert('入库成功') + $("#roll_table").html('') + rollList = data.inRollList + data.inRollList.forEach((item, index) => { + var str = '' + + '' + + '' + item.rollno + '' + + '' + + '' + item.rollqty + '' + + '' + + '' + + ''; + $("#roll_table").append(str); + }) + print(data.inRollList) + } else { + layer.alert(data.msg || '入库失败') + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + }, + error: function (data) { + } + }); +} + +function printRoll(rollno) { + var rolls = rollList.filter(item => item.rollno == rollno) + print(rolls); +} + +function print(val) { + var rollPrintList = val + if (rollPrintList.length <= 0) { + return; + } + $.ajax({ + url: "/finishedProduct/crollinfo/rollPrint", + contentType: 'application/json', + type: "POST", + data: JSON.stringify(rollPrintList), + dataType: "json", + beforeSend: function (request) { + request.setRequestHeader("token", $.cookie("token")); + }, + success: function (data) { + if (data.code == 0) { + layer.alert("打印成功") + rollPrintList = [] + } + if (data.code == 500) { + layer.alert(data.msg) + } + if (data.code == 401) { + layer.alert('用户身份已过期'); + window.location.href = "/login" + } + }, + error: function (data) { + } + }); +} diff --git a/src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl b/src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl new file mode 100644 index 0000000..93f110b --- /dev/null +++ b/src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl @@ -0,0 +1,121 @@ + + + + + + + + + + ${projectTitle!"MESPda"} + + + + + + + + + +
+
+
+
+
+ + SAP成品出库 +
+
+

+
+
+
+
+
卷号:
+ +
+
+
原因*
+ +
+
+
+
+ + + + + + + + + + + + + + + +
+ 操作 + + 卷号 + + 物料编码 + + 数量 +
+
+
+ + + + + + + + + +
+
+ +
+ + +
+
+ + + + + + + + + diff --git a/src/main/resources/templates/productwarehouse/sap/sap_storage.ftl b/src/main/resources/templates/productwarehouse/sap/sap_storage.ftl new file mode 100644 index 0000000..0881a13 --- /dev/null +++ b/src/main/resources/templates/productwarehouse/sap/sap_storage.ftl @@ -0,0 +1,150 @@ + + + + + + + + + +${projectTitle!"MESPda"} + + + + + + + + + +
+
+
+
+
+ + SAP成品入库 +
+
+

+
+
+
+
+
卷号:
+ +
+
+
物料编码*
+ +
+
+
物料名称:
+ +
+
+
入库数量*
+ +
+
+
单卷数量*
+ +
+
+
仓库号*
+ +
+
+
生产单号*
+ +
+
+
工序号*
+ +
+
+
原因*
+ +
+
+
+
+
+ + + + + + + + + + + + + +
+ 卷号 + + 数量 + + 操作 +
+
+
+ + + + + + + + +
+
+ +
+
+ +
+
+ + + + + + +