Browse Source

sap 其他入库的操作 其他的版本

master
Rui_Li 3 weeks ago
parent
commit
5b09ad04e3
  1. 17
      src/main/java/com/gaotao/modules/finishedProduct/sap/dao/SapViewDao.java
  2. 29
      src/main/java/com/gaotao/modules/finishedProduct/sap/dao/impl/SapViewDaoImpl.java
  3. 32
      src/main/java/com/gaotao/modules/finishedProduct/sap/service/SapRollService.java
  4. 193
      src/main/java/com/gaotao/modules/finishedProduct/sap/service/impl/SapRollServiceImpl.java
  5. 135
      src/main/resources/static/pda/js/productwarehouse/sap/sap_outbound.js
  6. 253
      src/main/resources/static/pda/js/productwarehouse/sap/sap_storage.js
  7. 121
      src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl
  8. 150
      src/main/resources/templates/productwarehouse/sap/sap_storage.ftl

17
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<Map<String, Object>> getOignOptions();
/**
* 查询 UFD_OIGE 视图SAP出库原因
*/
List<Map<String, Object>> getOigeOptions();
}

29
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<Map<String, Object>> getOignOptions() {
String sql = "SELECT FLDValue, Descr FROM UFD_OIGN";
return parameterJdbcTemplate.queryForList(sql, new HashMap<>());
}
@Override
public List<Map<String, Object>> getOigeOptions() {
String sql = "SELECT FLDValue, Descr FROM UFD_OIGE";
return parameterJdbcTemplate.queryForList(sql, new HashMap<>());
}
}

32
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<CRollinfoEntity> cRollinfoList);
/**
* 获取SAP下拉选项根据类型查询不同视图
* @param type "IN"=入库(UFD_OIGN), "OUT"=出库(UFD_OIGE)
*/
List<Map<String, Object>> getSapUfdOptions(String type);
}

193
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<CRollinfoEntity> 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<Object> params = new ArrayList<>();
// params.add(...);
// List<Map<String, Object>> resultList = procedureMapper.getProcedureData("存储过程名", params);
// Map<String, Object> 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<CRollinfoEntity> 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<Object> params = new ArrayList<>();
// params.add(...);
// List<Map<String, Object>> resultList = procedureMapper.getProcedureData("存储过程名", params);
// Map<String, Object> 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<Map<String, Object>> getSapUfdOptions(String type) {
if ("IN".equals(type)) {
return sapViewDao.getOignOptions();
} else if ("OUT".equals(type)) {
return sapViewDao.getOigeOptions();
}
return Collections.emptyList();
}
}

135
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 = '<tr id = ' + rollInfoData.rollno + '>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<button data-toggle="modal" onclick="removeRoll(\'' + rollInfoData.rollno + '\')" style="padding: 3px 10px;">' +
'删除</button>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<span>' + rollInfoData.rollno + '</span></th>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<span>' + rollInfoData.partno + '</span></th>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<span>' + rollInfoData.rollqty + '</span></th>' +
'</tr>';
$("#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) {
}
});
}

253
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 = '<tr id = ' + item.rollno + '_' + index + '>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<span>' + item.rollno + '</span></th>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<span>' + item.rollqty + '</span></th>' +
'<th class="" style="text-align:center;background-color: #ffff;">' +
'<button onclick="printRoll(\'' + item.rollno + '\')" data-toggle="modal" style="padding: 3px 10px;">' +
'打印标签</button></th>' +
'</tr>';
$("#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) {
}
});
}

121
src/main/resources/templates/productwarehouse/sap/sap_outbound.ftl

@ -0,0 +1,121 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/favicon.ico">
<title>${projectTitle!"MESPda"}</title>
<link href="/js/bootstrap-3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="/js/bootstrap-3.3.7/css/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/pda/jeasyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/pda/jeasyui/themes/icon.css">
<link href="/pda/css/base.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/css/button.css">
<link href="/layer/skin/layer.css" rel="stylesheet">
</head>
<body>
<div id="app">
<div data-v-45aee492="">
<header class="mint-header is-fixed">
<div class="mint-header-button is-left">
<div class="header-title">
<a href="/pda/publicMenu?titleName=''&menuId=0" class="go-back"><i class="mintui mintui-back"></i></a>
<span>SAP成品出库</span>
</div>
</div>
<h1 class="mint-header-title"></h1>
<div class="mint-header-button is-right"></div>
</header>
<form autocomplete="off" class="ivu-form ivu-form-label-right" style="margin-left:40px;margin-top: 10px ">
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">卷号:</div>
<input id="rollNo" class="ivu-col ivu-col-span-14"></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">原因<span style="color:red;">*</span>:</div>
<select class="ivu-col ivu-col-span-14" id="reasonCode" style="height: 30px;">
<option value="">--请选择--</option>
<#list ufdOptions! as opt>
<option value="${opt.FLDValue!}">${opt.FLDValue!} - ${opt.Descr!}</option>
</#list>
</select>
</div>
</form>
<div class="ivu-table" style="font-size: 11px;">
<div class="ivu-table-header">
<table style="width: 100%;" cellspacing="0" cellpadding="0"
border="0" style="table-layout:fixed;">
<colgroup>
<col width="25%">
<col width="25%">
<col width="25%">
<col width="25%">
</colgroup>
<thead>
<tr>
<th class="" style="text-align:center">
<span>操作</span>
</th>
<th class="" style="text-align:center">
<span>卷号</span>
</th>
<th class="" style="text-align:center">
<span>物料编码</span>
</th>
<th class="" style="text-align:center">
<span>数量</span>
</th>
</tr>
</thead>
</table>
</div>
<div class="ivu-table-body" style="">
<table style="width: 100%;" cellspacing="0" cellpadding="0"
border="0">
<colgroup>
<col width="25%">
<col width="25%">
<col width="25%">
<col width="25%">
</colgroup>
<tbody class="ivu-table-tbody" id = "roll_table" >
</tbody>
</table>
</div>
<div class="ivu-table-tip" style="display: none;">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><span>暂无筛选结果</span></td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="ivu-row" style="margin-top: 20px">
<div class="ivu-col ivu-col-span-12">
<a href="#" onclick="sapOutbound()" class="ivu-btn ivu-btn-primary">
<span>确认</span>
</a>
</div>
<div class="ivu-col ivu-col-span-12">
<a href="/pda/publicMenu?titleName=''&menuId=0" class="ivu-btn ivu-btn-primary">
<span>返回</span>
</a>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="/js/jquery/jquery-2.1.4.js"></script>
<script type="text/javascript" src="/pda/layer/layer.js"></script>
<script type="text/javascript" src="/pda/js/productwarehouse/sap/sap_outbound.js"></script>
<script type="text/javascript" src="/js/bootstrap-3.3.7/js/bootstrap.js"></script>
<script type="text/javascript" src="/js/bootstrap-3.3.7/js/bootstrap-table.js"></script>
<script type="text/javascript" src="/js/bootstrap-3.3.7/js/bootstrap-table-zh-CN.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.cookie.js"></script>
</html>

150
src/main/resources/templates/productwarehouse/sap/sap_storage.ftl

@ -0,0 +1,150 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="/favicon.ico">
<title>${projectTitle!"MESPda"}</title>
<link href="/pda/bootstrap/3.3.7/bootstrap.min.css" rel="stylesheet">
<link href="/pda/bootstrap/3.3.7/bootstrap-theme.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/pda/jeasyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/pda/jeasyui/themes/icon.css">
<link href="/pda/css/base.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/css/button.css">
<link href="/layer/skin/layer.css" rel="stylesheet">
</head>
<body>
<div id="app">
<div data-v-45aee492="">
<header class="mint-header is-fixed">
<div class="mint-header-button is-left">
<div class="header-title">
<a href="/pda/publicMenu?titleName=''&menuId=0" class="go-back"><i class="mintui mintui-back"></i></a>
<span>SAP成品入库</span>
</div>
</div>
<h1 class="mint-header-title"></h1>
<div class="mint-header-button is-right"></div>
</header>
<form autocomplete="off" class="ivu-form ivu-form-label-right" style="margin-left:40px;margin-top: 10px ">
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">卷号:</div>
<input id="rollNo" class="ivu-col ivu-col-span-14" ></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">物料编码<span style="color:red;">*</span>:</div>
<input id="partNo" class="ivu-col ivu-col-span-14" ></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">物料名称:</div>
<input id="partName" class="ivu-col ivu-col-span-14" disabled></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">入库数量<span style="color:red;">*</span>:</div>
<input id="storageNumber" class="ivu-col ivu-col-span-14" oninput="value=value.replace(/[^\d.]/g,'')"></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">单卷数量<span style="color:red;">*</span>:</div>
<input id="rollNumber" class="ivu-col ivu-col-span-14" oninput = "value=value.replace(/[^\d.]/g,'')"></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">仓库号<span style="color:red;">*</span>:</div>
<select class="ivu-col ivu-col-span-14" id="warehouseId"
data-options="editable:false" style="width:120px;height: 30px;">
<#list depots! as temp>
<option value="${temp.mark! }">${temp.mark! }</option>
</#list >
</select>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">生产单号<span style="color:red;">*</span>:</div>
<input id="orderRef1" class="ivu-col ivu-col-span-14"></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">工序号<span style="color:red;">*</span>:</div>
<input id="orderRef2" class="ivu-col ivu-col-span-14"></input>
</div>
<div class="r-left ivu-row" style="margin-top: 5px">
<div class="ivu-col ivu-col-span-6">原因<span style="color:red;">*</span>:</div>
<select class="ivu-col ivu-col-span-14" id="reasonCode" style="height: 30px;">
<option value="">--请选择--</option>
<#list ufdOptions! as opt>
<option value="${opt.FLDValue!}">${opt.FLDValue!} - ${opt.Descr!}</option>
</#list>
</select>
</div>
</form>
<div style="margin-top: 5px">
<div class="ivu-table" style="font-size: 11px;" >
<div class="ivu-table-header">
<table style="width: 100%;" cellspacing="0" cellpadding="0"
border="0" style="table-layout:fixed;">
<colgroup>
<col width="50%">
<col width="30%">
<col width="20%">
</colgroup>
<thead>
<tr>
<th class="" style="text-align:center">
<span>卷号</span>
</th>
<th class="" style="text-align:center">
<span>数量</span>
</th>
<th class="" style="text-align:center">
<span>操作</span>
</th>
</tr>
</thead>
</table>
</div>
<div class="ivu-table-body" style="">
<table style="width: 100%;" cellspacing="0" cellpadding="0"
border="0">
<colgroup>
<col width="50%">
<col width="30%">
<col width="20%">
</colgroup>
<tbody class="ivu-table-tbody" id = "roll_table" >
</tbody>
</table>
</div>
<div class="ivu-table-tip" style="display: none;">
<table cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td><span>暂无筛选结果</span></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="ivu-row" style="margin-top: 20px">
<div class="ivu-col ivu-col-span-12">
<a href="#" onclick="submitToStorage()" class="ivu-btn ivu-btn-primary">
<span>确认</span>
</a>
</div>
<div class="ivu-col ivu-col-span-12">
<a href="/pda/publicMenu?titleName=''&menuId=0" class="ivu-btn ivu-btn-primary">
<span>返回</span>
</a>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript" src="/js/jquery/jquery-2.1.4.js"></script>
<script type="text/javascript" src="/pda/layer/layer.js"></script>
<script type="text/javascript" src="/pda/js/productwarehouse/sap/sap_storage.js"></script>
<script type="text/javascript" src="/js/jquery/jquery.cookie.js"></script>
<script type="text/javascript">
</script>
</html>
Loading…
Cancel
Save