diff --git a/AMESCoreStudio.Web/Controllers/BASController.cs b/AMESCoreStudio.Web/Controllers/BASController.cs index a2beb66f..587e8157 100644 --- a/AMESCoreStudio.Web/Controllers/BASController.cs +++ b/AMESCoreStudio.Web/Controllers/BASController.cs @@ -1337,20 +1337,22 @@ namespace AMESCoreStudio.Web.Controllers return View(result[0]); } - public async Task BAS011DAsync(int id) + public async Task BAS011DAsync(int id,string status) { - var result = await _basApi.DeleteRules(id); + var result = await _basApi.DeleteRules(id, status); return Json(new Result() { success = true, msg = "" }); } - public async Task BAS011DAllAsync(int[] ids) + public async Task BAS011DAllAsync(string[] ids) { if (ids.Length > 0) { - var result = await _basApi.DeleteRules(ids[0]); + int id = int.Parse(ids[0].Split('_')[0]); + string status = ids[0].Split('_')[1]; + var result = await _basApi.DeleteRules(id,status); for (int i = 1; i < ids.Length; i++) { - result = await _basApi.DeleteRules(ids[i]); + result = await _basApi.DeleteRules(int.Parse(ids[i].Split('_')[0]), ids[i].Split('_')[1]); } return Json(new Result() { success = true, msg = "" }); diff --git a/AMESCoreStudio.Web/HttpApis/IBAS.cs b/AMESCoreStudio.Web/HttpApis/IBAS.cs index 1ddc5d48..603fe10c 100644 --- a/AMESCoreStudio.Web/HttpApis/IBAS.cs +++ b/AMESCoreStudio.Web/HttpApis/IBAS.cs @@ -362,7 +362,7 @@ namespace AMESCoreStudio.Web #endregion - #region BAS010流程資料維護相關 + #region BAS010流程站别維護相關 /// /// 新增流程站別 @@ -436,7 +436,7 @@ namespace AMESCoreStudio.Web /// /// [WebApiClient.Attributes.HttpDelete("api/Rules/{id}")] - ITask> DeleteRules(int id); + ITask> DeleteRules(int id,string ruleStatus); /// /// 根據ID獲取指定流程站別資料 diff --git a/AMESCoreStudio.Web/Views/BAS/BAS011.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS011.cshtml index 2451a576..4bf27348 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS011.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS011.cshtml @@ -129,7 +129,7 @@ hg.confirm("流程規則:" + obj.data.nextStation['stationName'] + ",确定要删除吗?", function () { $.ajax({ url: '/BAS/BAS011D', - data: { id: obj.data.ruleStationID }, + data: { id: obj.data.ruleStationID, status: obj.data.ruleStatus }, type: 'POST', success: function (data) { if (data.success) { @@ -153,14 +153,13 @@ layuiicon: '', class: 'layui-btn-danger', handler: function (obj, row) { - if (obj.checkstatus && obj.checkstatus.data.length > 0) - { - console.log(obj.checkstatus.data.map(function (x) { return x.ruleStationID }).join(',')) - + if (obj.checkstatus && obj.checkstatus.data.length > 0) { + console.log(obj.checkstatus.data.map(function (x) { return x.ruleStationID + '_' + x.ruleStatus }).join(',')) + hg.confirm("批量删除所有选中的数据,确定要删除吗?", function () { $.ajax({ url: '/BAS/BAS011DAll', - data: { ids: obj.checkstatus.data.map(function (x) { return x.ruleStationID }) }, + data: { ids: obj.checkstatus.data.map(function (x) { return x.ruleStationID + '_' + x.ruleStatus }) }, type: 'POST', success: function (data) { if (data.success) { diff --git a/AMESCoreStudio.Web/Views/BAS/BAS011U.cshtml b/AMESCoreStudio.Web/Views/BAS/BAS011U.cshtml index ad80c321..2a7281d4 100644 --- a/AMESCoreStudio.Web/Views/BAS/BAS011U.cshtml +++ b/AMESCoreStudio.Web/Views/BAS/BAS011U.cshtml @@ -20,7 +20,7 @@
- +
@@ -32,11 +32,11 @@
- +
- +
diff --git a/AMESCoreStudio.Web/Views/SYS/SYS001.cshtml b/AMESCoreStudio.Web/Views/SYS/SYS001.cshtml index 4783815f..58ba53d4 100644 --- a/AMESCoreStudio.Web/Views/SYS/SYS001.cshtml +++ b/AMESCoreStudio.Web/Views/SYS/SYS001.cshtml @@ -100,17 +100,7 @@ hg.open('新增系統', '/SYS/SYS001C', 720, 600); } - }, - { - text: '維修過站測試', - layuiicon: '', - class: 'layui-btn-normal', - handler: function () { - hg.open('新增系統', '/SYS/SYS001T', 720, 600); - - } - } - ]; + }]; //基本数据表格 var table = hg.table.datatable('test', '系統資料管理', '/SYS/GetSystemInfoes', {}, tableCols, toolbar, true, 'full-100', ['filter', 'print', 'exports']); diff --git a/AMESCoreStudio.Web/Views/SYS/SYS003.cshtml b/AMESCoreStudio.Web/Views/SYS/SYS003.cshtml index 2ea9726e..be1319c0 100644 --- a/AMESCoreStudio.Web/Views/SYS/SYS003.cshtml +++ b/AMESCoreStudio.Web/Views/SYS/SYS003.cshtml @@ -81,7 +81,7 @@ form.on('select(module)', function (data) { $("#moduleID").val(data.value); - alert(moduleID.value); + //alert(moduleID.value); var qs = $('button[lay-filter="querysubmit"]'); qs.click(); diff --git a/AMESCoreStudio.WebApi/Controllers/BAS/RulesController.cs b/AMESCoreStudio.WebApi/Controllers/BAS/RulesController.cs index 70338d8d..6d6dc3d7 100644 --- a/AMESCoreStudio.WebApi/Controllers/BAS/RulesController.cs +++ b/AMESCoreStudio.WebApi/Controllers/BAS/RulesController.cs @@ -241,10 +241,12 @@ namespace AMESCoreStudio.WebApi.Controllers.BAS /// // DELETE: api/Rules/5 [HttpDelete("{id}")] - public async Task> DeleteRules(int id) + public async Task> DeleteRules(int id,string ruleStatus) { ResultModel result = new ResultModel(); - var rules = await _context.Ruleses.FindAsync(id); + + var rules = await _context.Ruleses.Where(p => p.RuleStationID.Equals(id) && p.RuleStatus.Equals(ruleStatus)).FirstOrDefaultAsync(); + if (rules == null) { result.Success = false;