//控制流程环节显示
|
function showProgress() {
|
if (!inoutProgress) {
|
return;
|
}
|
if (inoutProgress.indexOf("REGISTER") == -1) {
|
$("#progress-register").css("display", "none");
|
}
|
if (inoutProgress.indexOf("CHECK") == -1) {
|
$("#progress-check").css("display", "none");
|
}
|
if (inoutProgress.indexOf("WEIGHT_FULL") == -1) {
|
$("#progress-fullWeight").css("display", "none");
|
}
|
if (inoutProgress.indexOf("HANDLE") == -1) {
|
$("#progress-hand").css("display", "none");
|
}
|
if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) {
|
$("#progress-emptyWeight").css("display", "none");
|
}
|
if (inoutProgress.indexOf("CARD_BACK") == -1) {
|
$("#progress-cardBack").css("display", "none");
|
}
|
}
|
|
//错误提醒
|
function alertError(msg) {
|
layer.alert(msg, {
|
icon: 5,
|
offset: ['300px', '300px']
|
});
|
}
|
|
function alertSuccess(msg) {
|
layer.alert(msg, {
|
icon: 1,
|
offset: ['300px', '300px']
|
});
|
}
|
|
/**
|
* 弹出提醒框
|
* @param msg 提醒信息
|
* @param data 数据信息,可能为空
|
*/
|
function notifyProgress(msg, data) {
|
if (data) {
|
//赋值
|
$("#resultMsg").text(msg);
|
$("#resultUserName").text(data.userName);
|
$("#resultPlateNum").text(data.plateNum);
|
if ("IN" == data.type) {
|
$("#resultType").text("入库-" + INOUT_PROGRESS_MSG(data.progress));
|
} else {
|
$("#resultType").text("出库-" + INOUT_PROGRESS_MSG(data.progress));
|
}
|
$("#resultIntelCard").text(data.intelCard);
|
layer.open({
|
type: 1,
|
offset: ['150px', '200px'],
|
area: '450px;',
|
shade: 0.8,
|
id: 'dialog_notify_info',
|
btn: ['确定'],
|
content: $('#dialog-from-notify'),
|
yes: function (index) {
|
layer.closeAll();
|
}
|
});
|
} else {
|
alertError(msg);
|
}
|
}
|