Commit 81b8cec2 authored by 刘学辉's avatar 刘学辉

采购信息记录调整、组件补充发料

parent 18996392
......@@ -30,9 +30,11 @@
<div class="hg-form-row">
<x:hidden name="depart"/>
<x:inputC name="departName" required="true" label="部门" labelCol="2" fieldCol="2" wrapper="tree"/>
<x:inputC name="departName" required="true" label="部门" labelCol="1" fieldCol="2" wrapper="tree"/>
<x:hidden name="applyPerson"/>
<x:inputC name="applyPersonName" required="true" label="人员" labelCol="2" fieldCol="2" wrapper="tree"/>
<x:inputC name="applyPersonName" required="true" label="人员" labelCol="1" fieldCol="2" wrapper="tree"/>
<x:inputC name="saleOrder" label="销售订单" labelCol="1" fieldCol="2" required="false"/>
<x:inputC name="produceOrder" label="生产订单" labelCol="1" fieldCol="2" required="false"/>
<x:selectC name="used" label="用途" required="false" labelCol="1" fieldCol="2" dictionary="materialUse"/>
</div>
......
......@@ -84,7 +84,7 @@ function deleteHandler() {
function addHandler() {
UICtrl.addTabItem({
tabid: 'addSapPermit',
tabid: 'addClientMaterials',
text: "新增客户供料通知",
url: web_app.name + '/clientMaterials/forwardClientMaterialsDetail.job'
});
......@@ -92,7 +92,7 @@ function addHandler() {
function doView(id) {
UICtrl.addTabItem({
tabid: 'viewSapPermit'+id,
tabid: 'viewClientMaterials'+id,
text: "客户供料通知",
url: web_app.name + '/clientMaterials/showClientMaterials.job?bizId='+id+"&isReadOnly=true"
});
......
......@@ -112,7 +112,10 @@ function loadGrid() {
name: "sapMaterialSelect",
getParam: function (item) {
return {
filterValue:item.werks
// filterValue:$('#suppliers').val(),
wlfl1:"ZZCP",
wlfl2:"ZBCP"
}
},
back: {
......@@ -131,7 +134,9 @@ function loadGrid() {
name: "sapMaterialSelect",
getParam: function (item) {
return {
filterValue:item.werks
// filterValue:$('#suppliers').val(),
noWlfl1:"ZZCP",
noWlfl2:"ZBCP"
}
},
back: {
......
......@@ -83,7 +83,7 @@ function deleteHandler() {
function addHandler() {
UICtrl.addTabItem({
tabid: 'addSapPermit',
tabid: 'addComponentSupply',
text: "新增组件补充发料",
url: web_app.name + '/componentSupply/forwardComponentSupplyDetail.job'
});
......@@ -91,7 +91,7 @@ function addHandler() {
function doView(id) {
UICtrl.addTabItem({
tabid: 'viewSapPermit'+id,
tabid: 'viewComponentSupply'+id,
text: "组件补充发料协议",
url: web_app.name + '/componentSupply/showComponentSupply.job?bizId='+id+"&isReadOnly=true"
});
......
......@@ -114,7 +114,7 @@ function bindEvent(){
$('#name1').val(data.nameOrg1);
}
});
//物料编码
$('#matnr').searchbox({
type: "system", name: "sapMaterialSelect",
getParam: function (item) {
......@@ -137,9 +137,16 @@ function bindEvent(){
$('#peinh').val(data.PEINH);
$('#meins').val(data.MEINS);
$('#meinsName').val(data.MSEHL);
if (data.MATNR == undefined) {
UICtrl.enable($("#matklName"))
} else {
UICtrl.disable($("#matklName"));
UICtrl.disable($("#maktx"))
}
}
});
//物料组
$('#matklName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......@@ -150,6 +157,14 @@ function bindEvent(){
onChange: function (value, data) {
$('#matkl').val(data.MATKL);
$('#matklName').val(data.WGBEZ);
UICtrl.enable($("#maktx"));
if (data.MATKL == undefined) {
$("#maktx").val("");
UICtrl.enable($("#matnr"));
UICtrl.disable($("#maktx"));
} else {
UICtrl.disable($("#matnr"));
}
}
});
......
......@@ -26,7 +26,7 @@
<x:inputC name="idnlf" label="供应商物料" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="nameOrg3" label="组织名称3" labelCol="1" fieldCol="2"/>
<x:inputC name="nameOrg4" label="组织名称4" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="matnr" label="物料编码" labelCol="1" fieldCol="2" required="true" wrapper="select"/>
<x:inputC name="matnr" label="物料编码" labelCol="1" fieldCol="2" required="false" wrapper="select"/>
<x:inputC name="maktx" label="物料描述" labelCol="1" fieldCol="2" readonly="true"/>
......@@ -45,16 +45,16 @@
<x:inputC name="peinh" label="价格单位" labelCol="1" fieldCol="2" required="false" />
<x:hidden name="bprme"/>
<x:inputC name="bprmeName" label="订单价格单位(采购)" labelCol="2" fieldCol="2" wrapper="select" required="false" />
<x:inputC name="bprmeName" label="订单价格单位(采购)" labelCol="2" fieldCol="2" wrapper="select" required="true" />
<x:inputC name="meinsName" label="基本计量单位" labelCol="1" fieldCol="1" required="false" readonly="true"/>
</div>
<div class="hg-form-row">
<x:hidden name="meins"/>
<x:selectC name="mwskz" label="销售/购买税代码" labelCol="2" fieldCol="1" required="true" dictionary="mwskz"/>
<x:inputC name="norbm" label="标准采购订单数量" labelCol="2" fieldCol="1" required="false" mask="99999999.99"/>
<x:inputC name="norbm" label="标准采购订单数量" labelCol="2" fieldCol="1" required="true" mask="99999999.99"/>
<x:inputC name="umren" label="单位转换分母" labelCol="1" fieldCol="2" required="false" mask="99999999.99"/>
<x:inputC name="umrez" label="单位转换分子" labelCol="1" fieldCol="2" required="false" mask="99999999.99"/>
<x:inputC name="umren" label="单位转换分母" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
<x:inputC name="umrez" label="单位转换分子" labelCol="1" fieldCol="2" required="true" mask="99999999.99"/>
......
......@@ -528,6 +528,18 @@ function doSaveDefine() {
var returnResult=checkInput();
var row = itemGridManager.rows;
var rId="";
if ($("#matnr").val()==""&&$("#matklName").val()==""){
Public.tip("物料编码与物料组必须填写一个!");
return false;
}
if ($("#matnr").val()==""&&$("#maktx").val()==""){
Public.tip("物料描述必须填写!");
return false;
}
if ($("#matnr").val()==""&&$("#sortl").val()==""){
Public.tip("排序字段必须填写!");
return false;
}
if (returnResult) {
if (row.length > 0) {
for (var u = 0; u < row.length; u++) {
......
......@@ -50,6 +50,7 @@ function initPurchaseListGrid() {
{display: "单据编号", name: "billCode", width: 150, minWidth: 60, type: "string", align: "center"},
{display: "消息类型", name: "typeTextView", width: 100, minWidth: 60, type: "string", align: "center"},
{display: "消息文本", name: "message", width: 300, minWidth: 60, type: "string", align: "center"},
{display: "采购信息记录编号", name: "infnr", width: 130, minWidth: 60, type: "string", align: "center"},
{display: "工厂", name: "werksName", width: "200", align: "left", type: "string"},
{display: "采购组织", name: "ekorgName", width: "200", align: "left", type: "string"},
{display: "供应商编号", name: "lifnr", width: "100", align: "left", type: "string"},
......
......@@ -130,6 +130,8 @@ public class ResourceSearchController {
.collect(Collectors.toList());
}
}
if (CollectionUtil.isNotEmpty(mapList)){
if (StringUtil.isNotBlank(param)){//模糊条件过滤
mapList = mapList
......@@ -137,7 +139,40 @@ public class ResourceSearchController {
.filter(map -> map.values().stream().anyMatch(value->value.contains(param)))
.collect(Collectors.toList());
}
List<Map<String,String>> newMapList=new ArrayList<>();
if (StringUtil.isNotBlank(sdo.getString("wlfl1"))){//包含物料分类2
newMapList = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(sdo.getString("wlfl1"))))
.collect(Collectors.toList());
}
List<Map<String,String>> newMapList2=new ArrayList<>();
if (StringUtil.isNotBlank(sdo.getString("wlfl2"))){//包含物料分类2
newMapList2 = mapList
.stream()
.filter(map -> map.values().stream().anyMatch(value->value.contains(sdo.getString("wlfl2"))))
.collect(Collectors.toList());
newMapList.addAll(newMapList2);
}
if (StringUtil.isNotBlank(sdo.getString("noWlfl1"))){//排除物料分类1
newMapList = mapList
.stream()
.filter(map -> map.values().stream().noneMatch(value->value.contains(sdo.getString("noWlfl1"))))
.collect(Collectors.toList());
}
if (StringUtil.isNotBlank(sdo.getString("noWlfl2"))){//排除物料分类2
newMapList = newMapList
.stream()
.filter(map -> map.values().stream().noneMatch(value->value.contains(sdo.getString("noWlfl2"))))
.collect(Collectors.toList());
}
mapList=newMapList;
}
Integer intPage = sdo.getInteger("intPage", 1);
Integer pageSize = sdo.getInteger("pageSize",10);
PageRequest pageRequest = new PageRequest(intPage - 1, pageSize);
......
......@@ -293,7 +293,7 @@ public class NonProdApplyNextController extends CommonController {
return forward("nonProdApplyClass", nonProdApplyDept);
case "V": //销售
if (StringUtils.isNotBlank(nonProdApplyDept.getMatnr())) {
String url = "md/mditem/queryBrandByItemCode/" + nonProdApplyDept.getMatnr();
String url = "md/mdItem/queryBrandByItemCode/" + nonProdApplyDept.getMatnr();
Map map = new HashMap();
try {
//{msg:"","code":"",data:{"code":"","name":}}
......
......@@ -12,6 +12,7 @@ import com.huigou.topsun.sap.purchaseInfoRecord.repository.SapPurchaseInfoRecord
import com.huigou.topsun.sap.suppliers.domain.SuppliersInfo;
import com.huigou.uasp.annotation.ControllerMapping;
import com.huigou.uasp.bmp.common.BizBillStatus;
import com.huigou.uasp.bmp.fn.CodeGenerator;
import com.huigou.uasp.client.CommonController;
import com.huigou.util.SDO;
import com.huigou.util.StringUtil;
......@@ -41,6 +42,8 @@ public class SapPurchaseInfoRecordController extends CommonController {
private SapPurchaseInfoRecordItemApplication sapPurchaseInfoRecordItemApplication;
@Autowired
private SapPurchaseInfoRecordItemRepository sapPurchaseInfoRecordItemRepository;
@Autowired
private CodeGenerator codeGenerator;
public String forwardSapPurchaseInfoRecordList(){
return forward("purchaseInfoRecordList");
......@@ -118,6 +121,8 @@ public class SapPurchaseInfoRecordController extends CommonController {
sapPurchaseInfoRecord.setStatusId(BizBillStatus.APPLYING.getId());
Operator operator = getOperator();
sapPurchaseInfoRecord.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
String nextCode = codeGenerator.getNextCode("purchaseInfoRecord");
sapPurchaseInfoRecord.setBillCode(nextCode);
return forward("purchaseInfoRecordDetail",sapPurchaseInfoRecord);
}
......
......@@ -13,6 +13,6 @@ public class SapDialogQuery {
private String maktx;
private String matkl;
private String mtart;
}
Markdown is supported
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