Commit 97a8df78 authored by 刘学辉's avatar 刘学辉

物料主数据扩展调整

parent 04353298
......@@ -65,26 +65,24 @@
<x:inputC name="materialUsage" label="用途" labelCol="1" fieldCol="2"/>
<x:selectC name="itemAttributes" label="物品属性" labelCol="1" fieldCol="2" dictionary="suppliesType"/>
</div>
<c:if test="${applyType==2}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsageSeled" label="扩展前业务用途" list="businessUsageSeledList" labelCol="1"
fieldCol="5" disabled="true"/>
<x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="5"/>
</div>
</c:if>
<c:if test="${applyType==2}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="11"/>
</div>
</c:if>
<c:if test="${applyType==1}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
</c:if>
<c:if test="${applyType==0}">
<c:if test="${applyType==0}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11"/>
</div>
</c:if>
</c:if>
<div class="hg-form-row">
<x:textareaC rows="3" name="textDescription" label="文本说明" labelCol="1" fieldCol="11"/>
......
......@@ -86,10 +86,10 @@ function loadNonProdApplyListGrid() {
return type;
}
},
{display: "物料/产品编码", name: "matnr", width: 120, minWidth: 60, type: "string", align: "left"},
{display: "维护类型", name: "maintenanceTypeTextView", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "批准人", name: "approver", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "批准日期", name: "approvalDate", width: 140, minWidth: 60, type: "date", align: "left"},
{display: "物料编码", name: "matnr", width: 100, minWidth: 60, type: "string", align: "left"},
{display: "通用品名", name: "genericName", width: 200, minWidth: 60, type: "string", align: "left"},
{display: "适用标准", name: "applicableStandard", width: 140, minWidth: 60, type: "string", align: "left"},
{display: "基本计量单位", name: "baseUnitTextView", width: 140, minWidth: 60, type: "string", align: "left"},
......@@ -181,7 +181,7 @@ function modifyHandler(id,matnr) {
return false;
}
UICtrl.addTabItem({
tabid: 'nonProdApplyChange',
tabid: 'nonProdApplyChange'+id,
text: "非产品/非本成品类物料主数据变更申请",
url: web_app.name + '/sapNonProdApply/forwardNonProdApplyDetail.job?bizId='+id
});
......
......@@ -130,20 +130,32 @@
</div>
<div class="hg-form-cols">
<!--x:checkboxListC name="businessUsageSeled" label="扩展前业务用途" list="businessUsageSeledList" labelCol="1"
fieldCol="5" disabled="true"/-->
<!--x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="5"/-->
<c:if test="${applyType==2}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsageSeled" label="扩展前业务用途" list="businessUsageSeledList" labelCol="1"
fieldCol="5" disabled="true"/>
<x:checkboxListC name="businessUsage" label="业务用途" list="businessUsageUnSeledList" labelCol="1"
fieldCol="5"/>
fieldCol="11"/>
</div>
</c:if>
<c:if test="${applyType!=2}">
<c:if test="${applyType==1}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11" disabled="true"/>
</div>
</c:if>
<c:if test="${applyType==0}">
<div class="hg-form-row">
<x:checkboxListC name="businessUsage" label="业务用途" dictionary="serviceusage" labelCol="1"
fieldCol="11"/>
</div>
</c:if>
<div class="hg-form-row">
<x:title title="业务人员" name="group"/>
<div id="businessPersonnelListGrid" style="margin: 2px;"></div>
......
......@@ -110,7 +110,7 @@ function loadGrid() {
$("#specifications").attr("disabled",true);
$("#materialUsage").attr("disabled",true);
UICtrl.disable($("#vkorg"));
// UICtrl.disable($("#vkorg"));
UICtrl.disable($("#vtweg"));
UICtrl.disable($("#businessUsage"));
UICtrl.disable($("#baseUnit"));
......@@ -380,7 +380,7 @@ function getMeId() {
}
function bindEvent(){
$('#vtwegName').searchbox({
/*$('#vtwegName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "VTWEG"}
......@@ -389,7 +389,7 @@ function bindEvent(){
$('#vtweg').val(data.VTWEG);
$('#vtwegName').val(data.VKORGTEXT);
}
});
}); */
/*$('#dwerk').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
......
......@@ -78,8 +78,8 @@
<x:title title="维护销售信息" name="group"/>
<div class="hg-form-cols">
<div class="hg-form-row">
<x:selectC name="vkorg" required="false" label="销售组织" labelCol="1" dictionary="vkorg" fieldCol="2"/>
<x:inputC name="vtwegName" required="false" label="分销渠道" labelCol="1" fieldCol="2" wrapper="select"/>
<x:inputC name="vkorgName" required="false" label="销售组织" labelCol="1" disabled="true" fieldCol="2"/>
<x:inputC name="vtwegName" required="false" label="分销渠道" labelCol="1" fieldCol="2" disabled="true"/>
<x:hidden name="vtweg"/>
<x:selectC name="vrkme" label="销售计量单位" labelCol="1" fieldCol="2" dictionary="measuringUnit"/>
<x:inputC name="umrenSale" label="转换分母" labelCol="1" fieldCol="2"/>
......
......@@ -45,6 +45,7 @@ import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.persistence.Column;
import java.util.*;
@Service("nonProdApplyApplication")
......@@ -83,15 +84,45 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
} else {
nonProdApplyBaseInfo = (NonProdApplyBaseInfo) commonDomainService.loadAndFillinProperties(nonProdApplyBaseInfo);
}
nonProdApplyBaseInfo.setKind("materiel");
if (StringUtil.isBlank(nonProdApplyBaseInfo.getKind())) {
nonProdApplyBaseInfo.setKind("materiel");
}
nonProdApplyBaseInfo = nonProdApplyBaseInfoRepository.save(nonProdApplyBaseInfo);
//是变更或扩展的
if (isNew&&StringUtil.isNotBlank(nonProdApplyBaseInfo.getSourceId())) {
SapNonProdApplyDept newSapNonProdApplyDept=new SapNonProdApplyDept();
if ("modify".equals(nonProdApplyBaseInfo.getMaintenanceType())) {
ClassHelper.copyProperties(sapNonProdApplyDept, newSapNonProdApplyDept);
} else { //扩展的
} else { //扩展的 设置默认基本字段
newSapNonProdApplyDept.setMatnr(sapNonProdApplyDept.getMatnr());
newSapNonProdApplyDept.setMtart(sapNonProdApplyDept.getMtart());
newSapNonProdApplyDept.setLvorm(sapNonProdApplyDept.getLvorm());
newSapNonProdApplyDept.setSpart(sapNonProdApplyDept.getSpart());
newSapNonProdApplyDept.setMtposMara(sapNonProdApplyDept.getMtposMara());
newSapNonProdApplyDept.setMaktx(sapNonProdApplyDept.getMaktx());
newSapNonProdApplyDept.setSpars(sapNonProdApplyDept.getSpars());
newSapNonProdApplyDept.setMaktx(sapNonProdApplyDept.getMaktx());
newSapNonProdApplyDept.setSpars(sapNonProdApplyDept.getSpars());
newSapNonProdApplyDept.setNormt(sapNonProdApplyDept.getNormt());
newSapNonProdApplyDept.setXchpf(sapNonProdApplyDept.getXchpf());
newSapNonProdApplyDept.setMagrv(sapNonProdApplyDept.getMagrv());
newSapNonProdApplyDept.setMeins(sapNonProdApplyDept.getMeins());
newSapNonProdApplyDept.setBrgew(sapNonProdApplyDept.getBrgew());
newSapNonProdApplyDept.setNtgew(sapNonProdApplyDept.getNtgew());
newSapNonProdApplyDept.setGewei(sapNonProdApplyDept.getGewei());
newSapNonProdApplyDept.setVolum(sapNonProdApplyDept.getVolum());
newSapNonProdApplyDept.setVoleh(sapNonProdApplyDept.getVoleh());
newSapNonProdApplyDept.setRaube(sapNonProdApplyDept.getRaube());
newSapNonProdApplyDept.setIprkz(sapNonProdApplyDept.getIprkz());
newSapNonProdApplyDept.setMhdrz(sapNonProdApplyDept.getMhdrz());
newSapNonProdApplyDept.setMhdhb(sapNonProdApplyDept.getMhdhb());
//销售组织
// newSapNonProdApplyDept.setVkorg(sapNonProdApplyDept.getVkorg());
// newSapNonProdApplyDept.setVkorgName(sapNonProdApplyDept.getVkorgName());
// newSapNonProdApplyDept.setVtweg(sapNonProdApplyDept.getVtweg());
// newSapNonProdApplyDept.setVtwegName(sapNonProdApplyDept.getVtwegName());
// newSapNonProdApplyDept.setWerks(sapNonProdApplyDept.getWerks());
// newSapNonProdApplyDept.setWerksName(sapNonProdApplyDept.getWerksName());
}
newSapNonProdApplyDept.setId("");
newSapNonProdApplyDept.setBaseInfoId(nonProdApplyBaseInfo.getId());
......
......@@ -54,7 +54,7 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
case "C":
deptVo = sdo.toObject(NonProdApplyClassVo.class);
break;
case "V":
case "V": //销售
deptVo = sdo.toObject(NonProdApplySaleVo.class);
break;
case "E":
......
......@@ -74,7 +74,7 @@ public class NonProdApplyController extends CommonController {
List <Map<String,String>> list=new ArrayList<>();
//for (Map maps:mapUsage){
//查询扩展前所有的 业务部门
String usedBusiness=nonProdApplyApplication.getChangeBusinessUsage(bizId,"扩展");
/* String usedBusiness=nonProdApplyApplication.getChangeBusinessUsage(bizId,"扩展");
String []usages=usedBusiness.split(",");//nonProdApplyBaseInfo.getBusinessUsage().split(",");
Map <String, String>mapTmp=new HashMap();
Map <String, String>unMapTmp=new HashMap();
......@@ -101,10 +101,18 @@ public class NonProdApplyController extends CommonController {
}
}
this.putAttribute("businessUsageSeledList",mapTmp);
this.putAttribute("businessUsageSeledList",mapTmp); */
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
boolean isexists = false;
if (!"K".equals(key)) {
unMapTmp.put(key, entry.getValue());
}
}
this.putAttribute("businessUsageUnSeledList",unMapTmp);
// nonProdApplyBaseInfo.setBusinessUsageSeled(nonProdApplyBaseInfo.getBusinessUsage());
nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness);
// nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness);
nonProdApplyBaseInfo.setApplyType("2");
this.putAttribute("bizId", "");
this.putAttribute("sourceId", bizId);
......@@ -189,9 +197,9 @@ public class NonProdApplyController extends CommonController {
nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness);
String []usages=usedBusiness.split(",");
Map <String, String>mapTmp=new HashMap();
/* Map <String, String>mapTmp=new HashMap();
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry: dictMapUsage.entrySet()) {
for (Map.Entry<String, String> entry: dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
for (String usage:usages){
if (key.equals(usage)){
......@@ -215,6 +223,15 @@ public class NonProdApplyController extends CommonController {
}
this.putAttribute("businessUsageSeledList",mapTmp);
this.putAttribute("businessUsageUnSeledList",unMapTmp);*/
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
boolean isexists = false;
if (!"K".equals(key)) {
unMapTmp.put(key, entry.getValue());
}
}
this.putAttribute("businessUsageUnSeledList",unMapTmp);
}
return forward("nonProdApplyDetail", nonProdApplyBaseInfo);
......
......@@ -75,7 +75,7 @@ public class NonProdApplyNextController extends CommonController {
nonProdApplyBaseInfo.setBusinessUsageSeled(usedBusiness);
//String []exdusages=nonProdApplyBaseInfo.getBusinessUsage().split(",");
Map <String, String>mapTmp=new HashMap();
/* Map <String, String>mapTmp=new HashMap();
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry: dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
......@@ -99,9 +99,18 @@ public class NonProdApplyNextController extends CommonController {
unMapTmp.put(key, entry.getValue());
}
}
this.putAttribute("businessUsageSeledList",mapTmp);
*/
Map <String, String>unMapTmp=new HashMap();
for (Map.Entry<String, String> entry : dictMapUsage.entrySet()) {
String key = entry.getKey().toUpperCase();
// boolean isexists = false;
if (!"K".equals(key)) {
unMapTmp.put(key, entry.getValue());
}
}
this.putAttribute("businessUsageUnSeledList",unMapTmp);
// this.putAttribute("businessUsageSeledList",mapTmp);
// this.putAttribute("businessUsageUnSeledList",unMapTmp);
}
if (nonProdApplyDept != null) {
getBaseInfoAttrs(nonProdApplyBaseInfo, nonProdApplyDept);
......@@ -208,7 +217,7 @@ public class NonProdApplyNextController extends CommonController {
return forward("nonProdApplyNext", nonProdApplyDept);
case "C":
return forward("nonProdApplyClass", nonProdApplyDept);
case "V":
case "V": //销售
return forward("nonProdApplySale", nonProdApplyDept);
case "E":
return forward("nonProdApplyPurchase", nonProdApplyDept);
......
......@@ -16,7 +16,7 @@ import java.util.Date;
public class NonProdApplyBaseInfo extends FlowBillAbstractEntity {
/**
* 维护类型
* 维护类型 :new 新建 modify 变更 extend 扩展
*/
@Column(name = "maintenance_type")
private String maintenanceType;
......
......@@ -7,6 +7,7 @@ import javax.persistence.Column;
import java.util.Date;
@Data
//产品数据接口字段
public class ProdApplyFromSapVO {
// 批准日期
......
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