升级easyUI到1.9.4版本
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="stylesheet" type="text/css" href="/js/easyui-1.3.5/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/js/easyui-1.3.5/themes/icon.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/js/easyui/themes/default/easyui.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="/js/easyui/themes/icon.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="/js/easyui/jquery.easyui.min.js"></script>
|
||||
<script type="text/javascript" src="/js/easyui/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -21,7 +21,7 @@
|
||||
<tr>
|
||||
<td>计量单位:</td>
|
||||
<td>
|
||||
<input type="text" name="searchName" id="searchName" style="width:100px;"/>
|
||||
<input type="text" name="searchName" id="searchName" class="easyui-textbox" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
@@ -33,26 +33,26 @@
|
||||
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<div id="unitDlg" class="easyui-dialog" style="width:380px;padding:10px 20px"
|
||||
<div id="unitDlg" class="easyui-dialog" style="width:450px;padding:10px 20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="unitFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>基本单位</td>
|
||||
<td style="padding:5px">
|
||||
<input name="basicName" id="basicName" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[1,10]'" style="width: 100px;height: 20px"/>
|
||||
<input name="basicName" id="basicName" class="easyui-textbox"
|
||||
data-options="required:true,validType:'length[1,10]'" style="width: 100px;"/>
|
||||
基本单位应为最小度量单位
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>副单位</td>
|
||||
<td style="padding:5px">
|
||||
<input name="otherName" id="otherName" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[1,5]'" style="width: 100px;height: 20px"/>
|
||||
<input name="otherName" id="otherName" class="easyui-textbox"
|
||||
data-options="required:true,validType:'length[1,5]'" style="width: 100px;"/>
|
||||
=
|
||||
<input name="otherNum" id="otherNum" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[1,5]'" style="width: 50px;height: 20px"/>
|
||||
<input name="otherNum" id="otherNum" class="easyui-textbox"
|
||||
data-options="required:true,validType:'length[1,5]'" style="width: 50px;"/>
|
||||
<span id="unitName"></span>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -110,11 +110,10 @@
|
||||
{field: 'id', width: 35, align: "center", checkbox: true},
|
||||
{
|
||||
title: '操作', field: 'op', align: "center", width: 60,
|
||||
formatter: function (value, rec) {
|
||||
formatter: function (value, rec, index) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.uname;
|
||||
str += '<img title="编辑" src="/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + rowInfo + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
|
||||
str += '<img title="编辑" src="/js/easyui/themes/icons/pencil.png" style="cursor: pointer;" onclick="editUnit(\'' + index + '\');"/> ';
|
||||
str += '<img title="删除" src="/js/easyui/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteUnit(' + rec.id + ');"/>';
|
||||
return str;
|
||||
}
|
||||
},
|
||||
@@ -322,7 +321,7 @@
|
||||
if(checkPower()){
|
||||
return;
|
||||
}
|
||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加计量单位');
|
||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/edit_add.png"/> 增加计量单位');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
$('#unitFM').form('clear');
|
||||
$("#name").focus();
|
||||
@@ -368,25 +367,25 @@
|
||||
});
|
||||
|
||||
//编辑信息
|
||||
function editUnit(unitTotalInfo) {
|
||||
var unitInfo = unitTotalInfo.split("AaBb");
|
||||
function editUnit(index) {
|
||||
var rowsdata = $("#tableData").datagrid("getRows")[index];
|
||||
|
||||
oldUnit = unitInfo[1];
|
||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 编辑计量单位');
|
||||
oldUnit = rowsdata.uname;
|
||||
$('#unitDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui/themes/icons/pencil.png"/> 编辑计量单位');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
unitID = unitInfo[0];
|
||||
unitID = rowsdata.id;
|
||||
//焦点在名称输入框==定焦在输入文字后面
|
||||
var name = unitInfo[1];
|
||||
var name = rowsdata.uname;
|
||||
var basicName = name.substring(0, name.indexOf(",")); //基础单位
|
||||
$("#basicName").val(basicName);
|
||||
$("#basicName").textbox("setValue", basicName);
|
||||
var otherItem = name.substring(name.indexOf(",") + 1);
|
||||
var otherName = otherItem.substring(0, otherItem.indexOf("("));
|
||||
$("#otherName").val(otherName);
|
||||
$("#otherName").textbox("setValue", otherName);
|
||||
var lastNum = otherItem.substring(otherItem.indexOf(":") + 1);
|
||||
lastNum = lastNum.replace(")", "");
|
||||
$("#otherNum").val(lastNum);
|
||||
$("#otherNum").textbox("setValue", lastNum);
|
||||
$("#unitName").text(basicName);
|
||||
url = '/unit/update?id=' + unitInfo[0];
|
||||
url = '/unit/update?id=' + rowsdata.id;
|
||||
}
|
||||
|
||||
//检查名称是否存在 ++ 重名无法提示问题需要跟进
|
||||
@@ -472,7 +471,7 @@
|
||||
//重置按钮
|
||||
$("#searchResetBtn").unbind().bind({
|
||||
click: function () {
|
||||
$("#searchName").val("");
|
||||
$("#searchName").textbox("clear");
|
||||
//加载完以后重新初始化
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user