Commit 441937d9 sunke

1 锡膏过期提示(过期3天前过期日期那一列会变成红色的字, 已经过期过期日期那一列会变成红色背景)

2 锡膏出入库预约时间可取消
3 垂直货柜库存数量错误的问题
4 垂直货柜出入库操作时,点确定的提示框不再需要点确定
1 个父辈 56b72b08
...@@ -625,6 +625,19 @@ public class Barcode extends BaseMongoBean { ...@@ -625,6 +625,19 @@ public class Barcode extends BaseMongoBean {
return false; return false;
} }
/**
* 是否即将(3天内)过期,已过期后,此字段变为false
*/
public boolean isWillExpired(){
if(isExpired()){
return false;
}
if(expireDate != null){
return expireDate.before(DateUtil.addDays(new Date(),3));
}
return false;
}
// public void setNoChangeField(Barcode oldBarcode){ // public void setNoChangeField(Barcode oldBarcode){
// if(oldBarcode != null){ // if(oldBarcode != null){
// this.expireDate = oldBarcode.getExpireDate(); // this.expireDate = oldBarcode.getExpireDate();
......
...@@ -100,7 +100,35 @@ public class SolderBoxController extends BaseController{ ...@@ -100,7 +100,35 @@ public class SolderBoxController extends BaseController{
} }
} }
return "1操作成功"; return "0操作成功";
}
/**
* 取消锡膏定时出库
*/
@RequestMapping("/service/store/solder/clearOutDate")
@ResponseBody
public String clearOutDate(HttpServletRequest request){
String pid = request.getParameter("pid");
StoragePos pos = storagePosManager.get(pid);
if(pos == null){
return "位置["+pid+"]不存在";
}
if(taskService.excludePosIds().contains(pid)){
return "当前库位任务已开始且未完成,无法取消";
}
log.info("取消仓位【"+pos.getPosName()+"】的定时出库任务");
try {
Barcode barcode = pos.getBarcode();
barcode.setNeedOutDate(null);
barcodeManager.save(barcode);
pos.setBarcode(barcode);
storagePosManager.save(pos);
} catch (ValidateException e) {
}
return "0操作成功";
} }
@RequestMapping(value = "/service/store/solder/matchMixSolder") @RequestMapping(value = "/service/store/solder/matchMixSolder")
......
...@@ -347,17 +347,20 @@ public class VerticalBoxController extends BaseController{ ...@@ -347,17 +347,20 @@ public class VerticalBoxController extends BaseController{
} }
} }
if(currentTask.isPutInTask()){
task.setType(StorageConstants.OP.PUT_IN);
}else{
task.setType(StorageConstants.OP.CHECKOUT);
}
task.setStatus(StorageConstants.OP_STATUS.FINISHED.name()); task.setStatus(StorageConstants.OP_STATUS.FINISHED.name());
task.setPartNumber(barcode.getPartNumber()); task.setPartNumber(barcode.getPartNumber());
task.setBarcode(barcode.getBarcode()); task.setBarcode(barcode.getBarcode());
task.setNum(opQty); task.setNum(opQty);
if(currentTask.isPutInTask()){
task.setType(StorageConstants.OP.PUT_IN);
}else{
task.setType(StorageConstants.OP.CHECKOUT);
opQty = - opQty;
}
Storage storage = dataCache.getStorage(currentTask.getCid()); Storage storage = dataCache.getStorage(currentTask.getCid());
task.setCid(storage.getCid()); task.setCid(storage.getCid());
task.setStorageId(storage.getId()); task.setStorageId(storage.getId());
......
...@@ -1701,7 +1701,7 @@ public class TaskService implements ITaskService { ...@@ -1701,7 +1701,7 @@ public class TaskService implements ITaskService {
//二维码状态 //二维码状态
Barcode barcode = barcodeManager.findByBarcode(task.getBarcode()); Barcode barcode = barcodeManager.findByBarcode(task.getBarcode());
barcode.setUsedCount(barcode.getUsedCount() + 1); barcode.setUsedCount(barcode.getUsedCount() + 1);
barcode.setUsedDate(new Date()); //barcode.setUsedDate(new Date());
barcode.setPutInTime(System.currentTimeMillis()); barcode.setPutInTime(System.currentTimeMillis());
barcode.setInOpor(task.getOperator()); barcode.setInOpor(task.getOperator());
barcode.setCheckOutDate(null,""); barcode.setCheckOutDate(null,"");
......
...@@ -151,18 +151,18 @@ ...@@ -151,18 +151,18 @@
defaultsort="1" class="table table-striped table-bordered table-hover" export="true" defaultsort="1" class="table table-striped table-bordered table-hover" export="true"
id="pos" > id="pos" >
<display:setProperty name="export.csv.filename" value="export.csv" /> <display:setProperty name="export.csv.filename" value="export.csv" />
<c:set var="alarmClass" value=""/> <c:set var="expireClass" value=""/>
<c:if test="${pos.barcode.type == 1 && pos.barcode.maxStorageTime != 0 && pos.inStoreHour >= pos.barcode.maxStorageTime}"> <c:if test="${pos.barcode.willExpired}">
<c:set var="alarmClass" value="alarmItem"/> <c:set var="expireClass" value="red"/>
</c:if>
<c:if test="${pos.barcode.expired}">
<c:set var="expireClass" value="bg-red"/>
</c:if> </c:if>
<c:set var="inactionClass" value=""/> <c:set var="inactionClass" value=""/>
<c:if test="${pos.updateDate <= inactionDate}"> <c:if test="${pos.updateDate <= inactionDate}">
<c:set var="inactionClass" value="inactionItem"/> <c:set var="inactionClass" value="inactionItem"/>
</c:if> </c:if>
<c:if test="${today >= pos.barcode.expireDate}">
<c:set var="alarmClass" value="alarmItem"/>
</c:if>
<c:set var="limitCheckOut" value="${pos.locked || pos.expandPos}"/> <c:set var="limitCheckOut" value="${pos.locked || pos.expandPos}"/>
<display:column title="<input type='checkbox' id='allCheck'/>" media="html"> <display:column title="<input type='checkbox' id='allCheck'/>" media="html">
<c:if test="${!limitCheckOut}"> <c:if test="${!limitCheckOut}">
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
<display:column titleKey="barcode.produceDate" sortProperty="barcode.produceDate" sortable="true"> <display:column titleKey="barcode.produceDate" sortProperty="barcode.produceDate" sortable="true">
<fmt:formatDate value="${pos.barcode.produceDate}" pattern="yyyy-MM-dd"/> <fmt:formatDate value="${pos.barcode.produceDate}" pattern="yyyy-MM-dd"/>
</display:column> </display:column>
<display:column titleKey="barcode.expireDate" sortProperty="barcode.expireDate" sortable="true" class="${alarmClass}"> <display:column titleKey="barcode.expireDate" sortProperty="barcode.expireDate" sortable="true" class="${expireClass}">
<fmt:formatDate value="${pos.barcode.expireDate}" pattern="yyyy-MM-dd"/> <fmt:formatDate value="${pos.barcode.expireDate}" pattern="yyyy-MM-dd"/>
</display:column> </display:column>
<display:column property="barcode.memo" titleKey="barcode.memo"/> <display:column property="barcode.memo" titleKey="barcode.memo"/>
...@@ -310,9 +310,9 @@ ...@@ -310,9 +310,9 @@
}); });
} }
jQuery(".alarmItem").pulsate({ // jQuery(".alarmItem").pulsate({
color: "#bf1c56" // color: "#bf1c56"
}); // });
</script> </script>
</c:set> </c:set>
\ No newline at end of file \ No newline at end of file
...@@ -221,38 +221,43 @@ ...@@ -221,38 +221,43 @@
position: 'bottom right', position: 'bottom right',
}); });
function showMsg(msg){ // function showMsg(msg){
if(msg == ""){ // if(msg == ""){
$("#msg").attr("class",""); // $("#msg").attr("class","");
$("#msg").html("&nbsp;"); // $("#msg").html("&nbsp;");
}else{ // }else{
//
var error = true; // var error = true;
if(msg.indexOf("OK") == 0){ // if(msg.indexOf("OK") == 0){
error = false; // error = false;
msg = msg.substr(2); // msg = msg.substr(2);
} // }
if(msg.indexOf("0") == 0){ // if(msg.indexOf("0") == 0){
error = false; // error = false;
msg = msg.substr(1); // msg = msg.substr(1);
} // }
if(msg.indexOf("x") == 0){ // if(msg.indexOf("x") == 0){
msg = msg.substr(1); // msg = msg.substr(1);
} // }
if(msg.indexOf("putIn") == 0){ // if(msg.indexOf("putIn") == 0){
error = false; // error = false;
msg = "&nbsp;"; // msg = "&nbsp;";
} // }
if(error){ // if(error){
$("#msg").attr("class","alert alert-danger"); // $("#msg").attr("class","alert alert-danger");
}else{ // }else{
$("#msg").attr("class","alert alert-success"); // $("#msg").attr("class","alert alert-success");
} // }
$("#msg").html(msg); // $("#msg").html(msg);
} // }
// }
function clearOutDate(pid){
$.post("${ctx}/service/store/solder/clearOutDate", {pid: pid}, function (data) {
showMsg(data);
});
} }
var solderStatusMsg={ var solderStatusMsg={
"1":"${solder_status_1}", "1":"${solder_status_1}",
"2":"${solder_status_2}", "2":"${solder_status_2}",
...@@ -290,16 +295,25 @@ ...@@ -290,16 +295,25 @@
var needOutDateStr = barcodeObj.needOutDateStr; var needOutDateStr = barcodeObj.needOutDateStr;
if(needOutDateStr != ''){ if(needOutDateStr != ''){
checkBox = ""; checkBox = "";
var clearBtn = "<a href='#' onclick=clearOutDate("+data[item].id+"); >Clear</a>";
needOutDateStr = needOutDateStr + clearBtn;
} }
var partNumber = data[item].barcode.partNumber; var partNumber = data[item].barcode.partNumber;
var expireDate = data[item].barcode.expireDateStr; var expireDate = data[item].barcode.expireDateStr;
var alarmClass = "";
if(data[item].barcode.willExpired){
alarmClass = "red";
}else if(data[item].barcode.expired){
alarmClass = "bg-red";
}
var posStr = data[item].posName; var posStr = data[item].posName;
var statusStr = solderStatusMsg[barcodeObj.solderStatus]; var statusStr = solderStatusMsg[barcodeObj.solderStatus];
var tdStr = var tdStr =
"<td>"+checkBox+"</td>" + "<td>"+checkBox+"</td>" +
"<td>"+barcodeObj.barcode+"</td>"+ "<td>"+barcodeObj.barcode+"</td>"+
"<td>"+partNumber+"</td>"+ "<td>"+partNumber+"</td>"+
"<td>"+expireDate+"</td>" + "<td class="+alarmClass+">"+expireDate+"</td>" +
"<td>"+posStr+"</td>" + "<td>"+posStr+"</td>" +
"<td>"+statusStr+"</td>" + "<td>"+statusStr+"</td>" +
"<td>"+needOutDateStr+"</td>"; "<td>"+needOutDateStr+"</td>";
...@@ -320,7 +334,7 @@ ...@@ -320,7 +334,7 @@
if(str != "") { if(str != "") {
checkout(str); checkout(str);
}else{ }else{
alert("请勾选"); showMsg("1请勾选");
} }
}); });
...@@ -328,7 +342,7 @@ ...@@ -328,7 +342,7 @@
var ids = posId.split(";"); var ids = posId.split(";");
var dateStr = $("#outDate").val(); var dateStr = $("#outDate").val();
$.post("${ctx}/service/store/solder/outSolder", {pids: posId, outDate:dateStr}, function (data) { $.post("${ctx}/service/store/solder/outSolder", {pids: posId, outDate:dateStr}, function (data) {
alert(data); showMsg(data);
}); });
} }
...@@ -419,15 +433,15 @@ ...@@ -419,15 +433,15 @@
options['num'] = data[item].num; options['num'] = data[item].num;
options['icon']='fa fa-database'; options['icon']='fa fa-database';
if(data[item].type == 2){//出库 if(data[item].checkOutTask){//出库
options['icon']='fa fa-sign-out'; options['icon']='fa fa-sign-out';
//showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 6){//回温取料 }else if(data[item].rewarmTakingTask){//回温取料
options['icon']='fa fa-sign-out'; options['icon']='fa fa-sign-out';
//showStr = posStr+"${status_14}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_14}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 7){//回温放料 }else if(data[item].rewarmPuttingTask){//回温放料
//showStr = posStr+"${status_16}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_16}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 8){//搅拌 }else if(data[item].mixTask){//搅拌
//showStr = posStr+"${status_20}"+ partNumber + "["+barcode+"]"; //showStr = posStr+"${status_20}"+ partNumber + "["+barcode+"]";
}else{ }else{
//options['onClick']= modifyClick; //options['onClick']= modifyClick;
......
...@@ -211,7 +211,7 @@ ...@@ -211,7 +211,7 @@
<fmt:message key="sotrage.status.999" var="status_999"/> <fmt:message key="sotrage.status.999" var="status_999"/>
<fmt:message key="allBoxView.boxStatus" var="boxStatus_label"/> <fmt:message key="storage.status" var="boxStatus_label"/>
<fmt:message key="inOutList.in" var="in_label"/> <fmt:message key="inOutList.in" var="in_label"/>
<fmt:message key="inOutList.out" var="out_label"/> <fmt:message key="inOutList.out" var="out_label"/>
<fmt:message key="dataLog.orderSource" var="source_label"/> <fmt:message key="dataLog.orderSource" var="source_label"/>
...@@ -247,41 +247,6 @@ ...@@ -247,41 +247,6 @@
}); });
function showMsg(id, msg){
if(id == ""){
return;
}
var msgDocument = $("#"+id);
if(msg == ""){
msgDocument.attr("class","");
msgDocument.html("&nbsp;");
}else{
var error = true;
if(msg.indexOf("OK") == 0){
error = false;
msg = msg.substr(2);
}
if(msg.indexOf("0") == 0){
error = false;
msg = msg.substr(1);
}
if(msg.indexOf("x") == 0){
msg = msg.substr(1);
}
if(msg.indexOf("putIn") == 0){
error = false;
msg = "&nbsp;";
}
if(error){
msgDocument.attr("class","help-block red");
}else{
msgDocument.attr("class","help-block green");
}
msgDocument.html(msg);
}
}
var solderStatusMsg={ var solderStatusMsg={
"1":"${solder_status_1}", "1":"${solder_status_1}",
...@@ -324,34 +289,18 @@ ...@@ -324,34 +289,18 @@
}); });
} }
$("#checkoutBtn").click(function(){
var str= "";
$("[name=posIds]").each(function(){
if($(this).attr("checked")){
str+=$(this).val()+";";
$(this).removeAttr("checked");
}
});
if(str != "") {
checkout(str);
}else{
alert("请勾选");
}
});
putIn = function(posId){ putIn = function(posId){
$.post("${ctx}/service/store/vertical/putIn", {pid: posId}, function (data) { $.post("${ctx}/service/store/vertical/putIn", {pid: posId}, function (data) {
//showMsg("",data); //showMsg("",data);
alert(data); showMsg(data);
}); });
}; };
function checkout(posId) { function checkout(posId) {
var ids = posId.split(";"); var ids = posId.split(";");
$.post("${ctx}/service/store/checkout.html", {pids: posId}, function (data) { $.post("${ctx}/service/store/checkout.html", {pids: posId}, function (data) {
alert(data); showMsg(data);
}); });
} }
...@@ -602,12 +551,36 @@ ...@@ -602,12 +551,36 @@
//showOperateWindow(); //showOperateWindow();
}); });
function showOpResult(id, msg){
if(id == ""){
return;
}
var msgDocument = $("#"+id);
if(msg == ""){
msgDocument.attr("class","");
msgDocument.html("&nbsp;");
}else{
var error = true;
if(msg.indexOf("OK") == 0){
error = false;
msg = msg.substr(2);
}
if(error){
msgDocument.attr("class","help-block red");
}else{
msgDocument.attr("class","help-block green");
}
msgDocument.html(msg);
}
}
$("#scan-code").change(function () { $("#scan-code").change(function () {
var codeValue = $(this).val(); var codeValue = $(this).val();
var currentOperatePos = $("#currentOperatePos").text(); var currentOperatePos = $("#currentOperatePos").text();
if(codeValue != ""){ if(codeValue != ""){
$.post("${ctx}/service/store/vertical/operatePos", {cid: '${show}', code: codeValue, pos:currentOperatePos}, function (data) { $.post("${ctx}/service/store/vertical/operatePos", {cid: '${show}', code: codeValue, pos:currentOperatePos}, function (data) {
showMsg("msg",data); showOpResult("msg",data);
$("#scan-code").val(""); $("#scan-code").val("");
}); });
} }
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<div class="page-footer-inner"> <div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a> 2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</div> </div>
<span class="right" style="color: #a3a3a3;">Version: 2020.08.23</span> <span class="right" style="color: #a3a3a3;">Version: 2020.09.09</span>
<div class="scroll-to-top"> <div class="scroll-to-top">
<i class="icon-arrow-up"></i> <i class="icon-arrow-up"></i>
</div> </div>
...@@ -332,7 +332,7 @@ ...@@ -332,7 +332,7 @@
<script src="${ctx}/scripts/lobibox/js/lobibox.js?id=32"></script> <script src="${ctx}/scripts/lobibox/js/lobibox.js?id=32"></script>
<script type="text/javascript" src="${ctx}/assets/global/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.js"></script> <script type="text/javascript" src="${ctx}/assets/global/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.js"></script>
<script src="${ctx}/scripts/common.js?v=2"></script> <script src="${ctx}/scripts/common.js?v=5"></script>
<!-- END PAGE LEVEL SCRIPTS --> <!-- END PAGE LEVEL SCRIPTS -->
<script> <script>
jQuery(document).ready(function() { jQuery(document).ready(function() {
......
...@@ -23,12 +23,16 @@ showMsg = function(text){ ...@@ -23,12 +23,16 @@ showMsg = function(text){
toastr.clear(msgObj); toastr.clear(msgObj);
msgObj = null; msgObj = null;
} }
if(text.indexOf("0") == 0){ if(text.indexOf("OK") == 0){
msgObj = toastr.success(text.substr(2));
}else if(text.indexOf("0") == 0){
msgObj = toastr.success(text.substr(1));
}else if(text.indexOf("x") == 0){
msgObj = toastr.success(text.substr(1)); msgObj = toastr.success(text.substr(1));
}else if(text.indexOf("1") == 0){ }else if(text.indexOf("1") == 0){
msgObj = toastr.warning(text.substr(1)); msgObj = toastr.warning(text.substr(1));
}else if(text.indexOf("2") == 0){ }else if(text.indexOf("2") == 0){
msgObj = showError(text); msgObj = toastr.error(text.substr(1));
}else { }else {
if(text){ if(text){
msgObj = toastr.info(text); msgObj = toastr.info(text);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!