Commit fe577eec authored by 刘学辉's avatar 刘学辉

物料主数据调整

parent a8914771
...@@ -49,6 +49,11 @@ function initializate() { ...@@ -49,6 +49,11 @@ function initializate() {
warehouseSet(data.value); warehouseSet(data.value);
} }
}); });
//不参与成本核算 修改 根据价格控制决定
$("#ncost").combox({onChange:function(data) {
financialDisplayNcost($("#vprsv").val());
}
});
switch ($("#active").val()) { switch ($("#active").val()) {
case '0'://待填报 case '0'://待填报
// $("#businessUsageDiv").hide(); // $("#businessUsageDiv").hide();
...@@ -427,6 +432,7 @@ function produceMustInput(flag){ ...@@ -427,6 +432,7 @@ function produceMustInput(flag){
function storeMustInput(flag) { function storeMustInput(flag) {
UICtrl.setElRequiredFlag("#prctr",flag); UICtrl.setElRequiredFlag("#prctr",flag);
UICtrl.setElRequiredFlag("#insmk",flag);
storeDisplaySer($('#mtart').val()); storeDisplaySer($('#mtart').val());
werksMustInput(); werksMustInput();
lgortMustInput(); lgortMustInput();
...@@ -459,10 +465,10 @@ function storeDisplaySer(mtart){ ...@@ -459,10 +465,10 @@ function storeDisplaySer(mtart){
} }
} }
function warehouseMustInput(flag) { function warehouseMustInput(flag) {
if (flag){ // if (flag){
$('#lhme1').val($('#meins').val()); //仓库的仓库设施1存储单位 默认基本计量单位 // $('#lhme1').val($('#meins').val()); //仓库的仓库设施1存储单位 默认基本计量单位
$('#lhme1Name').val( $('#meinsName').val()); // $('#lhme1Name').val( $('#meinsName').val());
} // } 24.08.28取消
UICtrl.setElRequiredFlag("#ltkzaName",flag); UICtrl.setElRequiredFlag("#ltkzaName",flag);
UICtrl.setElRequiredFlag("#ltkzeName",flag); UICtrl.setElRequiredFlag("#ltkzeName",flag);
UICtrl.setElRequiredFlag("#lgortProfitName",flag); UICtrl.setElRequiredFlag("#lgortProfitName",flag);
...@@ -508,16 +514,16 @@ function financialMustInput(flag) { ...@@ -508,16 +514,16 @@ function financialMustInput(flag) {
function financialDisplayNcost(vprsv) { // alert("-="+vprsv); function financialDisplayNcost(vprsv) { // alert("-="+vprsv);
if (vprsv == 'S') { //标准价格 if (vprsv == 'S') { //标准价格
$('#ncost').val('0'); $('#ncost').val('0');
$('#ncost_text').val('空'); $('#ncost_text').val('0-空');
$('#mlast').val('3'); $('#mlast').val('3');
$('#mlast_text').val('单/多级'); $('#mlast_text').val('单/多级');
} else if (vprsv == 'V') { //移动平均价格 } else if (vprsv == 'V') { //移动平均价格
if ($('#beskz').val() == 'F' || $('#sobsl').val() == '40' || $('#sobsl').val() == '70') { //外部采购,库存转储,从1010工厂领料 if ($('#beskz').val() == 'F' || $('#sobsl').val() == '40' || $('#sobsl').val() == '70') { //外部采购,库存转储,从1010工厂领料
$('#ncost').val('0'); $('#ncost').val('0');
$('#ncost_text').val('空'); $('#ncost_text').val('0-空');
} else { } else {
$('#ncost').val('X'); $('#ncost').val('X');
$('#ncost_text').val('是'); $('#ncost_text').val('X-是');
} }
$('#mlast').val('2'); $('#mlast').val('2');
$('#mlast_text').val('基于交易的'); $('#mlast_text').val('基于交易的');
......
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
<x:hidden name="spart"/> <x:hidden name="spart"/>
<x:selectC name="mtposMara" label="项目类别组" labelCol="1" fieldCol="2" dictionary="mtposMara"/> <x:selectC name="mtposMara" label="项目类别组" labelCol="1" fieldCol="2" dictionary="mtposMara"/>
<x:inputC name="maktx" label="汉语品名" required="true" labelCol="1" fieldCol="2"/> <x:inputC name="maktx" label="汉语品名" required="true" labelCol="1" fieldCol="2"/>
<x:selectC name="xchpf" label="批次管理" labelCol="1" fieldCol="2" dictionary="xchpf"/> <x:selectC name="xchpf" label="批次管理" labelCol="1" fieldCol="2" dictionary="xchpf" required="true"/>
<!--x:inputC name="magrv" label="包装物料组" labelCol="1" fieldCol="2"/--> <!--x:inputC name="magrv" label="包装物料组" labelCol="1" fieldCol="2"/-->
<x:inputC name="maktxEn" label="英语品名" labelCol="1" fieldCol="2"/> <x:inputC name="maktxEn" label="英语品名" labelCol="1" fieldCol="2"/>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
<x:selectC name="mlast" label="价格确定" labelCol="1" fieldCol="2" dictionary="mlast"/> <x:selectC name="mlast" label="价格确定" labelCol="1" fieldCol="2" dictionary="mlast"/>
<x:inputC name="peinh" label="定价基数" labelCol="1" fieldCol="2" required="false"/> <x:inputC name="peinh" label="定价基数" labelCol="1" fieldCol="2" required="false"/>
<x:selectC name="ncost" label="不参与成本核算" labelCol="2" fieldCol="1" dictionary="xchpf"/> <x:selectC name="ncost" label="不参与成本核算" labelCol="2" fieldCol="1" dictionary="ncost" />
<x:selectC name="hkmat" label="物料来源" labelCol="1" fieldCol="2" dictionary="xchpf"/> <x:selectC name="hkmat" label="物料来源" labelCol="1" fieldCol="2" dictionary="xchpf"/>
<x:inputC name="verpr" label="移动平均价" labelCol="1" fieldCol="2"/> <x:inputC name="verpr" label="移动平均价" labelCol="1" fieldCol="2"/>
<x:inputC name="stprs" label="标准价" labelCol="1" fieldCol="2"/> <x:inputC name="stprs" label="标准价" labelCol="1" fieldCol="2"/>
......
...@@ -27,6 +27,8 @@ import com.huigou.util.ClassHelper; ...@@ -27,6 +27,8 @@ import com.huigou.util.ClassHelper;
import com.huigou.util.SDO; import com.huigou.util.SDO;
import com.huigou.util.StringUtil; import com.huigou.util.StringUtil;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -37,7 +39,7 @@ import java.util.stream.Collectors; ...@@ -37,7 +39,7 @@ import java.util.stream.Collectors;
@Service @Service
public class NonProdApplyDeptApplicationImpl extends BaseApplication implements NonProdApplyDeptApplication { public class NonProdApplyDeptApplicationImpl extends BaseApplication implements NonProdApplyDeptApplication {
private final static Logger LOG = LoggerFactory.getLogger(NonProdApplyDeptApplicationImpl.class);
@Autowired @Autowired
NonProdApplyDeptRepository nonProdApplyDeptRepository; NonProdApplyDeptRepository nonProdApplyDeptRepository;
@Autowired @Autowired
...@@ -433,6 +435,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -433,6 +435,9 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
if (baseInfo.getBusinessUsage().contains("B")){ if (baseInfo.getBusinessUsage().contains("B")){
sapVO.setPstat("G,"+sapVO.getPstat()); sapVO.setPstat("G,"+sapVO.getPstat());
} }
sapVO.setBwkey(applyDept.getWerks());
sapVO.setLosgr(applyDept.getPeinh()); //成本核算的价格单位 默认为定价基数
sapVO.setUpdkz("I"); sapVO.setUpdkz("I");
if ("0".equals(sapVO.getInsmk())){ if ("0".equals(sapVO.getInsmk())){
sapVO.setInsmk(""); sapVO.setInsmk("");
...@@ -471,7 +476,14 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements ...@@ -471,7 +476,14 @@ public class NonProdApplyDeptApplicationImpl extends BaseApplication implements
Map<String, Object> backMap = new HashMap<>(); Map<String, Object> backMap = new HashMap<>();
backMap.put("businessType", busiType); backMap.put("businessType", busiType);
backMap.put("businessId", baseInfo.getId()); backMap.put("businessId", baseInfo.getId());
backMap.put("parameter", JSON.toJSONString(mapList)); try {
String paramJson = new ObjectMapper().writeValueAsString(mapList);
backMap.put("parameter", paramJson);//JSON.toJSONString(mapList));
} catch (Exception ex){
//ex.printStackTrace();
LOG.info("数据转换出错:={}", JSON.toJSONString(mapList));
backMap.put("parameter", JSON.toJSONString(mapList));
}
backMap.put("sequence", backMap.get("row")); backMap.put("sequence", backMap.get("row"));
backMap.put("TYPE", "E"); backMap.put("TYPE", "E");
String errorMsg = ""; String errorMsg = "";
......
...@@ -773,6 +773,11 @@ public class ProdApplyToSapVO { ...@@ -773,6 +773,11 @@ public class ProdApplyToSapVO {
@JsonProperty("VINT2") @JsonProperty("VINT2")
private String vint2; private String vint2;
/**
* MRP 价格单位 判断价格单位与 成本核算单元大小不能小于价格单位
*/
@JsonProperty("LOSGR")
private String losgr;
/** /**
* 综合MRP * 综合MRP
......
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