Commit 6a081353 authored by 季圣华's avatar 季圣华
Browse files

优化 礼品充值和礼品销售

parent d9a00b81
...@@ -723,9 +723,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel> ...@@ -723,9 +723,6 @@ public class DepotHeadAction extends BaseAction<DepotHeadModel>
private Map<String,Object> getConditionHead_Gift_In() { private Map<String,Object> getConditionHead_Gift_In() {
Map<String,Object> condition = new HashMap<String,Object>(); Map<String,Object> condition = new HashMap<String,Object>();
if(model.getProjectId()!=null) {
condition.put("AllocationProjectId_n_eq", model.getProjectId());
}
return condition; return condition;
} }
......
...@@ -97,16 +97,16 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO ...@@ -97,16 +97,16 @@ public class DepotItemDAO extends BaseDAO<DepotItem> implements DepotItemIDAO
//多表联查,多表连查,此处用到了createSQLQuery,可以随便写sql语句,很方便 //多表联查,多表连查,此处用到了createSQLQuery,可以随便写sql语句,很方便
Query query; Query query;
StringBuffer queryString = new StringBuffer(); StringBuffer queryString = new StringBuffer();
queryString.append("select sum(OperNumber) as OperNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and SubType='" + subType +"'"); queryString.append("select sum(OperNumber) as OperNumber from jsh_depotitem,jsh_depothead where jsh_depotitem.HeaderId = jsh_depothead.id and jsh_depothead.SubType='" + subType +"'");
if(ProjectId!=null) { if(ProjectId!=null) {
if(type.equals("in")){ if(type.equals("in")){
queryString.append(" and AllocationProjectId='" + ProjectId +"'"); //礼品充值时 queryString.append(" and jsh_depotitem.AnotherDepotId='" + ProjectId +"'"); //礼品充值时
} }
else if(type.equals("out")){ else if(type.equals("out")){
queryString.append(" and DepotId='" + ProjectId +"'"); queryString.append(" and jsh_depotitem.DepotId='" + ProjectId +"'");
} }
} }
queryString.append(" and MaterialId ="+ MId); queryString.append(" and jsh_depotitem.MaterialId ="+ MId);
query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch())); query = this.getHibernateTemplate().getSessionFactory().getCurrentSession().createSQLQuery(queryString + SearchConditionUtil.getCondition(pageUtil.getAdvSearch()));
pageUtil.setTotalCount(query.list().size()); pageUtil.setTotalCount(query.list().size());
pageUtil.setPageList(query.list()); pageUtil.setPageList(query.list());
......
...@@ -33,21 +33,17 @@ ...@@ -33,21 +33,17 @@
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable"> <table id="searchTable">
<tr> <tr>
<td>礼品卡:</td>
<td>
<input id="searchGiftId" name="searchGiftId" style="width:110px;" />
</td>
<td>单据编号:</td> <td>单据编号:</td>
<td> <td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/> <input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
</td> </td>
<td>-</td> <td>-</td>
<td> <td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
...@@ -63,45 +59,36 @@ ...@@ -63,45 +59,36 @@
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div> </div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>礼品卡:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<input id="GiftId" name="GiftId" style="width:120px;" /> <input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width:140px;"/>
</td> </td>
<td>单据日期:</td> <td style="width:70px;">单据编号:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/> <input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td> </td>
<td>单据编号:</td> <td></td>
<td style="padding:5px"> <td></td>
<input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/> <td></td>
</td> <td></td>
<td style="width:50px;"></td> <td style="width:100px;"></td>
<td style="padding:5px;width:120px;"></td> </tr>
</tr> <tr>
<tr> <td colspan="9">
<td>经手人:</td> <!-- 商品列表table -->
<td style="padding:5px"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select> </td>
</td> </tr>
<td>单据备注:</td> <tr>
<td style="padding:5px" colspan="3"> <td colspan="9">
<input name="Remark" id="Remark" class="easyui-validatebox" style="width:320px;"/> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
</td> </td>
<td></td> </tr>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
<td colspan="7">
<!-- 商品列表table -->
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form> </form>
...@@ -110,46 +97,37 @@ ...@@ -110,46 +97,37 @@
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <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> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px" <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" modal="true" cache="false" collapsible="false" closable="true"> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table> <table>
<tr> <tr>
<td>发货仓库:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:120px;"> <td style="padding:5px;width:140px;">
<span id="ProjectIdShow"></span> <span id="OperTimeShow"></span>
</td> </td>
<td>单据日期:</td> <td style="width:70px;">单据编号:</td>
<td style="padding:5px;width:120px;"> <td style="padding:5px;width:140px;">
<span id="OperTimeShow"></span> <span id="NumberShow"></span>
</td> </td>
<td>单据编号:</td> <td></td>
<td style="padding:5px;width:120px;"> <td></td>
<span id="NumberShow"></span> <td></td>
</td> <td></td>
<td style="width:50px;"></td> <td style="width:100px;"></td>
<td style="padding:5px;width:120px;"> </tr>
</td> <tr>
</tr> <td colspan="9" style="width: 1130px;">
<tr> <!-- 商品列表table -->
<td>经手人:</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td style="padding:5px"> </td>
<span id="HandsPersonIdShow"></span> </tr>
</td> <tr>
<td>单据备注:</td> <td style="width:60px;">单据备注:</td>
<td style="padding:5px" colspan="3"> <td colspan="8" style="height:35px;">
<span id="RemarkShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td></td> </tr>
<td></td> </table>
</tr>
<tr>
<td>商品列表:</td>
<td colspan="7">
<!-- 商品列表table -->
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
</table>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -33,21 +33,17 @@ ...@@ -33,21 +33,17 @@
<div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false"> <div id = "searchPanel" class="easyui-panel" style="padding:3px;" title="查询窗口" iconCls="icon-search" collapsible="true" closable="false">
<table id="searchTable"> <table id="searchTable">
<tr> <tr>
<td>发货仓库:</td>
<td>
<select name="searchProjectId" id="searchProjectId" style="width:80px;"></select>
</td>
<td>单据编号:</td> <td>单据编号:</td>
<td> <td>
<input type="text" name="searchNumber" id="searchNumber" style="width:60px;"/> <input type="text" name="searchNumber" id="searchNumber" style="width:100px;"/>
</td> </td>
<td>单据日期:</td> <td>单据日期:</td>
<td> <td>
<input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/> <input type="text" name="searchBeginTime" id="searchBeginTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
</td> </td>
<td>-</td> <td>-</td>
<td> <td>
<input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:80px;"/> <input type="text" name="searchEndTime" id="searchEndTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:100px;"/>
</td> </td>
<td>&nbsp;</td> <td>&nbsp;</td>
<td> <td>
...@@ -63,48 +59,36 @@ ...@@ -63,48 +59,36 @@
<table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table> <table id="tableData" style="top:300px;border-bottom-color:#FFFFFF"></table>
</div> </div>
<div id="depotHeadDlg" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px" <div id="depotHeadDlg" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true"> closed="true" buttons="#dlg-buttons" modal="true" cache="false" collapsible="false" closable="true">
<form id="depotHeadFM" method="post" novalidate> <form id="depotHeadFM" method="post" novalidate>
<table> <table>
<tr> <tr>
<td>发货仓库:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px"> <td style="padding:5px">
<select name="ProjectId" id="ProjectId" style="width:120px;"></select> <input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="txt Wdate" style="width: 140px;"/>
</td> </td>
<td>单据日期:</td> <td style="width:70px;">单据编号:</td>
<td style="padding:5px"> <td style="padding:5px">
<input type="text" name="OperTime" id="OperTime" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})" class="txt Wdate" style="width:120px;"/> <input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 140px;"/>
</td> </td>
<td>经手人:</td> <td></td>
<td style="padding:5px"> <td></td>
<select name="HandsPersonId" id="HandsPersonId" style="width:120px;"></select> <td></td>
</td> <td></td>
<td style="width:50px;"></td> <td style="width:100px;"></td>
<td style="padding:5px;width:120px;"></td> </tr>
</tr> <tr>
<tr> <td colspan="9">
<td>礼品卡:</td> <!-- 商品列表table -->
<td style="padding:5px"> <table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
<input id="GiftId" name="GiftId" style="width:120px;" /> </td>
</td> </tr>
<td>单据编号:</td> <tr>
<td style="padding:5px"><input name="Number" id="Number" class="easyui-validatebox" data-options="required:true,validType:'length[2,30]'" style="width: 120px;"/> <td colspan="9">
</td> <textarea name="Remark" id="Remark" rows="2" cols="2" placeholder="暂无备注信息" style="width: 1130px; height:35px;"></textarea>
<td>单据备注:</td> </td>
<td style="padding:5px"> </tr>
<input name="Remark" id="Remark" class="easyui-validatebox" style="width: 120px;"/>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
<td colspan="7">
<!-- 商品列表table -->
<table id="materialData" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
</table> </table>
<input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/> <input type="hidden" name="clientIp" id="clientIp" value="<%=clientIp %>"/>
</form> </form>
...@@ -113,50 +97,37 @@ ...@@ -113,50 +97,37 @@
<a href="javascript:void(0)" id="saveDepotHead" class="easyui-linkbutton" iconCls="icon-ok">保存</a> <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> <a href="javascript:void(0)" id="cancelDepotHead" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#depotHeadDlg').dialog('close')">取消</a>
</div> </div>
<div id="depotHeadDlgShow" class="easyui-dialog" style="width:850px;padding:10px 20px;top:20px" <div id="depotHeadDlgShow" class="easyui-dialog" style="width:1200px;padding:10px 20px;top:50px"
closed="true" modal="true" cache="false" collapsible="false" closable="true"> closed="true" modal="true" cache="false" collapsible="false" closable="true">
<table> <table>
<tr> <tr>
<td>发货仓库:</td> <td style="width:70px;">单据日期:</td>
<td style="padding:5px;width:120px;"> <td style="padding:5px;width:140px;">
<span id="ProjectIdShow"></span> <span id="OperTimeShow"></span>
</td> </td>
<td>单据日期:</td> <td style="width:70px;">单据编号:</td>
<td style="padding:5px;width:120px;"> <td style="padding:5px;width:140px;">
<span id="OperTimeShow"></span> <span id="NumberShow"></span>
</td> </td>
<td>经手人:</td> <td></td>
<td style="padding:5px"> <td></td>
<span id="HandsPersonIdShow"></span> <td></td>
</td> <td></td>
<td style="width:50px;"></td> <td style="width:100px;"></td>
<td style="padding:5px;width:120px;"> </tr>
</td> <tr>
</tr> <td colspan="9" style="width: 1130px;">
<tr> <!-- 商品列表table -->
<td>礼品卡:</td> <table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
<td style="padding:5px;width:120px;"> </td>
<span id="AllocationProjectIdShow"></span> </tr>
</td> <tr>
<td>单据编号:</td> <td style="width:60px;">单据备注:</td>
<td style="padding:5px"> <td colspan="8" style="height:35px;">
<span id="NumberShow"></span> <span id="RemarkShow" style="width: 1070px; height:35px;"></span>
</td> </td>
<td>单据备注:</td> </tr>
<td style="padding:5px"> </table>
<span id="RemarkShow"></span>
</td>
<td></td>
<td></td>
</tr>
<tr>
<td>商品列表:</td>
<td colspan="7">
<!-- 商品列表table -->
<table id="materialDataShow" style="top:100px;border-bottom-color:#FFFFFF"></table>
</td>
</tr>
</table>
</div> </div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -174,9 +174,6 @@ ...@@ -174,9 +174,6 @@
type:"post", type:"post",
url: "<%=path %>/depotHead/findGiftReport.action", url: "<%=path %>/depotHead/findGiftReport.action",
dataType: "json", dataType: "json",
data: ({
ProjectId: searchGiftId
}),
success: function (res) { success: function (res) {
var HeadIds = res.HeadIds; var HeadIds = res.HeadIds;
if(HeadIds) { if(HeadIds) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment