Commit 0c917016 authored by 季圣华's avatar 季圣华
Browse files

no commit message

parent 7907b729
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#tablePanel .action-show { #tablePanel .action-show {
background: url('../js/easyui-1.3.5/themes/icons/list.png') no-repeat left center; background: url('../js/easyui-1.3.5/themes/icons/list.png') no-repeat left center;
padding: 0 8px 0 20px;
} }
#tablePanel .action-edit { #tablePanel .action-edit {
...@@ -24,28 +23,3 @@ ...@@ -24,28 +23,3 @@
padding-left: 20px; padding-left: 20px;
} }
#depotHeadFM .price-list {
width:110px;
float:left;
position:absolute;
border:1px solid #95B8E7;
}
#depotHeadFM .price-list ul{
padding: 0px;
margin: 0px;
background-color: #fff;
}
#depotHeadFM .price-list ul li{
list-style: none;
padding: 3px;
}
#depotHeadFM .price-list ul li:hover{
background-color: #e9f1fc;
}
/*价格*/
#depotHeadFM .price-list {
width:110px;
float:left;
position:absolute;
border:1px solid #95B8E7;
}
#depotHeadFM .price-list ul{
padding: 0px;
margin: 0px;
background-color: #fff;
}
#depotHeadFM .price-list ul li{
list-style: none;
padding: 3px;
}
#depotHeadFM .price-list ul li:hover{
background-color: #e9f1fc;
}
/*零售*/
#depotHeadFM .retail-amount tr td{
padding: 5px;
}
#depotHeadFM .retail-amount tr td input{
width: 225px;
height: 30px;
line-height: 30px;
font-size: 24px;
border-color: #878787;
border-style: solid;
border-top-width: 0px;
border-right-width: 0px;
border-bottom-width: 1px;
border-left-width: 0px
}
#depotHeadFM .retail-amount .change-amount{
color:purple;
}
#depotHeadFM .retail-amount .get-amount{
color:red;
}
#depotHeadFM .retail-amount .back-amount{
color: green;
text-align: right;
}
#depotHeadDlgShow .retail-amount-show tr td{
padding: 5px;
}
#depotHeadDlgShow .retail-amount-show .change-amount-show{
color:purple;
font-size: 24px;
}
#depotHeadDlgShow .retail-amount-show .get-amount-show{
color:red;
font-size: 24px;
}
#depotHeadDlgShow .retail-amount-show .back-amount-show{
color: green;
text-align: right;
font-size: 24px;
}
/*计量单位*/
#depotHeadFM .unit-list {
width:68px;
float:left;
position:absolute;
border:1px solid #95B8E7;
}
#depotHeadFM .unit-list ul{
padding: 0px;
margin: 0px;
background-color: #fff;
}
#depotHeadFM .unit-list ul li{
list-style: none;
padding: 3px;
}
#depotHeadFM .unit-list ul li:hover{
background-color: #e9f1fc;
}
#depotHeadDlg .org-list{
float: left;
width:135px;
}
#depotHeadDlg .add-org-btn{
float: left;
width:30px;
padding: 2px;
}
\ No newline at end of file
.first-select-unit{
display: none;
}
.price-list {
display: none;
}
.price-list input{
width: 120px;
}
...@@ -38,7 +38,7 @@ var windowTemp = template( ...@@ -38,7 +38,7 @@ var windowTemp = template(
'<a class="ha-revert" btn="revert" href="javascript:;" title="还原" <% if(!isopenmax){ %>style="display:none"<% } %>><b class="revert-b"></b><b class="revert-t"></b></a>'+ '<a class="ha-revert" btn="revert" href="javascript:;" title="还原" <% if(!isopenmax){ %>style="display:none"<% } %>><b class="revert-b"></b><b class="revert-t"></b></a>'+
'<% } %>'+ '<% } %>'+
'<% if(istitlebarFullscreen){ %>'+ '<% if(istitlebarFullscreen){ %>'+
'<a class="ha-fullscreen" btn="fullscreen" href="javascript:;" title="全屏">+</a>'+ '<a class="ha-fullscreen" btn="fullscreen" href="javascript:;" title="全屏" style="display: none;">+</a>'+
'<% } %>'+ '<% } %>'+
'<a class="ha-close" btn="close" href="javascript:;" title="关闭">×</a>'+ '<a class="ha-close" btn="close" href="javascript:;" title="关闭">×</a>'+
'</div>'+ '</div>'+
......
...@@ -84,6 +84,29 @@ function getUrlParam(name) { ...@@ -84,6 +84,29 @@ function getUrlParam(name) {
if (r != null) return unescape(r[2]); return null; //返回参数值 if (r != null) return unescape(r[2]); return null; //返回参数值
} }
/**
* 获取按钮的权限
*/
function getBtnStr() {
var funId = window.parent.window.funId; //功能id
var btnStrList = window.parent.window.winBtnStrList; //按钮功能列表 JSON字符串
var btnEnableList =""; //按钮列表
if(funId && btnStrList) {
btnStrList = JSON.parse(btnStrList);
for(var i=0; i<btnStrList.length; i++){
if(btnStrList[i].funId ==funId){
if(btnStrList[i].btnStr) {
btnEnableList = btnEnableList + btnStrList[i].btnStr + ",";
}
}
}
if(btnEnableList) {
btnEnableList = btnEnableList.substring(0,btnEnableList.length-1);
}
}
return btnEnableList;
}
/** /**
* js获取当前时间, 格式“yyyy-MM-dd HH:MM:SS” * js获取当前时间, 格式“yyyy-MM-dd HH:MM:SS”
*/ */
...@@ -93,15 +116,27 @@ function getNowFormatDateTime() { ...@@ -93,15 +116,27 @@ function getNowFormatDateTime() {
var seperator2 = ":"; var seperator2 = ":";
var month = date.getMonth() + 1; var month = date.getMonth() + 1;
var strDate = date.getDate(); var strDate = date.getDate();
var strHours = date.getHours();
var strMinutes = date.getMinutes();
var strSeconds = date.getSeconds();
if (month >= 1 && month <= 9) { if (month >= 1 && month <= 9) {
month = "0" + month; month = "0" + month;
} }
if (strDate >= 0 && strDate <= 9) { if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate; strDate = "0" + strDate;
} }
if (strHours >= 0 && strHours <= 9) {
strHours = "0" + strHours;
}
if (strMinutes >= 0 && strMinutes <= 9) {
strMinutes = "0" + strMinutes;
}
if (strSeconds >= 0 && strSeconds <= 9) {
strSeconds = "0" + strSeconds;
}
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
+ " " + date.getHours() + seperator2 + date.getMinutes() + " " + strHours + seperator2 + strMinutes
+ seperator2 + date.getSeconds(); + seperator2 + strSeconds;
return currentdate; return currentdate;
} }
...@@ -138,6 +173,23 @@ function getNowFormatDate() { ...@@ -138,6 +173,23 @@ function getNowFormatDate() {
return currentdate; return currentdate;
} }
/**
* js获取当前时间, 格式“yyyyMMdd”
*/
function getNowFormatDateTwo() {
var date = new Date();
var month = date.getMonth() + 1;
var strDate = date.getDate();
if (month >= 1 && month <= 9) {
month = "0" + month;
}
if (strDate >= 0 && strDate <= 9) {
strDate = "0" + strDate;
}
var currentdate = date.getFullYear() + month + strDate;
return currentdate;
}
/** /**
* js根据时间生成编号, 格式“yyyyMMddHHMMSS” * js根据时间生成编号, 格式“yyyyMMddHHMMSS”
*/ */
...@@ -156,4 +208,8 @@ function getNowFormatDateNum() { ...@@ -156,4 +208,8 @@ function getNowFormatDateNum() {
var currentdate = date.getFullYear() + month + strDate + date.getHours() var currentdate = date.getFullYear() + month + strDate + date.getHours()
+ date.getMinutes() + date.getSeconds(); + date.getMinutes() + date.getSeconds();
return currentdate; return currentdate;
}
function encode(name){
return encodeURI(encodeURI(name));
} }
\ No newline at end of file
...@@ -171,9 +171,9 @@ function tabCloseEven() { ...@@ -171,9 +171,9 @@ function tabCloseEven() {
return false; return false;
}); });
//退出 //显示版权信息
$("#mm-exit").click(function () { $("#mm-version").click(function () {
$('#mm').menu('hide'); window.open("https://gitee.com/jishenghua/JSH_ERP");
}) })
} }
......
...@@ -55,8 +55,6 @@ ...@@ -55,8 +55,6 @@
.icon-filter{ .icon-filter{
background:url('icons/filter.png') no-repeat center center; background:url('icons/filter.png') no-repeat center center;
} }
.icon-mini-add{ .icon-mini-add{
background:url('icons/mini_add.png') no-repeat center center; background:url('icons/mini_add.png') no-repeat center center;
} }
...@@ -92,4 +90,10 @@ ...@@ -92,4 +90,10 @@
} }
.icon-excel{ .icon-excel{
background:url('icons/receipt-excel.png') no-repeat center center; background:url('icons/receipt-excel.png') no-repeat center center;
}
.icon-excel-new{
background:url('icons/excel1.png') no-repeat center center;
}
.icon-page-excel{
background:url('icons/page_excel.png') no-repeat center center;
} }
\ No newline at end of file
...@@ -221,28 +221,27 @@ ...@@ -221,28 +221,27 @@
pageSize: 5, pageSize: 5,
pageList: initPageNum, pageList: initPageNum,
columns:[[ columns:[[
{ field: 'Id',width:35,align:"center",checkbox:true}, { field: 'Id',width:35,align:"center",checkbox:true},
{field: 'OrganId',width:5, hidden:true}, { title: '操作',field: 'op',align:"center",width:90,formatter:function(value,rec) {
{ title: '单据编号',field: 'BillNo',width:140}, var str = '';
{ title: '单据时间 ',field: 'BillTime',width:100}, var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark
{ title: '合计',field: 'TotalPrice',width:80}, + 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName
{ title: '备注',field: 'Remark',width:100}, + 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount + 'AaBb' + rec.TotalPrice;
{ title: '操作',field: 'op',align:"center",width:180,formatter:function(value,rec) if(1 == value)
{ {
var str = ''; var orgId = rec.OrganId ? rec.OrganId : 0;
var rowInfo = rec.Id + 'AaBb' + rec.BillNo+ 'AaBb' + rec.BillTime+ 'AaBb' + rec.Remark str += '<img title="查看" src=' + path + '"/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountHead(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
+ 'AaBb' + rec.AccountId+ 'AaBb' + rec.AccountName + 'AaBb' + rec.OrganId + 'AaBb' + rec.OrganName str += '<img title="编辑" src=' + path + '"/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editAccountHead(\'' + rowInfo + '\''+',' + rec.Status + ');"/>&nbsp;&nbsp;&nbsp;';
+ 'AaBb' + rec.HandsPersonId + 'AaBb' + rec.HandsPersonName + 'AaBb' + rec.ChangeAmount + 'AaBb' + rec.TotalPrice; str += '<img title="删除" src=' + path + '"/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteAccountHead('+ rec.Id +',' + orgId +',' + rec.TotalPrice + ');"/>';
if(1 == value) }
{ return str;
var orgId = rec.OrganId ? rec.OrganId : 0;
str += '<a onclick="showAccountHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)"><span class="action-show">查看</span></a>';
str += '<a onclick="editAccountHead(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)"><span class="action-edit">编辑</span></a>';
str += '<a onclick="deleteAccountHead('+ rec.Id +',' + orgId +',' + rec.TotalPrice +');" style="text-decoration:none;color:black;" href="javascript:void(0)"><span class="action-delete">删除</span></a>';
} }
return str; },
} { field: 'OrganId',width:5, hidden:true},
} { title: '单据编号',field: 'BillNo',width:140},
{ title: '单据时间 ',field: 'BillTime',width:100},
{ title: '合计',field: 'TotalPrice',width:80},
{ title: '备注',field: 'Remark',width:100}
]], ]],
toolbar:[ toolbar:[
{ {
......
[
{
"id": 1,
"text": "导入导出"
},
{
"id": 2,
"text": "启用禁用"
},
{
"id": 3,
"text": "审核反审核"
},
{
"id": 4,
"text": "打印"
},
{
"id": 5,
"text": "作废"
}
]
\ No newline at end of file
This diff is collapsed.
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/outlook.js"></script> <script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/outlook.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script> <script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function NewTab(name, url) { function NewTab(name, url, funId) {
window.funId = funId;
addTab(name, url, ''); addTab(name, url, '');
} }
</script> </script>
...@@ -39,6 +40,7 @@ var kid=null; ...@@ -39,6 +40,7 @@ var kid=null;
var lei=null; var lei=null;
var last=""; var last="";
var functions=""; var functions="";
var btnStrList = []; //按钮权限列表
//初始化界面 //初始化界面
$(function() $(function()
...@@ -86,26 +88,31 @@ function initSystemData(kid,type) ...@@ -86,26 +88,31 @@ function initSystemData(kid,type)
} }
//初始化页面选项卡 //初始化页面选项卡
function initSelectInfo(lei) function initSelectInfo(lei) {
{ if(userBusinessList !=null) {
if(userBusinessList.length>0) {
if(userBusinessList !=null)
{
if(userBusinessList.length>0)
{
options =userBusinessList[0].value; options =userBusinessList[0].value;
if(options!="") if(options!="") {
{
options=options.substring(1,options.length-1); options=options.substring(1,options.length-1);
} }
if(lei==1) //app内列表赋值
{ if(lei==1) {
last+=options+']['; last+=options+'][';
} }
else if(lei==2) //功能菜单列表
{ else if(lei==2) {
functions+=options+']['; functions+=options+'][';
} }
//按钮权限列表
else if(lei==3) {
var btnStr =userBusinessList[0].btnStr;
if(btnStr!=null){
btnStr = JSON.parse(btnStr);
for(var j=0; j<btnStr.length; j++){
btnStrList.push(btnStr[j]);
}
}
}
} }
} }
} }
...@@ -113,41 +120,42 @@ function initSelectInfo(lei) ...@@ -113,41 +120,42 @@ function initSelectInfo(lei)
//初始化页面 //初始化页面
function initSelect() function initSelect()
{ {
var arr = options.split(']['); var arr = options.split('][');
for(var i in arr){ for(var i in arr){
initSystemData(arr[i],'RoleAPP'); //根据角色找app
initSystemData(arr[i],'RoleAPP'); //根据角色找app initSelectInfo(1);//app内列表赋值
initSelectInfo(1);
initSystemData(arr[i],'RoleFunctions'); //根据角色找functions
initSystemData(arr[i],'RoleFunctions'); //根据角色找functions initSelectInfo(2); //功能菜单列表
initSelectInfo(2); initSelectInfo(3); //查询角色对应的按钮权限
} }
if(last!="") if(last!="")
{ {
last="["+last.substring(0,last.length-1); last="["+last.substring(0,last.length-1);
//alert(last); //alert(last);
if(last.indexOf("["+pageid+"]")!=-1) if(last.indexOf("["+pageid+"]")!=-1)
{ {
//alert("存在"); //alert("存在");
$("#west").show(); $("#west").show();
$("#mainPanle").show(); $("#mainPanle").show();
$("#mm").show(); $("#mm").show();
} }
else else
{ {
//alert("不存在"); //alert("不存在");
$("div").remove(); $("div").remove();
$("<div style='width:100%;text-align:center;padding-top:20px'><b>抱歉,您没有该权限!</b></div>").appendTo("body"); $("<div style='width:100%;text-align:center;padding-top:20px'><b>抱歉,您没有该权限!</b></div>").appendTo("body");
} }
}
} if(functions!="")
if(functions!="") {
{ functions="["+functions.substring(0,functions.length-1);
functions="["+functions.substring(0,functions.length-1); //alert(functions);
//alert(functions); }
} if(btnStrList.length>0){
window.winBtnStrList = JSON.stringify(btnStrList); //将按钮功能列表存为全局变量
}
} }
//测试自定义hql //测试自定义hql
...@@ -238,8 +246,8 @@ function ceshi() ...@@ -238,8 +246,8 @@ function ceshi()
</div> </div>
<div class="menu-sep"> <div class="menu-sep">
</div> </div>
<div id="mm-exit"> <div id="mm-version">
退出 jshERP官网
</div> </div>
</div> </div>
</body> </body>
......
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
<html>
<head>
<title>客户信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/manage/supplier.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<td>
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>手机号码:</td>
<td>
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>联系电话:</td>
<td>
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td id="searchDescLabel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<td>
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</table>
</div>
<!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="客户信息列表" iconCls="icon-list" collapsible="true" closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<form id="supplierFM">
<table>
<tr>
<td style="width: 80px;height: 20px">名称</td>
<td style="width: 180px;padding:1px">
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
</td>
<td style="width: 60px;height: 20px">联系人</td>
<td style="width:180px;padding:1px;">
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>手机号码</td>
<td style="padding:1px;">
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>电子邮箱</td>
<td style="padding:1px">
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>联系电话</td>
<td style="padding:1px;">
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>传真</td>
<td style="padding:1px">
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>期初应收</td>
<td style="padding:1px">
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
</td>
<td>期初应付</td>
<td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
</td>
</tr>
<tr>
<td>累计应收</td>
<td style="padding:1px">
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
</td>
<td>累计应付</td>
<td style="padding:1px">
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
</td>
</tr>
<tr>
<td>纳税人识别号</td>
<td style="padding:1px">
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>税率</td>
<td style="padding:1px">
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>开户行</td>
<td style="padding:1px">
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>账号</td>
<td style="padding:1px">
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>地址</td>
<td style="padding:1px" colspan="3">
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</td>
</tr>
<tr>
<td>备注</td>
<td style="padding:1px" colspan="3">
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
<!-- 导入excel表格 -->
<div id="importExcelDlg" style="padding:10px 20px">
<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/supplier/importExcelCustomer.action">
<div class="fitem" style="padding:5px">
<label>文件名称&nbsp;&nbsp;</label>
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
</div>
<div class="fitem" style="padding:5px">
<label><b>导入注意</b>&nbsp;&nbsp;</label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
</div>
<div class="fitem" style="padding:5px;display: none;">
<label>是否审查&nbsp;&nbsp;</label>
<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px">
<option value="0"></option>
<option value="1" selected="selected"></option>
</select>
</div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<div id="dlg-buttons5">
<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -2,13 +2,12 @@ ...@@ -2,13 +2,12 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<% <%
String path = request.getContextPath(); String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String clientIp = Tools.getCurrentUserIP(); String clientIp = Tools.getCurrentUserIP();
%> %>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>部门管理</title> <title>仓库管理</title>
<meta charset="utf-8"> <meta charset="utf-8">
<!-- 指定以IE8的方式来渲染 --> <!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/> <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
...@@ -28,17 +27,14 @@ ...@@ -28,17 +27,14 @@
<tr> <tr>
<td>仓库名称:</td> <td>仓库名称:</td>
<td> <td>
<input type="text" name="searchName" id="searchName" style="width:150px;"/> <input type="text" name="searchName" id="searchName" style="width:100px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td id="searchRemarkLabel">描述:</td>
<td id="searchRemarkLabel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:</td>
<td> <td>
<input type="text" name="searchRemark" id="searchRemark" style="width:150px;"/> <input type="text" name="searchRemark" id="searchRemark" style="width:100px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td> <td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a> <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
...@@ -57,16 +53,40 @@ ...@@ -57,16 +53,40 @@
<form id="depotFM" method="post" novalidate> <form id="depotFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td><label id="nameLabel">仓库名称&nbsp;&nbsp;</label></td> <td>仓库名称</td>
<td style="padding:5px"><input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/></td> <td style="padding:5px">
<input name="name" id="name" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr> </tr>
<tr>
<td>仓库地址</td>
<td style="padding:5px">
<input name="address" id="address" class="easyui-validatebox" data-options="validType:'length[2,30]'" style="width: 230px;height: 20px"/>
</td>
</tr>
<tr>
<td>仓储费</td>
<td style="padding:5px">
<input name="warehousing" id="warehousing" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 175px;height: 20px"/>&nbsp;元/天/KG
</td>
</tr>
<tr>
<td>搬运费</td>
<td style="padding:5px">
<input name="truckage" id="truckage" class="easyui-numberbox" placeholder="如上下搬运20元,则填写10元" data-options="min:0,precision:2" style="width: 215px;height: 20px"/>&nbsp;
</td>
</tr>
<tr> <tr>
<td><label id="sortLabel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td> <td>排序</td>
<td style="padding:5px"><input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px">
<input name="sort" id="sort" class="easyui-textbox" style="width: 230px;height: 20px"/>
</td>
</tr> </tr>
<tr> <tr>
<td><label id="remarkLabel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td> <td>描述</td>
<td style="padding:5px"><textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea></td> <td style="padding:5px">
<textarea name="remark" id="remark" rows="2" cols="2" style="width: 230px;"></textarea>
</td>
</tr> </tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
...@@ -84,27 +104,7 @@ ...@@ -84,27 +104,7 @@
initTableData(); initTableData();
ininPager(); ininPager();
initForm(); initForm();
browserFit(); });
});
//浏览器适配
function browserFit()
{
if(getOs()=='MSIE')
{
$("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述:");
$("#nameLabel").empty().append("仓库名称&nbsp;&nbsp;");
$("#sortLabel").empty().append("排&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;&nbsp;");
$("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;&nbsp;");
}
else
{
$("#searchRemarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述:");
$("#nameLabel").empty().append("仓库名称&nbsp;");
$("#sortLabel").empty().append("排&nbsp;&nbsp;&nbsp;&nbsp;序&nbsp;");
$("#remarkLabel").empty().append("描&nbsp;&nbsp;&nbsp;&nbsp;述&nbsp;");
}
}
//防止表单提交重复 //防止表单提交重复
function initForm() function initForm()
...@@ -117,8 +117,7 @@ ...@@ -117,8 +117,7 @@
} }
//初始化表格数据 //初始化表格数据
function initTableData() function initTableData() {
{
$('#tableData').datagrid({ $('#tableData').datagrid({
//title:'仓库列表', //title:'仓库列表',
//iconCls:'icon-save', //iconCls:'icon-save',
...@@ -143,45 +142,46 @@ ...@@ -143,45 +142,46 @@
pageSize: initPageSize, pageSize: initPageSize,
pageList: initPageNum, pageList: initPageNum,
columns:[[ columns:[[
{ field: 'id',width:35,align:"center",checkbox:true}, { field: 'id',width:35,align:"center",checkbox:true},
{ title: '仓库名称',field: 'name',width:200}, { title: '操作',field: 'op',align:"center",width:60,
{ title: '排序',field: 'sort',width:200}, formatter:function(value,rec) {
{ title: '描述',field: 'remark',width:200}, var str = '';
{ title: '操作',field: 'op',align:"center",width:130,formatter:function(value,rec) var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark + 'AaBb'
{ + rec.address + 'AaBb' + rec.warehousing + 'AaBb' + rec.truckage;
var str = ''; if(1 == value)
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.sort + 'AaBb' + rec.remark; {
if(1 == value) str += '<img title="编辑" src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;&nbsp;&nbsp;';
{ str += '<img title="删除" src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot('+ rec.id +');"/>';
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editDepot(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editDepot(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; }
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_remove.png" style="cursor: pointer;" onclick="deleteDepot('+ rec.id +');"/>&nbsp;<a onclick="deleteDepot('+ rec.id +');" style="text-decoration:none;color:black;" href="javascript:void(0)">删除</a>&nbsp;&nbsp;'; return str;
} }
return str; },
} { title: '仓库名称',field: 'name',width:200},
} { title: '仓库地址',field: 'address',width:200},
{ title: '仓储费',field: 'warehousing',width:60},
{ title: '搬运费',field: 'truckage',width:60},
{ title: '排序',field: 'sort',width:60},
{ title: '描述',field: 'remark',width:120}
]], ]],
toolbar:[ toolbar:[
{ {
id:'addDepot', id:'addDepot',
text:'增加', text:'增加',
iconCls:'icon-add', iconCls:'icon-add',
handler:function() handler:function() {
{
addDepot(); addDepot();
} }
}, },'-',
{ {
id:'deleteDepot', id:'deleteDepot',
text:'删除', text:'删除',
iconCls:'icon-remove', iconCls:'icon-remove',
handler:function() handler:function() {
{
batDeleteDepot(); batDeleteDepot();
} }
} }
], ],
onLoadError:function() onLoadError:function() {
{
$.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error'); $.messager.alert('页面加载提示','页面加载异常,请稍后再试!','error');
return; return;
} }
...@@ -189,38 +189,31 @@ ...@@ -189,38 +189,31 @@
} }
//初始化键盘enter事件 //初始化键盘enter事件
$(document).keydown(function(event) $(document).keydown(function(event) {
{
//兼容 IE和firefox 事件 //兼容 IE和firefox 事件
var e = window.event || event; var e = window.event || event;
var k = e.keyCode||e.which||e.charCode; var k = e.keyCode||e.which||e.charCode;
//兼容 IE,firefox 兼容 //兼容 IE,firefox 兼容
var obj = e.srcElement ? e.srcElement : e.target; var obj = e.srcElement ? e.srcElement : e.target;
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题 //绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
if(k == "13"&&(obj.id=="name"||obj.id=="sort"|| obj.id=="remark" )) if(k == "13"&&(obj.id=="name"||obj.id=="sort"|| obj.id=="remark" )) {
{
$("#saveDepot").click(); $("#saveDepot").click();
} }
//搜索按钮添加快捷键 //搜索按钮添加快捷键
if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" )) if(k == "13"&&(obj.id=="searchName" || obj.id=="searchRemark" )) {
{
$("#searchBtn").click(); $("#searchBtn").click();
} }
}); });
//分页信息处理 //分页信息处理
function ininPager() function ininPager() {
{ try {
try
{
var opts = $("#tableData").datagrid('options'); var opts = $("#tableData").datagrid('options');
var pager = $("#tableData").datagrid('getPager'); var pager = $("#tableData").datagrid('getPager');
pager.pagination({ pager.pagination({
onSelectPage:function(pageNum, pageSize) onSelectPage:function(pageNum, pageSize) {
{
opts.pageNumber = pageNum; opts.pageNumber = pageNum;
opts.pageSize = pageSize; opts.pageSize = pageSize;
pager.pagination('refresh', pager.pagination('refresh', {
{
pageNumber:pageNum, pageNumber:pageNum,
pageSize:pageSize pageSize:pageSize
}); });
...@@ -228,19 +221,15 @@ ...@@ -228,19 +221,15 @@
} }
}); });
} }
catch (e) catch (e) {
{
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); $.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
} }
} }
//删除供应商信息 //删除供应商信息
function deleteDepot(depotID) function deleteDepot(depotID) {
{ $.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r) {
$.messager.confirm('删除确认','确定要删除此仓库信息吗?',function(r) if (r) {
{
if (r)
{
$.ajax({ $.ajax({
type:"post", type:"post",
url: "<%=path %>/depot/delete.action", url: "<%=path %>/depot/delete.action",
...@@ -249,8 +238,7 @@ ...@@ -249,8 +238,7 @@
depotID : depotID, depotID : depotID,
clientIp:'<%=clientIp %>' clientIp:'<%=clientIp %>'
}), }),
success: function (tipInfo) success: function (tipInfo) {
{
var msg = tipInfo.showModel.msgTip; var msg = tipInfo.showModel.msgTip;
if(msg == '成功') if(msg == '成功')
{ {
...@@ -261,8 +249,7 @@ ...@@ -261,8 +249,7 @@
$.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error'); $.messager.alert('删除提示','删除仓库信息失败,请稍后再试!','error');
}, },
//此处添加错误处理 //此处添加错误处理
error:function() error:function() {
{
$.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error'); $.messager.alert('删除提示','删除仓库信息异常,请稍后再试!','error');
return; return;
} }
...@@ -272,18 +259,14 @@ ...@@ -272,18 +259,14 @@
} }
//批量删除供应商 //批量删除供应商
function batDeleteDepot() function batDeleteDepot() {
{
var row = $('#tableData').datagrid('getChecked'); var row = $('#tableData').datagrid('getChecked');
if(row.length == 0) if(row.length == 0) {
{
$.messager.alert('删除提示','没有记录被选中!','info'); $.messager.alert('删除提示','没有记录被选中!','info');
return; return;
} }
if(row.length > 0) if(row.length > 0) {
{ $.messager.confirm('删除确认','确定要删除选中的' + row.length + '条仓库信息吗?',function(r) {
$.messager.confirm('删除确认','确定要删除选中的' + row.length + '条仓库信息吗?',function(r)
{
if (r) if (r)
{ {
var ids = ""; var ids = "";
...@@ -339,12 +322,10 @@ ...@@ -339,12 +322,10 @@
function addDepot() function addDepot()
{ {
$("#clientIp").val('<%=clientIp %>'); $("#clientIp").val('<%=clientIp %>');
$("#sort").val("");
$("#remark").val("");
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息'); $('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/edit_add.png"/>&nbsp;增加仓库信息');
$(".window-mask").css({ width: webW ,height: webH}); $(".window-mask").css({ width: webW ,height: webH});
$("#name").val("").focus(); $('#depotFM').form('clear');
//$('#depotFM').form('clear'); $("#name").focus();
orgDepot = ""; orgDepot = "";
depotID = 0; depotID = 0;
...@@ -352,52 +333,52 @@ ...@@ -352,52 +333,52 @@
} }
//保存信息 //保存信息
$("#saveDepot").unbind().bind({ $("#saveDepot").off("click").on("click",function() {
click:function() if(!$('#depotFM').form('validate'))
return;
else if(checkDepotName())
return;
else
{ {
if(!$('#depotFM').form('validate')) $.ajax({
return; type:"post",
else if(checkDepotName()) url: url,
return; dataType: "json",
else async : false,
{ data: ({
$.ajax({ name : $.trim($("#name").val()),
type:"post", address: $.trim($("#address").val()),
url: url, warehousing: $.trim($("#warehousing").val()),
dataType: "json", truckage: $.trim($("#truckage").val()),
async : false, type : 0,
data: ({ sort : $.trim($("#sort").val()),
name : $.trim($("#name").val()), remark : $.trim($("#remark").val()),
type : 0, clientIp:'<%=clientIp %>'
sort : $.trim($("#sort").val()), }),
remark : $.trim($("#remark").val()), success: function (tipInfo)
clientIp:'<%=clientIp %>' {
}), if(tipInfo)
success: function (tipInfo)
{ {
if(tipInfo) $('#depotDlg').dialog('close');
{
$('#depotDlg').dialog('close'); var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber,opts.pageSize);
var opts = $("#tableData").datagrid('options');
showDepotDetails(opts.pageNumber,opts.pageSize);
}
else
{
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存仓库信息异常,请稍后再试!','error');
return;
} }
}); else
} {
$.messager.show({
title: '错误提示',
msg: '保存仓库信息失败,请稍后重试!'
});
}
},
//此处添加错误处理
error:function()
{
$.messager.alert('提示','保存仓库信息异常,请稍后再试!','error');
return;
}
});
} }
}); });
...@@ -410,6 +391,9 @@ ...@@ -410,6 +391,9 @@
$("#name").focus().val(depotInfo[1]); $("#name").focus().val(depotInfo[1]);
$("#sort").val(depotInfo[2]); $("#sort").val(depotInfo[2]);
$("#remark").val(depotInfo[3]); $("#remark").val(depotInfo[3]);
$("#address").val(depotInfo[4]);
$("#warehousing").val(depotInfo[5]);
$("#truckage").val(depotInfo[6]);
orgDepot = depotInfo[1]; orgDepot = depotInfo[1];
$('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息'); $('#depotDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑仓库信息');
......
...@@ -60,41 +60,47 @@ ...@@ -60,41 +60,47 @@
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="functionsFM" method="post" novalidate> <form id="functionsFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>编号</td> <td style="width:65px;">编号</td>
<td style="padding:1px"><input name="Number" id="Number" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="Number" id="Number" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
</tr> </tr>
<tr> <tr>
<td>名称</td> <td>名称</td>
<td style="padding:1px"><input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,20]'" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="Name" id="Name" class="easyui-validatebox" data-options="required:true,validType:'length[2,20]'" style="width: 230px;height: 20px"/></td>
</tr> </tr>
<tr> <tr>
<td>上级编号</td> <td>上级编号</td>
<td style="padding:1px"><input name="PNumber" id="PNumber" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="PNumber" id="PNumber" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
</tr> </tr>
<tr> <tr>
<td>链接</td> <td>链接</td>
<td style="padding:1px"><input name="URL" id="URL" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="URL" id="URL" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
</tr> </tr>
<tr> <tr>
<td>收缩</td> <td>排序</td>
<td style="padding:1px"><input name="State" id="State" type="checkbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px"><input name="Sort" id="Sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td>
</tr> </tr>
<tr> <tr>
<td>排序</td> <td>功能按钮</td>
<td style="padding:1px"><input name="Sort" id="Sort" class="easyui-textbox" style="width: 230px;height: 20px"/></td> <td style="padding:5px">
</tr> <input id="PushBtn" name="PushBtn" style="width:230px;" />
<tr> </td>
<td>启用</td> </tr>
<td style="padding:1px"><input name="Enabled" id="Enabled" type="checkbox" style="width: 230px;height: 20px"/></td> <tr>
</tr> <td>收缩</td>
<tr> <td style="padding:5px"><input name="State" id="State" type="checkbox" style="width: 230px;height: 20px"/></td>
<td>类型</td> </tr>
<td style="padding:1px"><select name="Type" id="Type" style="width: 230px;height: 20px"> <tr>
<option value="电脑版">电脑版</option> <td>启用</td>
<option value="手机版">手机版</option></select> <td style="padding:5px"><input name="Enabled" id="Enabled" type="checkbox" style="width: 230px;height: 20px"/></td>
</td> </tr>
</tr> <tr>
<td>类型</td>
<td style="padding:5px"><select name="Type" id="Type" style="width: 230px;height: 20px">
<option value="电脑版">电脑版</option>
<option value="手机版">手机版</option></select>
</td>
</tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form> </form>
...@@ -111,6 +117,7 @@ ...@@ -111,6 +117,7 @@
initTableData(); initTableData();
ininPager(); ininPager();
initForm(); initForm();
bindEvent();
}); });
//防止表单提交重复 //防止表单提交重复
...@@ -166,7 +173,7 @@ ...@@ -166,7 +173,7 @@
{ {
var str = ''; var str = '';
var rowInfo = rec.Id + 'AaBb' + rec.Number+ 'AaBb' + rec.Name+ 'AaBb' + rec.PNumber+ 'AaBb' + rec.URL var rowInfo = rec.Id + 'AaBb' + rec.Number+ 'AaBb' + rec.Name+ 'AaBb' + rec.PNumber+ 'AaBb' + rec.URL
+ 'AaBb' + rec.State+ 'AaBb' + rec.Sort+ 'AaBb' + rec.Enabled+ 'AaBb' + rec.Type; + 'AaBb' + rec.State+ 'AaBb' + rec.Sort+ 'AaBb' + rec.Enabled+ 'AaBb' + rec.Type + 'AaBb' + rec.PushBtn;
if(1 == value) if(1 == value)
{ {
str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editFunctions(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editFunctions(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;'; str += '<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png" style="cursor: pointer;" onclick="editFunctions(\'' + rowInfo + '\');"/>&nbsp;<a onclick="editFunctions(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">编辑</a>&nbsp;&nbsp;';
...@@ -249,6 +256,17 @@ ...@@ -249,6 +256,17 @@
$.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error'); $.messager.alert('异常处理提示',"分页信息异常 : " + e.name + ": " + e.message,'error');
} }
} }
//绑定事件
function bindEvent(){
$('#PushBtn').combobox({
url: '<%=path %>/js/pages/manage/pushBtn.json',
valueField:'id',
textField:'text',
panelHeight:120,
multiple:true
});
}
//删除供应商信息 //删除供应商信息
function deleteFunctions(functionsID) function deleteFunctions(functionsID)
...@@ -393,6 +411,7 @@ ...@@ -393,6 +411,7 @@
Sort : $.trim($("#Sort").val()), Sort : $.trim($("#Sort").val()),
Enabled : $("#Enabled").is(':checked'), Enabled : $("#Enabled").is(':checked'),
Type : $.trim($("#Type").val()), Type : $.trim($("#Type").val()),
PushBtn : $('#PushBtn').combobox('getValues').toString(), //功能按钮
clientIp:'<%=clientIp %>' clientIp:'<%=clientIp %>'
}), }),
success: function (tipInfo) success: function (tipInfo)
...@@ -437,6 +456,21 @@ ...@@ -437,6 +456,21 @@
$("#Sort").focus().val(functionsInfo[6]); $("#Sort").focus().val(functionsInfo[6]);
$("#Enabled").attr("checked",functionsInfo[7]=='true'?true:false); $("#Enabled").attr("checked",functionsInfo[7]=='true'?true:false);
$("#Type").focus().val(functionsInfo[8]); $("#Type").focus().val(functionsInfo[8]);
if(functionsInfo[9] !== "undefined" && functionsInfo[9] !== ""){
var arr = functionsInfo[9].split(",");
var pushBtnArray = [];
for(var i=0;i<arr.length;i++){
if(arr[i]){
pushBtnArray.push(arr[i]);
}
}
if(pushBtnArray.length){
$("#PushBtn").combobox('setValues', pushBtnArray);
}
}
else {
$("#PushBtn").combobox('setValues', '');
}
orgFunctions = functionsInfo[2]; orgFunctions = functionsInfo[2];
$('#functionsDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑功能信息'); $('#functionsDlg').dialog('open').dialog('setTitle','<img src="<%=path%>/js/easyui-1.3.5/themes/icons/pencil.png"/>&nbsp;编辑功能信息');
......
<%@page import="com.jsh.util.Tools"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String clientIp = Tools.getCurrentUserIP();
%>
<!DOCTYPE html>
<html>
<head>
<title>会员信息</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- 指定以IE8的方式来渲染 -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
<link rel="shortcut icon" href="<%=path%>/images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css" href="<%=path %>/js/easyui-1.3.5/themes/icon.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/css/common.css" />
<script type="text/javascript" src="<%=path %>/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=path %>/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
<script src="<%=path %>/js/pages/manage/supplier.js"></script>
<script>
var kid = ${sessionScope.user.id};
var path = "<%=path%>";
var clientIp = "<%=clientIp%>";
</script>
</head>
<body>
<!-- 查询 -->
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable">
<tr>
<td>&nbsp;&nbsp;&nbsp;&nbsp;称:</td>
<td>
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>手机号码:</td>
<td>
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>联系电话:</td>
<td>
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td id="searchDescLabel">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注:</td>
<td>
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
</td>
<td>&nbsp;</td>
<td>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>
</td>
</tr>
</table>
</div>
<!-- 数据显示table -->
<div id = "tablePanel" class="easyui-panel" style="padding:1px;top:300px;" title="会员信息列表" iconCls="icon-list" collapsible="true" closable="false">
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div>
<div id="supplierDlg" class="easyui-dialog" style="width:600px;padding:10px 20px"
closed="true" buttons="#dlg-buttons" modal="true" collapsible="false" closable="true">
<form id="supplierFM">
<table>
<tr>
<td style="width: 80px;height: 20px">名称</td>
<td style="width: 180px;padding:1px">
<input name="supplier" id="supplier" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 160px;height: 20px"/>
</td>
<td style="width: 60px;height: 20px">联系人</td>
<td style="width:180px;padding:1px;">
<input name="contacts" id="contacts" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>手机号码</td>
<td style="padding:1px;">
<input name="telephone" id="telephone" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>电子邮箱</td>
<td style="padding:1px">
<input name="email" id="email" class="easyui-validatebox" validType="email" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>联系电话</td>
<td style="padding:1px;">
<input name="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>传真</td>
<td style="padding:1px">
<input name="fax" id="fax" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>期初应收</td>
<td style="padding:1px">
<input name="BeginNeedGet" id="BeginNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
</td>
<td>期初应付</td>
<td style="padding:1px">
<input name="BeginNeedPay" id="BeginNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px"></input>
</td>
</tr>
<tr>
<td>累计应收</td>
<td style="padding:1px">
<input name="AllNeedGet" id="AllNeedGet" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
</td>
<td>累计应付</td>
<td style="padding:1px">
<input name="AllNeedPay" id="AllNeedPay" type="text" class="easyui-numberbox" data-options="min:0,precision:2" style="width: 160px;height: 20px" disabled="true"></input>
</td>
</tr>
<tr>
<td>纳税人识别号</td>
<td style="padding:1px">
<input name="taxNum" id="taxNum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>税率</td>
<td style="padding:1px">
<input name="taxRate" id="taxRate" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>开户行</td>
<td style="padding:1px">
<input name="bankName" id="bankName" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
<td>账号</td>
<td style="padding:1px">
<input name="accountNumber" id="accountNumber" class="easyui-validatebox" style="width: 160px;height: 20px"/>
</td>
</tr>
<tr>
<td>地址</td>
<td style="padding:1px" colspan="3">
<input name="address" id="address" class="easyui-validatebox" style="width: 408px;height: 20px"/>
</td>
</tr>
<tr>
<td>备注</td>
<td style="padding:1px" colspan="3">
<textarea name="description" id="description" rows="2" cols="2" style="width: 408px;"></textarea>
</td>
</tr>
</table>
</form>
</div>
<div id="dlg-buttons">
<a href="javascript:void(0)" id="saveSupplier" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
<a href="javascript:void(0)" id="cancelSupplier" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#supplierDlg').dialog('close')">取消</a>
</div>
<!-- 导入excel表格 -->
<div id="importExcelDlg" style="padding:10px 20px">
<form id="importExcelFM" method="post" enctype="multipart/form-data" action="<%=path%>/supplier/importExcelMember.action">
<div class="fitem" style="padding:5px">
<label>文件名称&nbsp;&nbsp;</label>
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
</div>
<div class="fitem" style="padding:5px">
<label><b>导入注意</b>&nbsp;&nbsp;</label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
</div>
<div class="fitem" style="padding:5px;display: none;">
<label>是否审查&nbsp;&nbsp;</label>
<select id ="isCheck" name="isCheck" style="width: 230px;height: 20px">
<option value="0"></option>
<option value="1" selected="selected"></option>
</select>
</div>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
<div id="dlg-buttons5">
<a href="javascript:void(0)" id="saveimport" class="easyui-linkbutton" iconCls="icon-ok">导入</a>
<a href="javascript:void(0)" id="cancelimport" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#importExcelDlg').dialog('close')">取消</a>
</div>
</form>
</div>
</body>
</html>
\ No newline at end of file
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<tr> <tr>
<td>角色名称:</td> <td>角色名称:</td>
<td> <td>
<input type="text" name="searchName" id="searchName" style="width:230px;"/> <input type="text" name="searchName" id="searchName" style="width:150px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td>&nbsp;</td> <td>&nbsp;</td>
...@@ -40,7 +40,8 @@ ...@@ -40,7 +40,8 @@
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>&nbsp;&nbsp;
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;&nbsp; <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="searchResetBtn">重置</a>&nbsp;&nbsp;
<a id="btnSetApp" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配应用'>分配应用</a>&nbsp;&nbsp; <a id="btnSetApp" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配应用'>分配应用</a>&nbsp;&nbsp;
<a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a> <a id="btnSetFunctions" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配功能'>分配功能</a>&nbsp;&nbsp;
<a id="btnSetPushBtn" class='easyui-linkbutton iframe iframe_LargeForm' href='#' title='分配按钮'>分配按钮</a>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -510,6 +511,16 @@ ...@@ -510,6 +511,16 @@
} }
this.href = "<%=path %>/pages/manage/roleFunctions.jsp?id=" + currentRow.Id; this.href = "<%=path %>/pages/manage/roleFunctions.jsp?id=" + currentRow.Id;
}); });
//分配按钮
$('#btnSetPushBtn').click(function () {
var currentRow = $("#tableData").datagrid("getSelected");
if (currentRow == null) {
alert("请选择一条数据再操作!");
return false;
}
this.href = "<%=path %>/pages/manage/rolePushBtn.jsp?id=" + currentRow.Id;
});
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
......
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
</head> </head>
<body> <body>
<!-- 数据显示table --> <!-- 数据显示table -->
<div> <div style="padding-bottom: 10px;">
<a id="btnOK" class="easyui-linkbutton">保存</a> <a id="btnOK" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
</div> </div>
<div> <div>
<ul id="tt"></ul> <ul id="tt"></ul>
...@@ -63,13 +63,12 @@ ...@@ -63,13 +63,12 @@
$(function () { $(function () {
$('#tt').tree({ $('#tt').tree({
url:'<%=path%>/functions/findRoleFunctions.action?UBType='+type+'&UBKeyId='+url_id, url:'<%=path%>/functions/findRoleFunctions.action?UBType='+type+'&UBKeyId='+url_id,
animate:true, animate:true,
checkbox:true checkbox:true
}); });
$("#btnOK").click( $("#btnOK").click(
function() { function() {
if(!checkRoleFunctions()) if(!checkRoleFunctions())
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment