Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/smartschool-platform into dev

zhaoy 6 years ago
parent
commit
40eeb0c8de

+ 10 - 4
frontend/pc-web/app/model/Score.js

@@ -4,13 +4,19 @@
 Ext.define('school.model.Score', {
     extend: 'school.model.Base',
     fields: [{
-        name: 'number', // 学号
-        type: 'int'
+        name: 'sd_stuNumber', // 学号
+        type: 'string'
+    }, {
+        name: 'sd_stu', // 姓名
+        type: 'string'
     }, {
-        name: 'name', // 姓名
+        name: 'sd_subject',
         type: 'string'
     }, {
-        name: 'score', // 成绩
+        name: 'sd_score',
         type: 'float'
+    }, {
+        name: 'sd_remark',
+        type: 'string'
     }]
 });

+ 4 - 1
frontend/pc-web/app/view/Interaction/access/List.js

@@ -81,7 +81,10 @@ Ext.define('school.view.interaction.access.List', {
                     hidden: true
                 }, {
                     text: '类型',
-                    dataIndex: 'record_type'
+                    dataIndex: 'record_type',
+                    renderer: function(v,m,r) {
+                        return v == 1 ? '入校' : (v == 2 ? '出校' : '其他')
+                    }
                 }, {
                     text: '学号',
                     dataIndex: 'stu_number',

+ 10 - 2
frontend/pc-web/app/view/Interaction/homework/List.js

@@ -193,11 +193,19 @@ Ext.define('school.view.interaction.homework.List', {
                 }, {
                     text: '标题',
                     dataIndex: 'task_title',
-                    width: 120
+                    width: 250
                 }, {
                     text: '内容',
                     dataIndex: 'task_context',
-                    width: 300
+                    width: 300,
+                    xtype: 'widgetcolumn',
+                    tdCls: 'content-column',
+                    widget: {
+                        xtype: 'textareatrigger',
+                        winTitle: '内容',
+                        margin: '0',
+                        editable: false
+                    },
                 }, {
                     text: '发布人',
                     dataIndex: 'creator',

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

@@ -118,7 +118,7 @@ Ext.define('school.view.interaction.mailbox.List', {
                 columns : [{
                     text: '标题',
                     dataIndex: 'mailbox_title',
-                    width: 120
+                    width: 250
                 }, {
                     text: '内容',
                     dataIndex: 'mailbox_context',

+ 10 - 11
frontend/pc-web/app/view/Interaction/notice/List.js

@@ -139,20 +139,19 @@ Ext.define('school.view.interaction.notice.List', {
                 }, {
                     text: '标题',
                     dataIndex: 'notify_title',
-                    width: 120,
-                    // tdCls: 'x-detail-column',
-                    // listeners: {
-                    //     click: function(view, td, row, col, e, record, tr, eOpts, event) {
-                    //         let gridConfig = me.gridConfig;
-                    //         school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get('notify_title') + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
-                    //             initId: record.get(gridConfig.idField)
-                    //         });
-                    //     }
-                    // }
+                    width: 250
                 }, {
                     text: '内容',
                     dataIndex: 'notify_details',
-                    width: 300
+                    width: 300,
+                    xtype: 'widgetcolumn',
+                    tdCls: 'content-column',
+                    widget: {
+                        xtype: 'textareatrigger',
+                        winTitle: '内容',
+                        margin: '0',
+                        editable: false
+                    },
                 }, {
                     text: '发布人',
                     dataIndex: 'creator',

+ 69 - 7
frontend/pc-web/app/view/Interaction/score/Detail.js

@@ -12,7 +12,7 @@ Ext.define('school.view.interaction.score.Detail', {
     // _readUrl: 'http://10.1.80.36:9520/api/school/score/read',
     _readUrl: '/api/school/score/read',
     // _saveUrl: 'http://10.1.80.47:9520/api/school/score/save',
-    // _saveUrl: '/api/sale/sss/update',
+    _saveUrl: '/api/school/score/save',
     // _deleteUrl: 'http://10.1.80.47:9520/api/school/score/delete',
     _deleteUrl: '/api/school/score/delete',
     
@@ -29,7 +29,7 @@ Ext.define('school.view.interaction.score.Detail', {
                 name: 'si_examtitle',
                 fieldLabel: '考试标题'
             }, {
-                xtype: 'textfield',
+                xtype: 'datefield',
                 name: 'si_examdate',
                 fieldLabel: '考试时间'
             }, {
@@ -70,20 +70,81 @@ Ext.define('school.view.interaction.score.Detail', {
                 emptyRows: 10,
                 rowViewModel: {},
                 columns: [{
+                    text: 'ID',
+                    dataIndex: 'sd_id',
+                    hidden: true
+                }, {
                     text: '学生编号',
-                    dataIndex: 'sd_stuNumber'
+                    dataIndex: 'sd_stuNumber',
+                    editor: {
+                        xtype: 'textfield'
+                    }
                 }, {
                     text: '姓名',
-                    dataIndex: 'sd_stu'
+                    dataIndex: 'sd_stu',
+                    editor: {
+                        addTitle: '学生',
+                        xtype: 'dbfindtrigger',
+                        //数据接口
+                        dataUrl:'/api/school/student/list',
+                        //联想设置
+                        dbtpls:[{
+                            field:'stu_name',width:150
+                        }],
+                        dbfinds:[{
+                            from: 'stu_name', to: 'sd_stu',
+                        }, {
+                            from: 'stu_number', to: 'sd_stuNumber'
+                        }],
+                        defaultCondition: "1=1",
+                        dbSearchFields:[{
+                            emptyText:'请输入学生学号或姓名',
+                            xtype : "textfield", 
+                            name : "search", 
+                            getCondition: function(v) {
+                                return "(upper(stu_name) like '%"+v.toUpperCase()+"%' or upper(stu_number) like '%"+v.toUpperCase()+"%')";
+                            },
+                            allowBlank : true, 
+                            width:300
+                        }],
+                        //放大镜窗口列表
+                        dbColumns:[{
+                            text: "ID",
+                            dataIndex: "stu_id",
+                            hidden:true,
+                            xtype: "numbercolumn"
+                        }, {
+                            text: '工号',
+                            dataIndex: 'stu_number',
+                            width: 110
+                        }, {
+                            text: "姓名",
+                            dataIndex: "stu_name",
+                            width: 110
+                        }]
+                    }
                 }, {
                     text: '科目',
-                    dataIndex: 'sd_subject'
+                    dataIndex: 'sd_subject',
+                    editor: {
+                        xtype: 'subjectcombo',
+                        valueField: 'subject_name',
+                        hideLabel: true
+                    }
                 }, {
                     text: '成绩',
-                    dataIndex: 'sd_score'
+                    dataIndex: 'sd_score',
+                    editor: {
+                        xtype: 'numberfield',
+                        minValue: 0
+                    }
                 }, {
                     text: '备注',
-                    dataIndex: 'sd_remark'
+                    dataIndex: 'sd_remark',
+                    editor: {
+                        xtype: 'textfield'
+                    },
+                    width: 200
                 }]
             }],
             applyBtns: [{
@@ -108,6 +169,7 @@ Ext.define('school.view.interaction.score.Detail', {
     },
 
     refresh: function() {
+        Ext.StoreMgr.get('store_subject').load();
         Ext.StoreMgr.get('store_grade').load();
         Ext.StoreMgr.get('store_class').load();
     }

+ 2 - 2
frontend/pc-web/app/view/Interaction/score/DetailModel.js

@@ -3,10 +3,10 @@ Ext.define('school.view.interaction.score.DetailModel', {
     alias: 'viewmodel.interaction-score-detail',
 
     data: {
-        showAddBtn: false,
+        showAddBtn: true,
         showRefreshBtn: true,
         showCopyBtn: false,
-        showSaveBtn: false,
+        showSaveBtn: true,
         showDeleteBtn: true,
         showLogBtn: false
     },

+ 5 - 4
frontend/pc-web/app/view/Interaction/score/List.js

@@ -97,10 +97,10 @@ Ext.define('school.view.interaction.score.List', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
-                //     xtype: 'button',
-                //     text: '新增',
-                //     handler: 'onAddClick'
-                // }, {
+                    xtype: 'button',
+                    text: '新增',
+                    handler: 'onAddClick'
+                }, {
                     xtype: 'importbutton',
                     text: '导入',
                     belong: me,
@@ -241,6 +241,7 @@ Ext.define('school.view.interaction.score.List', {
     },
 
     refresh: function() {
+        Ext.StoreMgr.get('store_subject').load();
         Ext.StoreMgr.get('store_grade').load();
         Ext.StoreMgr.get('store_class').load();
         this.items.items[0].store.load();

+ 1 - 1
frontend/pc-web/app/view/Interaction/score/ListController.js

@@ -3,6 +3,6 @@ Ext.define('school.view.interaction.score.ListController', {
     alias: 'controller.interaction-score-list',
 
     onAddClick: function() {
-        school.util.BaseUtil.openTab('interaction-score-detail', '录入成绩', 'interaction-score-detail-add'); 
+        school.util.BaseUtil.openTab('interaction-score-detail', '成绩录入', 'interaction-score-detail-add'); 
     }
 });

+ 3 - 0
frontend/pc-web/app/view/core/form/field/dbfind/Trigger.js

@@ -196,6 +196,9 @@ Ext.define('school.view.core.form.field.dbfind.Trigger', {
             var me = f;
             var dbfinds = me.dbfinds,
                 data;
+            if(!me.strict) {
+                return;
+            }
             if (f.value && f.value != '') {
                 //添加默认条件
                 var searchField = null;