地铁二期项目正式开始

TargetManagementList.js 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. layui.use(['table', 'jquery'], function () {
  2. var table = layui.table;
  3. var form = layui.form,
  4. layer = parent.layer === undefined ? layui.layer : parent.layer,
  5. $ = layui.jquery;
  6. //监听表格复选框选择
  7. table.on('checkbox(demo)', function (obj) {
  8. console.log(obj)
  9. });
  10. //监听工具条
  11. table.on('tool(demo)', function (obj) {
  12. var data = obj.data;
  13. if (obj.event === 'edit') {
  14. layer.open({
  15. type: 2,
  16. anim: 4,
  17. scrollbar: false,
  18. content: '/QualityManagement/TargetManagementEdit/?callrecordsid=' + data.CallRecordsId + '&editType=2',
  19. area: ['800px', '450px'],
  20. id: 'TargetManagementEdit',
  21. title: '质检管理——打分'
  22. , end: function () {
  23. refushTreeAndData();
  24. }
  25. });
  26. }
  27. else if (obj.event === 'delete') {
  28. //layer.msg('ID:' + data.ProjectKey + ' 的查看操作');
  29. layer.confirm('确认要删除该行数据么?', function (index) {
  30. $.ajax({
  31. url: "/SystemManage/DeleteMenuData",
  32. type: "get",
  33. async: false,//同步请求
  34. contentType: "application/json",
  35. dataType: "text",
  36. cache: false,
  37. data: "menuId=" + data.F_FunctionId,
  38. success: function (thisResult, result) {
  39. if (thisResult == "True") {
  40. layer.open({
  41. content: '删除成功'
  42. , icon: 1
  43. , btn: ['确定']
  44. , yes: function (index, layero) {
  45. layer.close(index);
  46. refushTreeAndData();
  47. }
  48. });
  49. } else {
  50. layui.layer.alert("删除失败!", {
  51. icon: 2
  52. });
  53. }
  54. },
  55. error: function (error) {
  56. return false;
  57. }
  58. });
  59. layer.close(index);
  60. });
  61. }
  62. });
  63. });