|
@@ -1,110 +0,0 @@
|
|
|
-/**
|
|
|
|
|
- * 校长信箱
|
|
|
|
|
- */
|
|
|
|
|
-Ext.define('school.view.interaction.mailbox.Mailbox', {
|
|
|
|
|
- extend: 'Ext.grid.Panel',
|
|
|
|
|
- xtype: 'interaction-mailbox-mailbox',
|
|
|
|
|
- // dataUrl: '/api/interact/timetable/list',
|
|
|
|
|
-
|
|
|
|
|
- controller: 'interaction-mailbox-mailbox',
|
|
|
|
|
-
|
|
|
|
|
- //字段属性
|
|
|
|
|
- _title: '校长信箱',
|
|
|
|
|
- _idField: 'id',
|
|
|
|
|
- _codeField: 'pu_code',
|
|
|
|
|
- _statusField: 'pu_status',
|
|
|
|
|
- _statusCodeField: 'pu_statuscode',
|
|
|
|
|
- _auditmanField: 'pu_auditman',
|
|
|
|
|
- _auditdateField: 'pu_auditdate',
|
|
|
|
|
- _relationColumn: 'pd_puid',
|
|
|
|
|
- _readUrl: '/api/purchase/purchase/read',
|
|
|
|
|
- _saveUrl: '/api/purchase/purchase/save',
|
|
|
|
|
- _auditUrl: '/api/purchase/purchase/audit',
|
|
|
|
|
- _unAuditUrl: '/api/purchase/purchase/unAudit',
|
|
|
|
|
- _deleteUrl: '/api/purchase/purchase/delete',
|
|
|
|
|
- _turnInUrl: '/api/purchase/purchase/turnProdin',
|
|
|
|
|
- initId: 0,
|
|
|
|
|
- initComponent: function() {
|
|
|
|
|
- Ext.apply(this, {
|
|
|
|
|
- // title: '校长信箱',
|
|
|
|
|
- store: Ext.create('Ext.data.Store', {
|
|
|
|
|
- fields:['code', 'content', 'Enclosure', 'time', 'name', 'Handle'],
|
|
|
|
|
- data:[
|
|
|
|
|
- {code:"U001", content:"孩子作业太少了,回家每天玩王者荣耀,希望学校老师布置作业多一点,让我孩子忙起来", Enclosure:'无', time:"01/10/2004 16:00", name:'张三', Handle:true},
|
|
|
|
|
- {code:"U002", content:"学校课本费收入明细未公开,希望课本费明细能够向我们家长公开", Enclosure:'有', time:"01/10/2004 16:00", name:'张三', Handle:false},
|
|
|
|
|
- {code:"U003", content:"觉得十分激烈的交锋了", Enclosure:'无', time:"01/10/2004 16:00", name:'张三', Handle:true},
|
|
|
|
|
- ]
|
|
|
|
|
- }),
|
|
|
|
|
- columns : [
|
|
|
|
|
- {text: '编号',dataIndex: 'code', flex: 0.1},
|
|
|
|
|
- {text: '内容',dataIndex: 'content', flex: 0.3},
|
|
|
|
|
- {text: '附件',dataIndex: 'Enclosure', flex: 0.1},
|
|
|
|
|
- {text: '日期',dataIndex: 'time',xtype: 'datecolumn',format:'Y-m-d H:i', flex: 0.2},
|
|
|
|
|
- {text: '提出人',dataIndex: 'name', flex: 0.1},
|
|
|
|
|
- {text: '处理', flex: 0.2, align:'center', dataIndex: 'Handle',
|
|
|
|
|
- renderer: function(val,meta,rec) {
|
|
|
|
|
- // 为元素生成唯一id
|
|
|
|
|
- var id = Ext.id();
|
|
|
|
|
- if (!rec.data.Handle) {
|
|
|
|
|
- return Ext.String.format('<div>已回复</div>');
|
|
|
|
|
- } else {
|
|
|
|
|
- Ext.defer(function() {
|
|
|
|
|
- Ext.widget('button', {
|
|
|
|
|
- renderTo: id,
|
|
|
|
|
- text: '回复',
|
|
|
|
|
- // handler: 'ReplyClick'//点击回复事件
|
|
|
|
|
- handler: function () {//点击回复事件
|
|
|
|
|
- Ext.MessageBox.show({
|
|
|
|
|
- title: '回复处理',
|
|
|
|
|
- msg: '回复对象:'+rec.data.code,
|
|
|
|
|
- width:500,
|
|
|
|
|
- height:600,
|
|
|
|
|
- buttons: Ext.MessageBox.OKCANCEL,
|
|
|
|
|
- multiline: true,
|
|
|
|
|
- scope: this,
|
|
|
|
|
- fn: function (btn,text) {//回调函数
|
|
|
|
|
- if (btn == 'ok') {
|
|
|
|
|
- alert('点击的按钮是:'+btn+'内容是:'+text);
|
|
|
|
|
- } else {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }, 50);
|
|
|
|
|
- return Ext.String.format('<div id="{0}"></div>', id);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
- listeners: {// 每一行添加点击事件
|
|
|
|
|
- 'rowclick': function(grid, rowIndex, e) {
|
|
|
|
|
- let data = rowIndex.data//获取点击行的数据
|
|
|
|
|
- // console.log(data);
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- tbar: ['->',{
|
|
|
|
|
- xtype: 'button',
|
|
|
|
|
- text: '导出',
|
|
|
|
|
- handler: 'exportClick'
|
|
|
|
|
- }, {
|
|
|
|
|
- xtype: 'button',
|
|
|
|
|
- text: '删除',
|
|
|
|
|
- handler: 'deleteClick'
|
|
|
|
|
- }, {
|
|
|
|
|
- xtype: 'button',
|
|
|
|
|
- text: '批量回复',
|
|
|
|
|
- handler: 'batchClick'
|
|
|
|
|
- }],
|
|
|
|
|
- multiSelect:true,//运行多选,默认是单选
|
|
|
|
|
- dockedItems :[{//分页组件
|
|
|
|
|
- xtype:'pagingtoolbar',//分页组件
|
|
|
|
|
- store:Ext.data.StoreManager.lookup('s_user'),//分页组件也需要获取到数据
|
|
|
|
|
- dock:'bottom',//定位到底部
|
|
|
|
|
- displayInfo:true//是否展示信息
|
|
|
|
|
- }],
|
|
|
|
|
- });
|
|
|
|
|
- this.callParent();
|
|
|
|
|
- },
|
|
|
|
|
-})
|
|
|