var Book = Ext.data.Record.create([
{name : 'bookId',mapping : 'bookId',type : 'int'},
{name : 'bookName', mapping : 'bookName',type : 'string'},
{name : 'author',mapping : 'author',type : 'string'},
{name : 'press',mapping : 'press',type : 'string'},
{name : 'price',mapping : 'price',type : 'string'},
{name : 'editionNo',mapping : 'editionNo',type : 'string'},
{name : 'isbn', mapping : 'isbn',type : 'string'},
{name : 'categoryId',mapping : 'categoryId',type : 'int'},
{name : 'categoryName', mapping : 'categoryName',type : 'string'},
{name : 'wordCount',mapping : 'wordCount',type : 'string'},
{name : 'pageCount',mapping : 'pageCount',type : 'string'},
{name : 'bookSize', mapping : 'bookSize',type : 'string'},
{name : 'paper',mapping : 'paper',type : 'string'},
{name : 'pack', mapping : 'pack',type : 'string'},
{name : 'imageUrl', mapping : 'imageUrl',type : 'string'},
{name : 'address',mapping : 'address',type : 'string'},
{name : 'editorRecommend',mapping : 'editorRecommend', type : 'string'},
{name : 'description',mapping : 'description',type : 'string'},
{name : 'authorDesc',mapping : 'authorDesc',type : 'string'},
{name : 'state',mapping : 'state',type : 'int'}
]);
var categoryId;
var ds_category_select = new Ext.data.Store({
url : 'findAllCategoryName.action',
reader : new Ext.data.JsonReader({
root : 'root'
}, [{name : 'categoryId',type : 'int'},
{name : 'categoryName',type : 'string'}
])
});
var expander = new Ext.grid.RowExpander({
tpl : new Ext.Template('<p><table width="480" style="padding-left:20px" border="0" cellspacing="0" cellpadding="0">'
+ '<tr><td width="133" valign="top"><img src="{imageUrl}" onerror=\'this.src="/bmsh/images/nopic.jpg"\'/></td>'
+ '<td width="476" colspan="4"><table width="100%" border="0" cellspacing="6" cellpadding="4">'
+ '<tr><td width="19%" align="right" nowrap="nowrap">作 者:</td>'
+ '<td width="38%" nowrap="nowrap"> {author}</td><td width="15%" align="right" nowrap="nowrap"> </td>'
+ '<td width="28%" nowrap="nowrap"> </td></tr><tr><td align="right" nowrap="nowrap">出 版 社:</td>'
+ '<td nowrap="nowrap">{press}</td><td align="right" nowrap="nowrap"> </td><td nowrap="nowrap"> </td></tr><tr>'
+ '<td align="right" nowrap="nowrap">版 次:</td>'
+ '<td nowrap="nowrap">{editionNo}</td><td align="right" nowrap="nowrap">页 数:</td>'
+ '<td nowrap="nowrap">{pageCount}</td></tr><tr><td align="right" nowrap="nowrap">I S B N:</td>'
+ '<td nowrap="nowrap">{isbn}</td><td align="right" nowrap="nowrap">开 本:</td>'
+ '<td nowrap="nowrap">{bookSize}</td></tr><tr><td align="right" nowrap="nowrap">所属类别:</td>'
+ '<td nowrap="nowrap">{categoryName}</td><td align="right" nowrap="nowrap">纸 张:</td>'
+ '<td nowrap="nowrap">{paper}</td></tr><tr><td align="right" nowrap="nowrap">藏书地址:</td>'
+ '<td nowrap="nowrap">{address}</td><td align="right" nowrap="nowrap">包 装:</td>'
+ '<td nowrap="nowrap">{pack}</td></tr><tr><td align="right" nowrap="nowrap">定 价:</td>'
+ '<td nowrap="nowrap"><strong>¥</strong>{price}</td><td align="right" nowrap="nowrap">字 数:</td>'
+ '<td nowrap="nowrap">{wordCount}</td></tr></table></td></tr><tr><td colspan="5" valign="top"> </td></tr><tr>'
+ '<td colspan="5" valign="top"><h4>编辑推荐</h4></td></tr><tr><td colspan="5" valign="top">{editorRecommend}</td>'
+ '</tr><tr><td colspan="5" valign="top"> </td></tr><tr><td colspan="5" valign="top"><h4>内容简介</h4></td>'
+ '</tr><tr><td colspan="5" valign="top">{description}</td></tr><tr>'
+ '<td colspan="5" valign="top"> </td></tr><tr><td colspan="5" valign="top"><h4>作者简介</h4></td></tr><tr>'
+ '<td colspan="5" valign="top">{authorDesc}</td></tr></table></p>')
});
var cm_book = new Ext.grid.ColumnModel([expander,
{header : '图书名称', width : 120,dataIndex : 'bookName', sortable : true},
{header : '作者',width : 40, dataIndex : 'author',sortable : true},
{header : '定价',width : 30, dataIndex : 'price',sortable : true},
{header : '所属分类', width : 90, sortable : true,dataIndex : 'categoryName'},
{header : '当前读者',width : 40,dataIndex : 'currentReader',menuDisabled : true},
{header : '当前状态',width : 40,dataIndex : 'state',renderer : function(v) {return v == 0 ? '已借出' : '未借出'}, menuDisabled : true},
{header : '藏书地址', width : 90, dataIndex : 'address',id : 'address',sortable : true}]
);
var address,_editAddress;// 藏书地址
var cbb_company_for_book_update = new Ext.form.ComboBox({
name : '_companyName',
width : 120,
valueField : 'companyId',
displayField : 'companyName',
editable : false,
selectOnFocus : true,
mode : 'remote',
store : ds_company_select,
triggerAction : 'all',
loadingText : '加载中...',
fieldLabel : '所属分公司',
listeners : {
'select' : function() {
cbb_dept_for_book_update.reset();
ds_dept_select.baseParams.companyId = cbb_company_for_book_update.getValue();
ds_dept_select.reload();
_editAddress = cbb_company_for_book_update.getEl().dom.value;
bookEditForm.getForm().findField('address').setValue(_editAddress);
}
}
});
var cbb_dept_for_book_update = new Ext.form.ComboBox({
name : '_deptNo',
editable : false,
selectOnFocus : true,
width : 100,
displayField : 'deptName',
mode : 'remote',
store : ds_dept_select,
triggerAction : 'all',
loadingText : '加载中...',
fieldLabel : '所属部门',
listeners : {
'beforequery' : function(queryEvent) {
if (!cbb_company_for_book_update.getValue()) {
queryEvent.cancel = true;
}
},
'select' : function(combo, record, index) {
_editAddress += cbb_dept_for_book_update.getValue();
bookEditForm.getForm().findField('address').setValue(_editAddress);
}
}
});
var cbb_company_for_book = new Ext.form.ComboBox({
name : 'companyName',
width : 120,
valueField : 'companyId',
displayField : 'companyName',
editable : false,
selectOnFocus : true,
mode : 'remote',
store : ds_company_select,
triggerAction : 'all',
loadingText : '加载中...',
fieldLabel : '所属分公司',
listeners : {
'select' : function() {
cbb_dept_for_book.reset();
ds_dept_select.baseParams.companyId = cbb_company_for_book.getValue();
ds_dept_select.reload();
address = cbb_company_for_book.getEl().dom.value;
bookForm.getForm().findField('book.address').setValue(address);
}
}
});
var cbb_dept_for_book = new Ext.form.ComboBox({
name : 'deptNo',
editable : false,
selectOnFocus : true,
width : 100,
displayField : 'deptName',
mode : 'remote',
store : ds_dept_select,
triggerAction : 'all',
loadingText : '加载中...',
fieldLabel : '所属部门',
listeners : {
'beforequery' : function(queryEvent) {
if (!cbb_company_for_book.getValue()) {
queryEvent.cancel = true;
}
},
'select' : function(combo, record, index) {
address += cbb_dept_for_book.getValue();
bookForm.getForm().findField('book.address').setValue(address);
}
}
});
var bookEditForm = new Ext.FormPanel({
url : 'updateBook.action',
labelAlign : 'right',
labelWidth : 70,
bodyStyle : 'padding:5px',
border : false,
fileUpload : true,
baseCls : 'x-plain',
items : [{
layout : 'column',
border : false,
baseCls : 'x-plain',
items : [{
columnWidth : .5,
layout : 'form',
baseCls : 'x-plain',
没有合适的资源?快使用搜索试试~ 我知道了~
EXTJS图书管理系统页面(JAVA)
共14个文件
js:11个
json:3个
需积分: 10 11 下载量 62 浏览量
2011-07-15
15:48:49
上传
评论
收藏 31KB RAR 举报
温馨提示
EXJ JS源码 图书管理系统的页面开发 EXJ JS源码 图书管理系统的页面开发 EXJ JS源码 图书管理系统的页面开发 EXJ JS源码 图书管理系统的页面开发
资源推荐
资源详情
资源评论
收起资源包目录
js.rar (14个子文件)
js
duty.js 5KB
category.js 10KB
company.js 8KB
tree-data-manager.json 769B
tree-data-simple.json 769B
tree-data-simple - 复制.json 151B
region.js 10KB
dept.js 10KB
main.js 4KB
subject.js 5KB
RowExpander.js 4KB
user.js 17KB
book.js 32KB
simple_book.js 2KB
共 14 条
- 1
资源评论
tufef
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功