File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,112 +1,118 @@
|
||||
// strPrintName 打印任务名
|
||||
// printDatagrid 要打印的datagrid
|
||||
function CreateFormPage(strPrintName, printDatagrid, path) {
|
||||
var beginDate= $("#searchBeginTime").val();
|
||||
var endDate= $("#searchEndTime").val();
|
||||
var getMonth= $("#searchMonth").val();
|
||||
var listTitle = $("#tablePanel").prev().text();
|
||||
listTitle = listTitle.replace("列表","");
|
||||
var companyName = "";
|
||||
//加载公司信息
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: path + "/systemConfig/findBy.action",
|
||||
dataType: "json",
|
||||
async: false,
|
||||
success: function (res) {
|
||||
if(res && res.rows) {
|
||||
var array = res.rows;
|
||||
for(var i=0; i<array.length; i++){
|
||||
var name = array[i].name;
|
||||
if(name === "company_name") {
|
||||
companyName = array[i].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function() {
|
||||
$.messager.alert('查询失败','查询系统配置信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
var tableString = '<div class="div-title">' + companyName + "-" + listTitle + '\n</div>';
|
||||
if(beginDate && endDate) {
|
||||
tableString+='\n<div class="div-time">日期:' + beginDate + ' 至 ' + endDate + ' \n</div>';
|
||||
}
|
||||
if(getMonth) {
|
||||
tableString += '\n<div class="div-time">月份:' + getMonth + ' \n</div>';
|
||||
}
|
||||
tableString+='\n<table cellspacing="0" class="pb">';
|
||||
var frozenColumns = printDatagrid.datagrid("options").frozenColumns; // 得到frozenColumns对象
|
||||
var columns = printDatagrid.datagrid("options").columns; // 得到columns对象
|
||||
var nameList = '';
|
||||
|
||||
// 载入title
|
||||
if (typeof columns != 'undefined' && columns != '') {
|
||||
$(columns).each(function (index) {
|
||||
tableString += '\n<tr>';
|
||||
if (typeof frozenColumns != 'undefined' && typeof frozenColumns[index] != 'undefined') {
|
||||
for (var i = 0; i < frozenColumns[index].length; ++i) {
|
||||
if (!frozenColumns[index][i].hidden) {
|
||||
tableString += '\n<th width="' + frozenColumns[index][i].width + '"';
|
||||
if (typeof frozenColumns[index][i].rowspan != 'undefined' && frozenColumns[index][i].rowspan > 1) {
|
||||
tableString += ' rowspan="' + frozenColumns[index][i].rowspan + '"';
|
||||
}
|
||||
if (typeof frozenColumns[index][i].colspan != 'undefined' && frozenColumns[index][i].colspan > 1) {
|
||||
tableString += ' colspan="' + frozenColumns[index][i].colspan + '"';
|
||||
}
|
||||
if (typeof frozenColumns[index][i].field != 'undefined' && frozenColumns[index][i].field != '') {
|
||||
nameList += ',{"f":"' + frozenColumns[index][i].field + '", "a":"' + frozenColumns[index][i].align + '"}';
|
||||
}
|
||||
tableString += '>' + frozenColumns[0][i].title + '</th>';
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < columns[index].length; ++i) {
|
||||
if (!columns[index][i].hidden) {
|
||||
tableString += '\n<th width="' + columns[index][i].width + '"';
|
||||
if (typeof columns[index][i].rowspan != 'undefined' && columns[index][i].rowspan > 1) {
|
||||
tableString += ' rowspan="' + columns[index][i].rowspan + '"';
|
||||
}
|
||||
if (typeof columns[index][i].colspan != 'undefined' && columns[index][i].colspan > 1) {
|
||||
tableString += ' colspan="' + columns[index][i].colspan + '"';
|
||||
}
|
||||
if (typeof columns[index][i].field != 'undefined' && columns[index][i].field != '') {
|
||||
nameList += ',{"f":"' + columns[index][i].field + '", "a":"' + columns[index][i].align + '"}';
|
||||
}
|
||||
tableString += '>' + columns[index][i].title + '</th>';
|
||||
}
|
||||
}
|
||||
tableString += '\n</tr>';
|
||||
});
|
||||
}
|
||||
// 载入内容
|
||||
var rows = printDatagrid.datagrid("getRows"); // 这段代码是获取当前页的所有行
|
||||
var nl = eval('([' + nameList.substring(1) + '])');
|
||||
for (var i = 0; i < rows.length; ++i) {
|
||||
tableString += '\n<tr>';
|
||||
$(nl).each(function (j) {
|
||||
var e = nl[j].f.lastIndexOf('_0');
|
||||
|
||||
tableString += '\n<td';
|
||||
if (nl[j].a != 'undefined' && nl[j].a != '') {
|
||||
tableString += ' style="text-align:' + nl[j].a + ';"';
|
||||
}
|
||||
tableString += '>';
|
||||
if (e + 2 == nl[j].f.length) {
|
||||
tableString += rows[i][nl[j].f.substring(0, e)];
|
||||
}
|
||||
else
|
||||
tableString += rows[i][nl[j].f];
|
||||
tableString += '</td>';
|
||||
});
|
||||
tableString += '\n</tr>';
|
||||
}
|
||||
tableString += '\n</table>';
|
||||
|
||||
localStorage.setItem("tableString",tableString);
|
||||
|
||||
window.open("../../js/print/print.html","location:No;status:No;help:No;dialogWidth:800px;dialogHeight:600px;scroll:auto;");
|
||||
// strPrintName 打印任务名
|
||||
// printDatagrid 要打印的datagrid
|
||||
function CreateFormPage(strPrintName, printDatagrid) {
|
||||
var beginDate= $("#searchBeginTime").val();
|
||||
var endDate= $("#searchEndTime").val();
|
||||
var getMonth= $("#searchMonth").val();
|
||||
var listTitle = $("#tablePanel").prev().text();
|
||||
listTitle = listTitle.replace("列表","");
|
||||
var companyName = "";
|
||||
//加载公司信息
|
||||
$.ajax({
|
||||
type:"get",
|
||||
url: "/systemConfig/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
async: false,
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data && res.data.page) {
|
||||
var array = res.data.page.rows;
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
var name = array[i].name;
|
||||
if (name === "company_name") {
|
||||
companyName = array[i].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error:function() {
|
||||
$.messager.alert('查询失败','查询系统配置信息异常,请稍后再试!','error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
var tableString = '<div class="div-title">' + companyName + "-" + listTitle + '\n</div>';
|
||||
if(beginDate && endDate) {
|
||||
tableString+='\n<div class="div-time">日期:' + beginDate + ' 至 ' + endDate + ' \n</div>';
|
||||
}
|
||||
if(getMonth) {
|
||||
tableString += '\n<div class="div-time">月份:' + getMonth + ' \n</div>';
|
||||
}
|
||||
tableString+='\n<table cellspacing="0" class="pb">';
|
||||
var frozenColumns = printDatagrid.datagrid("options").frozenColumns; // 得到frozenColumns对象
|
||||
var columns = printDatagrid.datagrid("options").columns; // 得到columns对象
|
||||
var nameList = '';
|
||||
|
||||
// 载入title
|
||||
if (typeof columns != 'undefined' && columns != '') {
|
||||
$(columns).each(function (index) {
|
||||
tableString += '\n<tr>';
|
||||
if (typeof frozenColumns != 'undefined' && typeof frozenColumns[index] != 'undefined') {
|
||||
for (var i = 0; i < frozenColumns[index].length; ++i) {
|
||||
if (!frozenColumns[index][i].hidden) {
|
||||
tableString += '\n<th width="' + frozenColumns[index][i].width + '"';
|
||||
if (typeof frozenColumns[index][i].rowspan != 'undefined' && frozenColumns[index][i].rowspan > 1) {
|
||||
tableString += ' rowspan="' + frozenColumns[index][i].rowspan + '"';
|
||||
}
|
||||
if (typeof frozenColumns[index][i].colspan != 'undefined' && frozenColumns[index][i].colspan > 1) {
|
||||
tableString += ' colspan="' + frozenColumns[index][i].colspan + '"';
|
||||
}
|
||||
if (typeof frozenColumns[index][i].field != 'undefined' && frozenColumns[index][i].field != '') {
|
||||
nameList += ',{"f":"' + frozenColumns[index][i].field + '", "a":"' + frozenColumns[index][i].align + '"}';
|
||||
}
|
||||
tableString += '>' + frozenColumns[0][i].title + '</th>';
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var i = 0; i < columns[index].length; ++i) {
|
||||
if (!columns[index][i].hidden) {
|
||||
tableString += '\n<th width="' + columns[index][i].width + '"';
|
||||
if (typeof columns[index][i].rowspan != 'undefined' && columns[index][i].rowspan > 1) {
|
||||
tableString += ' rowspan="' + columns[index][i].rowspan + '"';
|
||||
}
|
||||
if (typeof columns[index][i].colspan != 'undefined' && columns[index][i].colspan > 1) {
|
||||
tableString += ' colspan="' + columns[index][i].colspan + '"';
|
||||
}
|
||||
if (typeof columns[index][i].field != 'undefined' && columns[index][i].field != '') {
|
||||
nameList += ',{"f":"' + columns[index][i].field + '", "a":"' + columns[index][i].align + '"}';
|
||||
}
|
||||
tableString += '>' + columns[index][i].title + '</th>';
|
||||
}
|
||||
}
|
||||
tableString += '\n</tr>';
|
||||
});
|
||||
}
|
||||
// 载入内容
|
||||
var rows = printDatagrid.datagrid("getRows"); // 这段代码是获取当前页的所有行
|
||||
var nl = eval('([' + nameList.substring(1) + '])');
|
||||
for (var i = 0; i < rows.length; ++i) {
|
||||
tableString += '\n<tr>';
|
||||
$(nl).each(function (j) {
|
||||
var e = nl[j].f.lastIndexOf('_0');
|
||||
|
||||
tableString += '\n<td';
|
||||
if (nl[j].a != 'undefined' && nl[j].a != '') {
|
||||
tableString += ' style="text-align:' + nl[j].a + ';"';
|
||||
}
|
||||
tableString += '>';
|
||||
if (e + 2 == nl[j].f.length) {
|
||||
tableString += rows[i][nl[j].f.substring(0, e)];
|
||||
}
|
||||
else
|
||||
tableString += rows[i][nl[j].f];
|
||||
tableString += '</td>';
|
||||
});
|
||||
tableString += '\n</tr>';
|
||||
}
|
||||
tableString += '\n</table>';
|
||||
|
||||
localStorage.setItem("tableString",tableString);
|
||||
|
||||
window.open("../../js/print/print.html","location:No;status:No;help:No;dialogWidth:800px;dialogHeight:600px;scroll:auto;");
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,187 +1,186 @@
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelCustomer.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </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>
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelCustomer">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </label>
|
||||
<select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
|
||||
<option value="0">是</option>
|
||||
<option value="1" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<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>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,187 +1,186 @@
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelMember.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </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>
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelMember">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </label>
|
||||
<select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
|
||||
<option value="0">是</option>
|
||||
<option value="1" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<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>
|
||||
@@ -1,188 +1,187 @@
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelVendor.action">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </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>
|
||||
<!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="/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 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/common/common.js"></script>
|
||||
<script src="/js/pages/manage/supplier.js"></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>名 称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSupplier" id="searchSupplier" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>手机号码:</td>
|
||||
<td>
|
||||
<input type="text" name="searchTelephone" id="searchTelephone" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>联系电话:</td>
|
||||
<td>
|
||||
<input type="text" name="searchPhonenum" id="searchPhonenum" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td id="searchDescLabel">备 注:</td>
|
||||
<td>
|
||||
<input type="text" name="searchDesc" id="searchDesc" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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"/>
|
||||
</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"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>累计应收</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedGet" id="AllNeedGet" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</td>
|
||||
<td>累计应付</td>
|
||||
<td style="padding:1px">
|
||||
<input name="AllNeedPay" id="AllNeedPay" type="text" style="width: 160px;height: 20px"
|
||||
readonly="readonly"/>
|
||||
</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="/supplier/importExcelVendor">
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label>文件名称 </label>
|
||||
<input name="supplierFile" id="supplierFile" type="file" style="width: 230px;height: 20px"/>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px">
|
||||
<label><b>导入注意</b> </label><span>(预收款、期初应收、期初应付、税率均为数值且要大于0;另外期初应收、期初应付不能同时输入)</span>
|
||||
</div>
|
||||
<div class="fitem" style="padding:5px;display: none;">
|
||||
<label>是否审查 </label>
|
||||
<select id="isCheck" name="isCheck" style="width: 230px;height: 20px">
|
||||
<option value="0">是</option>
|
||||
<option value="1" selected="selected">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<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>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,382 +1,382 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>采购入库</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="/css/in_out.css"/>
|
||||
<script src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script src="/js/common/common.js"></script>
|
||||
<script src="/js/pages/materials/in_out.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
</td>
|
||||
<td>商品信息:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:60px;">供应商:</td>
|
||||
<td style="padding:5px;width:170px;">
|
||||
<div class="org-list">
|
||||
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
||||
</div>
|
||||
<div class="add-org-btn">
|
||||
<img id="addOrgan" src="/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||
style="cursor: pointer;" alt="增加供应商" title="增加供应商"/>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:70px;">单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="OperTime" id="OperTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
|
||||
style="width:140px;"/>
|
||||
</td>
|
||||
<td style="width:80px;">单据编号:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Number" id="Number" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
|
||||
</td>
|
||||
<td style="width:70px;"></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>优惠率:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="Discount" name="Discount" style="width:110px;"/>
|
||||
%
|
||||
</td>
|
||||
<td>付款优惠:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
|
||||
</td>
|
||||
<td>优惠后金额:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
|
||||
</td>
|
||||
<td>本次付款:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结算账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="AccountId" id="AccountId" style="width:110px;"></select>
|
||||
<img class="many-account-ico" src="/js/easyui-1.3.5/themes/icons/filelist.jpg"
|
||||
style="display: none;"/>
|
||||
</td>
|
||||
<td>本次欠款:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
|
||||
</td>
|
||||
<td>采购费用:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
|
||||
<img class="other-money-ico" src="/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,3]'" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:60px;">供应商:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;">单据日期:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="OperTimeShow"></span>
|
||||
</td>
|
||||
<td style="width:80px;">单据编号:</td>
|
||||
<td style="padding:5px;width:140px;">
|
||||
<span id="NumberShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;"></td>
|
||||
<td style="padding:5px;width:140px;"></td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="width: 1130px;">
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:60px;">单据备注:</td>
|
||||
<td colspan="8" style="height:35px;">
|
||||
<span id="RemarkShow" style="width: 1070px; height:35px;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>优惠率:</td>
|
||||
<td>
|
||||
<span id="DiscountShow" style="width: 110px;"></span>
|
||||
%
|
||||
</td>
|
||||
<td>付款优惠:</td>
|
||||
<td>
|
||||
<span id="DiscountMoneyShow" style="width: 120px;"></span>
|
||||
</td>
|
||||
<td>优惠后金额:</td>
|
||||
<td>
|
||||
<span id="DiscountLastMoneyShow" style="width: 120px;"></span>
|
||||
</td>
|
||||
<td>本次付款:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结算账户:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>本次欠款:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="DebtShow"></span>
|
||||
</td>
|
||||
<td>采购费用:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OtherMoneyShow"></span>
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="AccountDayShow"></span>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
|
||||
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
|
||||
<table class="account-dlg">
|
||||
<tr class="account-head-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:5px;">结算账户</td>
|
||||
<td style="width:100px; padding:5px;">金额</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px;text-align: center;">合计:</td>
|
||||
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tabs-tmp">
|
||||
<tr class="account-content-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
|
||||
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="accountDlgButtons">
|
||||
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
|
||||
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<table class="money-dlg">
|
||||
<tr class="money-head-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:5px;">结算账户</td>
|
||||
<td style="width:100px; padding:5px;">金额</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px;text-align: center;">合计:</td>
|
||||
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tabs-tmp">
|
||||
<tr class="money-content-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
|
||||
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="otherMoneyDlgBtn">
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
|
||||
closed="true" buttons="#supplierDlgBtn" 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="phonenum" id="phonenum" class="easyui-validatebox" style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
<td>手机</td>
|
||||
<td style="padding:1px;">
|
||||
<input name="telephone" id="telephone" class="easyui-validatebox"
|
||||
style="width: 160px;height: 20px"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>电子邮箱</td>
|
||||
<td style="padding:1px">
|
||||
<input name="email" id="email" class="easyui-validatebox" validType="email"
|
||||
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="supplierDlgBtn">
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>采购入库</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="/css/in_out.css"/>
|
||||
<script src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script src="/js/easyui-1.3.5/jquery.easyui.min.js"></script>
|
||||
<script src="/js/easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
|
||||
<script src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script src="/js/common/common.js"></script>
|
||||
<script src="/js/pages/materials/in_out.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<!-- 查询 -->
|
||||
<div id="searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true"
|
||||
closable="false">
|
||||
<table id="searchTable">
|
||||
<tr>
|
||||
<td>单据编号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
|
||||
</td>
|
||||
<td>商品信息:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMaterial" id="searchMaterial" placeholder="名称,型号" style="width:100px;"/>
|
||||
</td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
|
||||
class="txt Wdate" style="width:100px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
<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="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
|
||||
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<form id="depotHeadFM" method="post" novalidate>
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:60px;">供应商:</td>
|
||||
<td style="padding:5px;width:170px;">
|
||||
<div class="org-list">
|
||||
<input id="OrganId" name="OrganId" style="width:130px;"/>
|
||||
</div>
|
||||
<div class="add-org-btn">
|
||||
<img id="addOrgan" src="/js/easyui-1.3.5/themes/icons/edit_add.png"
|
||||
style="cursor: pointer;" alt="增加供应商" title="增加供应商"/>
|
||||
</div>
|
||||
</td>
|
||||
<td style="width:70px;">单据日期:</td>
|
||||
<td style="padding:5px">
|
||||
<input type="text" name="OperTime" id="OperTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate"
|
||||
style="width:140px;"/>
|
||||
</td>
|
||||
<td style="width:80px;">单据编号:</td>
|
||||
<td style="padding:5px">
|
||||
<input name="Number" id="Number" class="easyui-validatebox"
|
||||
data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
|
||||
</td>
|
||||
<td style="width:70px;"></td>
|
||||
<td style="padding:5px">
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9">
|
||||
<textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息"
|
||||
style="width: 1130px; height:35px;"></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>优惠率:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="Discount" name="Discount" style="width:110px;"/>
|
||||
%
|
||||
</td>
|
||||
<td>付款优惠:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="DiscountMoney" name="DiscountMoney" style="width:120px;"/>
|
||||
</td>
|
||||
<td>优惠后金额:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="DiscountLastMoney" name="DiscountLastMoney" readonly="readonly" style="width:120px;"/>
|
||||
</td>
|
||||
<td>本次付款:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="ChangeAmount" name="ChangeAmount" data-changeamount="0" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结算账户:</td>
|
||||
<td style="padding:5px">
|
||||
<select name="AccountId" id="AccountId" style="width:110px;"></select>
|
||||
<img class="many-account-ico" src="/js/easyui-1.3.5/themes/icons/filelist.jpg"
|
||||
style="display: none;"/>
|
||||
</td>
|
||||
<td>本次欠款:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="Debt" name="Debt" readonly="readonly" style="width:120px;"/>
|
||||
</td>
|
||||
<td>采购费用:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="OtherMoney" name="OtherMoney" style="width:120px;" readonly="readonly"/>
|
||||
<img class="other-money-ico" src="/js/easyui-1.3.5/themes/icons/filelist.jpg"/>
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<input id="AccountDay" name="AccountDay" class="easyui-validatebox"
|
||||
data-options="validType:'length[1,3]'" style="width:120px;"/>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
|
||||
</form>
|
||||
</div>
|
||||
<div id="dlg-buttons">
|
||||
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel"
|
||||
onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
|
||||
</div>
|
||||
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:20px"
|
||||
closed="true" modal="true" cache="false" collapsible="false" closable="true">
|
||||
<table>
|
||||
<tr>
|
||||
<td style="width:60px;">供应商:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="OrganIdShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;">单据日期:</td>
|
||||
<td style="padding:5px;width:130px;">
|
||||
<span id="OperTimeShow"></span>
|
||||
</td>
|
||||
<td style="width:80px;">单据编号:</td>
|
||||
<td style="padding:5px;width:140px;">
|
||||
<span id="NumberShow"></span>
|
||||
</td>
|
||||
<td style="width:70px;"></td>
|
||||
<td style="padding:5px;width:140px;"></td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="9" style="width: 1130px;">
|
||||
<!-- 商品列表table -->
|
||||
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:60px;">单据备注:</td>
|
||||
<td colspan="8" style="height:35px;">
|
||||
<span id="RemarkShow" style="width: 1070px; height:35px;"></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>优惠率:</td>
|
||||
<td>
|
||||
<span id="DiscountShow" style="width: 110px;"></span>
|
||||
%
|
||||
</td>
|
||||
<td>付款优惠:</td>
|
||||
<td>
|
||||
<span id="DiscountMoneyShow" style="width: 120px;"></span>
|
||||
</td>
|
||||
<td>优惠后金额:</td>
|
||||
<td>
|
||||
<span id="DiscountLastMoneyShow" style="width: 120px;"></span>
|
||||
</td>
|
||||
<td>本次付款:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="ChangeAmountShow"></span>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>结算账户:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="AccountIdShow"></span>
|
||||
</td>
|
||||
<td>本次欠款:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="DebtShow"></span>
|
||||
</td>
|
||||
<td>采购费用:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="OtherMoneyShow"></span>
|
||||
</td>
|
||||
<td>结算天数:</td>
|
||||
<td style="padding:5px">
|
||||
<span id="AccountDayShow"></span>
|
||||
</td>
|
||||
<td style="width:100px;"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="depotHeadAccountDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
|
||||
closed="true" modal="true" buttons="#accountDlgButtons" cache="false" collapsible="false" closable="true">
|
||||
<table class="account-dlg">
|
||||
<tr class="account-head-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:5px;">结算账户</td>
|
||||
<td style="width:100px; padding:5px;">金额</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px;text-align: center;">合计:</td>
|
||||
<td style="width:100px;"><span id="accountMoneyTotalDlg"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tabs-tmp">
|
||||
<tr class="account-content-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:3px;"><select class="account-id-dlg" style="width:140px;"></select></td>
|
||||
<td style="width:100px; padding:3px;"><input class="account-money-dlg" style="width:100px;"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="accountDlgButtons">
|
||||
<a href="javascript:void(0)" id="saveDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelDepotHeadAccountDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="otherMoneyDlg" class="easyui-dialog" style="width:380px;padding:10px 20px;top:80px"
|
||||
closed="true" modal="true" buttons="#otherMoneyDlgBtn" cache="false" collapsible="false" closable="true">
|
||||
<table class="money-dlg">
|
||||
<tr class="money-head-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:5px;">结算账户</td>
|
||||
<td style="width:100px; padding:5px;">金额</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px;text-align: center;">合计:</td>
|
||||
<td style="width:100px;"><span id="otherMoneyTotalDlg"></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table class="tabs-tmp">
|
||||
<tr class="money-content-tmp">
|
||||
<td style="width:30px;"></td>
|
||||
<td style="width:140px; padding:3px;"><select class="money-id-dlg" style="width:140px;"></select></td>
|
||||
<td style="width:100px; padding:3px;"><input class="other-money-dlg" style="width:100px;"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div id="otherMoneyDlgBtn">
|
||||
<a href="javascript:void(0)" id="saveOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
|
||||
<a href="javascript:void(0)" id="cancelOtherMoneyDlg" class="easyui-linkbutton" iconCls="icon-cancel">取消</a>
|
||||
</div>
|
||||
<div id="supplierDlg" class="easyui-dialog" style="width:580px;padding:10px 20px"
|
||||
closed="true" buttons="#supplierDlgBtn" 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="supplierDlgBtn">
|
||||
<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>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,320 +1,319 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>结算账户查询</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>名称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>编号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
|
||||
modal="true" collapsible="false" closable="true">
|
||||
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
collapsible: false,
|
||||
selectOnCheck: false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
checkOnSelect: false,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pagination: true,
|
||||
//自动截取数据
|
||||
//nowrap : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{title: '名称', field: 'name', width: 100},
|
||||
{title: '编号', field: 'serialno', width: 150, align: "center"},
|
||||
{title: '期初金额', field: 'initialamount', width: 100, align: "center"},
|
||||
{title: '本月发生额', field: 'thismonthamount', width: 100, align: "center"},
|
||||
{title: '当前余额', field: 'currentamount', width: 100, align: "center"},
|
||||
{
|
||||
title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount;
|
||||
str += '<img src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/> <a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a> ';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
showAccountDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchSerialNo")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showAccountDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
showAccountDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountDetails(pageNo, pageSize) {
|
||||
var name = $.trim($("#searchName").val());
|
||||
var serialNo = $.trim($("#searchSerialNo").val());
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/account/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: name,
|
||||
serialNo: serialNo,
|
||||
remark: ""
|
||||
}),
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
if(res.data && res.data.page) {
|
||||
$("#tableData").datagrid('loadData', res.data.page);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showAccountInOutList(accountInfo) {
|
||||
var info = accountInfo.split("AaBb");
|
||||
var accountId = info[0];
|
||||
var initialAmount = info[3];
|
||||
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
initAccountDetailData(accountId);
|
||||
getAccountInOutList(accountId, initialAmount, 1, initPageSize);
|
||||
ininAccountDetailPager(accountId, initialAmount);
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initAccountDetailData(accountId) {
|
||||
$('#accountTableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
collapsible: false,
|
||||
selectOnCheck: false,
|
||||
//单击行是否选中
|
||||
checkOnSelect: false,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 150,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.type + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '类型', field: 'type', width: 100},
|
||||
{title: '单位信息', field: 'supplierName', width: 150},
|
||||
{
|
||||
title: '金额', field: 'changeAmount', width: 80,
|
||||
formatter: function (value, row) {
|
||||
if (row.aList && row.amList) {
|
||||
var aListArr = row.aList.toString().split(",");
|
||||
var amListArr = row.amList.toString().split(",");
|
||||
var res = "";
|
||||
for (var i = 0; i < aListArr.length; i++) {
|
||||
if (aListArr[i] == accountId) {
|
||||
res = amListArr[i];
|
||||
}
|
||||
}
|
||||
return res + "[多账户]";
|
||||
}
|
||||
else {
|
||||
return row.changeAmount;
|
||||
}
|
||||
}
|
||||
},
|
||||
{title: '余额', field: 'balance', width: 80},
|
||||
{title: '入库出库日期', field: 'operTime', width: 180}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//分页信息处理
|
||||
function ininAccountDetailPager(accountId, initialAmount) {
|
||||
try {
|
||||
var opts = $("#accountTableData").datagrid('options');
|
||||
var pager = $("#accountTableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
getAccountInOutList(accountId, initialAmount, pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
function getAccountInOutList(accountId, initialAmount, pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/account/findAccountInOutList",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
accountId: accountId,
|
||||
initialAmount: initialAmount
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
$("#accountTableData").datagrid('loadData', res.data);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>结算账户查询</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>名称:</td>
|
||||
<td>
|
||||
<input type="text" name="searchName" id="searchName" style="width:70px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>编号:</td>
|
||||
<td>
|
||||
<input type="text" name="searchSerialNo" id="searchSerialNo" style="width:70px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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="accountDetailListDlg" class="easyui-dialog" style="width:900px;height:500px;padding:10px 20px" closed="true"
|
||||
modal="true" collapsible="false" closable="true">
|
||||
<table id="accountTableData" style="top:50px;border-bottom-color:#FFFFFF"></table>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
//初始化界面
|
||||
$(function () {
|
||||
initTableData();
|
||||
ininPager();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
//iconCls:'icon-save',
|
||||
//width:700,
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
collapsible: false,
|
||||
selectOnCheck: false,
|
||||
//fitColumns:true,
|
||||
//单击行是否选中
|
||||
checkOnSelect: false,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pagination: true,
|
||||
//自动截取数据
|
||||
//nowrap : true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{title: '名称', field: 'name', width: 100},
|
||||
{title: '编号', field: 'serialno', width: 150, align: "center"},
|
||||
{title: '期初金额', field: 'initialamount', width: 100, align: "center"},
|
||||
{title: '本月发生额', field: 'thismonthamount', width: 100, align: "center"},
|
||||
{title: '当前余额', field: 'currentamount', width: 100, align: "center"},
|
||||
{
|
||||
title: '操作', field: 'op', width: 100, align: "center", formatter: function (value, rec) {
|
||||
var str = '';
|
||||
var rowInfo = rec.id + 'AaBb' + rec.name + 'AaBb' + rec.serialno + 'AaBb' + rec.initialamount + 'AaBb' + rec.currentamount;
|
||||
str += '<img src="/js/easyui-1.3.5/themes/icons/list.png" style="cursor: pointer;" onclick="showAccountInOutList(\'' + rowInfo + '\');"/> <a onclick="showAccountInOutList(\'' + rowInfo + '\');" style="text-decoration:none;color:black;" href="javascript:void(0)">流水</a> ';
|
||||
return str;
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
showAccountDetails(1, initPageSize);
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchName" || obj.id == "searchSerialNo")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showAccountDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
showAccountDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function showAccountDetails(pageNo, pageSize) {
|
||||
var name = $.trim($("#searchName").val());
|
||||
var serialNo = $.trim($("#searchSerialNo").val());
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/account/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: name,
|
||||
serialNo: serialNo,
|
||||
remark: ""
|
||||
}),
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
if(res.data && res.data.page) {
|
||||
$("#tableData").datagrid('loadData', res.data.page);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showAccountInOutList(accountInfo) {
|
||||
var info = accountInfo.split("AaBb");
|
||||
var accountId = info[0];
|
||||
var initialAmount = info[3];
|
||||
$('#accountDetailListDlg').dialog('open').dialog('setTitle', '<img src="/js/easyui-1.3.5/themes/icons/pencil.png"/> 查看账户流水');
|
||||
$(".window-mask").css({width: webW, height: webH});
|
||||
initAccountDetailData(accountId);
|
||||
getAccountInOutList(accountId, initialAmount, 1, initPageSize);
|
||||
ininAccountDetailPager(accountId, initialAmount);
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initAccountDetailData(accountId) {
|
||||
$('#accountTableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: false,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
collapsible: false,
|
||||
selectOnCheck: false,
|
||||
//单击行是否选中
|
||||
checkOnSelect: false,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pagination: true,
|
||||
pageSize: initPageSize,
|
||||
pageList: initPageNum,
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 150,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.type + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '类型', field: 'type', width: 100},
|
||||
{title: '单位信息', field: 'supplierName', width: 150},
|
||||
{
|
||||
title: '金额', field: 'changeAmount', width: 80,
|
||||
formatter: function (value, row) {
|
||||
if (row.aList && row.amList) {
|
||||
var aListArr = row.aList.toString().split(",");
|
||||
var amListArr = row.amList.toString().split(",");
|
||||
var res = "";
|
||||
for (var i = 0; i < aListArr.length; i++) {
|
||||
if (aListArr[i] == accountId) {
|
||||
res = amListArr[i];
|
||||
}
|
||||
}
|
||||
return res + "[多账户]";
|
||||
}
|
||||
else {
|
||||
return row.changeAmount;
|
||||
}
|
||||
}
|
||||
},
|
||||
{title: '余额', field: 'balance', width: 80},
|
||||
{title: '入库出库日期', field: 'operTime', width: 180}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//分页信息处理
|
||||
function ininAccountDetailPager(accountId, initialAmount) {
|
||||
try {
|
||||
var opts = $("#accountTableData").datagrid('options');
|
||||
var pager = $("#accountTableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
getAccountInOutList(accountId, initialAmount, pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
function getAccountInOutList(accountId, initialAmount, pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/account/findAccountInOutList",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
accountId: accountId,
|
||||
initialAmount: initialAmount
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
$("#accountTableData").datagrid('loadData', res.data);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,261 +1,260 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>进货统计</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{title: '进货数量', field: 'InSum', width: 60},
|
||||
{title: '进货金额', field: 'InSumPrice', width: 60},
|
||||
{title: '退货数量', field: 'OutSum', width: 60},
|
||||
{title: '退货金额', field: 'OutSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/buyIn",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>进货统计</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{title: '进货数量', field: 'InSum', width: 60},
|
||||
{title: '进货金额', field: 'InSumPrice', width: 60},
|
||||
{title: '退货数量', field: 'OutSum', width: 60},
|
||||
{title: '退货金额', field: 'OutSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/buyIn",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -344,8 +344,7 @@
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,315 +1,314 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>入库明细</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>供应商:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var supUrl = "/supplier/findBySelect_sup"; //供应商接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化供应商信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化供应商
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: supUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 140,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.newType + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '商品名称', field: 'mname', width: 120},
|
||||
{title: '商品型号', field: 'model', width: 100},
|
||||
{title: '单价', field: 'unitPrice', width: 60},
|
||||
{title: '入库数量', field: 'operNumber', width: 60},
|
||||
{title: '金额', field: 'allPrice', width: 60},
|
||||
{title: '供应商', field: 'sname', width: 200},
|
||||
{title: '仓库', field: 'dname', width: 120},
|
||||
{title: '入库日期', field: 'operTime', width: 80},
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInDetail",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "入库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>入库明细</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>供应商:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var supUrl = "/supplier/findBySelect_sup"; //供应商接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化供应商信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化供应商
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: supUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 140,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.newType + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '商品名称', field: 'mname', width: 120},
|
||||
{title: '商品型号', field: 'model', width: 100},
|
||||
{title: '单价', field: 'unitPrice', width: 60},
|
||||
{title: '入库数量', field: 'operNumber', width: 60},
|
||||
{title: '金额', field: 'allPrice', width: 60},
|
||||
{title: '供应商', field: 'sname', width: 200},
|
||||
{title: '仓库', field: 'dname', width: 120},
|
||||
{title: '入库日期', field: 'operTime', width: 80},
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInDetail",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "入库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,304 +1,303 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>入库汇总</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>供应商:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var kid = sessionStorage.getItem("userId");
|
||||
var supUrl = "/supplier/findBySelect_sup"; //供应商接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化供应商信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化供应商
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: supUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: kid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '商品名称', field: 'mName', width: 150},
|
||||
{title: '商品型号', field: 'model', width: 150},
|
||||
{title: '商品类型', field: 'categoryName', width: 120},
|
||||
{title: '入库数量', field: 'numSum', width: 120},
|
||||
{title: '入库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInOutMaterialCount",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "入库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>入库汇总</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>供应商:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var kid = sessionStorage.getItem("userId");
|
||||
var supUrl = "/supplier/findBySelect_sup"; //供应商接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化供应商信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化供应商
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: supUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: kid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '商品名称', field: 'mName', width: 150},
|
||||
{title: '商品型号', field: 'model', width: 150},
|
||||
{title: '商品类型', field: 'categoryName', width: 120},
|
||||
{title: '入库数量', field: 'numSum', width: 120},
|
||||
{title: '入库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInOutMaterialCount",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "入库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,420 +1,419 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>库存状况</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="exprotBtn">导出</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
|
||||
<span class="total-count"></span>
|
||||
</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
var kid = sessionStorage.getItem("userId");
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
exportExcel();
|
||||
print();
|
||||
});
|
||||
|
||||
//导出EXCEL
|
||||
function exportExcel() {
|
||||
$("#exprotBtn").off("click").on("click", function () {
|
||||
if (!$("#searchPanel .total-count").text()) {
|
||||
$.messager.alert('导出提示', '请先选择月份再进行查询!', 'error');
|
||||
}
|
||||
else {
|
||||
showEachDetails(1, 3000);
|
||||
//此处直接去做get请求,用下面的查询每月统计的方法,去获取list,参数长度虽长,但还是可以用get
|
||||
//window.location.href = "/depotItem/exportExcel.action?browserType=" + getOs();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: kid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$("#searchProjectId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{
|
||||
title: '单价', field: 'UnitPrice', width: 60, formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
},
|
||||
{title: '上月结存数量', field: 'prevSum', width: 80},
|
||||
{title: '入库数量', field: 'InSum', width: 60},
|
||||
{title: '出库数量', field: 'OutSum', width: 60},
|
||||
{title: '本月结存数量', field: 'thisSum', width: 80},
|
||||
{
|
||||
title: '结存金额', field: 'thisAllPrice', width: 60,
|
||||
formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showEachDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showEachDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showEachDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
if (pageSize === 3000) {
|
||||
window.location.href = "/depotItem/exportExcel.action?browserType=" + getOs() + "&pageNo=" + pageNo + "&pageSize=" + pageSize + "&ProjectId=" + $.trim($("#searchProjectId").val()) + "&MonthTime=" + $("#searchMonth").val() + "&HeadIds=" + HeadIds + "&MaterialIds=" + MIds;
|
||||
}
|
||||
else {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/findByAll",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
$("#tableData").datagrid('loadData', res.data);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
//总金额
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/totalCountMoney",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
if(res.data && res.data.totalCount) {
|
||||
var count = res.data.totalCount.toString();
|
||||
if (count.lastIndexOf('.') > -1) {
|
||||
count = count.substring(0, count.lastIndexOf('.') + 3);
|
||||
}
|
||||
$("#searchPanel .total-count").text("本月合计金额:" + count + "元");//本月合计金额
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>库存状况</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-redo" id="exprotBtn">导出</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
|
||||
<span class="total-count"></span>
|
||||
</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
var kid = sessionStorage.getItem("userId");
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
exportExcel();
|
||||
print();
|
||||
});
|
||||
|
||||
//导出EXCEL
|
||||
function exportExcel() {
|
||||
$("#exprotBtn").off("click").on("click", function () {
|
||||
if (!$("#searchPanel .total-count").text()) {
|
||||
$.messager.alert('导出提示', '请先选择月份再进行查询!', 'error');
|
||||
}
|
||||
else {
|
||||
showEachDetails(1, 3000);
|
||||
//此处直接去做get请求,用下面的查询每月统计的方法,去获取list,参数长度虽长,但还是可以用get
|
||||
//window.location.href = "/depotItem/exportExcel.action?browserType=" + getOs();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: kid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
}
|
||||
}
|
||||
}
|
||||
$("#searchProjectId").empty().append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{
|
||||
title: '单价', field: 'UnitPrice', width: 60, formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
},
|
||||
{title: '上月结存数量', field: 'prevSum', width: 80},
|
||||
{title: '入库数量', field: 'InSum', width: 60},
|
||||
{title: '出库数量', field: 'OutSum', width: 60},
|
||||
{title: '本月结存数量', field: 'thisSum', width: 80},
|
||||
{
|
||||
title: '结存金额', field: 'thisAllPrice', width: 60,
|
||||
formatter: function (value, row, index) {
|
||||
return value.toFixed(2);
|
||||
}
|
||||
}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showEachDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showEachDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showEachDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
if (pageSize === 3000) {
|
||||
window.location.href = "/depotItem/exportExcel?browserType=" + getOs() + "¤tPage=" + pageNo + "&pageSize=" + pageSize + "&projectId=" + $.trim($("#searchProjectId").val()) + "&monthTime=" + $("#searchMonth").val() + "&headIds=" + HeadIds + "&materialIds=" + mIds;
|
||||
}
|
||||
else {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/findByAll",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
$("#tableData").datagrid('loadData', res.data);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
//总金额
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/totalCountMoney",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
if(res.data && res.data.totalCount) {
|
||||
var count = res.data.totalCount.toString();
|
||||
if (count.lastIndexOf('.') > -1) {
|
||||
count = count.substring(0, count.lastIndexOf('.') + 3);
|
||||
}
|
||||
$("#searchPanel .total-count").text("本月合计金额:" + count + "元");//本月合计金额
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,315 +1,314 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>出库明细</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>客户:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var cusUrl = "/supplier/findBySelect_cus?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化客户信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化客户
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: cusUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 140,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.newType + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '商品名称', field: 'mname', width: 120},
|
||||
{title: '商品型号', field: 'model', width: 100},
|
||||
{title: '单价', field: 'unitPrice', width: 60},
|
||||
{title: '出库数量', field: 'operNumber', width: 60},
|
||||
{title: '金额', field: 'allPrice', width: 60},
|
||||
{title: '客户', field: 'sname', width: 200},
|
||||
{title: '仓库', field: 'dname', width: 120},
|
||||
{title: '出库日期', field: 'operTime', width: 80}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInDetail",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "出库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>出库明细</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/common/outlook_in.js"></script>
|
||||
<script type="text/javascript" src="/js/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>客户:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var cusUrl = "/supplier/findBySelect_cus?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化客户信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化客户
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: cusUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{
|
||||
title: '单据编号', field: 'number', width: 140,
|
||||
formatter: function (value, row) {
|
||||
return "<a class='n-link' onclick=\"newTab('" + row.number + "','../materials/bill_detail.html?n=" + row.number + "&type=" + row.newType + "','')\">"
|
||||
+ row.number + "</a>";
|
||||
}
|
||||
},
|
||||
{title: '商品名称', field: 'mname', width: 120},
|
||||
{title: '商品型号', field: 'model', width: 100},
|
||||
{title: '单价', field: 'unitPrice', width: 60},
|
||||
{title: '出库数量', field: 'operNumber', width: 60},
|
||||
{title: '金额', field: 'allPrice', width: 60},
|
||||
{title: '客户', field: 'sname', width: 200},
|
||||
{title: '仓库', field: 'dname', width: 120},
|
||||
{title: '出库日期', field: 'operTime', width: 80}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInDetail",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "出库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,304 +1,303 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>出库汇总</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>客户:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var cusUrl = "/supplier/findBySelect_cus?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化客户信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化客户
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: cusUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '商品名称', field: 'mName', width: 150},
|
||||
{title: '商品型号', field: 'model', width: 150},
|
||||
{title: '商品类型', field: 'categoryName', width: 120},
|
||||
{title: '出库数量', field: 'numSum', width: 120},
|
||||
{title: '出库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInOutMaterialCount",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "出库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>出库汇总</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>客户:</td>
|
||||
<td>
|
||||
<input id="OrganId" name="OrganId" style="width:120px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>仓库:</td>
|
||||
<td>
|
||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>单据日期:</td>
|
||||
<td>
|
||||
<input type="text" name="searchBeginTime" id="searchBeginTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td>-</td>
|
||||
<td>
|
||||
<input type="text" name="searchEndTime" id="searchEndTime"
|
||||
onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var depotList = null;
|
||||
var depotID = null;
|
||||
var depotString = ""; //仓库列表
|
||||
var uid = sessionStorage.getItem("userId");
|
||||
var cusUrl = "/supplier/findBySelect_cus?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||
//初始化界面
|
||||
$(function () {
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
var thisDateTime = getNowFormatDateTime(); //当前时间
|
||||
$("#searchBeginTime").val(thisDate + "-01 00:00:00");
|
||||
$("#searchEndTime").val(thisDateTime);
|
||||
var userBusinessList = null;
|
||||
var userdepot = null;
|
||||
initSupplier(); //初始化客户信息
|
||||
initSystemData_UB();
|
||||
initSelectInfo_UB();
|
||||
initSystemData_depot();
|
||||
initSelectInfo_depot();
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化客户
|
||||
function initSupplier() {
|
||||
$('#OrganId').combobox({
|
||||
url: cusUrl,
|
||||
valueField: 'id',
|
||||
textField: 'supplier',
|
||||
filter: function (q, row) {
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].indexOf(q) > -1;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_UB() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/userBusiness/getBasicData",
|
||||
data: ({
|
||||
KeyId: uid,
|
||||
Type: "UserDepot"
|
||||
}),
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200) {
|
||||
if(res.data) {
|
||||
userBusinessList = res.data.userBusinessList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
userBusinessList = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_UB() {
|
||||
|
||||
if (userBusinessList != null) {
|
||||
if (userBusinessList.length > 0) {
|
||||
//用户对应的仓库列表 [1][2][3]...
|
||||
userdepot = userBusinessList[0].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化系统基础信息
|
||||
function initSystemData_depot() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depot/getAllList",
|
||||
//设置为同步
|
||||
async: false,
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if(res && res.code === 200) {
|
||||
depotList = res.data;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化页面选项卡
|
||||
function initSelectInfo_depot() {
|
||||
var options = "";
|
||||
|
||||
if (depotList != null) {
|
||||
options = "";
|
||||
for (var i = 0; i < depotList.length; i++) {
|
||||
var depot = depotList[i];
|
||||
|
||||
if (userdepot != null) {
|
||||
if (userdepot.indexOf("[" + depot.id + "]") != -1) {
|
||||
options += '<option value="' + depot.id + '">' + depot.name + '</option>';
|
||||
depotString = depotString + depot.id + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
depotString = depotString.substring(0, depotString.length - 1);
|
||||
$("#searchProjectId").empty().append('<option value="">全部</option>').append(options);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '商品名称', field: 'mName', width: 150},
|
||||
{title: '商品型号', field: 'model', width: 150},
|
||||
{title: '商品类型', field: 'categoryName', width: 120},
|
||||
{title: '出库数量', field: 'numSum', width: 120},
|
||||
{title: '出库金额', field: 'priceSum', width: 120}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
if (k == "13" && (obj.id == "Type" || obj.id == "Name")) {
|
||||
$("#savePerson").click();
|
||||
}
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchType")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//增加
|
||||
var url;
|
||||
var personID = 0;
|
||||
//保存编辑前的名称
|
||||
var orgPerson = "";
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findInOutMaterialCount",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
organId: $('#OrganId').combobox('getValue'),
|
||||
projectId: $.trim($("#searchProjectId").val()),
|
||||
depotIds: depotString,
|
||||
beginTime: $("#searchBeginTime").val(),
|
||||
endTime: $("#searchEndTime").val(),
|
||||
type: "出库"
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,264 +1,263 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>销售统计</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
|
||||
</td>
|
||||
<td><span class="tip">注:此处包含零售+批发销售</span></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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function () {
|
||||
$("#searchTable .tip").css("padding-left", "15px").css("color", "red");
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{title: '销售数量', field: 'OutSum', width: 60},
|
||||
{title: '销售金额', field: 'OutSumPrice', width: 60},
|
||||
{title: '退货数量', field: 'InSum', width: 60},
|
||||
{title: '退货金额', field: 'InSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/saleOut",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>销售统计</title>
|
||||
<meta charset="utf-8">
|
||||
<!-- 指定以IE8的方式来渲染 -->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8"/>
|
||||
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"/>
|
||||
<script type="text/javascript" src="/js/jquery-1.8.0.min.js"></script>
|
||||
<script type="text/javascript" src="/js/print/print.js"></script>
|
||||
<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 type="text/css" rel="stylesheet" href="/css/common.css"/>
|
||||
<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/My97DatePicker/WdatePicker.js"></script>
|
||||
<script type="text/javascript" src="/js/common/common.js"></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>月份:</td>
|
||||
<td>
|
||||
<input type="text" name="searchMonth" id="searchMonth" onClick="WdatePicker({dateFmt:'yyyy-MM'})"
|
||||
class="txt Wdate" style="width:180px;"/>
|
||||
</td>
|
||||
<td> </td>
|
||||
<td> </td>
|
||||
<td>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" id="searchBtn">查询</a>
|
||||
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-print" id="printBtn">打印</a>
|
||||
</td>
|
||||
<td><span class="tip">注:此处包含零售+批发销售</span></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>
|
||||
|
||||
<script type="text/javascript">
|
||||
var mPropertyList = ""; //商品属性列表
|
||||
//初始化界面
|
||||
$(function () {
|
||||
$("#searchTable .tip").css("padding-left", "15px").css("color", "red");
|
||||
var thisDate = getNowFormatMonth(); //当前月份
|
||||
$("#searchMonth").val(thisDate);
|
||||
initMProperty(); //初始化商品属性
|
||||
initTableData();
|
||||
ininPager();
|
||||
search();
|
||||
print();
|
||||
});
|
||||
|
||||
//初始化商品属性
|
||||
function initMProperty() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/materialProperty/list",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
search: JSON.stringify({
|
||||
name: ""
|
||||
}),
|
||||
currentPage: 1,
|
||||
pageSize: 100
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200){
|
||||
var thisRows = res.data.page.rows;
|
||||
for (var i = 0; i < thisRows.length; i++) {
|
||||
if (thisRows[i].enabled) {
|
||||
mPropertyList += thisRows[i].nativename + ",";
|
||||
}
|
||||
}
|
||||
if (mPropertyList) {
|
||||
mPropertyList = mPropertyList.substring(0, mPropertyList.length - 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询信息异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化表格数据
|
||||
function initTableData() {
|
||||
$('#tableData').datagrid({
|
||||
height: heightInfo,
|
||||
nowrap: false,
|
||||
rownumbers: true,
|
||||
//动画效果
|
||||
animate: false,
|
||||
//选中单行
|
||||
singleSelect: true,
|
||||
pagination: true,
|
||||
//交替出现背景
|
||||
striped: true,
|
||||
//loadFilter: pagerFilter,
|
||||
pageSize: 10,
|
||||
pageList: [10, 50, 100],
|
||||
columns: [[
|
||||
{title: '名称', field: 'MaterialName', width: 60},
|
||||
{title: '型号', field: 'MaterialModel', width: 80},
|
||||
{title: '扩展信息', field: 'MaterialOther', width: 150},
|
||||
{title: '单位', field: 'MaterialUnit', width: 80},
|
||||
{title: '销售数量', field: 'OutSum', width: 60},
|
||||
{title: '销售金额', field: 'OutSumPrice', width: 60},
|
||||
{title: '退货数量', field: 'InSum', width: 60},
|
||||
{title: '退货金额', field: 'InSumPrice', width: 60}
|
||||
]],
|
||||
onLoadError: function () {
|
||||
$.messager.alert('页面加载提示', '页面加载异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//初始化键盘enter事件
|
||||
$(document).keydown(function (event) {
|
||||
//兼容 IE和firefox 事件
|
||||
var e = window.event || event;
|
||||
var k = e.keyCode || e.which || e.charCode;
|
||||
//兼容 IE,firefox 兼容
|
||||
var obj = e.srcElement ? e.srcElement : e.target;
|
||||
//绑定键盘事件为 id是指定的输入框才可以触发键盘事件 13键盘事件 ---遗留问题 enter键效验 对话框会关闭问题
|
||||
//搜索按钮添加快捷键
|
||||
if (k == "13" && (obj.id == "searchMonth")) {
|
||||
$("#searchBtn").click();
|
||||
}
|
||||
});
|
||||
|
||||
//分页信息处理
|
||||
function ininPager() {
|
||||
try {
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage: function (pageNum, pageSize) {
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh', {
|
||||
pageNumber: pageNum,
|
||||
pageSize: pageSize
|
||||
});
|
||||
showDetails(pageNum, pageSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
$.messager.alert('异常处理提示', "分页信息异常 : " + e.name + ": " + e.message, 'error');
|
||||
}
|
||||
}
|
||||
|
||||
//搜索处理
|
||||
function search() {
|
||||
showDetails(1, initPageSize);
|
||||
var opts = $("#tableData").datagrid('options');
|
||||
var pager = $("#tableData").datagrid('getPager');
|
||||
opts.pageNumber = 1;
|
||||
opts.pageSize = initPageSize;
|
||||
pager.pagination('refresh',
|
||||
{
|
||||
pageNumber: 1,
|
||||
pageSize: initPageSize
|
||||
});
|
||||
}
|
||||
|
||||
$("#searchBtn").unbind().bind({
|
||||
click: function () {
|
||||
search();
|
||||
}
|
||||
});
|
||||
|
||||
function showDetails(pageNo, pageSize) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotHead/findByMonth",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
monthTime: $("#searchMonth").val()
|
||||
}),
|
||||
success: function (res) {
|
||||
if(res && res.code === 200 && res.data) {
|
||||
var HeadIds = res.data.HeadIds;
|
||||
if (HeadIds) {
|
||||
//获取排序后的产品ID
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/material/findByOrder",
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
var mIds = res.data.mIds;
|
||||
if (mIds) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/depotItem/saleOut",
|
||||
dataType: "json",
|
||||
data: ({
|
||||
currentPage: pageNo,
|
||||
pageSize: pageSize,
|
||||
monthTime: $("#searchMonth").val(),
|
||||
headIds: HeadIds,
|
||||
materialIds: mIds,
|
||||
mpList: mPropertyList
|
||||
}),
|
||||
success: function (res) {
|
||||
if (res && res.code === 200 && res.data) {
|
||||
$("#tableData").datagrid('loadData', res.data.rows);
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
$.messager.alert('查询提示', '本月无数据!', 'error');
|
||||
}
|
||||
}
|
||||
},
|
||||
//此处添加错误处理
|
||||
error: function () {
|
||||
$.messager.alert('查询提示', '查询数据后台异常,请稍后再试!', 'error');
|
||||
return;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -343,8 +343,7 @@
|
||||
//报表打印
|
||||
function print() {
|
||||
$("#printBtn").off("click").on("click", function () {
|
||||
var path = "<%=path %>";
|
||||
CreateFormPage('打印报表', $('#tableData'), path);
|
||||
CreateFormPage('打印报表', $('#tableData'));
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user