DoClassifiWindow.cshtml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. 
  2. @{
  3. ViewBag.Title = "DoClassifiWindow";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <div class="easyui-layout" data-options="fit:true">
  7. <div data-options="region:'south',border:false" style="height:50px; padding-top:10px;text-align:right; padding-right:10px;">
  8. <a id="btnFinish" href="#" class="easyui-linkbutton c8"><i class="fa fa-check"></i> 确定</a> &nbsp;
  9. <a id="btnClose" href="#" class="easyui-linkbutton c5"><i class="fa fa-power-off"></i> 关闭</a>
  10. </div>
  11. <div data-options="region:'center',border:false">
  12. <div style="padding:20px 20px 0px 20px">
  13. <input class="easyui-combotreegrid" id="ProblemType" />
  14. </div>
  15. <div style="padding: 20px 20px 0px 20px ">
  16. <input class="easyui-combobox" id="WTXZ" name="WTXZ" editable="false" data-options="label:'问题性质:',prompt:'请选择',limitToList:true,panelHeight:150,tipPosition:'top',labelAlign:'left'" style="width:380px;" />
  17. </div>
  18. </div>
  19. </div>
  20. <script>
  21. var id = '@ViewBag.ID';
  22. $(function () {
  23. //关闭窗口
  24. $('#btnClose').bind('click', function () {
  25. ZLPMS.CloseTopWindow();
  26. });
  27. //加载问题分类
  28. $('#ProblemType').combotreegrid({
  29. width: '380px',
  30. panelWidth: 300,
  31. panelHeight:200,
  32. label: '选择分类:',
  33. labelPosition: 'left',
  34. url: '/ClassifyManage/GetTreeGrid',
  35. method: 'GET',
  36. idField: 'ID',
  37. treeField: '名称',
  38. editable: true,
  39. columns: [[
  40. { field: '编码', title: '编码', width: 55, align: 'center' },
  41. { field: '名称', title: '名称', width: 170, align: 'center' },
  42. { field: '说明', title: '说明', width: 380, align: 'center', halign: 'center' },
  43. {
  44. field: '分值', title: '分值', width: 70, align: 'center', halign: 'center', formatter: function (val, row, index) {
  45. return (val || 0) + "分";
  46. }
  47. }
  48. ]]
  49. });
  50. $("#WTXZ").combobox({
  51. url: '/Problem/GetProblemNature',
  52. valueField: '代码',
  53. textField: '显示名',
  54. onLoadSuccess: function (data) {
  55. $('#WTXZ').combobox('setValue', '@ViewBag.nature' );
  56. //if (data != null) {
  57. // $('#WTXZ').combobox('setValue', data[2].代码);
  58. //}
  59. },
  60. onChange: function (newValue, oldValue) {
  61. }
  62. })
  63. //确定按钮事件
  64. $('#btnFinish').bind('click', function () {
  65. //问题分类
  66. var TypeID = $('#ProblemType').combotree('getValue');
  67. var nature = $('#WTXZ').combotree('getValue');
  68. $.post('/Problem/DoClassifi?id=' + id + "&ClssID="+TypeID + "&nature="+nature,{ }, function (data) {
  69. if (data == '1') {
  70. top.ZLPMS.Msg('分类完成');
  71. ZLPMS.CloseTopWindow(true);
  72. } else {
  73. top.ZLPMS.Msg('数据发生异常,请重新填写');
  74. }
  75. })
  76. });
  77. });
  78. </script>