Commit 93fbebc9 authored by 刘学辉's avatar 刘学辉

物料主数据页面调整

parent e1292902
......@@ -142,9 +142,10 @@ columns = [
MATNR: "productCode",
MAKTX: "productName",
PSMNG: "number",
MEINS: "unitName",
KOEIN: "currencyName",
KWERT: "money",
EDATU: "sendDate"
LFDAT: "sendDate"
}
}
}
......
......@@ -47,7 +47,7 @@ function initializate() {
switch ($("#active").val()) {
case '0'://待填报
// $("#businessUsageDiv").hide();
hideAllBusiness();
hideAllBusiness(false); //隐藏但不清理值
for (var x=0;x<$("input[name='businessUsage']").length;x++) {
if ($("input[name='businessUsage']")[x].checked) {
showBusiness($("input[name='businessUsage']")[x].value);
......@@ -102,7 +102,7 @@ function initializate() {
} else {
$("input[name='businessUsage']").each(function(){
$(this).attr("checked",false);
hideAllBusiness();
hideAllBusiness(true);
})
}
});
......@@ -173,31 +173,38 @@ function hideBusiness(busiCode) {
if (busiCode=="E") {
$("#purchaseDiv").hide();
purchaseMustInput(false);
clearForm_purchase();
}
if (busiCode=="V") {
$("#saleDiv").hide();
saleMustInput(false);
clearForm_sale();
}
if (busiCode=="D"){
$("#mrpDiv").hide();
mrpMustInput(false);
UICtrl.setElRequiredFlag("#dismm",false);
clearForm_mrp();
}
if (busiCode=="A") {
$("#produceDiv").hide();
produceMustInput(false);
clearForm_produce();
}
if (busiCode=="L") {
$("#storeDiv").hide();
storeMustInput(false);
clearForm_store();
}
if (busiCode=="S") {
$("#warehouseDiv").hide();
warehouseMustInput(false);
clearForm_warehouse();
}
if (busiCode=="B") {
$("#financialDiv").hide();
financialMustInput(false);
clearForm_financial();
}
}
function showAllBusiness() {
......@@ -211,7 +218,7 @@ function showAllBusiness() {
//设置必输项
saleMustInput(true);
purchaseMustInput(true);
produceMustInput(true);
UICtrl.setElRequiredFlag("#dismm",true); //MRP类型
storeMustInput(true);
warehouseMustInput(true);
......@@ -221,7 +228,7 @@ function showAllBusiness() {
mtvfpMustInput();
}
function hideAllBusiness() {
function hideAllBusiness(flag) {
$("#saleDiv").hide();
$("#purchaseDiv").hide();
$("#mrpDiv").hide();
......@@ -229,9 +236,27 @@ function hideAllBusiness() {
$("#storeDiv").hide();
$("#warehouseDiv").hide();
$("#financialDiv").hide();
werksMustInput();
werksMustInput(); //可以不需要的?
lgortMustInput();
mtvfpMustInput();
saleMustInput(false);
purchaseMustInput(false);
produceMustInput(false);
UICtrl.setElRequiredFlag("#dismm",false); //MRP类型
storeMustInput(false);
warehouseMustInput(false);
financialMustInput(false);
if (flag) {
clearForm_sale();
clearForm_produce();
clearForm_purchase();
clearForm_mrp();
clearForm_store();
clearForm_warehouse();
clearForm_financial();
}
}
function showBusinessReadOnly(busiCode) {
......@@ -294,11 +319,19 @@ function saleMustInput(flag) { //销售必输项
UICtrl.setElRequiredFlag("#ktgrm",flag);
UICtrl.setElRequiredFlag("#vkorgName",flag);
UICtrl.setElRequiredFlag("#vtwegName",flag);
if (!flag) {
UICtrl.setElRequiredFlag("#umrenSale", flag);
UICtrl.setElRequiredFlag("#umrezSale", flag);
}
mtvfpMustInput();
}
function purchaseMustInput(flag) { //采购必输项
UICtrl.setElRequiredFlag("#ekgrpName",flag);
UICtrl.setElRequiredFlag("#ekgrp",flag);
if (!flag) {
UICtrl.setElRequiredFlag("#umrenPurch", flag);
UICtrl.setElRequiredFlag("#umrezPurch", flag);
}
werksMustInput();
}
function werksMustInput(){ //工厂必输
......@@ -380,8 +413,13 @@ function mrpMustInput(flag) { //MRP必输项
function produceMustInput(flag){
UICtrl.setElRequiredFlag("#sfcpf",flag);
UICtrl.setElRequiredFlag("#fevor",flag);
if (!flag) {
UICtrl.setElRequiredFlag("#umrenProd", flag);
UICtrl.setElRequiredFlag("#umrezProd", flag);
}
werksMustInput();
}
function storeMustInput(flag) {
UICtrl.setElRequiredFlag("#prctr",flag);
storeDisplaySer($('#mtart').val());
......@@ -423,7 +461,7 @@ function warehouseMustInput(flag) {
UICtrl.setElRequiredFlag("#ltkzaName",flag);
UICtrl.setElRequiredFlag("#ltkzeName",flag);
UICtrl.setElRequiredFlag("#lgortProfitName",flag);
UICtrl.setElRequiredFlag("#lhmg1",flag);
// UICtrl.setElRequiredFlag("#lhmg1",flag);
UICtrl.setElRequiredFlag("#lhme1Name",flag);
UICtrl.setElRequiredFlag("#lgnumName",flag);
UICtrl.setElRequiredFlag("#lgortName",flag);
......@@ -650,10 +688,13 @@ function clearForm_mrp() {
//撤销生产
function clearForm_produce() {
// $("#saleForm").formClean();
$("#ausmeName").val("");
$("#ausme").val("");
$("#umrenProd").val("");
$("#umrezProd").val("");
$("#sfcpf").val("");
$("#fevor").val("");
// $("#fevorName").val("");
$("#insmk").val("");
}
......@@ -852,6 +893,19 @@ function bindEvent() {
$('#meinsName').val(data.MSEHL);
$('#lhme1').val(data.MSEH3); // 仓库的仓库设施1存储单位
$('#lhme1Name').val(data.MSEHL);
if ($('#ausme').val()==data.MSEH3) {//投料计量单位
$('#ausme').val("");
$('#ausmeName').val("");
}
if ($('#vrkme').val()==data.MSEH3) { //销售计量单位
$('#vrkme').val("");
$('#vrkmeName').val("");
}
if ($('#bstme').val()==data.MSEH3) { //采购计量单位
$('#bstme').val("");
$('#bstmeName').val("");
}
}
});
......@@ -920,8 +974,18 @@ function bindEvent() {
return {fieldName: "MEINS"}
},
onChange: function (value, data) {
$('#bstme').val(data.MSEHI);
$('#bstmeName').val(data.MSEHL);
if ($('#meins').val()==data.MSEH3) {
Public.errorTip("不能与基本计量单位相同!");
$('#bstme').val("");
$('#bstmeName').val("");
UICtrl.setElRequiredFlag("#umrenPurch",false);
UICtrl.setElRequiredFlag("#umrezPurch",false);
} else {
$('#bstme').val(data.MSEH3);
$('#bstmeName').val(data.MSEHL);
UICtrl.setElRequiredFlag("#umrenPurch",true);
UICtrl.setElRequiredFlag("#umrezPurch",true);
}
}
});
bindEvent_sale(); //销售视图
......@@ -940,6 +1004,37 @@ function bindEvent() {
$('#lgortQmName').val(data.LGOBE);
}
});
$('#fevor').searchbox({ //生产主管
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "T024F", filterValue: $('#werks').val()}
},
onChange: function (value, data) {
$('#fevor').val(data.FEVOR);
// $('#fevorName').val(data.LGOBE);
}
});
//投料计量单位
$('#ausmeName').searchbox({
type: "system", name: "dictionary",
getParam: function (item) {
return {fieldName: "MEINS"}
},
onChange: function (value, data) {
if ($('#meins').val()==data.MSEH3) {
Public.errorTip("不能与基本计量单位相同!");
$('#ausme').val("");
$('#ausmeName').val("");
UICtrl.setElRequiredFlag("#umrenProd",false);
UICtrl.setElRequiredFlag("#umrezProd",false);
}else {
$('#ausme').val(data.MSEH3);
$('#ausmeName').val(data.MSEHL);
UICtrl.setElRequiredFlag("#umrenProd",true);
UICtrl.setElRequiredFlag("#umrezProd",true);
}
}
});
bindEvent_warehouse();
}
......@@ -978,7 +1073,7 @@ function bindEvent_sale() {
});
$('#vrkmeName').searchbox({
$('#vrkmeName').searchbox({ //销售记量单位
type: "system", name: "dictionary",
getParam: function (item) {
return {
......@@ -986,8 +1081,19 @@ function bindEvent_sale() {
}
},
onChange: function (value, data) {
$('#vrkme').val(data.MSEH3);
$('#vrkmeName').val(data.MSEHL);
if ($('#meins').val()==data.MSEH3) {
Public.errorTip("不能与基本计量单位相同!");
$('#vrkme').val("");
$('#vrkmeName').val("");
UICtrl.setElRequiredFlag("#umrenSale",false);
UICtrl.setElRequiredFlag("#umrezSale",false);
}else {
$('#vrkme').val(data.MSEH3);
$('#vrkmeName').val(data.MSEHL);
UICtrl.setElRequiredFlag("#umrenSale",true);
UICtrl.setElRequiredFlag("#umrezSale",true);
}
}
});
......
......@@ -283,10 +283,10 @@
<x:selectC name="perkz" label="期间标识" labelCol="1" fieldCol="2" dictionary="perkz"/>
<x:inputC name="plifz" label="外采交货时间" labelCol="1" fieldCol="2"/>
</div>
</div>
<div class="hg-form-row">
<x:selectC name="diskz" label="库存地MRP标识" labelCol="2" fieldCol="2" dictionary="diskz"/>
<x:selectC name="diskz" label="库存地MRP标识" labelCol="2" fieldCol="2" dictionary="diskz"/>
<x:inputC name="lgproName" label="默认生产库存地" labelCol="2" fieldCol="2" wrapper="select"/>
<x:hidden name="lgpro"/>
<x:inputC name="lgfsbName" label="默认采购收货库存地" labelCol="2" fieldCol="2" wrapper="select"/>
......@@ -297,12 +297,13 @@
<div class="hg-form-cols" id="produceDiv">
<x:title title="生产" name="group"/>
<div class="hg-form-row">
<x:inputC name="ausme" label="投料计量单位" labelCol="1" fieldCol="2"/>
<x:inputC name="ausmeName" label="投料计量单位" labelCol="1" fieldCol="2" wrapper="select"/>
<x:hidden name="ausme"/>
<x:inputC name="umrenProd" label="转换分母(生产)" labelCol="2" fieldCol="2"/>
<x:inputC name="umrezProd" label="转换分子(生产)" labelCol="2" fieldCol="2"/>
</div>
<div class="hg-form-row">
<x:inputC name="fevor" label="生产主管" labelCol="1" fieldCol="2"/>
<x:inputC name="fevor" label="生产主管" labelCol="1" fieldCol="2" wrapper="select" required="false"/>
<x:selectC name="sfcpf" label="生产计划参数文件" labelCol="2" fieldCol="2" dictionary="sfcpf"/>
</div>
......
......@@ -268,10 +268,10 @@ public class ResourceSearchController {
new QuerySchemeField("物料名称", "MAKTX", "string", 200L),
new QuerySchemeField("数量", "PSMNG", "string", 100L),
// new QuerySchemeField("客户物料编码", "KDMAT", "string", 200L),
new QuerySchemeField("单位", "MEINS", "string", 100L),
new QuerySchemeField("币别", "KOEIN", "string", 100L),
new QuerySchemeField("金额", "KWERT", "string", 200L),
new QuerySchemeField("出货日期", "EDATU", "string", 100L)
new QuerySchemeField("出货日期", "LFDAT", "string", 100L)
);
easySearchParse.setFields(fields);
......
......@@ -9,6 +9,7 @@ import com.huigou.context.ThreadLocalUtil;
import com.huigou.data.domain.model.CommonDomainConstants;
import com.huigou.data.query.model.QueryDescriptor;
import com.huigou.data.query.model.QueryModel;
import com.huigou.topsun.base.bsnMessage.appliction.MannualStartWorkApplication;
import com.huigou.topsun.ep.order.application.EpSaleOrderApplication;
import com.huigou.topsun.ep.order.domain.EpSaleOrderItem;
import com.huigou.topsun.ep.order.domain.vo.EpSaleOrderItemVo;
......@@ -59,7 +60,8 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
private OperatorApplication operatorApplication;
@Autowired
SapMutualEpLogApplication sapMutualEpLogApplication;
@Autowired
private MannualStartWorkApplication mannualStartWorkApplication;
@Override
protected String saveBizAndApprovalData() {
super.saveBizAndApprovalData();
......@@ -116,7 +118,7 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
}
@Transactional
private void updateStatus(String bizId, BizBillStatus status) {
protected void updateStatus(String bizId, BizBillStatus status) {
Assert.hasText(bizId, CommonDomainConstants.ID_NOT_BLANK);
this.commonDomainService.updateStatus(EpSaleOrder.class, bizId, status.getId());
}
......@@ -245,10 +247,12 @@ public class EpSaleOrderApplicationImpl extends FlowBroker implements EpSaleOrde
Set<String> vbelns = epSaleOrderItemVos.stream().map(EpSaleOrderItemVo::getVbeln).collect(Collectors.toSet());
String vbeln = String.join(",", vbelns);
formData.put("vbeln",vbeln);
String bizId = this.startProcessInstance(EpSaleOrderApplication.PROCESS_DEFINITION_KEY, formData, localSdo);
// String bizId = this.startProcessInstance(EpSaleOrderApplication.PROCESS_DEFINITION_KEY, formData, localSdo);
String bizId =mannualStartWorkApplication.startWorkflow(epSaleOrder,PROCESS_DEFINITION_KEY,"epSaleOrder");
epSaleOrder.setId(bizId);
// epSaleOrder.setStatusId(BizBillStatus.APPROVING.getId()); //lxh
epSaleOrder.setStatusId(BizBillStatus.APPLYING.getId());
epSaleOrder.setStatusId(BizBillStatus.APPROVING.getId()); //lxh 08.01
// epSaleOrder.setStatusId(BizBillStatus.APPLYING.getId());
epSaleOrder = epSaleOrderRepository.save(epSaleOrder);
List<EpSaleOrderItem> epSaleOrderItems = new ArrayList<>();
......
......@@ -651,7 +651,7 @@ public class NonProdApplyApplicationImpl extends FlowBroker implements NonProdA
// bsnMessageApplication.publishTasks(sapNonProdApplyDept.getApplyDeptId());
Map backMap=new HashMap();
backMap.put("TYPE","P");
backMap.put("title",nonProdApplyBaseInfo.getBillCode());
backMap.put("title",sapNonProdApplyDept.getMaktx()); //汉语品名
backMap.put("positionCode","HYZY");
nonProdApplyDeptApplication.saveBsnMessageData(nonProdApplyBaseInfo, backMap);
}catch(Exception ex){
......
......@@ -906,6 +906,11 @@ public class SapNonProdApplyDept implements Serializable {
@Column(name = "vrkme_name")
private String vrkmeName;
// @Column(name = "sfcpf_name")
// private String sfcpfName;
@Column(name = "fevor_name")
private String fevorName;
@Transient
private String billCode;
......
......@@ -105,7 +105,9 @@ public class SapMaterialApplicationImpl implements SapMaterialApplication {
newMap.put("MAKTX", mapItem.get("MAKTX")); //物料名称
newMap.put("AUFNR", mapItem.get("AUFNR")); //生产单号
newMap.put("PSMNG", mapItem.get("PSMNG")); //生产数量
newMap.put("EDATU", mapItem.get("EDATU")); //出货日期
newMap.put("LFDAT", mapItem.get("LFDAT")); //出货日期
newMap.put("MEINS", mapItem.get("MEINS")); //单位
// KPEIN //定价单位
newMap.put("KWERT", mapItem.get("KWERT")); // //折前总金额
newMap.put("KOEIN", mapItem.get("KOEIN")); // 币别
......
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