增加-零售出库单据-增加会员卡号和部分字段的默认值
This commit is contained in:
parent
b1eaa0cc8b
commit
8aa1f98682
@ -345,6 +345,46 @@ public class SupplierAction extends BaseAction<SupplierModel>
|
|||||||
Log.errorFileSync(">>>>>>>>>回写查询客户信息结果异常", e);
|
Log.errorFileSync(">>>>>>>>>回写查询客户信息结果异常", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查找散户信息-下拉框
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public void findBySelect_retail()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PageUtil<Supplier> pageUtil = new PageUtil<Supplier>();
|
||||||
|
pageUtil.setPageSize(0);
|
||||||
|
pageUtil.setCurPage(0);
|
||||||
|
pageUtil.setAdvSearch(getCondition_Select_retail());
|
||||||
|
supplierService.find(pageUtil);
|
||||||
|
List<Supplier> dataList = pageUtil.getPageList();
|
||||||
|
//存放数据json数组
|
||||||
|
JSONArray dataArray = new JSONArray();
|
||||||
|
if(null != dataList)
|
||||||
|
{
|
||||||
|
for(Supplier supplier:dataList)
|
||||||
|
{
|
||||||
|
JSONObject item = new JSONObject();
|
||||||
|
item.put("id", supplier.getId());
|
||||||
|
//客户名称
|
||||||
|
item.put("supplier", supplier.getSupplier());
|
||||||
|
dataArray.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//回写查询结果
|
||||||
|
toClient(dataArray.toString());
|
||||||
|
}
|
||||||
|
catch (DataAccessException e)
|
||||||
|
{
|
||||||
|
Log.errorFileSync(">>>>>>>>>查找客户信息异常", e);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
Log.errorFileSync(">>>>>>>>>回写查询客户信息结果异常", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼接搜索条件
|
* 拼接搜索条件
|
||||||
@ -380,6 +420,7 @@ public class SupplierAction extends BaseAction<SupplierModel>
|
|||||||
condition.put("id_s_order", "desc");
|
condition.put("id_s_order", "desc");
|
||||||
return condition;
|
return condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拼接搜索条件-下拉框-客户
|
* 拼接搜索条件-下拉框-客户
|
||||||
* @return
|
* @return
|
||||||
@ -394,6 +435,21 @@ public class SupplierAction extends BaseAction<SupplierModel>
|
|||||||
condition.put("id_s_order", "desc");
|
condition.put("id_s_order", "desc");
|
||||||
return condition;
|
return condition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 拼接搜索条件-下拉框-散户
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private Map<String,Object> getCondition_Select_retail()
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 拼接搜索条件
|
||||||
|
*/
|
||||||
|
Map<String,Object> condition = new HashMap<String,Object>();
|
||||||
|
condition.put("type_s_like", "散户");
|
||||||
|
condition.put("id_s_order", "desc");
|
||||||
|
return condition;
|
||||||
|
}
|
||||||
|
|
||||||
//=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
|
//=============以下spring注入以及Model驱动公共方法,与Action处理无关==================
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -82,4 +82,64 @@ function getUrlParam(name) {
|
|||||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
|
||||||
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
var r = window.location.search.substr(1).match(reg); //匹配目标参数
|
||||||
if (r != null) return unescape(r[2]); return null; //返回参数值
|
if (r != null) return unescape(r[2]); return null; //返回参数值
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* js获取当前时间, 格式“yyyy-MM-dd HH:MM:SS”
|
||||||
|
*/
|
||||||
|
function getNowFormatDateTime() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator1 = "-";
|
||||||
|
var seperator2 = ":";
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
var strDate = date.getDate();
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (strDate >= 0 && strDate <= 9) {
|
||||||
|
strDate = "0" + strDate;
|
||||||
|
}
|
||||||
|
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
|
||||||
|
+ " " + date.getHours() + seperator2 + date.getMinutes()
|
||||||
|
+ seperator2 + date.getSeconds();
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* js获取当前时间, 格式“yyyy-MM-dd”
|
||||||
|
*/
|
||||||
|
function getNowFormatDate() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator1 = "-";
|
||||||
|
var seperator2 = ":";
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
var strDate = date.getDate();
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (strDate >= 0 && strDate <= 9) {
|
||||||
|
strDate = "0" + strDate;
|
||||||
|
}
|
||||||
|
var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate;
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* js根据时间生成编号, 格式“yyyyMMddHHMMSS”
|
||||||
|
*/
|
||||||
|
function getNowFormatDateNum() {
|
||||||
|
var date = new Date();
|
||||||
|
var seperator1 = "-";
|
||||||
|
var seperator2 = ":";
|
||||||
|
var month = date.getMonth() + 1;
|
||||||
|
var strDate = date.getDate();
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (strDate >= 0 && strDate <= 9) {
|
||||||
|
strDate = "0" + strDate;
|
||||||
|
}
|
||||||
|
var currentdate = date.getFullYear() + month + strDate + date.getHours()
|
||||||
|
+ date.getMinutes() + date.getSeconds();
|
||||||
|
return currentdate;
|
||||||
|
}
|
||||||
@ -20,6 +20,7 @@
|
|||||||
var listSubType = ""; //采购 销售等
|
var listSubType = ""; //采购 销售等
|
||||||
var payTypeTitle = "";//付款 收款
|
var payTypeTitle = "";//付款 收款
|
||||||
var organUrl = ""; //组织数据接口地址
|
var organUrl = ""; //组织数据接口地址
|
||||||
|
var amountNum = ""; //单据编号开头字符
|
||||||
//初始化系统基础信息
|
//初始化系统基础信息
|
||||||
getType();
|
getType();
|
||||||
initSystemData_UB();
|
initSystemData_UB();
|
||||||
@ -41,59 +42,69 @@
|
|||||||
listTitle = $("#tablePanel").prev().text();
|
listTitle = $("#tablePanel").prev().text();
|
||||||
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
var supUrl = path + "/supplier/findBySelect_sup.action"; //供应商接口
|
||||||
var cusUrl = path + "/supplier/findBySelect_cus.action"; //客户接口
|
var cusUrl = path + "/supplier/findBySelect_cus.action"; //客户接口
|
||||||
|
var retailUrl = path + "/supplier/findBySelect_retail.action"; //散户接口
|
||||||
if(listTitle === "采购入库列表"){
|
if(listTitle === "采购入库列表"){
|
||||||
listType = "入库";
|
listType = "入库";
|
||||||
listSubType = "采购";
|
listSubType = "采购";
|
||||||
payTypeTitle = "付款";
|
payTypeTitle = "付款";
|
||||||
organUrl = supUrl;
|
organUrl = supUrl;
|
||||||
|
amountNum = "CGRK";
|
||||||
}
|
}
|
||||||
else if(listTitle === "零售退货列表"){
|
else if(listTitle === "零售退货列表"){
|
||||||
listType = "入库";
|
listType = "入库";
|
||||||
listSubType = "零售退货";
|
listSubType = "零售退货";
|
||||||
payTypeTitle = "付款";
|
payTypeTitle = "付款";
|
||||||
organUrl = cusUrl;
|
organUrl = retailUrl;
|
||||||
|
amountNum = "LSTH";
|
||||||
}
|
}
|
||||||
else if(listTitle === "销售退货列表"){
|
else if(listTitle === "销售退货列表"){
|
||||||
listType = "入库";
|
listType = "入库";
|
||||||
listSubType = "销售退货";
|
listSubType = "销售退货";
|
||||||
payTypeTitle = "付款";
|
payTypeTitle = "付款";
|
||||||
organUrl = cusUrl;
|
organUrl = cusUrl;
|
||||||
|
amountNum = "XSTH";
|
||||||
}
|
}
|
||||||
else if(listTitle === "其它入库列表"){
|
else if(listTitle === "其它入库列表"){
|
||||||
listType = "入库";
|
listType = "入库";
|
||||||
listSubType = "其它";
|
listSubType = "其它";
|
||||||
payTypeTitle = "隐藏";
|
payTypeTitle = "隐藏";
|
||||||
organUrl = supUrl;
|
organUrl = supUrl;
|
||||||
|
amountNum = "QTRK";
|
||||||
}
|
}
|
||||||
else if(listTitle === "零售出库列表"){
|
else if(listTitle === "零售出库列表"){
|
||||||
listType = "出库";
|
listType = "出库";
|
||||||
listSubType = "零售";
|
listSubType = "零售";
|
||||||
payTypeTitle = "收款";
|
payTypeTitle = "收款";
|
||||||
organUrl = cusUrl;
|
organUrl = retailUrl;
|
||||||
|
amountNum = "LSCK";
|
||||||
}
|
}
|
||||||
else if(listTitle === "销售出库列表"){
|
else if(listTitle === "销售出库列表"){
|
||||||
listType = "出库";
|
listType = "出库";
|
||||||
listSubType = "销售";
|
listSubType = "销售";
|
||||||
payTypeTitle = "收款";
|
payTypeTitle = "收款";
|
||||||
organUrl = cusUrl;
|
organUrl = cusUrl;
|
||||||
|
amountNum = "XSCK";
|
||||||
}
|
}
|
||||||
else if(listTitle === "采购退货列表"){
|
else if(listTitle === "采购退货列表"){
|
||||||
listType = "出库";
|
listType = "出库";
|
||||||
listSubType = "采购退货";
|
listSubType = "采购退货";
|
||||||
payTypeTitle = "收款";
|
payTypeTitle = "收款";
|
||||||
organUrl = supUrl;
|
organUrl = supUrl;
|
||||||
|
amountNum = "CGTH";
|
||||||
}
|
}
|
||||||
else if(listTitle === "其它出库列表"){
|
else if(listTitle === "其它出库列表"){
|
||||||
listType = "出库";
|
listType = "出库";
|
||||||
listSubType = "其它";
|
listSubType = "其它";
|
||||||
payTypeTitle = "隐藏";
|
payTypeTitle = "隐藏";
|
||||||
organUrl = cusUrl;
|
organUrl = cusUrl;
|
||||||
|
amountNum = "QTCK";
|
||||||
}
|
}
|
||||||
else if(listTitle === "调拨出库列表"){
|
else if(listTitle === "调拨出库列表"){
|
||||||
listType = "出库";
|
listType = "出库";
|
||||||
listSubType = "调拨";
|
listSubType = "调拨";
|
||||||
payTypeTitle = "隐藏";
|
payTypeTitle = "隐藏";
|
||||||
organUrl = supUrl;
|
organUrl = supUrl;
|
||||||
|
amountNum = "DBCK";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//初始化系统基础信息
|
//初始化系统基础信息
|
||||||
@ -642,10 +653,13 @@
|
|||||||
function addDepotHead(){
|
function addDepotHead(){
|
||||||
$("#clientIp").val(clientIp);
|
$("#clientIp").val(clientIp);
|
||||||
$('#depotHeadFM').form('clear');
|
$('#depotHeadFM').form('clear');
|
||||||
|
var thisDate = getNowFormatDate(); //当前日期
|
||||||
|
$("#OperTime").val(thisDate);
|
||||||
|
var thisNumber = getNowFormatDateNum(); //根据时间生成编号
|
||||||
|
$("#Number").val(amountNum + thisNumber).focus();
|
||||||
var addTitle = listTitle.replace("列表","信息");
|
var addTitle = listTitle.replace("列表","信息");
|
||||||
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="' + path + '/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加' + addTitle);
|
$('#depotHeadDlg').dialog('open').dialog('setTitle','<img src="' + path + '/js/easyui-1.3.5/themes/icons/edit_add.png"/> 增加' + addTitle);
|
||||||
$(".window-mask").css({ width: webW ,height: webH});
|
$(".window-mask").css({ width: webW ,height: webH});
|
||||||
$("#Number").val("").focus();
|
|
||||||
|
|
||||||
orgDepotHead = "";
|
orgDepotHead = "";
|
||||||
depotHeadID = 0;
|
depotHeadID = 0;
|
||||||
@ -656,11 +670,12 @@
|
|||||||
//零售单据修改收款时,自动计算找零
|
//零售单据修改收款时,自动计算找零
|
||||||
if(listSubType == "零售"){
|
if(listSubType == "零售"){
|
||||||
var getAmount = $("#depotHeadFM .get-amount");
|
var getAmount = $("#depotHeadFM .get-amount");
|
||||||
|
var changeAmount = $("#depotHeadFM .change-amount");
|
||||||
|
var backAmount = $("#depotHeadFM .back-amount");
|
||||||
|
getAmount.val(0); changeAmount.val(0); backAmount.val(0); //时间初始化
|
||||||
getAmount.off("keyup").on("keyup",function() {
|
getAmount.off("keyup").on("keyup",function() {
|
||||||
var changeAmount = $("#depotHeadFM .change-amount");
|
|
||||||
var backAmount = $("#depotHeadFM .back-amount");
|
|
||||||
if(changeAmount.val()){
|
if(changeAmount.val()){
|
||||||
backAmount.val(getAmount.val()-changeAmount.val());
|
backAmount.val((getAmount.val()-changeAmount.val()).toFixed(2));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -915,7 +930,7 @@
|
|||||||
TotalPrice = TotalPrice + UnitPrice*OperNumber;
|
TotalPrice = TotalPrice + UnitPrice*OperNumber;
|
||||||
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
||||||
if(listSubType == "零售"){
|
if(listSubType == "零售"){
|
||||||
$("#ChangeAmount, #getAmount").val(TotalPrice);
|
$("#ChangeAmount, #getAmount").val((TotalPrice).toFixed(2));
|
||||||
$("#backAmount").val(0);
|
$("#backAmount").val(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -990,7 +1005,7 @@
|
|||||||
TotalPrice = TotalPrice + UnitPrice*OperNumber;
|
TotalPrice = TotalPrice + UnitPrice*OperNumber;
|
||||||
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
||||||
if(listSubType == "零售"){
|
if(listSubType == "零售"){
|
||||||
$("#ChangeAmount, #getAmount").val(TotalPrice);
|
$("#ChangeAmount, #getAmount").val((TotalPrice).toFixed(2));
|
||||||
$("#backAmount").val(0);
|
$("#backAmount").val(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -1008,7 +1023,7 @@
|
|||||||
TotalPrice = TotalPrice + AllPrice;
|
TotalPrice = TotalPrice + AllPrice;
|
||||||
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
footer.find("[field='AllPrice']").find("div").text((TotalPrice).toFixed(2));
|
||||||
if(listSubType == "零售"){
|
if(listSubType == "零售"){
|
||||||
$("#ChangeAmount, #getAmount").val(TotalPrice);
|
$("#ChangeAmount, #getAmount").val((TotalPrice).toFixed(2));
|
||||||
$("#backAmount").val(0);
|
$("#backAmount").val(0);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@ -39,6 +39,7 @@
|
|||||||
<option value="">全部</option>
|
<option value="">全部</option>
|
||||||
<option value="供应商">供应商</option>
|
<option value="供应商">供应商</option>
|
||||||
<option value="客户">客户</option>
|
<option value="客户">客户</option>
|
||||||
|
<option value="散户">散户</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
<td> </td>
|
<td> </td>
|
||||||
@ -86,6 +87,7 @@
|
|||||||
<select name="type" id="type" style="width:230px;">
|
<select name="type" id="type" style="width:230px;">
|
||||||
<option value="供应商">供应商</option>
|
<option value="供应商">供应商</option>
|
||||||
<option value="客户">客户</option>
|
<option value="客户">客户</option>
|
||||||
|
<option value="散户">散户</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="fitem" style="padding:5px">
|
<div class="fitem" style="padding:5px">
|
||||||
|
|||||||
@ -68,7 +68,7 @@
|
|||||||
<form id="depotHeadFM" method="post" novalidate>
|
<form id="depotHeadFM" method="post" novalidate>
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>购买单位:</td>
|
<td>会员卡号:</td>
|
||||||
<td style="padding:5px">
|
<td style="padding:5px">
|
||||||
<input id="OrganId" name="OrganId" style="width:110px;" />
|
<input id="OrganId" name="OrganId" style="width:110px;" />
|
||||||
</td>
|
</td>
|
||||||
@ -111,7 +111,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<input id="getAmount" name="getAmount" class="get-amount" data-changeamount="0" />
|
<input id="getAmount" name="getAmount" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))" class="get-amount" data-changeamount="0" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
@ -149,7 +149,7 @@
|
|||||||
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>会员卡号:</td>
|
||||||
<td style="padding:5px;width:110px;">
|
<td style="padding:5px;width:110px;">
|
||||||
<span id="OrganIdShow"></span>
|
<span id="OrganIdShow"></span>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user