Commit 441937d9 sunke

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

2 锡膏出入库预约时间可取消
3 垂直货柜库存数量错误的问题
4 垂直货柜出入库操作时,点确定的提示框不再需要点确定
1 个父辈 56b72b08
......@@ -625,6 +625,19 @@ public class Barcode extends BaseMongoBean {
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){
// if(oldBarcode != null){
// this.expireDate = oldBarcode.getExpireDate();
......
......@@ -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")
......
......@@ -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.setPartNumber(barcode.getPartNumber());
task.setBarcode(barcode.getBarcode());
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());
task.setCid(storage.getCid());
task.setStorageId(storage.getId());
......
......@@ -1701,7 +1701,7 @@ public class TaskService implements ITaskService {
//二维码状态
Barcode barcode = barcodeManager.findByBarcode(task.getBarcode());
barcode.setUsedCount(barcode.getUsedCount() + 1);
barcode.setUsedDate(new Date());
//barcode.setUsedDate(new Date());
barcode.setPutInTime(System.currentTimeMillis());
barcode.setInOpor(task.getOperator());
barcode.setCheckOutDate(null,"");
......
......@@ -151,18 +151,18 @@
defaultsort="1" class="table table-striped table-bordered table-hover" export="true"
id="pos" >
<display:setProperty name="export.csv.filename" value="export.csv" />
<c:set var="alarmClass" value=""/>
<c:if test="${pos.barcode.type == 1 && pos.barcode.maxStorageTime != 0 && pos.inStoreHour >= pos.barcode.maxStorageTime}">
<c:set var="alarmClass" value="alarmItem"/>
<c:set var="expireClass" value=""/>
<c:if test="${pos.barcode.willExpired}">
<c:set var="expireClass" value="red"/>
</c:if>
<c:if test="${pos.barcode.expired}">
<c:set var="expireClass" value="bg-red"/>
</c:if>
<c:set var="inactionClass" value=""/>
<c:if test="${pos.updateDate <= inactionDate}">
<c:set var="inactionClass" value="inactionItem"/>
</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}"/>
<display:column title="<input type='checkbox' id='allCheck'/>" media="html">
<c:if test="${!limitCheckOut}">
......@@ -211,7 +211,7 @@
<display:column titleKey="barcode.produceDate" sortProperty="barcode.produceDate" sortable="true">
<fmt:formatDate value="${pos.barcode.produceDate}" pattern="yyyy-MM-dd"/>
</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"/>
</display:column>
<display:column property="barcode.memo" titleKey="barcode.memo"/>
......@@ -310,9 +310,9 @@
});
}
jQuery(".alarmItem").pulsate({
color: "#bf1c56"
});
// jQuery(".alarmItem").pulsate({
// color: "#bf1c56"
// });
</script>
</c:set>
\ No newline at end of file
......@@ -221,38 +221,43 @@
position: 'bottom right',
});
function showMsg(msg){
if(msg == ""){
$("#msg").attr("class","");
$("#msg").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){
$("#msg").attr("class","alert alert-danger");
}else{
$("#msg").attr("class","alert alert-success");
}
$("#msg").html(msg);
}
// function showMsg(msg){
// if(msg == ""){
// $("#msg").attr("class","");
// $("#msg").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){
// $("#msg").attr("class","alert alert-danger");
// }else{
// $("#msg").attr("class","alert alert-success");
// }
// $("#msg").html(msg);
// }
// }
function clearOutDate(pid){
$.post("${ctx}/service/store/solder/clearOutDate", {pid: pid}, function (data) {
showMsg(data);
});
}
var solderStatusMsg={
"1":"${solder_status_1}",
"2":"${solder_status_2}",
......@@ -290,16 +295,25 @@
var needOutDateStr = barcodeObj.needOutDateStr;
if(needOutDateStr != ''){
checkBox = "";
var clearBtn = "<a href='#' onclick=clearOutDate("+data[item].id+"); >Clear</a>";
needOutDateStr = needOutDateStr + clearBtn;
}
var partNumber = data[item].barcode.partNumber;
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 statusStr = solderStatusMsg[barcodeObj.solderStatus];
var tdStr =
"<td>"+checkBox+"</td>" +
"<td>"+barcodeObj.barcode+"</td>"+
"<td>"+partNumber+"</td>"+
"<td>"+expireDate+"</td>" +
"<td class="+alarmClass+">"+expireDate+"</td>" +
"<td>"+posStr+"</td>" +
"<td>"+statusStr+"</td>" +
"<td>"+needOutDateStr+"</td>";
......@@ -320,7 +334,7 @@
if(str != "") {
checkout(str);
}else{
alert("请勾选");
showMsg("1请勾选");
}
});
......@@ -328,7 +342,7 @@
var ids = posId.split(";");
var dateStr = $("#outDate").val();
$.post("${ctx}/service/store/solder/outSolder", {pids: posId, outDate:dateStr}, function (data) {
alert(data);
showMsg(data);
});
}
......@@ -419,15 +433,15 @@
options['num'] = data[item].num;
options['icon']='fa fa-database';
if(data[item].type == 2){//出库
if(data[item].checkOutTask){//出库
options['icon']='fa fa-sign-out';
//showStr = posStr+"${out_label}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 6){//回温取料
}else if(data[item].rewarmTakingTask){//回温取料
options['icon']='fa fa-sign-out';
//showStr = posStr+"${status_14}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 7){//回温放料
}else if(data[item].rewarmPuttingTask){//回温放料
//showStr = posStr+"${status_16}"+ partNumber + "["+barcode+"]";
}else if(data[item].type == 8){//搅拌
}else if(data[item].mixTask){//搅拌
//showStr = posStr+"${status_20}"+ partNumber + "["+barcode+"]";
}else{
//options['onClick']= modifyClick;
......
......@@ -211,7 +211,7 @@
<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.out" var="out_label"/>
<fmt:message key="dataLog.orderSource" var="source_label"/>
......@@ -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={
"1":"${solder_status_1}",
......@@ -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){
$.post("${ctx}/service/store/vertical/putIn", {pid: posId}, function (data) {
//showMsg("",data);
alert(data);
showMsg(data);
});
};
function checkout(posId) {
var ids = posId.split(";");
$.post("${ctx}/service/store/checkout.html", {pids: posId}, function (data) {
alert(data);
showMsg(data);
});
}
......@@ -602,12 +551,36 @@
//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 () {
var codeValue = $(this).val();
var currentOperatePos = $("#currentOperatePos").text();
if(codeValue != ""){
$.post("${ctx}/service/store/vertical/operatePos", {cid: '${show}', code: codeValue, pos:currentOperatePos}, function (data) {
showMsg("msg",data);
showOpResult("msg",data);
$("#scan-code").val("");
});
}
......
......@@ -241,7 +241,7 @@
<div class="page-footer-inner">
2016&copy; <a href="${ctx}/updateHistory.html">SMD BOX</a>
</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">
<i class="icon-arrow-up"></i>
</div>
......@@ -332,7 +332,7 @@
<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 src="${ctx}/scripts/common.js?v=2"></script>
<script src="${ctx}/scripts/common.js?v=5"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>
jQuery(document).ready(function() {
......
......@@ -23,12 +23,16 @@ showMsg = function(text){
toastr.clear(msgObj);
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));
}else if(text.indexOf("1") == 0){
msgObj = toastr.warning(text.substr(1));
}else if(text.indexOf("2") == 0){
msgObj = showError(text);
msgObj = toastr.error(text.substr(1));
}else {
if(text){
msgObj = toastr.info(text);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!