BN089-BS开发框架MVC4版/source20131023/Zephyr.Web/Areas/Mms/ViewModels/mms.lookupMaterial.js
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
$(function () {
using(['layout', 'datagrid', 'tree'], function () {
//获取window信息
var iframe = getThisIframe();
var thiswin = parent.$(iframe).parent();
var options = thiswin.window("options");
var param = options.paramater;
//初始化layout
var box = $("#layoutbox"), right = $('#right').layout();
box.width($(window).width()).height($(window).height()).layout();
$(window).resize(function () { box.width($(window).width()).height($(window).height()).layout('resize'); });
//调整layout时自动调整grid
var panels = $('#right').data('layout').panels;
panels.north.panel({
onResize: function (w, h) {
$('#list').datagrid('resize', { width: w, height: h - 38 });
}
});
panels.center.panel({
onResize: function (w, h) {
$('#selectlist').datagrid('resize', { width: w, height: h - 36 });
}
});
//设置grid列
var cols = [[
{ title: '材料编码', field: 'MaterialCode', sortable: true, align: 'left', width: 100},
{ title: '材料名称', field: 'MaterialName', sortable: true, align: 'left', width: 120 },
{ title: '规格型号', field: 'Model', sortable: true, align: 'left', width: 80},
//{ title: '材质', field: 'Material', sortable: true, align: 'center', width: 60 },
{ title: '剩余数量', field: 'RemainNum', sortable: true, align: 'right', width: 60 }
]];
if (param._xml == "mms.material_send" || param._xml == "mms.material_dict")
cols[0].pop();
if (param._xml == "mms.material_check") {
cols[0][3] = { title: '账面数量', field: 'BookNum', sortable: true, align: 'right', width: 60 };
}
if (param._xml == "mms.material_batches" || param._xml == "mms.material_send" || param._xml == "mms.material_rentin") {
cols[0].push({ title: '来源类型', field: 'SrcBillType', sortable: true, align: 'left', width: 60 ,formatter:mms.com.formatSrcBillType});
cols[0].push({ title: '来源单号', field: 'SrcBillNo', sortable: true, align: 'left', width: 85 });
}
//定义返回值
var selected = { total: 0, rows: [] };
var grid1 = $('#list');
var grid2 = $('#selectlist');
var defaults = {
iconCls: 'icon icon-list',
nowrap: true, //折行
rownumbers: true, //行号
striped: true, //隔行变色
singleSelect: true, //单选
remoteSort: true, //后台排序
pagination: false, //翻页
后面还有 111 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
