zhuth пре 6 година
родитељ
комит
813cb1f7b0

+ 33 - 33
frontend/pc-web/app/view/Interaction/mailbox/List.js

@@ -114,10 +114,6 @@ Ext.define('school.view.interaction.mailbox.List', {
                     handler: 'onUnIgnoreClick'
                 }],
                 columns : [{
-                    text: 'ID',
-                    dataIndex: 'mailbox_id',
-                    hidden: true
-                }, {
                     text: '标题',
                     dataIndex: 'mailbox_title',
                     width: 120
@@ -134,45 +130,17 @@ Ext.define('school.view.interaction.mailbox.List', {
                     },
 
                     width: 300
-                }, {
-                    xtype: 'datecolumn',
-                    text: '日期',
-                    dataIndex: 'create_date',
-                    width: 150
-                }, {
-                    text: '提出人',
-                    dataIndex: 'mb_creatorname',
-                    width: 120
-                }, {
-                    text: '年级',
-                    dataIndex: 'mb_grade'
-                }, {
-                    text: '班级',
-                    dataIndex: 'mb_class'
-                }, {
-                    text: '学生',
-                    dataIndex: 'mb_student'
                 }, {
                     text: '回复状态',
                     dataIndex: 'mailbox_status',
                     renderer: function(v, m, r) {
                         return v == 3 ? '已回复' : '未回复';
                     }
-                }, {
-                    text: '忽略状态',
-                    dataIndex: 'mb_ignore',
-                    renderer: function(v, m, r) {
-                        return v == 1 ? '已忽略' : '正常';
-                    }
-                }, {
-                    text: '回复信息',
-                    dataIndex: 'mb_reply',
-                    width: 250
                 }, {
                     xtype:'actioncolumn',
                     width:70,
                     dataIndex:'actioncolumn',
-                    text:'操作',
+                    text:'回复',
                     align: 'center',
                     items: [{
                         tooltip: '回复',
@@ -182,6 +150,38 @@ Ext.define('school.view.interaction.mailbox.List', {
                     listeners: {
                         click: 'onActionClick'
                     }
+                }, {
+                    text: '回复信息',
+                    dataIndex: 'mb_reply',
+                    width: 250
+                }, {
+                    text: '忽略状态',
+                    dataIndex: 'mb_ignore',
+                    renderer: function(v, m, r) {
+                        return v == 1 ? '已忽略' : '正常';
+                    }
+                }, {
+                    text: 'ID',
+                    dataIndex: 'mailbox_id',
+                    hidden: true
+                }, {
+                    xtype: 'datecolumn',
+                    text: '日期',
+                    dataIndex: 'create_date',
+                    width: 150
+                }, {
+                    text: '提出人',
+                    dataIndex: 'mb_creatorname',
+                    width: 120
+                }, {
+                    text: '年级',
+                    dataIndex: 'mb_grade'
+                }, {
+                    text: '班级',
+                    dataIndex: 'mb_class'
+                }, {
+                    text: '学生',
+                    dataIndex: 'mb_student'
                 }]
             },
         });

+ 2 - 1
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -43,7 +43,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
                 allowBlank: false,
                 listeners: {
                     select: function (combo, record, eOpts) {
-                        combo.up('form').getForm().findField('gradeId').setValue(record.get('value'));
+                        combo.up('form').getForm().findField('gradeId').setValue(record.get('grade_id'));
                         combo.up('form').getForm().findField('clazzId').setValue(null);
                         combo.up('form').getForm().findField('clazzName').setValue(null);
                     }
@@ -76,6 +76,7 @@ Ext.define('school.view.interaction.timetable.Detail', {
                     },
                     select: function (combo, record, eOpts) {
                         combo.up('form').getForm().findField('clazzId').setValue(record.get('clazz_id'));
+                        combo.up('form').getForm().findField('gradeId').setValue(record.get('grade_id'));
                         combo.up('form').getForm().findField('gradeName').setValue(record.get('clazz_grade'));
                     }
                 }

+ 1 - 0
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -208,6 +208,7 @@ Ext.define('school.view.interaction.timetable.List', {
     refresh: function() {
         Ext.StoreMgr.get('store_grade').load();
         Ext.StoreMgr.get('store_class').load();
+        Ext.StoreMgr.get('store_subject').load();
         this.items.items[0].store.load();
     }
 });

+ 3 - 0
frontend/pc-web/app/view/basic/class/ClassInfoController.js

@@ -7,6 +7,9 @@ Ext.define('school.view.basic.class.ClassInfoController', {
         view = me.getView(),
         viewModel = me.getViewModel();
 
+        Ext.StoreMgr.get('store_grade').load();
+        Ext.StoreMgr.get('store_class').load();
+        Ext.StoreMgr.get('store_subject').load();
         viewModel.get('store_gradeclass').load();
     },
 

+ 19 - 2
frontend/pc-web/app/view/core/form/field/ClassComboBox.js

@@ -8,7 +8,23 @@ Ext.define('school.view.core.form.field.ClassComboBox', {
     editable: true,
     minChars: 0,
     queryMode: 'local',
-    initComponent: function() {
+
+    // Template for the dropdown menu.
+    // Note the use of the "x-list-plain" and "x-boundlist-item" class,
+    // this is required to make the items selectable.
+    tpl: Ext.create('Ext.XTemplate',
+        '<ul class="x-list-plain"><tpl for=".">',
+        '<li role="option" class="x-boundlist-item">{clazz_name} | {clazz_grade}</li>',
+        '</tpl></ul>'
+    ),
+    // template for the content inside text field
+    displayTpl: Ext.create('Ext.XTemplate',
+        '<tpl for=".">',
+        '{clazz_name} | {clazz_grade}',
+        '</tpl>'
+    ),
+
+    initComponent: function () {
         var me = this;
 
         Ext.apply(me, {
@@ -16,5 +32,6 @@ Ext.define('school.view.core.form.field.ClassComboBox', {
         });
 
         me.callParent(arguments);
-    }
+    },
+
 });