出入库报表增加供应商的栏目
This commit is contained in:
@@ -640,11 +640,12 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
|||||||
pageUtil.setCurPage(model.getPageNo());
|
pageUtil.setCurPage(model.getPageNo());
|
||||||
Long pid =model.getProjectId();
|
Long pid =model.getProjectId();
|
||||||
String dids =model.getDepotIds();
|
String dids =model.getDepotIds();
|
||||||
|
Long oId = model.getOrganId();
|
||||||
String beginTime = model.getBeginTime();
|
String beginTime = model.getBeginTime();
|
||||||
String endTime = model.getEndTime();
|
String endTime = model.getEndTime();
|
||||||
String type = model.getType();
|
String type = model.getType();
|
||||||
try{
|
try{
|
||||||
depotHeadService.findInDetail(pageUtil,beginTime,endTime,type,pid,dids);
|
depotHeadService.findInDetail(pageUtil,beginTime,endTime,type,pid,dids,oId);
|
||||||
List dataList = pageUtil.getPageList();
|
List dataList = pageUtil.getPageList();
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
@@ -688,11 +689,12 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
|||||||
pageUtil.setCurPage(model.getPageNo());
|
pageUtil.setCurPage(model.getPageNo());
|
||||||
Long pid =model.getProjectId();
|
Long pid =model.getProjectId();
|
||||||
String dids =model.getDepotIds();
|
String dids =model.getDepotIds();
|
||||||
|
Long oId = model.getOrganId();
|
||||||
String beginTime = model.getBeginTime();
|
String beginTime = model.getBeginTime();
|
||||||
String endTime = model.getEndTime();
|
String endTime = model.getEndTime();
|
||||||
String type = model.getType();
|
String type = model.getType();
|
||||||
try{
|
try{
|
||||||
depotHeadService.findInOutMaterialCount(pageUtil, beginTime, endTime, type, pid, dids);
|
depotHeadService.findInOutMaterialCount(pageUtil, beginTime, endTime, type, pid, dids, oId);
|
||||||
List dataList = pageUtil.getPageList();
|
List dataList = pageUtil.getPageList();
|
||||||
JSONObject outer = new JSONObject();
|
JSONObject outer = new JSONObject();
|
||||||
outer.put("total", pageUtil.getTotalCount());
|
outer.put("total", pageUtil.getTotalCount());
|
||||||
@@ -707,7 +709,8 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
|
|||||||
item.put("mName", arr[1]); //商品名称
|
item.put("mName", arr[1]); //商品名称
|
||||||
item.put("Model", arr[2]); //商品型号
|
item.put("Model", arr[2]); //商品型号
|
||||||
item.put("categoryName", arr[3]); //商品类型
|
item.put("categoryName", arr[3]); //商品类型
|
||||||
item.put("priceSum", arr[4]); //金额
|
item.put("numSum", arr[4]); //数量
|
||||||
|
item.put("priceSum", arr[5]); //金额
|
||||||
dataArray.add(item);
|
dataArray.add(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException {
|
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException {
|
||||||
StringBuffer queryString = new StringBuffer();
|
StringBuffer queryString = new StringBuffer();
|
||||||
queryString.append("select dh.Number,m.`name`,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier,d.dName,date_format(dh.OperTime, '%Y-%m-%d') " +
|
queryString.append("select dh.Number,m.`name`,m.Model,di.UnitPrice,di.OperNumber,di.AllPrice,s.supplier,d.dName,date_format(dh.OperTime, '%Y-%m-%d') " +
|
||||||
"from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id " +
|
"from jsh_depothead dh inner join jsh_depotitem di on di.HeaderId=dh.id " +
|
||||||
@@ -60,6 +60,9 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
|||||||
"inner join jsh_supplier s on s.id=dh.OrganId " +
|
"inner join jsh_supplier s on s.id=dh.OrganId " +
|
||||||
"inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId " +
|
"inner join (select id,name as dName from jsh_depot) d on d.id=di.DepotId " +
|
||||||
"where dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' ");
|
"where dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' ");
|
||||||
|
if(oId!=null){
|
||||||
|
queryString.append(" and dh.OrganId = "+ oId );
|
||||||
|
}
|
||||||
if(pid!=null){
|
if(pid!=null){
|
||||||
queryString.append(" and di.DepotId=" + pid );
|
queryString.append(" and di.DepotId=" + pid );
|
||||||
}
|
}
|
||||||
@@ -84,21 +87,44 @@ public class DepotHeadDAO extends BaseDAO<DepotHead> implements DepotHeadIDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException {
|
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException {
|
||||||
StringBuffer queryString = new StringBuffer();
|
StringBuffer queryString = new StringBuffer();
|
||||||
queryString.append("select di.MaterialId, m.mName,m.Model,m.categoryName, "+
|
queryString.append("select di.MaterialId, m.mName,m.Model,m.categoryName, ");
|
||||||
" (select sum(jsh_depotitem.AllPrice) priceSum from jsh_depothead INNER JOIN jsh_depotitem " +
|
//数量汇总
|
||||||
"on jsh_depothead.id=jsh_depotitem.HeaderId where jsh_depotitem.MaterialId=di.MaterialId " +
|
queryString.append(" (select sum(jdi.BasicNumber) numSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " +
|
||||||
" and jsh_depothead.type='"+ type +"' and dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"'");
|
"on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " +
|
||||||
|
" and jdh.type='"+ type +"' and jdh.OperTime >='"+ beginTime +"' and jdh.OperTime <='"+ endTime +"'");
|
||||||
|
if(oId!=null){
|
||||||
|
queryString.append(" and jdh.OrganId = "+ oId );
|
||||||
|
}
|
||||||
if(pid!=null){
|
if(pid!=null){
|
||||||
queryString.append(" and di.DepotId=" + pid );
|
queryString.append(" and jdi.DepotId=" + pid );
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
queryString.append(" and di.DepotId in (" + dids + ")" );
|
queryString.append(" and jdi.DepotId in (" + dids + ")" );
|
||||||
}
|
}
|
||||||
queryString.append(" ) priceSum from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId " +
|
queryString.append(" ) numSum, ");
|
||||||
|
//金额汇总
|
||||||
|
queryString.append(" (select sum(jdi.AllPrice) priceSum from jsh_depothead jdh INNER JOIN jsh_depotitem jdi " +
|
||||||
|
"on jdh.id=jdi.HeaderId where jdi.MaterialId=di.MaterialId " +
|
||||||
|
" and jdh.type='"+ type +"' and jdh.OperTime >='"+ beginTime +"' and jdh.OperTime <='"+ endTime +"'");
|
||||||
|
if(oId!=null){
|
||||||
|
queryString.append(" and jdh.OrganId = "+ oId );
|
||||||
|
}
|
||||||
|
if(pid!=null){
|
||||||
|
queryString.append(" and jdi.DepotId=" + pid );
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
queryString.append(" and jdi.DepotId in (" + dids + ")" );
|
||||||
|
}
|
||||||
|
queryString.append(" ) priceSum ");
|
||||||
|
|
||||||
|
queryString.append(" from jsh_depothead dh INNER JOIN jsh_depotitem di on dh.id=di.HeaderId " +
|
||||||
" INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m " +
|
" INNER JOIN (SELECT jsh_material.id,jsh_material.name mName, Model,jsh_materialcategory.`Name` categoryName from jsh_material INNER JOIN jsh_materialcategory on jsh_material.CategoryId=jsh_materialcategory.Id) m " +
|
||||||
" on m.Id=di.MaterialId where dh.type='"+ type +"' and dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' ");
|
" on m.Id=di.MaterialId where dh.type='"+ type +"' and dh.OperTime >='"+ beginTime +"' and dh.OperTime <='"+ endTime +"' ");
|
||||||
|
if(oId!=null){
|
||||||
|
queryString.append(" and dh.OrganId = "+ oId );
|
||||||
|
}
|
||||||
if(pid!=null){
|
if(pid!=null){
|
||||||
queryString.append(" and di.DepotId=" + pid );
|
queryString.append(" and di.DepotId=" + pid );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ public interface DepotHeadIDAO extends BaseIDAO<DepotHead>
|
|||||||
|
|
||||||
public void batchSetStatus(Boolean status,String depotHeadIDs);
|
public void batchSetStatus(Boolean status,String depotHeadIDs);
|
||||||
|
|
||||||
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException;
|
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException;
|
||||||
|
|
||||||
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException;
|
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids, Long oId) throws JshException;
|
||||||
|
|
||||||
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException;
|
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ public interface DepotHeadIService extends BaseIService<DepotHead>
|
|||||||
|
|
||||||
public void batchSetStatus(Boolean status,String depotHeadIDs);
|
public void batchSetStatus(Boolean status,String depotHeadIDs);
|
||||||
|
|
||||||
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime, String type, Long pid,String dids)throws JshException;
|
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime, String type, Long pid,String dids,Long oId)throws JshException;
|
||||||
|
|
||||||
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime, String type, Long pid,String dids)throws JshException;
|
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime, String type, Long pid,String dids,Long oId)throws JshException;
|
||||||
|
|
||||||
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId)throws JshException;
|
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId)throws JshException;
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@ public class DepotHeadService extends BaseService<DepotHead> implements DepotHea
|
|||||||
depotHeadDao.batchSetStatus(status, depotHeadIDs);
|
depotHeadDao.batchSetStatus(status, depotHeadIDs);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException {
|
public void findInDetail(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException {
|
||||||
depotHeadDao.findInDetail(pageUtil,beginTime,endTime,type,pid,dids);
|
depotHeadDao.findInDetail(pageUtil,beginTime,endTime,type,pid,dids,oId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids) throws JshException {
|
public void findInOutMaterialCount(PageUtil pageUtil,String beginTime,String endTime,String type,Long pid,String dids,Long oId) throws JshException {
|
||||||
depotHeadDao.findInOutMaterialCount(pageUtil,beginTime,endTime,type,pid,dids);
|
depotHeadDao.findInOutMaterialCount(pageUtil,beginTime,endTime,type,pid,dids,oId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException {
|
public void findMaterialsListByHeaderId(PageUtil pageUtil,Long headerId) throws JshException {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
<td>单位名称:</td>
|
<td>客户:</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -30,6 +30,11 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>供应商:</td>
|
||||||
|
<td>
|
||||||
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
<td>仓库:</td>
|
<td>仓库:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||||
@@ -62,6 +67,8 @@
|
|||||||
var depotList = null;
|
var depotList = null;
|
||||||
var depotID = null;
|
var depotID = null;
|
||||||
var depotString = ""; //仓库列表
|
var depotString = ""; //仓库列表
|
||||||
|
var path = "<%=path %>";
|
||||||
|
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
$("#searchEndTime").val(thisDateTime);
|
$("#searchEndTime").val(thisDateTime);
|
||||||
var userBusinessList=null;
|
var userBusinessList=null;
|
||||||
var userdepot=null;
|
var userdepot=null;
|
||||||
|
initSupplier(); //初始化供应商信息
|
||||||
initSystemData_UB();
|
initSystemData_UB();
|
||||||
initSelectInfo_UB();
|
initSelectInfo_UB();
|
||||||
initSystemData_depot();
|
initSystemData_depot();
|
||||||
@@ -79,9 +87,20 @@
|
|||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
print();
|
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(){
|
function initSystemData_UB(){
|
||||||
@@ -290,6 +309,7 @@
|
|||||||
data: ({
|
data: ({
|
||||||
pageNo:pageNo,
|
pageNo:pageNo,
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
|
OrganId: $('#OrganId').combobox('getValue'),
|
||||||
ProjectId: $.trim($("#searchProjectId").val()),
|
ProjectId: $.trim($("#searchProjectId").val()),
|
||||||
DepotIds: depotString,
|
DepotIds: depotString,
|
||||||
BeginTime: $("#searchBeginTime").val(),
|
BeginTime: $("#searchBeginTime").val(),
|
||||||
|
|||||||
@@ -30,6 +30,11 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>供应商:</td>
|
||||||
|
<td>
|
||||||
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
<td>仓库:</td>
|
<td>仓库:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||||
@@ -62,6 +67,8 @@
|
|||||||
var depotList = null;
|
var depotList = null;
|
||||||
var depotID = null;
|
var depotID = null;
|
||||||
var depotString = ""; //仓库列表
|
var depotString = ""; //仓库列表
|
||||||
|
var path = "<%=path %>";
|
||||||
|
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
$("#searchEndTime").val(thisDateTime);
|
$("#searchEndTime").val(thisDateTime);
|
||||||
var userBusinessList=null;
|
var userBusinessList=null;
|
||||||
var userdepot=null;
|
var userdepot=null;
|
||||||
|
initSupplier(); //初始化供应商信息
|
||||||
initSystemData_UB();
|
initSystemData_UB();
|
||||||
initSelectInfo_UB();
|
initSelectInfo_UB();
|
||||||
initSystemData_depot();
|
initSystemData_depot();
|
||||||
@@ -79,8 +87,20 @@
|
|||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
print();
|
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(){
|
function initSystemData_UB(){
|
||||||
@@ -193,6 +213,7 @@
|
|||||||
{ title: '商品名称',field: 'mName',width:150},
|
{ title: '商品名称',field: 'mName',width:150},
|
||||||
{ title: '商品型号',field: 'Model',width:150},
|
{ title: '商品型号',field: 'Model',width:150},
|
||||||
{ title: '商品类型',field: 'categoryName',width:120},
|
{ title: '商品类型',field: 'categoryName',width:120},
|
||||||
|
{ title: '入库数量',field: 'numSum',width:120},
|
||||||
{ title: '入库金额',field: 'priceSum',width:120}
|
{ title: '入库金额',field: 'priceSum',width:120}
|
||||||
]],
|
]],
|
||||||
onLoadError:function()
|
onLoadError:function()
|
||||||
@@ -284,6 +305,7 @@
|
|||||||
data: ({
|
data: ({
|
||||||
pageNo:pageNo,
|
pageNo:pageNo,
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
|
OrganId: $('#OrganId').combobox('getValue'),
|
||||||
ProjectId: $.trim($("#searchProjectId").val()),
|
ProjectId: $.trim($("#searchProjectId").val()),
|
||||||
DepotIds: depotString,
|
DepotIds: depotString,
|
||||||
BeginTime: $("#searchBeginTime").val(),
|
BeginTime: $("#searchBeginTime").val(),
|
||||||
|
|||||||
@@ -30,6 +30,11 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>客户:</td>
|
||||||
|
<td>
|
||||||
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
<td>仓库:</td>
|
<td>仓库:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||||
@@ -62,6 +67,8 @@
|
|||||||
var depotList = null;
|
var depotList = null;
|
||||||
var depotID = null;
|
var depotID = null;
|
||||||
var depotString = ""; //仓库列表
|
var depotString = ""; //仓库列表
|
||||||
|
var path = "<%=path %>";
|
||||||
|
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
$("#searchEndTime").val(thisDateTime);
|
$("#searchEndTime").val(thisDateTime);
|
||||||
var userBusinessList=null;
|
var userBusinessList=null;
|
||||||
var userdepot=null;
|
var userdepot=null;
|
||||||
|
initSupplier(); //初始化客户信息
|
||||||
initSystemData_UB();
|
initSystemData_UB();
|
||||||
initSelectInfo_UB();
|
initSelectInfo_UB();
|
||||||
initSystemData_depot();
|
initSystemData_depot();
|
||||||
@@ -81,6 +89,18 @@
|
|||||||
print();
|
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(){
|
function initSystemData_UB(){
|
||||||
@@ -196,7 +216,7 @@
|
|||||||
{ title: '单价',field: 'unitPrice',width:60},
|
{ title: '单价',field: 'unitPrice',width:60},
|
||||||
{ title: '出库数量',field: 'operNumber',width:60},
|
{ title: '出库数量',field: 'operNumber',width:60},
|
||||||
{ title: '金额',field: 'allPrice',width:60},
|
{ title: '金额',field: 'allPrice',width:60},
|
||||||
{ title: '供应商',field: 'supplierName',width:200},
|
{ title: '客户',field: 'supplierName',width:200},
|
||||||
{ title: '仓库',field: 'depotName',width:120},
|
{ title: '仓库',field: 'depotName',width:120},
|
||||||
{ title: '出库日期',field: 'operTime',width:80},
|
{ title: '出库日期',field: 'operTime',width:80},
|
||||||
]],
|
]],
|
||||||
@@ -289,6 +309,7 @@
|
|||||||
data: ({
|
data: ({
|
||||||
pageNo:pageNo,
|
pageNo:pageNo,
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
|
OrganId: $('#OrganId').combobox('getValue'),
|
||||||
ProjectId: $.trim($("#searchProjectId").val()),
|
ProjectId: $.trim($("#searchProjectId").val()),
|
||||||
DepotIds: depotString,
|
DepotIds: depotString,
|
||||||
BeginTime: $("#searchBeginTime").val(),
|
BeginTime: $("#searchBeginTime").val(),
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
<script type="text/javascript" src="<%=path %>/js/My97DatePicker/WdatePicker.js"></script>
|
||||||
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
<script type="text/javascript" src="<%=path %>/js/common/common.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var kid = ${sessionScope.user.id};
|
var uid = ${sessionScope.user.id};
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -30,6 +30,11 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
|
<td>客户:</td>
|
||||||
|
<td>
|
||||||
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
|
</td>
|
||||||
|
<td> </td>
|
||||||
<td>仓库:</td>
|
<td>仓库:</td>
|
||||||
<td>
|
<td>
|
||||||
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
<select name="searchProjectId" id="searchProjectId" style="width:100px;"></select>
|
||||||
@@ -62,6 +67,8 @@
|
|||||||
var depotList = null;
|
var depotList = null;
|
||||||
var depotID = null;
|
var depotID = null;
|
||||||
var depotString = ""; //仓库列表
|
var depotString = ""; //仓库列表
|
||||||
|
var path = "<%=path %>";
|
||||||
|
var cusUrl = path + "/supplier/findBySelect_cus.action?UBType=UserCustomer&UBKeyId=" + uid; //客户接口
|
||||||
//初始化界面
|
//初始化界面
|
||||||
$(function()
|
$(function()
|
||||||
{
|
{
|
||||||
@@ -71,6 +78,7 @@
|
|||||||
$("#searchEndTime").val(thisDateTime);
|
$("#searchEndTime").val(thisDateTime);
|
||||||
var userBusinessList=null;
|
var userBusinessList=null;
|
||||||
var userdepot=null;
|
var userdepot=null;
|
||||||
|
initSupplier(); //初始化客户信息
|
||||||
initSystemData_UB();
|
initSystemData_UB();
|
||||||
initSelectInfo_UB();
|
initSelectInfo_UB();
|
||||||
initSystemData_depot();
|
initSystemData_depot();
|
||||||
@@ -79,8 +87,20 @@
|
|||||||
ininPager();
|
ininPager();
|
||||||
search();
|
search();
|
||||||
print();
|
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(){
|
function initSystemData_UB(){
|
||||||
@@ -88,7 +108,7 @@
|
|||||||
type:"post",
|
type:"post",
|
||||||
url: "<%=path %>/userBusiness/getBasicData.action",
|
url: "<%=path %>/userBusiness/getBasicData.action",
|
||||||
data: ({
|
data: ({
|
||||||
KeyId:kid,
|
KeyId:uid,
|
||||||
Type:"UserDepot"
|
Type:"UserDepot"
|
||||||
}),
|
}),
|
||||||
//设置为同步
|
//设置为同步
|
||||||
@@ -193,6 +213,7 @@
|
|||||||
{ title: '商品名称',field: 'mName',width:150},
|
{ title: '商品名称',field: 'mName',width:150},
|
||||||
{ title: '商品型号',field: 'Model',width:150},
|
{ title: '商品型号',field: 'Model',width:150},
|
||||||
{ title: '商品类型',field: 'categoryName',width:120},
|
{ title: '商品类型',field: 'categoryName',width:120},
|
||||||
|
{ title: '出库数量',field: 'numSum',width:120},
|
||||||
{ title: '出库金额',field: 'priceSum',width:120}
|
{ title: '出库金额',field: 'priceSum',width:120}
|
||||||
]],
|
]],
|
||||||
onLoadError:function()
|
onLoadError:function()
|
||||||
@@ -284,6 +305,7 @@
|
|||||||
data: ({
|
data: ({
|
||||||
pageNo:pageNo,
|
pageNo:pageNo,
|
||||||
pageSize:pageSize,
|
pageSize:pageSize,
|
||||||
|
OrganId: $('#OrganId').combobox('getValue'),
|
||||||
ProjectId: $.trim($("#searchProjectId").val()),
|
ProjectId: $.trim($("#searchProjectId").val()),
|
||||||
DepotIds: depotString,
|
DepotIds: depotString,
|
||||||
BeginTime: $("#searchBeginTime").val(),
|
BeginTime: $("#searchBeginTime").val(),
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
<div id = "searchPanel" class="easyui-panel" style="padding:10px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
|
||||||
<table id="searchTable">
|
<table id="searchTable">
|
||||||
<tr>
|
<tr>
|
||||||
<td>单位名称:</td>
|
<td>供应商:</td>
|
||||||
<td>
|
<td>
|
||||||
<input id="OrganId" name="OrganId" style="width:120px;" />
|
<input id="OrganId" name="OrganId" style="width:120px;" />
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user