1,批量导入转移。2,收货
parent
c6292d9f39
commit
5270ffa565
|
@ -379,6 +379,16 @@ public class WmToMoveGoodsController extends BaseController {
|
|||
try {
|
||||
List<WmToMoveGoodsEntity> listWmToMoveGoodsEntitys = ExcelImportUtil.importExcel(file.getInputStream(),WmToMoveGoodsEntity.class,params);
|
||||
for (WmToMoveGoodsEntity wmToMoveGoods : listWmToMoveGoodsEntitys) {
|
||||
if(StringUtil.isNotEmpty(wmToMoveGoods.getOrderIdI())){
|
||||
try{
|
||||
WmToMoveGoodsEntity t = systemService.findByProperty(WmToMoveGoodsEntity.class,"orderIdI",wmToMoveGoods.getOrderIdI()).get(0);
|
||||
if(t!=null){
|
||||
continue;
|
||||
}
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
}
|
||||
wmToMoveGoodsService.save(wmToMoveGoods);
|
||||
}
|
||||
j.setMsg("文件导入成功!");
|
||||
|
|
|
@ -33,38 +33,44 @@ public class WmToMoveGoodsEntity implements java.io.Serializable {
|
|||
/**主键*/
|
||||
private java.lang.String id;
|
||||
/**创建人名称*/
|
||||
@Excel(name="创建人名称")
|
||||
// @Excel(name="创建人名称")
|
||||
private java.lang.String createName;
|
||||
/**创建人登录名称*/
|
||||
@Excel(name="创建人登录名称")
|
||||
// @Excel(name="创建人登录名称")
|
||||
private java.lang.String createBy;
|
||||
/**创建日期*/
|
||||
@Excel(name="创建日期", format = "yyyy-MM-dd hh:mm:ss")
|
||||
// @Excel(name="创建日期", format = "yyyy-MM-dd hh:mm:ss")
|
||||
private java.util.Date createDate;
|
||||
/**更新人名称*/
|
||||
@Excel(name="更新人名称")
|
||||
// @Excel(name="更新人名称")
|
||||
private java.lang.String updateName;
|
||||
/**更新人登录名称*/
|
||||
@Excel(name="更新人登录名称")
|
||||
// @Excel(name="更新人登录名称")
|
||||
private java.lang.String updateBy;
|
||||
/**更新日期*/
|
||||
@Excel(name="更新日期",format = "yyyy-MM-dd hh:mm:ss")
|
||||
// @Excel(name="更新日期",format = "yyyy-MM-dd hh:mm:ss")
|
||||
private java.util.Date updateDate;
|
||||
/**所属部门*/
|
||||
@Excel(name="所属部门")
|
||||
// @Excel(name="所属部门")
|
||||
private java.lang.String sysOrgCode;
|
||||
/**所属公司*/
|
||||
@Excel(name="所属公司")
|
||||
// @Excel(name="所属公司")
|
||||
private java.lang.String sysCompanyCode;
|
||||
/**原始单据类型*/
|
||||
@Excel(name="原始单据类型")
|
||||
// @Excel(name="原始单据类型")
|
||||
private java.lang.String orderTypeCode;
|
||||
/**原始单据编码*/
|
||||
@Excel(name="原始单据编码")
|
||||
// @Excel(name="原始单据编码")
|
||||
private java.lang.String orderId;
|
||||
/**原始单据行项目*/
|
||||
@Excel(name="原始单据行项目")
|
||||
private java.lang.String orderIdI;
|
||||
/**客户编码*/
|
||||
@Excel(name="原客户")
|
||||
private java.lang.String cusCode;
|
||||
/**客户名称*/
|
||||
@Excel(name="原客户名称")
|
||||
private java.lang.String cusName;
|
||||
/**商品编码*/
|
||||
@Excel(name="商品编码")
|
||||
private java.lang.String goodsId;
|
||||
|
@ -74,45 +80,48 @@ public class WmToMoveGoodsEntity implements java.io.Serializable {
|
|||
/**数量*/
|
||||
@Excel(name="数量")
|
||||
private java.lang.String goodsQua;
|
||||
/**生产日期*/
|
||||
@Excel(name="生产日期")
|
||||
private java.lang.String goodsProData;
|
||||
/**单位*/
|
||||
@Excel(name="单位")
|
||||
private java.lang.String goodsUnit;
|
||||
/**客户编码*/
|
||||
@Excel(name="客户编码")
|
||||
private java.lang.String cusCode;
|
||||
/**客户名称*/
|
||||
@Excel(name="客户名称")
|
||||
private java.lang.String cusName;
|
||||
/**源托盘*/
|
||||
@Excel(name="源托盘")
|
||||
private java.lang.String tinFrom;
|
||||
/**到托盘*/
|
||||
@Excel(name="到托盘")
|
||||
private java.lang.String tinId;
|
||||
/**源储位*/
|
||||
@Excel(name="源储位")
|
||||
private java.lang.String binFrom;
|
||||
/**到储位*/
|
||||
@Excel(name="到储位")
|
||||
private java.lang.String binTo;
|
||||
/**状态*/
|
||||
@Excel(name="状态")
|
||||
private java.lang.String moveSta;
|
||||
/**转移客户*/
|
||||
@Excel(name="转移客户")
|
||||
private java.lang.String toCusCode;
|
||||
/**转移客户名称*/
|
||||
@Excel(name="转移客户名称")
|
||||
private java.lang.String toCusName;
|
||||
/**基本单位*/
|
||||
@Excel(name="基本单位")
|
||||
private java.lang.String baseUnit;
|
||||
/**基本单位数量*/
|
||||
@Excel(name="基本单位数量")
|
||||
private java.lang.String baseGoodscount;
|
||||
/**基本单位*/
|
||||
@Excel(name="基本单位")
|
||||
private java.lang.String baseUnit;
|
||||
/**生产日期*/
|
||||
@Excel(name="生产日期")
|
||||
private java.lang.String goodsProData;
|
||||
/**源储位*/
|
||||
@Excel(name="源储位")
|
||||
private java.lang.String binFrom;
|
||||
|
||||
/**源托盘*/
|
||||
@Excel(name="源托盘")
|
||||
private java.lang.String tinFrom;
|
||||
/**转移客户*/
|
||||
@Excel(name="到客户")
|
||||
private java.lang.String toCusCode;
|
||||
/**转移客户名称*/
|
||||
@Excel(name="到客户名称")
|
||||
private java.lang.String toCusName;
|
||||
|
||||
|
||||
|
||||
/**到储位*/
|
||||
@Excel(name="到储位")
|
||||
private java.lang.String binTo;
|
||||
/**到托盘*/
|
||||
@Excel(name="到托盘")
|
||||
private java.lang.String tinId;
|
||||
|
||||
@Excel(name="到生产日期")
|
||||
private java.lang.String toGoodsProData;
|
||||
/**状态*/
|
||||
@Excel(name="状态")
|
||||
private java.lang.String moveSta;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*方法: 取得java.lang.String
|
||||
|
@ -565,4 +574,18 @@ public class WmToMoveGoodsEntity implements java.io.Serializable {
|
|||
public void setBaseGoodscount(java.lang.String baseGoodscount){
|
||||
this.baseGoodscount = baseGoodscount;
|
||||
}
|
||||
|
||||
|
||||
@Column(name ="TO_GOODS_PRO_DATA",nullable=true,length=32)
|
||||
public java.lang.String getToGoodsProData(){
|
||||
return this.toGoodsProData;
|
||||
}
|
||||
|
||||
/**
|
||||
*方法: 设置java.lang.String
|
||||
*@param: java.lang.String 生产日期
|
||||
*/
|
||||
public void setToGoodsProData(java.lang.String toGoodsProData){
|
||||
this.toGoodsProData = toGoodsProData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -278,7 +278,13 @@ public class SmsSendTask {
|
|||
wmToDownGoods.setGoodsId(wmToMoveGoodsEntity.getGoodsId());//
|
||||
wmToDownGoods.setGoodsProData(wmToMoveGoodsEntity.getGoodsProData());//生产日期
|
||||
wmToDownGoods.setOrderId("ZY");//出货通知单
|
||||
wmToDownGoods.setOrderIdI(wmToMoveGoodsEntity.getId());//转移项目
|
||||
if(StringUtil.isEmpty(wmToMoveGoodsEntity.getOrderIdI())){
|
||||
wmToDownGoods.setOrderIdI(wmToMoveGoodsEntity.getId());
|
||||
|
||||
}else{
|
||||
wmToDownGoods.setOrderIdI(wmToMoveGoodsEntity.getOrderIdI());
|
||||
|
||||
}
|
||||
MvGoodsEntity mvgoods = new MvGoodsEntity();
|
||||
mvgoods = systemService.findUniqueByProperty(
|
||||
MvGoodsEntity.class, "goodsCode",
|
||||
|
@ -315,7 +321,11 @@ public class SmsSendTask {
|
|||
wmToUpGoodsEntity.setCreateDate(wmToMoveGoodsEntity.getCreateDate());
|
||||
wmToUpGoodsEntity.setCreateName(wmToMoveGoodsEntity.getCreateName());
|
||||
wmToUpGoodsEntity.setGoodsId(wmToMoveGoodsEntity.getGoodsId());
|
||||
wmToUpGoodsEntity.setGoodsProData(wmToMoveGoodsEntity.getGoodsProData());
|
||||
if(StringUtil.isEmpty(wmToMoveGoodsEntity.getToGoodsProData())){
|
||||
wmToUpGoodsEntity.setGoodsProData(wmToMoveGoodsEntity.getGoodsProData());
|
||||
}else{
|
||||
wmToUpGoodsEntity.setGoodsProData(wmToMoveGoodsEntity.getToGoodsProData());
|
||||
}
|
||||
wmToUpGoodsEntity.setGoodsBatch(wmToMoveGoodsEntity.getGoodsProData());
|
||||
wmToUpGoodsEntity.setGoodsQua(wmToMoveGoodsEntity.getGoodsQua());
|
||||
wmToUpGoodsEntity.setGoodsUnit(wmToMoveGoodsEntity.getGoodsUnit());
|
||||
|
@ -340,8 +350,13 @@ public class SmsSendTask {
|
|||
// wmToUpGoodsEntity.setBaseGoodscount(wmToMoveGoodsEntity.getGoodsQua());
|
||||
wmToUpGoodsEntity.setBaseUnit(mvgoods.getBaseunit());
|
||||
wmToUpGoodsEntity.setGoodsName(mvgoods.getGoodsName());
|
||||
|
||||
wmToUpGoodsEntity.setOrderIdI(wmToMoveGoodsEntity.getId());
|
||||
if(StringUtil.isEmpty(wmToMoveGoodsEntity.getOrderIdI())){
|
||||
wmToUpGoodsEntity.setOrderIdI(wmToMoveGoodsEntity.getId());
|
||||
|
||||
}else{
|
||||
wmToUpGoodsEntity.setOrderIdI(wmToMoveGoodsEntity.getOrderIdI());
|
||||
|
||||
}
|
||||
wmToUpGoodsEntity.setOrderId("ZY");
|
||||
wmToUpGoodsEntity.setBinId(wmToMoveGoodsEntity.getTinId());
|
||||
wmToUpGoodsEntity.setKuWeiBianMa(wmToMoveGoodsEntity.getBinTo());
|
||||
|
|
|
@ -74,7 +74,7 @@ window.onload = function() {
|
|||
|
||||
<body>
|
||||
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="wmInQmIController.do?doAdd" tiptype="1" >
|
||||
<t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="div" >
|
||||
<input type="hidden" id="btn_sub" class="btn_sub"/>
|
||||
<input type="hidden" id="id" name="id"/>
|
||||
<input type="hidden" id="binSta" name="binSta" value="N"/>
|
||||
|
@ -123,7 +123,9 @@ window.onload = function() {
|
|||
<b>数量(${wmInQmIPage.goodsUnit}) :</b>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
<input id="qmOkQuat" name="qmOkQuat" type="text" class="form-control"
|
||||
<input id="qmOkQuaty" name="qmOkQuaty" value='${wmInQmIPage.qmOkQuat}' type="hidden"/>
|
||||
|
||||
<input id="qmOkQuat" name="qmOkQuat" type="text" class="form-control"
|
||||
ignore="checked" value='${wmInQmIPage.qmOkQuat}' style="width:80px;"
|
||||
datatype="*" />
|
||||
|
||||
|
@ -156,7 +158,7 @@ window.onload = function() {
|
|||
<div class="col-xs-3">
|
||||
<input id="proData" name="proData" type="text"
|
||||
ignore="checked" onchange="setbatch()"
|
||||
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" datatype="*" type="date" pattern="yyyy-MM-dd"/>
|
||||
style="background: url('plug-in/ace/images/datetime.png') no-repeat scroll right center transparent;" class="form-control" onClick="WdatePicker()" type="date" />
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">生产日期</label>
|
||||
</div>
|
||||
|
@ -210,44 +212,61 @@ window.onload = function() {
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row" id = "sub_tr" style="display: none;">
|
||||
<div class="col-xs-12 layout-header">
|
||||
<div class="col-xs-6"></div>
|
||||
<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>
|
||||
</div>
|
||||
</div>
|
||||
<%--<div class="row" id = "sub_tr" style="display: none;">--%>
|
||||
<%--<div class="col-xs-12 layout-header">--%>
|
||||
<%--<div class="col-xs-6"></div>--%>
|
||||
<%--<div class="col-xs-6"><button type="button" onclick="neibuClick();" class="btn btn-default">提交</button></div>--%>
|
||||
<%--</div>--%>
|
||||
<%--</div>--%>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="con-wrapper" id="con-wrapper2" style="display: block;"></div>
|
||||
</div>
|
||||
</t:formvalid>
|
||||
<div style="margin:3px auto"><button onclick="sub('formobj');">验收</button></div>
|
||||
|
||||
</t:formvalid>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
//查看模式情况下,删除和上传附件功能禁止使用
|
||||
if(location.href.indexOf("load=detail")!=-1){
|
||||
$(".jeecgDetail").hide();
|
||||
}
|
||||
|
||||
if(location.href.indexOf("mode=read")!=-1){
|
||||
//查看模式控件禁用
|
||||
$("#formobj").find(":input").attr("disabled","disabled");
|
||||
}
|
||||
if(location.href.indexOf("mode=onbutton")!=-1){
|
||||
//其他模式显示提交按钮
|
||||
$("#sub_tr").show();
|
||||
}
|
||||
});
|
||||
|
||||
var neibuClickFlag = false;
|
||||
function neibuClick() {
|
||||
neibuClickFlag = true;
|
||||
$('#btn_sub').trigger('click');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//表单提交
|
||||
function sub(formid){
|
||||
console.log('1');
|
||||
|
||||
var qmOkQuaty = $("#qmOkQuaty").val();
|
||||
console.log("qmOkQuaty"+qmOkQuaty);
|
||||
var qmOkQuat = $("#qmOkQuat").val();
|
||||
console.log("qmOkQuaty"+qmOkQuaty);
|
||||
|
||||
if(qmOkQuat==""||qmOkQuat<=0){
|
||||
alert("请输入数量");
|
||||
}else{
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url:"wmInQmIController.do?doAdd",
|
||||
data:$("#"+formid).serialize(),
|
||||
async:true,
|
||||
success:function (data) {
|
||||
var d = $.parseJSON(data);
|
||||
if (d.success) {
|
||||
var msg = d.msg;
|
||||
tip(msg);
|
||||
qmOkQuaty = qmOkQuaty - qmOkQuat;
|
||||
$("#qmOkQuaty").val(qmOkQuaty);
|
||||
$("#qmOkQuat").val(qmOkQuaty);
|
||||
$("#binId").val("");
|
||||
|
||||
} else {
|
||||
tip(d.msg);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</body>
|
||||
<script src = "webpage/com/zzjee/wm/wmInQmI.js"></script>
|
||||
|
|
|
@ -40,7 +40,11 @@
|
|||
function wmim(id) {
|
||||
var url = "wmInQmIController.do?goAddBatch&id=" + id;
|
||||
// createdetailwindow()
|
||||
add('收货登记', url, "wmInQmIbatchList","100%","100%");
|
||||
|
||||
// function addbytab(){
|
||||
addOneTab("验收", url);
|
||||
// }
|
||||
// add('收货登记', url, "wmInQmIbatchList","100%","100%");
|
||||
}
|
||||
//导入
|
||||
function ImportXls() {
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
<%-- <t:dgToolBar title="编辑" icon="icon-edit" url="wvStockController.do?goUpdate" funname="update"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="wvStockController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="查看" icon="icon-search" url="wvStockController.do?goUpdate" funname="detail"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar> --%>
|
||||
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
|
||||
<%--<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>--%>
|
||||
<%--<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>--%>
|
||||
|
||||
<%-- <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
|
||||
<%--<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>--%>
|
||||
</t:datagrid>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -110,7 +110,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wvStockController.do?upload', "wvStockList");
|
||||
openuploadwin('Excel导入', 'wmToMoveGoodsController.do?upload', "wvStockList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
@ -120,7 +120,7 @@ function ExportXls() {
|
|||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("wvStockController.do?exportXlsByT","wvStockList");
|
||||
JeecgExcelExport("wmToMoveGoodsController.do?exportXlsByT","wvStockList");
|
||||
}
|
||||
|
||||
</script>
|
|
@ -3,7 +3,7 @@
|
|||
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="wvStockList" checkbox="true" pagination="true" fitColumns="false" title="生成库存转移任务" actionUrl="wvStockController.do?datagridkczy" idField="id" fit="true" queryMode="group">
|
||||
<t:datagrid name="wvStockList" checkbox="true" pagination="true" fitColumns="false" title="生成库存转移任务" actionUrl="wvStockController.do?datagridkczy" idField="id" fit="false" queryMode="group">
|
||||
<t:dgCol title="id" field="id" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
<t:dgCol title="操作" field="opt" width="80"></t:dgCol>
|
||||
<t:dgCol title="创建人名称" field="createName" hidden="true" queryMode="group" width="120"></t:dgCol>
|
||||
|
@ -31,10 +31,10 @@
|
|||
<%-- <t:dgToolBar title="编辑" icon="icon-edit" url="wvStockController.do?goUpdate" funname="update"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="wvStockController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="查看" icon="icon-search" url="wvStockController.do?goUpdate" funname="detail"></t:dgToolBar> --%>
|
||||
<%-- <t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar> --%>
|
||||
<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>
|
||||
<t:dgToolBar title="导入" icon="icon-put" funname="ImportXls"></t:dgToolBar>
|
||||
<%--<t:dgToolBar title="导出" icon="icon-putout" funname="ExportXls"></t:dgToolBar>--%>
|
||||
|
||||
<%-- <t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar> --%>
|
||||
<t:dgToolBar title="模板下载" icon="icon-putout" funname="ExportXlsByT"></t:dgToolBar>
|
||||
</t:datagrid>
|
||||
<div name="searchColums1" style="float: left; padding-left: 0px;padding-top: 5px;">
|
||||
<span style="vertical-align:middle;display:-moz-inline-box;display:inline-block;width: 90px;text-align:right;" title="批量托盘">批量托盘为: </span>
|
||||
|
@ -117,7 +117,7 @@
|
|||
|
||||
//导入
|
||||
function ImportXls() {
|
||||
openuploadwin('Excel导入', 'wvStockController.do?upload', "wvStockList");
|
||||
openuploadwin('Excel导入', 'wmToMoveGoodsController.do?upload', "wvStockList");
|
||||
}
|
||||
|
||||
//导出
|
||||
|
@ -127,7 +127,7 @@ function ExportXls() {
|
|||
|
||||
//模板下载
|
||||
function ExportXlsByT() {
|
||||
JeecgExcelExport("wvStockController.do?exportXlsByT","wvStockList");
|
||||
JeecgExcelExport("wmToMoveGoodsController.do?exportXlsByT","wvStockList");
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue