diff --git a/WMS-BS/NFine.Application/OMAY/OMAYApsApp.cs b/WMS-BS/NFine.Application/OMAY/OMAYApsApp.cs
index 98d2e1d..82fd2c7 100644
--- a/WMS-BS/NFine.Application/OMAY/OMAYApsApp.cs
+++ b/WMS-BS/NFine.Application/OMAY/OMAYApsApp.cs
@@ -142,6 +142,42 @@ where 1=1
return Repository().FindTablePageBySql(sql.ToString(), parameter.ToArray(), ref jqgridparam);
}
+ public string CancelSendMo(string keyValue)
+ {
+ string returnValue = string.Empty;
+ try
+ {
+ var queryParam = keyValue.ToJObject();
+
+ string MUSER = NFine.Code.OperatorProvider.Provider.GetCurrent().UserCode;
+ string MUSERNAME = NFine.Code.OperatorProvider.Provider.GetCurrent().UserName;
+ string WorkPoint = NFine.Code.OperatorProvider.Provider.GetCurrent().Location;
+
+ var ids = queryParam["ids"].ToString().Split(',');
+
+ string sql = @" UPDATE dbo.ICSMO
+set MTIME=GETDATE(),MUSER='{0}',MUSERName='{1}',WorkPoint='{2}',APSStatus=null,ApsOrderDate=null,PlanStartDate=null,PlanEndDate=null
+WHERE ID in ('{3}') ";
+
+ sql = string.Format(sql, MUSER, MUSERNAME, WorkPoint, string.Join("','", ids));
+
+
+ var rows = SqlHelper.CmdExecuteNonQueryLi(sql) > 0;
+ if (!rows)
+ {
+ throw new Exception("修改失败");
+ }
+ }
+ catch (Exception ex)
+ {
+
+ returnValue = ex.Message;
+ }
+
+
+ return returnValue;
+ }
+
public string UpdateMoOrderStatus(string keyValue)
{
string returnValue = string.Empty;
diff --git a/WMS-BS/NFine.Web/Areas/OMAY/Controllers/ApsController.cs b/WMS-BS/NFine.Web/Areas/OMAY/Controllers/ApsController.cs
index 69123c9..a6308ca 100644
--- a/WMS-BS/NFine.Web/Areas/OMAY/Controllers/ApsController.cs
+++ b/WMS-BS/NFine.Web/Areas/OMAY/Controllers/ApsController.cs
@@ -59,6 +59,26 @@ namespace NFine.Web.Areas.OMAY.Controllers
}
}
+ ///
+ /// 取消下发
+ ///
+ ///
+ ///
+ [HttpPost]
+ [HandlerAjaxOnly]
+ public ActionResult CancelSendMo(string keyValue)
+ {
+ string msg = App.CancelSendMo(keyValue);
+ if (!string.IsNullOrEmpty(msg))
+ {
+ return Error(msg);
+ }
+ else
+ {
+ return Success("修改成功!");
+ }
+ }
+
[HttpPost]
[HandlerAjaxOnly]
public ActionResult UpdateMoOrderStatus(string keyValue)
diff --git a/WMS-BS/NFine.Web/Areas/OMAY/Views/Aps/MoProducePlan.cshtml b/WMS-BS/NFine.Web/Areas/OMAY/Views/Aps/MoProducePlan.cshtml
index e53e8af..7d938e2 100644
--- a/WMS-BS/NFine.Web/Areas/OMAY/Views/Aps/MoProducePlan.cshtml
+++ b/WMS-BS/NFine.Web/Areas/OMAY/Views/Aps/MoProducePlan.cshtml
@@ -325,18 +325,18 @@
that.query();
});
$("#NF-InstructionBill").click(function () {
-
+
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow');
-
+
if (objList.length == 0) {
$.modalMsg("请选择一条数据", "warning");
return;
}
-
+
let lines = [];
for (var i = 0; i < objList.length; i++) {
let line = $("#gridList").jqGrid('getRowData', objList[i]).DepName;
-
+
lines.push(line);
}
if (lines.length==0) {
@@ -481,7 +481,7 @@
}
});
$("#NF-UpdateMoOrderStatus").click(function () {
-
+
var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
if (ids.length == 0) {
$.modalMsg("请选择一条数据", "warning");
@@ -493,7 +493,7 @@
ids: ids.join(),
orderStatus: status==''?'Close':''
};
-
+
$.ajax({
url: "/OMAY/Aps/UpdateMoOrderStatus" + "?" + Math.random(),
type: "POST",
@@ -514,6 +514,39 @@
}
});
});
+
+ $("#NF-CancelMoPlan").click(function () {
+ var ids = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //获取 多行数据
+ if (ids.length == 0) {
+ $.modalMsg("请选择一条数据", "warning");
+ return;
+ }
+
+ // let status = $("#txt_OrderStatus").val();
+ let obj = {
+ ids: ids.join()
+ };
+
+ $.ajax({
+ url: "/OMAY/Aps/CancelSendMo" + "?" + Math.random(),
+ type: "POST",
+ dataType: "json",
+ async: false,
+ data: {
+ keyValue: JSON.stringify(obj)
+ },
+ success: function (data) {
+ //
+ console.log(data);
+ if (data.state == "success") {
+ $.modalMsg("取消成功", "success");
+ that.query();
+ }
+ else
+ $.modalMsg(data.message, "warning");
+ }
+ });
+ });
}
@@ -534,6 +567,7 @@
预览子料
生成条码
修改
+ 取消下发
变更订单状态
@*导出*@