Prechádzať zdrojové kódy

界面字段调整(

zhuth 6 rokov pred
rodič
commit
e5e02b25e4

+ 11 - 0
frontend/pc-web/app/store/Ethnicity.js

@@ -0,0 +1,11 @@
+Ext.define('school.store.Ethnicity', {
+    extend: 'Ext.data.ArrayStore',
+    alias: 'store.store_ethnicity',
+
+    fields: ['name', 'value'],
+    
+    // DATAS: ['汉族','满族','蒙古族','回族','藏族','维吾尔族','苗族','彝族','壮族','布依族','侗族','瑶族','白族','土家族','哈尼族','哈萨克族','傣族','黎族','傈僳族','佤族','畲族','高山族','拉祜族','水族','东乡族','纳西族','景颇族','柯尔克孜族','土族','达斡尔族','仫佬族','羌族','布朗族','撒拉族','毛南族','仡佬族','锡伯族','阿昌族','普米族','朝鲜族','塔吉克族','怒族','乌孜别克族','俄罗斯族','鄂温克族','德昂族','保安族','裕固族','京族','塔塔尔族','独龙族','鄂伦春族','赫哲族','门巴族','珞巴族','基诺族'],
+    
+    // JSON.stringify(DATAS.map(function(d){return [d, d]}))
+    data: [["汉族","汉族"],["满族","满族"],["蒙古族","蒙古族"],["回族","回族"],["藏族","藏族"],["维吾尔族","维吾尔族"],["苗族","苗族"],["彝族","彝族"],["壮族","壮族"],["布依族","布依族"],["侗族","侗族"],["瑶族","瑶族"],["白族","白族"],["土家族","土家族"],["哈尼族","哈尼族"],["哈萨克族","哈萨克族"],["傣族","傣族"],["黎族","黎族"],["傈僳族","傈僳族"],["佤族","佤族"],["畲族","畲族"],["高山族","高山族"],["拉祜族","拉祜族"],["水族","水族"],["东乡族","东乡族"],["纳西族","纳西族"],["景颇族","景颇族"],["柯尔克孜族","柯尔克孜族"],["土族","土族"],["达斡尔族","达斡尔族"],["仫佬族","仫佬族"],["羌族","羌族"],["布朗族","布朗族"],["撒拉族","撒拉族"],["毛南族","毛南族"],["仡佬族","仡佬族"],["锡伯族","锡伯族"],["阿昌族","阿昌族"],["普米族","普米族"],["朝鲜族","朝鲜族"],["塔吉克族","塔吉克族"],["怒族","怒族"],["乌孜别克族","乌孜别克族"],["俄罗斯族","俄罗斯族"],["鄂温克族","鄂温克族"],["德昂族","德昂族"],["保安族","保安族"],["裕固族","裕固族"],["京族","京族"],["塔塔尔族","塔塔尔族"],["独龙族","独龙族"],["鄂伦春族","鄂伦春族"],["赫哲族","赫哲族"],["门巴族","门巴族"],["珞巴族","珞巴族"],["基诺族","基诺族"]],
+});

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

@@ -14,16 +14,40 @@ Ext.define('school.view.interaction.homework.List', {
         Ext.apply(this, {
             searchField: [{
                 xtype: 'textfield',
-                name: 'creator',
-                fieldLabel: '发布人'
+                name: 'keyword',
+                fieldLabel: '关键字',
+                getCondition: function (value) {
+                    return ' (task_title like\'%' + value + '%\' or task_context like \'%' + value + '%\') ';
+                }
             }, {
-                xtype: 'datefield',
-                name: 'createTime',
-                fieldLabel: '发布时间'
+                xtype: 'textfield',
+                name: 'bj',
+                fieldLabel: '班级'
             }, {
                 xtype: 'textfield',
-                name: 'keyword',
-                fieldLabel: '关键字'
+                name: 'task_creator',
+                fieldLabel: '发布人'
+            }, {
+                xtype: 'combobox',
+                name: 'homework_status',
+                fieldLabel: '发布状态',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [
+                        ['已发布', 1],
+                        ['未发布', 0]
+                    ]
+                }),
+                minChars: 0,
+                queryMode: 'local'
+            }, {
+                xtype: 'condatefield',
+                name: 'start_date',
+                fieldLabel: '发布时间',
+                columnWidth: 0.5
             }],
 
             gridConfig: {
@@ -90,6 +114,12 @@ Ext.define('school.view.interaction.homework.List', {
                     text: 'id',
                     dataIndex: 'task_id',
                     hidden: true
+                }, {
+                    text: '年级',
+                    dataIndex: 'nj'
+                }, {
+                    text: '班级',
+                    dataIndex: 'bj'
                 }, {
                     text: '标题',
                     dataIndex: 'task_title',
@@ -107,13 +137,13 @@ Ext.define('school.view.interaction.homework.List', {
                     text: '内容',
                     dataIndex: 'task_context',
                     width: 300
-                }, {
-                    text: '通知人',
-                    dataIndex: 'task_notifier'
                 }, {
                     text: '发布人',
                     dataIndex: 'task_creator',
                     width: 150
+                }, {
+                    text: '发布状态',
+                    dataIndex: 'zt'
                 }, {
                     text: '发布时间',
                     dataIndex: 'start_date',

+ 47 - 6
frontend/pc-web/app/view/Interaction/homework/Release.js

@@ -29,18 +29,30 @@ Ext.define('school.view.interaction.homework.Release', {
                 name: "task_creator",
                 fieldLabel: "发布人",
                 columnWidth: 0.5
+            }, {
+                xtype: 'textfield',
+                name: 'njid',
+                fieldLabel: '年级id',
+                hidden: true
+            }, {
+                xtype: 'textfield',
+                name: 'nj',
+                fieldLabel: '年级'
+            }, {
+                xtype: 'textfield',
+                name: 'bjid',
+                fieldLabel: '班级id',
+                hidden: true
+            }, {
+                xtype: 'textfield',
+                name: 'bj',
+                fieldLabel: '班级'
             }, {
                 xtype: 'datefield',
                 name: 'start_date',
                 fieldLabel: '开始时间',
                 columnWidth: 0.5,
                 defaultValue: new Date()
-            }, {
-                xtype: 'textfield',
-                name: 'task_notifier',
-                fieldLabel: '通知人',
-                maxLength: 500,
-                columnWidth: 0.5,
             }, {
                 xtype: 'datefield',
                 name: 'end_date',
@@ -57,6 +69,35 @@ Ext.define('school.view.interaction.homework.Release', {
                 fieldLabel: "内容",
                 columnWidth: 1,
                 height: 250
+            }, {
+                xtype: 'textfield',
+                name: 'fj',
+                fieldLabel: '附件'
+            }],
+            toolBtns: [{
+                xtype: 'button',
+                text: '发布',
+                bind: {
+                    hidden: '{!task_id}'
+                },
+                handler: function() {
+                    let id = me.getViewModel().data.task_id;
+                    me.setLoading(true);
+                    school.util.BaseUtil.request({
+                        url: '/api/school/homework/publish/' + id,
+                        method: 'POST'
+                    })
+                    .then(function() {
+                        me.setLoading(false);
+                        school.util.BaseUtil.showSuccessToast('发布成功');
+                        me.getViewModel().set('notify_status', 1);
+                        me.clearDirty();
+                    })
+                    .catch(function(e) {
+                        me.setLoading(false);
+                        school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
+                    });
+                }
             }]
         });
         this.callParent();

+ 31 - 7
frontend/pc-web/app/view/Interaction/notice/List.js

@@ -14,16 +14,33 @@ Ext.define('school.view.interaction.notice.List', {
         Ext.apply(this, {
             searchField: [{
                 xtype: 'textfield',
-                name: 'creator',
+                name: 'keyword',
+                fieldLabel:'关键字',
+                getCondition: function (value) {
+                    return ' (notify_title like\'%' + value + '%\' or notify_details like \'%' + value + '%\') ';
+                }
+            }, {
+                xtype: 'textfield',
+                name: 'notify_creator',
                 fieldLabel: '发布人'
             }, {
-                xtype: 'datefield',
-                name: 'createTime',
-                fieldLabel: '发布时间'
+                xtype: 'combobox',
+                name: 'notify_status',
+                fieldLabel: '发布状态',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['已发布', 1], ['未发布', 2]]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
-                xtype: 'textfield',
-                name: 'keyword',
-                fieldLabel:'关键字'
+                xtype: 'condatefield',
+                name: 'create_date',
+                fieldLabel: '发布时间',
+                columnWidth: 0.5
             }],
         
             gridConfig: {
@@ -112,6 +129,13 @@ Ext.define('school.view.interaction.notice.List', {
                     text: '发布人',
                     dataIndex: 'notify_creator',
                     width: 150
+                }, {
+                    text: '发布状态',
+                    dataIndex: 'notify_status',
+                    width: 120,
+                    renderer: function(v) {
+                        return !!v ? (v == 2 ? '未发布' : '已发布') : '未发布'
+                    }
                 }, {
                     xtype: 'datecolumn',
                     formate: 'Y-m-d H:i:s',

+ 44 - 0
frontend/pc-web/app/view/Interaction/notice/SchoolNotice.js

@@ -29,6 +29,21 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 name: "notify_creator",
                 fieldLabel: "发布人",
                 columnWidth: 0.5
+            }, {
+                xtype: 'combobox',
+                name: 'notify_status',
+                fieldLabel: '发布状态',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                readOnly: true,
+                defaultValue: 2,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['未发布', 2], ['已发布', 1]]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
                 xtype: 'datefield',
                 name: 'create_date',
@@ -46,6 +61,35 @@ Ext.define('school.view.interaction.notice.SchoolNotice', {
                 fieldLabel: "内容",
                 height: 300,
                 columnWidth: 1,
+            }, {
+                xtype: 'textfield',
+                name: 'fj',
+                fieldLabel: '附件'
+            }],
+            toolBtns: [{
+                xtype: 'button',
+                text: '发布',
+                bind: {
+                    hidden: '{!notify_id}'
+                },
+                handler: function() {
+                    let id = me.getViewModel().data.notify_id;
+                    me.setLoading(true);
+                    school.util.BaseUtil.request({
+                        url: '/api/school/notice/publish/' + id,
+                        method: 'POST'
+                    })
+                    .then(function() {
+                        me.setLoading(false);
+                        school.util.BaseUtil.showSuccessToast('发布成功');
+                        me.getViewModel().set('notify_status', 1);
+                        me.clearDirty();
+                    })
+                    .catch(function(e) {
+                        me.setLoading(false);
+                        school.util.BaseUtil.showErrorToast('发布失败: ' + e.message);
+                    });
+                }
             }]
         });
         this.callParent();

+ 4 - 8
frontend/pc-web/app/view/Interaction/timetable/Detail.js

@@ -27,6 +27,10 @@ Ext.define('school.view.interaction.timetable.Detail', {
                 xtype: 'hidden',
                 name: 'id',
                 fieldLabel: 'id'
+            }, {
+                xtype: 'textfield',
+                name: 'name',
+                fieldLabel: '课表名称'
             }, {
                 xtype: 'numberfield',
                 name: 'gradeId',
@@ -50,18 +54,10 @@ Ext.define('school.view.interaction.timetable.Detail', {
                 xtype: 'textfield',
                 name: 'status',
                 fieldLabel: '状态'
-            }, {
-                xtype: 'textfield',
-                name: 'code',
-                fieldLabel: '课表编号'
             }, {
                 xtype: "textfield",
                 name: "termName",
                 fieldLabel: "学期名称"
-            }, {
-                xtype: 'textfield',
-                name: 'name',
-                fieldLabel: '课表名称'
             }, {
                 xtype: "datefield",
                 name: "termStart",

+ 37 - 19
frontend/pc-web/app/view/Interaction/timetable/List.js

@@ -9,31 +9,38 @@ Ext.define('school.view.interaction.timetable.List', {
 
     // dataUrl: 'http://10.1.80.36:9520/api/school/curriculum/list',
     dataUrl: '/api/school/curriculum/list',
+    _title: '课程表',
+    caller: 'Curriculum',
+    pathKey: 'curriculum',
+
     initComponent: function() {
         var me = this;
         Ext.apply(this, {
             searchField: [{
                 xtype: 'textfield',
-                name: 'term',
-                fieldLabel: '学期'
+                name: 'name',
+                fieldLabel: '课表名称'
             }, {
                 xtype: 'textfield',
-                name: 'grade',
+                name: 'gradeName',
                 fieldLabel: '年级'
             }, {
                 xtype: 'textfield',
-                name: 'class',
+                name: 'clazzName',
                 fieldLabel: '班级'
+            }, {
+                xtype: 'numberfield',
+                name: 'text',
+                fieldLabel: '学年',
+                getCondition: function(v) {
+                    return '1=1';
+                }
+            }, {
+                xtype: 'textfield',
+                name: 'termName',
+                fieldLabel: '学期'
             }],
         
-            caller: null,
-            _formXtype: null,
-            _title: null,
-            _deleteUrl: null,
-            _batchOpenUrl: null,
-            _batchCloseUrl: null,
-            _batchDeleteUrl: null,
-        
             gridConfig: {
                 addTitle: '课程表',
                 addXtype: 'interaction-timetable-detail',
@@ -53,6 +60,21 @@ Ext.define('school.view.interaction.timetable.List', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: 'onAddClick'
+                }, {
+                    xtype: 'importbutton',
+                    text: '导入',
+                    belong: me,
+                    caller: me.caller,
+                    pathKey: me.pathKey,
+                    onSuccess: function () {
+                        //刷新界面
+                        var g = me.down('grid');
+                        g.store.loadPage(g.store.currentPage);
+                    }
+                }, {
                     xtype: 'button',
                     text: '删除',
                     handler: function() {
@@ -87,10 +109,6 @@ Ext.define('school.view.interaction.timetable.List', {
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
                     }
-                }, {
-                    xtype: 'button',
-                    text: '新增',
-                    handler: 'onAddClick'
                 }],
                 columns : [{
                     text: 'id',
@@ -115,13 +133,13 @@ Ext.define('school.view.interaction.timetable.List', {
                 }, {
                     text: '班级',
                     dataIndex: 'clazzName'
+                }, {
+                    text: '学年',
+                    dataIndex: 'xn'
                 }, {
                     text: '学期',
                     dataIndex: 'termName',
                     width: 120
-                }, {
-                    text: '状态',
-                    dataIndex: 'status'
                 }]
             },
         });

+ 24 - 19
frontend/pc-web/app/view/basic/school/SchoolInfo.js

@@ -14,7 +14,7 @@ Ext.define('school.view.basic.school.SchoolInfo', {
 
     layout: 'column',
     autoScroll: true,
-    bodyPadding: '8 12 8 12',
+    bodyPadding: '12 250 12 250',
 
     fieldDefaults: {
         margin: '0 0 10 0',
@@ -27,7 +27,7 @@ Ext.define('school.view.basic.school.SchoolInfo', {
         Ext.apply(this, {
             dockedItems: [{
                 xtype: 'toolbar',
-                dock: 'top',
+                dock: 'bottom',
                 items: ['->', {
                     xtype: 'button',
                     text: '更新',
@@ -37,20 +37,34 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                     handler: function() {
                         me.onSave();
                     }
-                }],
+                }, '->'],
             }],
             items: [{
                 xtype: 'hidden',
                 name: 'school_id',
                 bind: '{schoolId}',
-                fieldLabel: 'id'
+                fieldLabel: 'id',
+                columnWidth: 1
             }, {
                 xtype: "textfield",
                 name: "school_name",
                 bind: '{schoolName}',
                 fieldLabel: "学校名称",
                 allowBlank: false,
-                columnWidth: 0.5
+                columnWidth: 1
+            }, {
+                xtype: "textfield",
+                name: 'school_phone',
+                bind: '{schoolPhone}',
+                fieldLabel: '联系电话',
+                columnWidth: 1
+            }, {
+                xtype: "textfield",
+                name: "school_address",
+                bind: '{schoolAddress}',
+                fieldLabel: "学校地址",
+                allowBlank: true,
+                columnWidth: 1
             }, {
                 xtype: 'combobox',
                 name: 'school_status',
@@ -59,6 +73,7 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                 displayField: 'name',
                 valueField: 'value',
                 queryMode: 'local',
+                editable: false,
                 store: Ext.create('Ext.data.Store', {
                     fields: ['name', 'value'],
                     data: [{
@@ -68,31 +83,21 @@ Ext.define('school.view.basic.school.SchoolInfo', {
                         name: '冻结',
                         value: 2
                     }]
-                })
-            }, {
-                xtype: "textfield",
-                name: "school_address",
-                bind: '{schoolAddress}',
-                fieldLabel: "学校地址",
-                allowBlank: true,
+                }),
                 columnWidth: 1
-            }, {
-                xtype: "textfield",
-                name: 'school_phone',
-                bind: '{schoolPhone}',
-                fieldLabel: '联系电话'
             }, {
                 xtype: 'textfield',
                 name: 'school_appid',
                 bind: '{schoolAppId}',
                 fieldLabel: '公众号账号',
-                readOnly: true
+                readOnly: true,
+                columnWidth: 1
             }, {
                 xtype: 'textfield',
                 name: 'school_secret',
                 bind: '{schoolSecret}',
                 fieldLabel: '公众号密钥',
-                columnWidth: 0.5,
+                columnWidth: 1,
                 readOnly: true
             }, {
                 xtype: 'textfield',

+ 55 - 66
frontend/pc-web/app/view/basic/staff/StaffDetail.js

@@ -12,6 +12,7 @@ Ext.define('school.view.basic.staff.StaffDetail', {
     _statusCodeField: null,
     _auditmanField: null,
     _auditdateField: null,
+    // _readUrl: 'http://10.1.80.47:9560/teacher/read',
     _readUrl: '/api/school/teacher/read',
     // _saveUrl: 'http://10.1.80.47:9560/teacher/save',
     _saveUrl: '/api/school/teacher/save',
@@ -35,94 +36,82 @@ Ext.define('school.view.basic.staff.StaffDetail', {
                 name: 'teacher_name',
                 fieldLabel: '姓名'
             }, {
-                xtype: 'combobox',
+                xtype: 'gendercombo',
                 name: 'teacher_sex',
                 fieldLabel: '性别',
-                displayField: 'name',
-                valueField: 'value',
-                editable: false,
-                store: {
-                    type: 'store_gender'
-                },
-                minChars: 0,
-                queryMode: 'local'
             }, {
                 xtype: 'textfield',
                 name: 'teacher_phone',
                 fieldLabel: '手机号'
+            }, {
+                xtype: 'textfield',
+                name: 'teacher_email',
+                fieldLabel: '邮箱'
+            }, {
+                xtype: 'ethnicitycombobox',
+                name: 'teacher_nation',
+                fieldLabel: '民族',
             }, {
                 xtype: "textfield",
-                name: "teacher_jg",
+                name: "teacher_native",
                 fieldLabel: "籍贯"
             }, {
                 xtype: 'datefield',
-                name: 'teacher_birth',
-                fieldLabel: '出生年月日',
+                name: 'teacher_birthday',
+                fieldLabel: '出生日',
                 format: 'Y-m-d'
             }, {
-                xtype: 'textfield',
-                name: 'teacher_mz',
-                fieldLabel: '民族'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_hf',
-                fieldLabel: '婚姻状态'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_zz',
-                fieldLabel: '政治面貌'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_address',
-                fieldLabel: '现居住址'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_jjname',
-                fieldLabel: '紧急联系人'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_jjphone',
-                fieldLabel: '紧急联系人电话'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_jjgx',
-                fieldLabel: '紧急联系人关系'
+                xtype: 'combobox',
+                name: 'teacher_marriage',
+                fieldLabel: '婚姻状态',
+                displayField: 'name',
+                valueField: 'value',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name', 'value'],
+                    data: [['未婚', 0], ['已婚', 1], ['离异', -1]]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
-                xtype: 'textfield',
-                name: 'teacher_xl',
-                fieldLabel: '学历'
+                xtype: 'combobox',
+                name: 'teacher_political',
+                fieldLabel: '政治面貌',
+                displayField: 'name',
+                valueField: 'name',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name'],
+                    data: [['中共党员'], ['中共预备党员'], ['共青团员'], ['群众']]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
                 xtype: 'textfield',
-                name: 'teacher_by',
+                name: 'teacher_school',
                 fieldLabel: '毕业学校'
             }, {
-                xtype: 'textfield',
-                name: 'teacher_zy',
-                fieldLabel: '专业'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_phone',
-                fieldLabel: '手机号码'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_email',
-                fieldLabel: '邮箱'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_app',
-                fieldLabel: '是否开通APP'
-            }, {
-                xtype: 'textfield',
-                name: 'teacher_wechat',
-                fieldLabel: '绑定微信号'
+                xtype: 'combobox',
+                name: 'teacher_education',
+                fieldLabel: '学历',
+                displayField: 'name',
+                valueField: 'name',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name'],
+                    data: [['博士后'], ['博士'], ['硕士'], ['研究生'], ['本科(统招)'], ['本科(成人高考)'], ['本科(专升本)'], ['大专'], ['高中'], ['职高'], ['初中'], ['小学']]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
                 xtype: 'textfield',
-                name: 'teacher_type',
-                fieldLabel: '账号类型'
+                name: 'teacher_major',
+                fieldLabel: '专业'
             }, {
                 xtype: 'textfield',
-                name: 'teacher_gwlx',
-                fieldLabel: '岗位类型'
+                name: 'teacher_address',
+                fieldLabel: '现居住址',
+                columnWidth: 0.5
             }, {
                 name: "detailGridField",
                 xtype: "detailGridField",

+ 19 - 25
frontend/pc-web/app/view/basic/staff/StaffList.js

@@ -16,16 +16,12 @@ Ext.define('school.view.basic.staff.StaffList', {
         Ext.apply(this, {
             searchField: [{
                 xtype: 'textfield',
-                name: 'code',
+                name: 'teacher_number',
                 fieldLabel: '教职工号'
             }, {
                 xtype: 'textfield',
-                name: 'name',
+                name: 'teacher_name',
                 fieldLabel: '姓名'
-            }, {
-                xtype: 'textfield',
-                name: 'job',
-                fieldLabel: '职位'
             }],
 
             gridConfig: {
@@ -46,7 +42,14 @@ Ext.define('school.view.basic.staff.StaffList', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: function () {
+                        school.util.BaseUtil.openTab('basic-staff-staffdetail', '新增教职工信息', 'basic-staff-staffdetail-add');
+                    }
+                }, {
                     xtype: 'importbutton',
+                    text: '导入',
                     belong: me,
                     caller: me.caller,
                     pathKey: me.pathKey,
@@ -55,9 +58,6 @@ Ext.define('school.view.basic.staff.StaffList', {
                         var g = me.down('grid');
                         g.store.loadPage(g.store.currentPage);
                     }
-                }, {
-                    xtype: 'button',
-                    text: '一键开通'
                 }, {
                     xtype: 'button',
                     text: '删除',
@@ -94,12 +94,6 @@ Ext.define('school.view.basic.staff.StaffList', {
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
                     }
-                }, {
-                    xtype: 'button',
-                    text: '新增',
-                    handler: function () {
-                        school.util.BaseUtil.openTab('basic-staff-staffdetail', '新增教职工信息', 'basic-staff-staffdetail-add');
-                    }
                 }],
                 columns: [{
                     text: 'ID',
@@ -109,14 +103,14 @@ Ext.define('school.view.basic.staff.StaffList', {
                     text: '工号',
                     dataIndex: 'teacher_number',
                     width: 150
-                }, {
-                    text: '绑定手机号',
-                    dataIndex: 'phone',
-                    width: 120
                 }, {
                     text: '姓名',
                     dataIndex: 'teacher_name',
                     width: 120
+                }, {
+                    text: '手机号',
+                    dataIndex: 'phone',
+                    width: 120
                 }, {
                     text: '性别',
                     dataIndex: 'teacher_sex',
@@ -124,14 +118,14 @@ Ext.define('school.view.basic.staff.StaffList', {
                         return v == 1 ? '男' : (v == 0 ? '女' : '未知');
                     }
                 }, {
-                    text: '工龄',
-                    dataIndex: 'teacher_working_age'
+                    text: '民族',
+                    dataIndex: 'teacher_nation'
                 }, {
-                    text: '是否开通',
-                    dataIndex: 'open'
+                    text: '学历',
+                    dataIndex: 'teacher_education'
                 }, {
-                    text: '状态',
-                    dataIndex: 'teacher_status'
+                    text: '专业',
+                    dataIndex: 'teacher_major'
                 }]
             },
         });

+ 33 - 26
frontend/pc-web/app/view/basic/student/StudentDetail.js

@@ -2,7 +2,7 @@ Ext.define('school.view.basic.student.StudentDetail', {
     extend: 'school.view.core.form.FormPanel',
     xtype: 'basic-student-studentdetail',
 
-    // controller: 'sale-b2b-purchasedetail',
+    controller: 'basic-student-studentdetail',
     // viewModel: 'sale-b2b-purchasedetail',
 
     //字段属性
@@ -47,30 +47,27 @@ Ext.define('school.view.basic.student.StudentDetail', {
                 },
                 minChars: 0,
                 queryMode: 'local'
-            }, {
-                xtype: 'datefield',
-                name: 'stu_enroll_date',
-                fieldLabel: '入学时间'
-            }, {
-                xtype: 'datefield',
-                name: 'stu_graduate_date',
-                fieldLabel: '毕业时间'
-            }, {
-                xtype: 'textfield',
-                name: 'grade',
-                fieldLabel: '年级'
             }, {
                 xtype: 'textfield',
-                name: 'class',
-                fieldLabel: '班级'
+                name: 'stu_native',
+                fieldLabel: '籍贯'
             }, {
-                xtype: "textfield",
-                name: "jg",
-                fieldLabel: "籍贯"
+                xtype: 'ethnicitycombobox',
+                name: 'stu_nation',
+                fieldLabel: '民族',
             }, {
-                xtype: 'textfield',
-                name: 'mz',
-                fieldLabel: '民族'
+                xtype: 'combobox',
+                name: 'stu_political',
+                fieldLabel: '政治面貌',
+                displayField: 'name',
+                valueField: 'name',
+                editable: false,
+                store: Ext.create('Ext.data.ArrayStore', {
+                    fields: ['name'],
+                    data: [['中共党员'], ['中共预备党员'], ['共青团员'], ['群众']]
+                }),
+                minChars: 0,
+                queryMode: 'local'
             }, {
                 xtype: 'datefield',
                 name: 'stu_birthday',
@@ -82,15 +79,25 @@ Ext.define('school.view.basic.student.StudentDetail', {
             }, {
                 xtype: "textfield",
                 name: "stu_address",
-                fieldLabel: "家庭住址"
+                fieldLabel: "家庭住址",
+                columnWidth: 0.5
+            }, {
+                xtype: 'datefield',
+                name: 'stu_enroll_date',
+                fieldLabel: '入学日期'
             }, {
                 xtype: 'textfield',
-                name: 'teacher_zz',
-                fieldLabel: '政治面貌'
+                name: 'stu_grade',
+                fieldLabel: '年级'
             }, {
                 xtype: 'textfield',
-                name: 'stu_status',
-                fieldLabel: '状态'
+                name: 'clazz_id',
+                fieldLabel: '班级id',
+                hidden: true
+            }, {
+                xtype: 'textfield',
+                name: 'stu_class',
+                fieldLabel: '班级'
             }, {
                 name: "parent",
                 xtype: "detailGridField",

+ 17 - 0
frontend/pc-web/app/view/basic/student/StudentDetailController.js

@@ -0,0 +1,17 @@
+Ext.define('school.view.basic.student.StudentDetailController', {
+    extend: 'school.view.core.form.FormPanelController',
+    alias: 'controller.basic-student-studentdetail',
+
+    onAfterSave: function(localJson) {
+        var form = this.getView();
+        var id = localJson.data.id;
+        var code = localJson.data.code;
+        form.initId = id;
+        school.util.FormUtil.loadData(form).then(function(data) {
+            var newId = form.xtype + '-' + data.main.id;
+            var newTitle = form._title + '(' + data.main.stu_number + ')';
+    
+            school.util.BaseUtil.refreshTabTitle(newId, newTitle);
+        });
+    },
+});

+ 16 - 29
frontend/pc-web/app/view/basic/student/StudentList.js

@@ -23,16 +23,17 @@ Ext.define('school.view.basic.student.StudentList', {
                 fieldLabel: '班级'
             }, {
                 xtype: 'textfield',
-                name: 'code',
+                name: 'stu_number',
                 fieldLabel:'学号'
             }, {
                 xtype: 'textfield',
-                name: 'name',
+                name: 'stu_name',
                 fieldLabel: '姓名'
             }, {
-                xtype: 'textfield',
-                name: 'parent',
-                fieldLabel: '家长'
+                xtype: 'condatefield',
+                name: 'stu_enroll_date',
+                fieldLabel: '入学日期',
+                columnWidth: 0.5
             }],
         
             gridConfig: {
@@ -54,6 +55,12 @@ Ext.define('school.view.basic.student.StudentList', {
                 },
                 hiddenTools: false,
                 toolBtns: [{
+                    xtype: 'button',
+                    text: '新增',
+                    handler: function() {
+                        school.util.BaseUtil.openTab('basic-student-studentdetail', '新增学生信息', 'basic-student-studentdetail-add');
+                    }
+                }, {
                     xtype: 'importbutton',
                     belong: me,
                     caller: me.caller,
@@ -63,9 +70,6 @@ Ext.define('school.view.basic.student.StudentList', {
                         var g = me.down('grid');
                         g.store.loadPage(g.store.currentPage);
                     }
-                }, {
-                    xtype: 'button',
-                    text: '一键开通'
                 }, {
                     xtype: 'button',
                     text: '删除',
@@ -102,12 +106,6 @@ Ext.define('school.view.basic.student.StudentList', {
                             school.util.BaseUtil.showErrorToast('删除失败: ' + e.message);
                         });
                     }
-                }, {
-                    xtype: 'button',
-                    text: '新增',
-                    handler: function() {
-                        school.util.BaseUtil.openTab('basic-student-studentdetail', '新增学生信息', 'basic-student-studentdetail-add');
-                    }
                 }],
                 columns : [{
                     text: 'id',
@@ -118,7 +116,7 @@ Ext.define('school.view.basic.student.StudentList', {
                     dataIndex: 'stu_number',
                     width: 150
                 }, {
-                    text: '学生姓名',
+                    text: '姓名',
                     dataIndex: 'stu_name',
                     width: 120
                 }, {
@@ -134,28 +132,17 @@ Ext.define('school.view.basic.student.StudentList', {
                 }, {
                     text: '班级',
                     dataIndex: 'class'
-                }, {
-                    text: '出生日期',
-                    dataIndex: 'stu_birthday',
-                    width: 120,
-                    xtype: 'datecolumn',
-                    format: 'Y-m-d'
-                }, {
-                    text: '年龄',
-                    dataIndex: 'stu_age'
                 }, {
                     text: '入学日期',
                     dataIndex: 'stu_enroll_date',
                     xtype: 'datecolumn',
                     format: 'Y-m-d'
                 }, {
-                    text: '毕业日期',
-                    dataIndex: 'stu_graduate_date',
+                    text: '出生日期',
+                    dataIndex: 'stu_birthday',
+                    width: 120,
                     xtype: 'datecolumn',
                     format: 'Y-m-d'
-                }, {
-                    text: '状态',
-                    dataIndex: 'stu_status'
                 }]
             },
         });

+ 1 - 2
frontend/pc-web/app/view/core/button/import/Window.js

@@ -84,7 +84,6 @@ Ext.define('school.view.core.button.import.Window', {
             if (id) {
                 form.setLoading(true);
                 Ext.Ajax.request({
-                    // url: '/api/document/'+form.ownerCt.caller.toLocaleLowerCase()+'/saveToFormal',//这里是填写需要跨域访问的URL
                     // url: 'http://10.1.80.47:9560/' + win.pathKey + '/saveToFormal', //这里是填写需要跨域访问的URL
                     url: '/api/school/' + win.pathKey + '/saveToFormal', //这里是填写需要跨域访问的URL
                     method: 'post',
@@ -251,7 +250,7 @@ Ext.define('school.view.core.button.import.Window', {
                             fd.append('caller', me.caller);
                             form.setLoading(true);
                             Ext.Ajax.request({
-                                // url: 'http://10.1.80.47:9560/excel/import/parse', //这里是填写需要跨域访问的URL
+                                // url: 'http://10.1.80.36:9520/api/school/excel/import/parse', //这里是填写需要跨域访问的URL
                                 url: '/api/school/excel/import/parse', //这里是填写需要跨域访问的URL
                                 cors: true,
                                 useDefaultXhrHeader: false,

+ 1 - 1
frontend/pc-web/app/view/core/form/field/ConDateField.js

@@ -122,7 +122,7 @@ Ext.define('school.view.core.form.field.ConDateField', {
         });
         var t = this.value;
         if(!t || !t in [1,2,3,4,5,6,7]) {
-            t = 1;
+            t = 7;
         }
         this.value = null;
         this.setInitValue(t);

+ 14 - 0
frontend/pc-web/app/view/core/form/field/EthnicityComboBox.js

@@ -0,0 +1,14 @@
+Ext.define('school.view.core.form.field.EthnicityComboBox', {
+    extend: 'Ext.form.field.ComboBox',
+    alias: 'widget.ethnicitycombobox',
+
+    fieldLabel: '民族',
+    displayField: 'name',
+    valueField: 'value',
+    editable: true,
+    store: {
+        type: 'store_ethnicity'
+    },
+    minChars: 0,
+    queryMode: 'local'
+});

+ 14 - 0
frontend/pc-web/app/view/core/form/field/GenderComboBox.js

@@ -0,0 +1,14 @@
+Ext.define('school.view.core.form.field.GenderComboBox', {
+    extend: 'Ext.form.field.ComboBox',
+    alias: 'widget.gendercombo',
+
+    fieldLabel: '性别',
+    displayField: 'name',
+    valueField: 'value',
+    editable: false,
+    store: {
+        type: 'store_gender'
+    },
+    minChars: 0,
+    queryMode: 'local'
+});