浏览代码

班级组织

zhuth 6 年之前
父节点
当前提交
a3b88e4896

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

@@ -1,4 +1,4 @@
-Ext.define('school.view.basic.ClassDetail', {
+Ext.define('school.view.basic.class.ClassDetail', {
     extend: 'school.view.core.form.FormPanel',
     xtype: 'classdetail',
 

+ 4 - 4
frontend/pc-web/app/view/basic/ClassInfo.js → frontend/pc-web/app/view/basic/class/ClassInfo.js

@@ -1,12 +1,12 @@
 /**
  * 班级信息
  */
-Ext.define('school.view.basic.ClassInfo', {
+Ext.define('school.view.basic.class.ClassInfo', {
     extend: 'Ext.panel.Panel',
-    xtype: 'basic-classinfo',
+    xtype: 'basic-class-classinfo',
 
-    controller: 'basic-classinfo',
-    viewModel: 'basic-classinfo',
+    controller: 'basic-class-classinfo',
+    viewModel: 'basic-class-classinfo',
 
     layout: 'border',
 

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

@@ -1,6 +1,6 @@
-Ext.define('school.view.basic.ClassInfoController', {
+Ext.define('school.view.basic.class.ClassInfoController', {
     extend: 'Ext.app.ViewController',
-    alias: 'controller.basic-classinfo',
+    alias: 'controller.basic-class-classinfo',
 
     onItemMouseEnter: function(tree, record, item, index, e, eOpts)  {
         var icons = item.getElementsByClassName('action-icon');

+ 2 - 2
frontend/pc-web/app/view/basic/ClassInfoModel.js → frontend/pc-web/app/view/basic/class/ClassInfoModel.js

@@ -1,6 +1,6 @@
-Ext.define('school.view.basic.ClassInfoModel', {
+Ext.define('school.view.basic.class.ClassInfoModel', {
     extend: 'Ext.app.ViewModel',
-    alias: 'viewmodel.basic-classinfo',
+    alias: 'viewmodel.basic-class-classinfo',
 
     data: {
         toggleIconCls: 'sa-arrows-left',

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

@@ -1,7 +1,7 @@
 /**
  * 年级班级卡片列表
  */
-Ext.define('school.view.basic.ListCard', {
+Ext.define('school.view.basic.class.ListCard', {
     extend: 'Ext.view.View',
     xtype: 'listcard',
 
@@ -40,7 +40,7 @@ Ext.define('school.view.basic.ListCard', {
 
     showNode: function(node) {
         var me = this,
-        classInfo = me.up('basic-classinfo'),
+        classInfo = me.up('basic-class-classinfo'),
         viewModel = classInfo.getViewModel(),
         currentlist = viewModel.get('currentlist'),
         currentDetail = viewModel.get('currentDetail'),

+ 0 - 0
frontend/pc-web/app/view/basic/ListCard.scss → frontend/pc-web/app/view/basic/class/ListCard.scss


+ 2 - 2
frontend/pc-web/app/view/basic/ListCardController.js → frontend/pc-web/app/view/basic/class/ListCardController.js

@@ -1,4 +1,4 @@
-Ext.define('school.view.basic.ListCardController', {
+Ext.define('school.view.basic.class.ListCardController', {
     extend: 'Ext.app.ViewController',
     alias: 'controller.listcard',
 
@@ -14,7 +14,7 @@ Ext.define('school.view.basic.ListCardController', {
     cardItemClick: function(view, record, navItem, index, e, eOpts) {
         var me = this;
         var view = me.getView();
-        var classInfo = view.up('basic-classinfo');
+        var classInfo = view.up('basic-class-classinfo');
         var classInfoController = classInfo.getController();
         var refs = classInfo.getReferences();
         var treeList = refs.treelist;

+ 2 - 4
frontend/pc-web/app/view/basic/SchoolInfo.js → frontend/pc-web/app/view/basic/school/SchoolInfo.js

@@ -1,15 +1,13 @@
 /**
  * 学校信息
  */
-Ext.define('school.view.basic.SchoolInfo', {
+Ext.define('school.view.basic.school.SchoolInfo', {
     extend: 'school.view.core.form.FormPanel',
-    xtype: 'basic-schoolinfo',
+    xtype: 'basic-school-schoolinfo',
 
     // controller: 'purchase-purchase-formpanel',
     // viewModel: 'purchase-purchase-formpanel',
 
-    viewName: 'basic-schoolinfo',
-
     //字段属性
     _title: '学校信息',
     _idField: 'id',

+ 147 - 0
frontend/pc-web/app/view/basic/staff/StaffList.js

@@ -0,0 +1,147 @@
+/**
+ * 教职工信息
+ */
+Ext.define('school.view.basic.staff.StaffList', {
+    extend: 'school.view.core.base.BasePanel',
+    xtype: 'basic-staff-stafflist',
+
+    // dataUrl: '/api/sale/saledown/list',
+    initComponent: function() {
+        var me = this;
+        Ext.apply(this, {
+            searchField: [{
+                xtype: 'textfield',
+                name: 'code',
+                fieldLabel:'教职工号'
+            }, {
+                xtype: 'textfield',
+                name: 'name',
+                fieldLabel: '姓名'
+            }, {
+                xtype: 'textfield',
+                name: 'job',
+                fieldLabel: '职位'
+            }],
+        
+            caller: null,
+            _formXtype: null,
+            _title: null,
+            _deleteUrl: null,
+            _batchOpenUrl: null,
+            _batchCloseUrl: null,
+            _batchDeleteUrl: null,
+        
+            gridConfig: {
+                idField: null,
+                codeField: null,
+                statusCodeField: null,
+                dataUrl: me.dataUrl,
+                caller: null,
+                rootProperty: 'data.list',
+                totalProperty: 'data.total',
+                actionColumn: [],
+                selModel: {
+                    type: 'cellmodel'
+                },
+                data: [{
+
+                }],
+                columns : [{
+                    text: '工号',
+                    dataIndex: 'code',
+                    width: 150
+                }, {
+                    text: '绑定手机号',
+                    dataIndex: 'phone',
+                    width: 120
+                }, {
+                    text: '姓名',
+                    dataIndex: 'name',
+                    width: 120
+                }, {
+                    text: '职位',
+                    dataIndex: 'job',
+                    width: 120
+                }, {
+                    text: '是否开通',
+                    dataIndex: 'open'
+                }, {
+                    text: '状态',
+                    dataIndex: 'status'
+                }],
+                listeners: {
+                    itemclick: function(view, record, item, index, e, eOpts) {
+                        // saas.util.BaseUtil.openTab('sale-b2b-purchasedetail', '客户采购单', 'sale-b2b-purchasedetail'+record.id, {
+                        //     initId: record.get('id')
+                        // }); 
+                    }
+                }
+            },
+        });
+        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;
+     },
+});

+ 6 - 6
frontend/pc-web/resources/json/navigation.json

@@ -2,17 +2,17 @@
     "text": "基础资料",
     "iconCls": "x-sa sa-accountCenter",
     "items": [{
-        "id": "basic-schoolinfo",
+        "id": "basic-school-schoolinfo",
         "text": "学校信息",
-        "view": "basic-schoolinfo"
+        "view": "basic-school-schoolinfo"
     }, {
-        "id": "basic-classinfo",
+        "id": "basic-class-classinfo",
         "text": "班级组织",
-        "view": "basic-classinfo"
+        "view": "basic-class-classinfo"
     }, {
-        "id": "staff -info",
+        "id": "basic-staff-stafflist",
         "text": "教职工信息",
-        "view": "staff -info"
+        "view": "basic-staff-stafflist"
     }, {
         "id": "student-info",
         "text": "学生信息",