|
|
@@ -0,0 +1,85 @@
|
|
|
+/**
|
|
|
+ * 校长信箱
|
|
|
+ */
|
|
|
+Ext.define('school.view.interaction.mailbox.mailbox', {
|
|
|
+ // extend: 'school.view.core.base.BasePanel',
|
|
|
+ extend: 'Ext.grid.Panel',
|
|
|
+ xtype: 'interaction-mailbox-mailbox',
|
|
|
+ // dataUrl: '/api/interact/timetable/list',
|
|
|
+ //字段属性
|
|
|
+ _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:"U001", content:"学校课本费收入明细未公开,希望课本费明细能够向我们家长公开", Enclosure:'有', time:"01/10/2004 16:00", name:'张三', Handle:'false'},
|
|
|
+ {code:"U001", 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 == 'false') {
|
|
|
+ return Ext.String.format('<div>已回复</div>');
|
|
|
+ } else if(rec.data.Handle == 'true'){
|
|
|
+ Ext.defer(function() {
|
|
|
+ Ext.widget('button', {
|
|
|
+ renderTo: id,
|
|
|
+ text: '回复',
|
|
|
+ handler: function() {//点击回复事件
|
|
|
+ Ext.MessageBox.show({
|
|
|
+ title: '回复处理',
|
|
|
+ msg: '回复对象:'+rec.data.code,
|
|
|
+ width:500,
|
|
|
+ height:600,
|
|
|
+ bbar: Ext.MessageBox.OKCANCEL,
|
|
|
+ multiline: true,
|
|
|
+ scope: this,
|
|
|
+ fn: this.showResultText,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }, 50);
|
|
|
+ return Ext.String.format('<div id="{0}"></div>', id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ tbar: ['->',{
|
|
|
+ xtype: 'button',
|
|
|
+ text: '导出'
|
|
|
+ }, {
|
|
|
+ xtype: 'button',
|
|
|
+ text: '删除'
|
|
|
+ }, {
|
|
|
+ xtype: 'button',
|
|
|
+ text: '批量回复'
|
|
|
+ }],
|
|
|
+ });
|
|
|
+ this.callParent();
|
|
|
+ },
|
|
|
+})
|