Commit 5cfe7691 by 江和松

生产入库逻辑功能提交,bug修改

parent d717cbb1
......@@ -143,6 +143,7 @@ public class ServiceHGKC003 extends ServiceBase {
Map<?, ?> map = eiBlock.getRow(i);
hgkc003.fromMap(map);
hgkc003 = HGKCTools.HgKc003.getId(hgkc003.getId());
hgkc003.setSubmitStatus(HGConstant.ProductStatus.YTJ);
// 校验数据
this.checkSubmitData(hgkc003);
......
......@@ -17,7 +17,7 @@ $(function () {
if (item.id){
if (status == 0) {
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="updateSubmitStatus(' + item.id + ',1)" >提交</a>';
+ 'onclick="updateSubmitStatus(' + item.id + ')" >提交</a>';
template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+ 'onclick="sendBack(' + item.id + ')" >退回</a>';
}
......@@ -132,22 +132,36 @@ function showDetail(id) {
* @param id
* @param status
*/
function updateSubmitStatus(id,status) {
function updateSubmitStatus(id) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
inEiInfo.set("result-0-submitStatus", status);
EiCommunicator.send('HGKC003', 'updateSubmitStatus', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
JSUtils.confirm("确定提交此生产入库单吗? ", {
ok: function () {
EiCommunicator.send('HGKC003', 'updateSubmitStatus', inEiInfo, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
);
});
}
/**
......@@ -197,16 +211,30 @@ let save = function () {
function sendBack(id) {
let inEiInfo = new EiInfo();
inEiInfo.set("result-0-id", id);
EiCommunicator.send('HGKC003', 'sendBack', inEiInfo, {
onSuccess(response) {
NotificationUtil(response.msg);
query();
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
JSUtils.confirm("确定对此生产入库单进行退回操作吗? ", {
ok: function () {
EiCommunicator.send('HGKC003', 'sendBack', inEiInfo, {
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
try {
query();
} catch (e) {
}
if (ei.getStatus() == 0) {
NotificationUtil(ei, 'warning');
} else {
NotificationUtil(ei);
}
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
}
}
);
}
);
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment