Browse Source

必填字段/学生信息保存

zhuth 6 years ago
parent
commit
c931d41d3d

+ 3 - 69
frontend/pc-web/app/view/Interaction/access/List.js

@@ -33,12 +33,10 @@ Ext.define('school.view.interaction.access.List', {
                 totalProperty: 'data.total',
                 totalProperty: 'data.total',
                 actionColumn: [],
                 actionColumn: [],
                 selModel: {
                 selModel: {
-                    checkOnly: true,
-                    type: 'checkboxmodel',
-                    mode: "MULTI",
-                    ignoreRightMouseSelection: false
+                    type: 'cellmodel'
                 },
                 },
                 hiddenTools: true,
                 hiddenTools: true,
+                disableDetail: true,
                 toolBtns: [],
                 toolBtns: [],
                 columns: [{
                 columns: [{
                     text: 'id',
                     text: 'id',
@@ -76,69 +74,5 @@ Ext.define('school.view.interaction.access.List', {
             },
             },
         });
         });
         this.callParent(arguments);
         this.callParent(arguments);
-    },
-
-    /**
-     * 处理部分字段值
-     */
-    getConditionValue: function (field, value) {
-        var me = this,
-            xtypes = field.getXTypes().split('/'),
-            conditionValue;
-        if (me.isContainsAny(xtypes, ['datefield'])) {
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d H:i:s');
-        } else if (me.isContainsAny(xtypes, ['conmonthfield'])) {
-            var from = value.from,
-                to = value.to;
-
-            conditionValue = from + ',' + to;
-        } else if (me.isContainsAny(xtypes, ['condatefield'])) {
-            var from = value.from,
-                to = value.to;
-
-            conditionValue = Ext.Date.format(new Date(from), 'Y-m-d 00:00:00') + ',' + Ext.Date.format(new Date(to), 'Y-m-d 23:59:59');
-        } else if (me.isContainsAny(xtypes, ['dbfindtrigger'])) {
-            conditionValue = value;
-        } else if (me.isContainsAny(xtypes, ['combobox', 'combo'])) {
-            conditionValue = value;
-        } else if (me.isContainsAny(xtypes, ['multicombo'])) {
-            conditionValue = value.map ? value.map(function (v) {
-                return v.value;
-            }).join(',') : '';
-        } else {
-            conditionValue = value;
-        }
-
-        return conditionValue;
-    },
-
-    getExtraParams: function (store, op, condition) {
-        var temp = {};
-
-        for (let x = 0; x < condition.length; x++) {
-            let c = condition[x];
-            if (c.field == 'keyword') {
-                temp.keyword = c.value;
-            } else if (c.field == 'date') {
-                temp.fromDate = new Date(c.value.split(',')[0]).getTime();
-                temp.endDate = new Date(c.value.split(',')[1]).getTime();
-            } else if (c.field == 'quoted') {
-                temp.quoted = c.value == 'all' ? null : c.value;
-            } else if (c.field == 'closed') {
-                // temp.endDate = c.value == 'all' ? null : (
-                //     c.value == '0' ? 
-                // );
-            }
-        }
-        let obj = {
-            pageNumber: store.exportNumber ? store.exportNumber : op._page,
-            pageSize: store.exportPageSize ? store.exportPageSize : store.pageSize
-        };
-        for (let k in temp) {
-            if (!!temp[k]) {
-                obj[k] = temp[k];
-            }
-        }
-        return obj;
-    },
+    }
 });
 });

+ 5 - 1
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -28,6 +28,8 @@ Ext.define('school.view.interaction.homework.Release', {
                 xtype: "textfield",
                 xtype: "textfield",
                 name: "task_creator",
                 name: "task_creator",
                 fieldLabel: "发布人",
                 fieldLabel: "发布人",
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
             }, {
                 xtype: 'gradecombo',
                 xtype: 'gradecombo',
                 name: 'grade_name',
                 name: 'grade_name',
@@ -93,7 +95,9 @@ Ext.define('school.view.interaction.homework.Release', {
                 name: 'publish_date',
                 name: 'publish_date',
                 fieldLabel: '发布时间',
                 fieldLabel: '发布时间',
                 readOnly: true,
                 readOnly: true,
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
             }, {
             }, {
                 xtype: "textfield",
                 xtype: "textfield",
                 name: "task_title",
                 name: "task_title",

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

@@ -25,12 +25,10 @@ Ext.define('school.view.interaction.mailbox.List', {
                 totalProperty: 'data.total',
                 totalProperty: 'data.total',
                 actionColumn: [],
                 actionColumn: [],
                 selModel: {
                 selModel: {
-                    checkOnly:true,
-                    type:'checkboxmodel',
-                    mode : "MULTI" ,
-                    ignoreRightMouseSelection : false
+                    type: 'cellmodel'
                 },
                 },
                 hiddenTools: false,
                 hiddenTools: false,
+                disableDetail: true,
                 toolBtns: [{
                 toolBtns: [{
                     xtype: 'button',
                     xtype: 'button',
                     text: '导出'
                     text: '导出'

+ 6 - 2
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -28,7 +28,9 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 xtype: "textfield",
                 xtype: "textfield",
                 name: "notify_creator",
                 name: "notify_creator",
                 fieldLabel: "发布人",
                 fieldLabel: "发布人",
-                columnWidth: 0.5
+                columnWidth: 0.5,
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
             }, {
                 xtype: 'combobox',
                 xtype: 'combobox',
                 name: 'notify_status',
                 name: 'notify_status',
@@ -49,7 +51,9 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 name: 'publish_date',
                 name: 'publish_date',
                 fieldLabel: '发布时间',
                 fieldLabel: '发布时间',
                 readOnly: true,
                 readOnly: true,
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
             }, {
             }, {
                 xtype: "textfield",
                 xtype: "textfield",
                 name: "notify_title",
                 name: "notify_title",

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

@@ -92,12 +92,16 @@ Ext.define('school.view.interaction.timetable.Detail', {
             }, {
             }, {
                 xtype: "textfield",
                 xtype: "textfield",
                 name: "creatorName",
                 name: "creatorName",
-                fieldLabel: "录入人"
+                fieldLabel: "录入人",
+                defaultValue: school.util.BaseUtil.getCurrentUser().username,
+                readOnly: true
             }, {
             }, {
                 xtype: 'datefield',
                 xtype: 'datefield',
                 name: 'createTime',
                 name: 'createTime',
                 fieldLabel: '录入时间',
                 fieldLabel: '录入时间',
-                format: 'Y-m-d H:i:s'
+                format: 'Y-m-d H:i:s',
+                defaultValue: new Date(),
+                readOnly: true
             }, {
             }, {
                 xtype: 'textfield',
                 xtype: 'textfield',
                 name: 'status',
                 name: 'status',

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

@@ -209,7 +209,7 @@ Ext.define('school.view.basic.class.ClassInfoController', {
                             let url, params, headers;
                             let url, params, headers;
                             if(type == 'SCHOOL') {
                             if(type == 'SCHOOL') {
                                 currentNode = rootNode;
                                 currentNode = rootNode;
-                                childNode.leaf = false;
+                                childNode.leaf = true;
                                 childNode.children = [];
                                 childNode.children = [];
                                 // url = 'http://10.1.80.47:9560/grade/save';
                                 // url = 'http://10.1.80.47:9560/grade/save';
                                 url = '/api/school/grade/save';
                                 url = '/api/school/grade/save';

+ 1 - 1
frontend/pc-web/app/view/basic/class/ListCard.js

@@ -87,7 +87,7 @@ Ext.define('school.view.basic.class.ListCard', {
             if(node.data.type == 'GRADE') {
             if(node.data.type == 'GRADE') {
                 list = node.childNodes.map(function(c) {
                 list = node.childNodes.map(function(c) {
                     return Ext.Object.merge(c.data, {
                     return Ext.Object.merge(c.data, {
-                        pathText: node.data.text + c.data.text
+                        pathText: node.data.text + ' ' + c.data.text
                     })
                     })
                 });
                 });
             }else {
             }else {

+ 6 - 2
frontend/pc-web/app/view/basic/student/StudentDetail.js

@@ -152,9 +152,13 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 allowEmpty: true,
                 allowEmpty: true,
                 showCount: false,
                 showCount: false,
                 columns: [{
                 columns: [{
-                    text: '家长姓名',
+                    text: '关系id',
                     dataIndex: 'parent_stu_id',
                     dataIndex: 'parent_stu_id',
                     hidden: true
                     hidden: true
+                }, {
+                    text: '家长id',
+                    dataIndex: 'parent_id',
+                    hidden: true
                 }, {
                 }, {
                     text: '家长姓名',
                     text: '家长姓名',
                     dataIndex: 'parents_name',
                     dataIndex: 'parents_name',
@@ -169,7 +173,7 @@ Ext.define('school.view.basic.student.StudentDetail', {
                     }
                     }
                 }, {
                 }, {
                     text: '关系',
                     text: '关系',
-                    dataIndex: 'parent_rel',
+                    dataIndex: 'ps_relation',
                     editor: {
                     editor: {
                         xtype: 'combobox',
                         xtype: 'combobox',
                         displayField: 'name',
                         displayField: 'name',

+ 1 - 1
frontend/pc-web/app/view/core/base/BasePanel.js

@@ -44,7 +44,7 @@ Ext.define('school.view.core.base.BasePanel', {
             padding: '8 12',
             padding: '8 12',
             _columns: gridColumns.map(function(c) {
             _columns: gridColumns.map(function(c) {
                 c.listeners = c.listeners || {};
                 c.listeners = c.listeners || {};
-                if(!c.listeners['click']) {
+                if(!gridConfig.disableDetail && !c.listeners['click']) {
                     // c.tdCls = c.tdCls ? (c.tdCls + ' x-detail-column') : 'x-detail-column'
                     // c.tdCls = c.tdCls ? (c.tdCls + ' x-detail-column') : 'x-detail-column'
                     c.listeners['click'] = function(view, td, row, col, e, record, tr, eOpts, event) {
                     c.listeners['click'] = function(view, td, row, col, e, record, tr, eOpts, event) {
                         school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get(gridConfig.codeField) + ')', gridConfig.addXtype + record.get(gridConfig.idField), {
                         school.util.BaseUtil.openTab(gridConfig.addXtype, gridConfig.addTitle + '(' + record.get(gridConfig.codeField) + ')', gridConfig.addXtype + record.get(gridConfig.idField), {