出库通知修改
parent
9034666173
commit
6753f3e80a
|
@ -2,11 +2,8 @@ package com.zzjee.wm.controller;
|
|||
import com.zzjee.api.ResultDO;
|
||||
import com.zzjee.md.entity.*;
|
||||
import com.zzjee.wm.entity.*;
|
||||
import com.zzjee.wm.page.WmNoticeImpPage;
|
||||
import com.zzjee.wm.page.*;
|
||||
import com.zzjee.wm.service.WmOmNoticeHServiceI;
|
||||
import com.zzjee.wm.page.Delrowpage;
|
||||
import com.zzjee.wm.page.WmOmNoticeHPage;
|
||||
import com.zzjee.wm.page.confrowpage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
|
@ -134,6 +131,73 @@ public class WmOmNoticeHController extends BaseController {
|
|||
public ModelAndView list(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/wm/wmOmNoticeHList");
|
||||
}
|
||||
/**
|
||||
* 出货通知列表 页面跳转
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(params = "listitem")
|
||||
public ModelAndView listitem(HttpServletRequest request) {
|
||||
return new ModelAndView("com/zzjee/wm/wmOmNoticeitemList");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(params = "datagriditem")
|
||||
public void datagriditem(WmOmNoticeIEntity wmOmNoticeitem,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
|
||||
CriteriaQuery cq = new CriteriaQuery(WmOmNoticeIEntity.class, dataGrid);
|
||||
//查询条件组装器
|
||||
org.jeecgframework.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, wmOmNoticeitem);
|
||||
|
||||
try {
|
||||
// 自定义追加查询条件
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
|
||||
if(StringUtil.isNotEmpty(wmUtil.getCusCode())){
|
||||
cq.eq("cusCode", wmUtil.getCusCode());
|
||||
|
||||
}
|
||||
|
||||
Map<String,Object> map1 = new HashMap<String,Object>();
|
||||
map1.put("omNoticeId", "desc");
|
||||
cq.setOrder(map1);
|
||||
cq.add();
|
||||
this.wmOmNoticeHService.getDataGridReturn(cq, true);
|
||||
TagUtil.datagrid(response, dataGrid);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(params = "saveOmnotice")
|
||||
@ResponseBody
|
||||
public AjaxJson saveOmnotice(wmomnoticeipage page){
|
||||
String message = null;
|
||||
List<WmOmNoticeIEntity> demos=page.getWmomnoticeirows();
|
||||
AjaxJson j = new AjaxJson();
|
||||
if(CollectionUtils.isNotEmpty(demos)){
|
||||
for(WmOmNoticeIEntity jeecgDemo:demos){
|
||||
if (StringUtil.isNotEmpty(jeecgDemo.getId())) {
|
||||
WmOmNoticeIEntity t =systemService.get(WmOmNoticeIEntity.class, jeecgDemo.getId());
|
||||
try {
|
||||
message = "保存成功";
|
||||
t.setBinId(jeecgDemo.getBinId());
|
||||
t.setPlanSta(jeecgDemo.getPlanSta());
|
||||
t.setGoodsProData(jeecgDemo.getGoodsProData());
|
||||
t.setBaseGoodscount(jeecgDemo.getBaseGoodscount());
|
||||
t.setGoodsQua(jeecgDemo.getGoodsQua());
|
||||
systemService.updateEntitie(t);
|
||||
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return j;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(params = "listqt")
|
||||
public ModelAndView listqt(HttpServletRequest request) {
|
||||
|
@ -536,11 +600,7 @@ public class WmOmNoticeHController extends BaseController {
|
|||
String datecuso[]= wmOmNoticeH.getOcusCode().split("-");
|
||||
MdCusOtherEntity mdcusother = systemService.findUniqueByProperty(MdCusOtherEntity.class, "keHuBianMa", datecuso[0]);
|
||||
if (mdcusother != null) {
|
||||
wmOmNoticeH.setOcusCode(datecuso[0]);
|
||||
wmOmNoticeH.setOcusName(mdcusother.getZhongWenQch());
|
||||
}else{
|
||||
wmOmNoticeH.setOcusName(wmOmNoticeH.getOcusCode());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.zzjee.wm.page;
|
||||
|
||||
import com.zzjee.wm.entity.WmOmNoticeIEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
*/
|
||||
public class wmomnoticeipage {
|
||||
private List<WmOmNoticeIEntity> wmomnoticeirows;
|
||||
|
||||
public List<WmOmNoticeIEntity> getWmomnoticeirows() {
|
||||
return wmomnoticeirows;
|
||||
}
|
||||
|
||||
public void setWmomnoticeirows(List<WmOmNoticeIEntity> wmomnoticeirows) {
|
||||
this.wmomnoticeirows = wmomnoticeirows;
|
||||
}
|
||||
}
|
|
@ -1467,11 +1467,19 @@
|
|||
<input name="wmImNoticeIList[${stuts.index }].goodsWqmCount" type="hidden" value="${poVal.goodsWqmCount }"/>
|
||||
<input name="wmImNoticeIList[${stuts.index }].baseUnit" type="hidden" value="${poVal.baseUnit }"/>
|
||||
<input name="wmImNoticeIList[${stuts.index }].baseGoodscount" type="hidden" value="${poVal.baseGoodscount }"/>
|
||||
<input name="wmImNoticeIList[${stuts.index }].baseQmcount" type="hidden" value="${poVal.baseQmcount }"/>
|
||||
<%-- <input name="wmImNoticeIList[${stuts.index }].goodsUnit" type="hidden" value="${poVal.goodsUnit }"/> --%>
|
||||
|
||||
<input name="wmImNoticeIList[${stuts.index }].goodsCode" type="hidden" value="${poVal.goodsCode }"/>
|
||||
|
||||
<%-- <input name="wmImNoticeIList[${stuts.index }].goodsUnit" type="hidden" value="${poVal.goodsUnit }"/> --%>
|
||||
<td align="left">
|
||||
<t:dictSelect field="wmImNoticeIList[${stuts.index }].goodsCode" type="list" extendJson="{class:'form-control',style:'width:350px'}"
|
||||
dictCondition="${wmImNoticeHPage.wherecon}" dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="${poVal.goodsCode }" hasLabel="false" title="商品编码"></t:dictSelect>
|
||||
|
||||
|
||||
<input id="wmOmNoticeIList[${stuts.index }].goodsName" value="${poVal.goodsName }" readonly="readonly" name="wmOmNoticeIList[${stuts.index }].goodsName" maxlength="32"
|
||||
ignore="ignore"
|
||||
type="text" style="width:420px;text-align: left" >
|
||||
|
||||
<%--<t:dictSelect field="wmImNoticeIList[${stuts.index }].goodsCode" type="list" extendJson="{class:'form-control',style:'width:350px'}" --%>
|
||||
<%--dictCondition="${wmImNoticeHPage.wherecon}" dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="${poVal.goodsCode }" hasLabel="false" title="商品编码"></t:dictSelect> --%>
|
||||
<label class="Validform_label" style="display: none;">商品编码</label>
|
||||
<%-- <input id="wmImNoticeIList[${stuts.index }].goodsCode" name="wmImNoticeIList[${stuts.index }].goodsCode" maxlength="32" --%>
|
||||
|
||||
|
|
|
@ -172,8 +172,8 @@
|
|||
<b>三方客户:</b>
|
||||
</div>
|
||||
<div class="col-xs-2">
|
||||
<t:dictSelect id="ocusCodeid" field="ocusCode" type="list" extendJson="{class:'form-control',style:'width:230px'}"
|
||||
defaultVal="${wmOmNoticeHPage.ocusCode}" dictTable="mv_cus_other" dictField="cus_code" dictText="cus_name" hasLabel="false" title="三方客户编码"></t:dictSelect>
|
||||
<input id="ocusCode" name="ocusCode"
|
||||
value="${wmOmNoticeHPage.ocusCode}" hasLabel="false" class="form-control"/>
|
||||
<span class="Validform_checktip" style="float:left;height:0px;"></span>
|
||||
<label class="Validform_label" style="display: none">三方客户</label>
|
||||
</div>
|
||||
|
|
|
@ -1728,14 +1728,23 @@
|
|||
<input name="wmOmNoticeIList[${stuts.index }].omSta" type="hidden" value="${poVal.omSta }"/>
|
||||
<input name="wmOmNoticeIList[${stuts.index }].baseUnit" type="hidden" value="${poVal.baseUnit }"/>
|
||||
<input name="wmOmNoticeIList[${stuts.index }].baseGoodscount" type="hidden" value="${poVal.baseGoodscount }"/>
|
||||
<%-- <input name="wmOmNoticeIList[${stuts.index }].planSta" type="hidden" value="${poVal.planSta }"/> --%>
|
||||
<input name="wmOmNoticeIList[${stuts.index }].goodsId" type="hidden" value="${poVal.goodsId }"/>
|
||||
|
||||
|
||||
<%--
|
||||
wmOmNoticeIList[${stuts.index }].goodsId<input name="wmOmNoticeIList[${stuts.index }].planSta" type="hidden" value="${poVal.planSta }"/> --%>
|
||||
|
||||
|
||||
<td align="left">
|
||||
|
||||
|
||||
<input id="wmOmNoticeIList[${stuts.index }].goodsName" value="${poVal.goodsName }" readonly="readonly" name="wmOmNoticeIList[${stuts.index }].goodsName" maxlength="32"
|
||||
ignore="ignore"
|
||||
type="text" style="width:420px;text-align: left" >
|
||||
<%-- <input name="wmOmNoticeIList[${stuts.index }].goodsId" maxlength="32" --%>
|
||||
<%-- type="text" class="form-control" style="width:120px;" value="${poVal.goodsId }"> --%>
|
||||
<t:dictSelect field="wmOmNoticeIList[${stuts.index }].goodsId" type="list" extendJson="{class:'form-control',style:'width:350px'}"
|
||||
dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="${poVal.goodsId }" hasLabel="false" title="商品编码"></t:dictSelect>
|
||||
<%--<t:dictSelect field="wmOmNoticeIList[${stuts.index }].goodsId" type="list" extendJson="{class:'form-control',style:'width:350px'}"--%>
|
||||
<%--dictTable="mv_goods" dictField="goods_code" dictText="goods_name" defaultVal="${poVal.goodsId }" hasLabel="false" title="商品编码"></t:dictSelect>--%>
|
||||
|
||||
<label class="Validform_label" style="display: none;">出货商品</label>
|
||||
</td>
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
||||
<%@include file="/context/mytags.jsp"%>
|
||||
<t:base type="jquery,easyui,tools,DatePicker,autocomplete"></t:base>
|
||||
<div class="easyui-layout" fit="true">
|
||||
<div region="center" style="padding:0px;border:0px">
|
||||
<t:datagrid name="wmOmNoticeitemList" checkbox="true" pagination="true" fitColumns="true"
|
||||
title="出库通知调整" actionUrl="wmOmNoticeHController.do?datagriditem" idField="id" queryMode="group">
|
||||
<t:dgCol title="主键" field="id" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="创建人" field="createName" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="创建人登录名称" field="createBy" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="下架时间" field="createDate" hidden="true" formatter="yyyy-MM-dd hh:mm:ss" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="复核人" field="updateName" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="更新人登录名称" field="updateBy" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="复核时间" field="updateDate" hidden="true" formatter="yyyy-MM-dd hh:mm:ss" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属部门" field="sysOrgCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="所属公司" field="sysCompanyCode" hidden="true" queryMode="single" width="120"></t:dgCol>
|
||||
|
||||
<t:dgCol title="出库单号" field="omNoticeId" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
|
||||
<t:dgCol title="客户订单号" field="imCusCode" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="备注" field="omBeizhu" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="商品名称" field="goodsName" query="true" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="出货数量" field="goodsQua" extendParams="editor:'text'" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="出货单位" field="goodsUnit" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="生产日期" field="goodsProData" formatter="yyyy-MM-dd" extendParams="editor:'text'" queryMode="single" width="120"></t:dgCol>
|
||||
<t:dgCol title="基本单位数量" field="baseGoodscount" extendParams="editor:'text'" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="基本单位" field="baseUnit" queryMode="single" width="80"></t:dgCol>
|
||||
<t:dgCol title="托盘" field="binId" query="true" extendParams="editor:'text'" queryMode="single" width="80"></t:dgCol>
|
||||
|
||||
<t:dgCol title="下架计划生成状态" field="planSta" extendParams="editor:'text'" queryMode="single" width="80"></t:dgCol>
|
||||
|
||||
|
||||
<%-- <t:dgToolBar operationCode="add" title="录入" icon="icon-add" funname="addRow"></t:dgToolBar> --%>
|
||||
<t:dgToolBar operationCode="edit" title="选择修改" icon="icon-edit" funname="editRow"></t:dgToolBar>
|
||||
<t:dgToolBar operationCode="save" title="修改保存" icon="icon-save" url="wmOmNoticeHController.do?saveOmnotice" funname="saveData"></t:dgToolBar>
|
||||
<t:dgToolBar operationCode="undo" title="取消修改" icon="icon-undo" funname="reject"></t:dgToolBar>
|
||||
<%-- <t:dgToolBar title="批量删除" icon="icon-remove" url="jeecgListDemoController.do?doBatchDel" funname="deleteALLSelect"></t:dgToolBar> --%>
|
||||
</t:datagrid>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
//添加行
|
||||
function addRow(title,addurl,gname){
|
||||
$('#'+gname).datagrid('appendRow',{});
|
||||
var editIndex = $('#'+gname).datagrid('getRows').length-1;
|
||||
$('#'+gname).datagrid('selectRow', editIndex)
|
||||
.datagrid('beginEdit', editIndex);
|
||||
}
|
||||
//保存数据
|
||||
function saveData(title,addurl,gname){
|
||||
if(!endEdit(gname))
|
||||
return false;
|
||||
var rows=$('#'+gname).datagrid("getChanges","inserted");
|
||||
var uprows=$('#'+gname).datagrid("getChanges","updated");
|
||||
rows=rows.concat(uprows);
|
||||
if(rows.length<=0){
|
||||
tip("没有需要保存的数据!")
|
||||
return false;
|
||||
}
|
||||
var result={};
|
||||
for(var i=0;i<rows.length;i++){
|
||||
for(var d in rows[i]){
|
||||
result["wmomnoticeirows["+i+"]."+d]=rows[i][d];
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
url:"<%=basePath%>/"+addurl,
|
||||
type:"post",
|
||||
data:result,
|
||||
dataType:"json",
|
||||
success:function(data){
|
||||
tip(data.msg);
|
||||
if(data.success){
|
||||
reloadTable();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//结束编辑
|
||||
function endEdit(gname){
|
||||
var editIndex = $('#'+gname).datagrid('getRows').length-1;
|
||||
for(var i=0;i<=editIndex;i++){
|
||||
if($('#'+gname).datagrid('validateRow', i))
|
||||
$('#'+gname).datagrid('endEdit', i);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
//编辑行
|
||||
function editRow(title,addurl,gname){
|
||||
var rows=$('#'+gname).datagrid("getChecked");
|
||||
if(rows.length==0){
|
||||
tip("请选择条目");
|
||||
return false;
|
||||
}
|
||||
for(var i=0;i<rows.length;i++){
|
||||
var index= $('#'+gname).datagrid('getRowIndex', rows[i]);
|
||||
$('#'+gname).datagrid('beginEdit', index);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//取消编辑
|
||||
function reject(title,addurl,gname){
|
||||
$('#'+gname).datagrid('clearChecked');
|
||||
$('#'+gname).datagrid('rejectChanges');
|
||||
|
||||
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue