12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
-
- @{
- ViewBag.Title = "DoClassifiWindow";
- Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
- }
- <div class="easyui-layout" data-options="fit:true">
- <div data-options="region:'south',border:false" style="height:50px; padding-top:10px;text-align:right; padding-right:10px;">
- <a id="btnFinish" href="#" class="easyui-linkbutton c8"><i class="fa fa-check"></i> 确定</a>
- <a id="btnClose" href="#" class="easyui-linkbutton c5"><i class="fa fa-power-off"></i> 关闭</a>
- </div>
- <div data-options="region:'center',border:false">
- <div style="padding:20px 20px 0px 20px">
- <input class="easyui-combotreegrid" id="ProblemType" />
- </div>
- <div style="padding: 20px 20px 0px 20px ">
- <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;" />
- </div>
- </div>
- </div>
- <script>
- var id = '@ViewBag.ID';
- $(function () {
- //关闭窗口
- $('#btnClose').bind('click', function () {
- ZLPMS.CloseTopWindow();
- });
- //加载问题分类
- $('#ProblemType').combotreegrid({
- width: '380px',
- panelWidth: 300,
- panelHeight:200,
- label: '选择分类:',
- labelPosition: 'left',
- url: '/ClassifyManage/GetTreeGrid',
- method: 'GET',
- idField: 'ID',
- treeField: '名称',
- editable: true,
- columns: [[
- { field: '编码', title: '编码', width: 55, align: 'center' },
- { field: '名称', title: '名称', width: 170, align: 'center' },
- { field: '说明', title: '说明', width: 380, align: 'center', halign: 'center' },
- {
- field: '分值', title: '分值', width: 70, align: 'center', halign: 'center', formatter: function (val, row, index) {
- return (val || 0) + "分";
- }
- }
- ]]
- });
- $("#WTXZ").combobox({
- url: '/Problem/GetProblemNature',
- valueField: '代码',
- textField: '显示名',
- onLoadSuccess: function (data) {
- $('#WTXZ').combobox('setValue', '@ViewBag.nature' );
- //if (data != null) {
- // $('#WTXZ').combobox('setValue', data[2].代码);
- //}
- },
- onChange: function (newValue, oldValue) {
- }
- })
- //确定按钮事件
- $('#btnFinish').bind('click', function () {
- //问题分类
- var TypeID = $('#ProblemType').combotree('getValue');
- var nature = $('#WTXZ').combotree('getValue');
- $.post('/Problem/DoClassifi?id=' + id + "&ClssID="+TypeID + "&nature="+nature,{ }, function (data) {
- if (data == '1') {
- top.ZLPMS.Msg('分类完成');
- ZLPMS.CloseTopWindow(true);
- } else {
- top.ZLPMS.Msg('数据发生异常,请重新填写');
- }
- })
- });
- });
- </script>
|