Commit 05d8a905 authored by 1650842865's avatar 1650842865

工序外协产品+工序可能有多个,根据供应商来确定;工序报价数量止不填时默认99999999

parent b1ad5e50
...@@ -21,7 +21,8 @@ function initGrid() { ...@@ -21,7 +21,8 @@ function initGrid() {
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=produce' url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=produce'
}); });
} }
} },
//exportExcelHandler: exportExcelHandler,
/* addPurchaseHandler: {id: 'purchaseException', text: '添加采购异常单', img: 'fa-building-o', className: 'btn-gray', /* addPurchaseHandler: {id: 'purchaseException', text: '添加采购异常单', img: 'fa-building-o', className: 'btn-gray',
click: function () { click: function () {
UICtrl.addTabItem({ UICtrl.addTabItem({
...@@ -61,6 +62,7 @@ function initGrid() { ...@@ -61,6 +62,7 @@ function initGrid() {
} }
} */ } */
, {display: "异常原因分类", name: "exceptionReasonTypeTextView", width: 100, minWidth: 60, type: "string", align: "center"} , {display: "异常原因分类", name: "exceptionReasonTypeTextView", width: 100, minWidth: 60, type: "string", align: "center"}
, {display: "处理方式", name: "dealWayTextView", width: 150, minWidth: 60, type: "string", align: "center"}
, {display: "呈报日期", name: "reportDate", width: 100, minWidth: 60, type: "date", align: "center"} , {display: "呈报日期", name: "reportDate", width: 100, minWidth: 60, type: "date", align: "center"}
, {display: "异常日期", name: "exceptionDate", width: 100, minWidth: 60, type: "date", align: "center"} , {display: "异常日期", name: "exceptionDate", width: 100, minWidth: 60, type: "date", align: "center"}
...@@ -203,3 +205,8 @@ function resetForm(obj) { ...@@ -203,3 +205,8 @@ function resetForm(obj) {
$(obj).formClean(); $(obj).formClean();
} }
//导出Excel
function exportExcelHandler() {
UICtrl.gridExport(gridManager);
}
...@@ -158,13 +158,13 @@ ...@@ -158,13 +158,13 @@
<%--<x:inputC name="" label="旧料号" labelCol="1" fieldCol="2"/>--%> <%--<x:inputC name="" label="旧料号" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="mhdrz" label="最小货架寿命" labelCol="1" fieldCol="2"/> <x:inputC name="mhdrz" label="最小货架寿命" labelCol="1" fieldCol="2"/>
<%--<x:inputC name="normt" label="适用行业标准" labelCol="1" fieldCol="2"/> <%--<x:inputC name="normt" label="适用行业标准" labelCol="1" fieldCol="2"/>--%>
<x:inputC name="length" label="长度cm" labelCol="1" fieldCol="2" mask="999999.9999"/> <x:inputC name="length" label="长度cm" labelCol="1" fieldCol="2" mask="999999.9999"/>
<x:inputC name="widthCm" label="宽度cm" labelCol="1" fieldCol="2" mask="999999.9999"/> <x:inputC name="widthCm" label="宽度cm" labelCol="1" fieldCol="2" mask="999999.9999"/>
<x:inputC name="thickness" label="厚度cm" labelCol="1" fieldCol="2" mask="999999.9999"/> <x:inputC name="thickness" label="厚度cm" labelCol="1" fieldCol="2" mask="999999.9999"/>
<x:inputC name="weight" label="克重g" labelCol="1" fieldCol="2" mask="999999.9999"/> <x:inputC name="weight" label="克重g" labelCol="1" fieldCol="2" mask="999999.9999"/>
<x:inputC name="singleThickness" label="单层厚" labelCol="1" fieldCol="2" mask="999999.9999"/>--%> <x:inputC name="singleThickness" label="单层厚" labelCol="1" fieldCol="2" mask="999999.9999"/>
<x:hidden name="klart"/> <x:hidden name="klart"/>
......
...@@ -559,7 +559,7 @@ function getBklas(mtart){ //获取评估分类 ...@@ -559,7 +559,7 @@ function getBklas(mtart){ //获取评估分类
$('#bklas').val("3000"); $('#bklas').val("3000");
} else if (mtart=='ZMYP') { } else if (mtart=='ZMYP') {
$('#bklas').val("7930"); $('#bklas').val("7930");
} else if (mtart==' ZSHB'|| mtart=='ZZCP') { } else if (mtart=='ZSHB'|| mtart=='ZZCP') {
$('#bklas').val("7920"); $('#bklas').val("7920");
} else if (mtart=='ZSRV') { } else if (mtart=='ZSRV') {
$('#bklas').val("7940"); $('#bklas').val("7940");
......
...@@ -412,6 +412,15 @@ function getExtendedData(processAction) { ...@@ -412,6 +412,15 @@ function getExtendedData(processAction) {
if (!datas) { if (!datas) {
return false; return false;
} }
if ("outer" == getSubProcUnitId()){
for (let i = 0; i < datas.length; i++) {
var data = datas[i];
if (MathUtil.compare(data.kbetr,0) <= 0){
Public.tip("序号为:"+data.sequence+" 的行项目单价必须大于0");
return false;
}
}
}
extendedData.orderItems = Public.encodeJSONURI(datas); extendedData.orderItems = Public.encodeJSONURI(datas);
} }
......
...@@ -34,12 +34,12 @@ function loadItemNumberGrid() { ...@@ -34,12 +34,12 @@ function loadItemNumberGrid() {
columns: [ columns: [
{ {
display: "数量起", name: "numberFrom", width: 100, minWidth: 60, type: "String", align: "left", display: "数量起", name: "numberFrom", width: 100, minWidth: 60, type: "String", align: "left",
editor: {required: false, type: "text",mask: '9999999.999'} editor: {required: false, type: "text",mask: '999999999.99'}
}, },
{ {
display: "数量止", name: "numberTo", width: 100, minWidth: 60, type: "String", align: "left", display: "数量止", name: "numberTo", width: 100, minWidth: 60, type: "String", align: "left",
editor: { editor: {
required: false, type: "text",mask: '9999999.999' required: false, type: "text",mask: '999999999.99'
} }
}, },
{ {
......
...@@ -35,11 +35,13 @@ ...@@ -35,11 +35,13 @@
</div> </div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint"> <table cellspacing="0px" cellpadding="0px" class="tablePrint">
<colgroup> <colgroup>
<col width="73%"/> <col width="2%"/>
<col width="71%"/>
<#--<col width="52%"/>--> <#--<col width="52%"/>-->
<col width="27%"/> <col width="27%"/>
</colgroup> </colgroup>
<tr> <tr>
<td class="left"></td>
<td class="left" style="font-size: 14px;font-weight:bold;">${changeNo?default("")?html}</td> <td class="left" style="font-size: 14px;font-weight:bold;">${changeNo?default("")?html}</td>
<#-- <td class="right">--> <#-- <td class="right">-->
<#-- <div style="text-align:right;font-weight:bold;font-size: 25px">Engineering Change Notice</div>--> <#-- <div style="text-align:right;font-weight:bold;font-size: 25px">Engineering Change Notice</div>-->
......
...@@ -127,31 +127,33 @@ public class ProcessQuotedPriceItemApplicationImpl extends BaseApplication imple ...@@ -127,31 +127,33 @@ public class ProcessQuotedPriceItemApplicationImpl extends BaseApplication imple
@Override @Override
public BigDecimal findPriceByProductAndProcess(String productCode, String outProcess, BigDecimal number,String lifnr) { public BigDecimal findPriceByProductAndProcess(String productCode, String outProcess, BigDecimal number,String lifnr) {
ProcessQuotedPriceItem quotedPriceItem = processQuotedPriceItemRepository.findByProductCodeAndOutProcess(productCode, outProcess); List<ProcessQuotedPriceItem> quotedPriceItemList = processQuotedPriceItemRepository.findByProductCodeAndOutProcess(productCode, outProcess);
BigDecimal price = BigDecimal.ZERO; BigDecimal price = BigDecimal.ZERO;
if (quotedPriceItem != null){ if (!CollectionUtils.isEmpty(quotedPriceItemList)){
ProcessQuotedPrice quotedPrice = processQuotedPriceRepository.findOne(quotedPriceItem.getProcessQuotedPriceId()); for (ProcessQuotedPriceItem quotedPriceItem : quotedPriceItemList) {
//审批完成的 ProcessQuotedPrice quotedPrice = processQuotedPriceRepository.findOne(quotedPriceItem.getProcessQuotedPriceId());
if (quotedPrice.getStatusId() == BizBillStatus.COMPLETED.getId() && lifnr.equals(quotedPrice.getSupplier())){ //审批完成的;已启用的;对应供应商
List<ProcessQuotedPriceItemNumber> numberList = processQuotedPriceItemNumberApplication.findByProcessQuotedPriceItemId(quotedPriceItem.getId()); if (quotedPrice.getStatusId() == BizBillStatus.COMPLETED.getId() && lifnr.equals(quotedPrice.getSupplier()) && "1".equals(quotedPriceItem.getStatus())){
List<BigDecimal> decimals = numberList List<ProcessQuotedPriceItemNumber> numberList = processQuotedPriceItemNumberApplication.findByProcessQuotedPriceItemId(quotedPriceItem.getId());
.stream() List<BigDecimal> decimals = numberList
.filter(processQuotedPriceItemNumber -> .stream()
(processQuotedPriceItemNumber.getNumberFrom().compareTo(number) < 0 .filter(processQuotedPriceItemNumber ->
&& processQuotedPriceItemNumber.getNumberTo().compareTo(number) >= 0)) (processQuotedPriceItemNumber.getNumberFrom().compareTo(number) < 0
.map( && processQuotedPriceItemNumber.getNumberTo().compareTo(number) >= 0))
processQuotedPriceItemNumber -> { .map(
//返回含税单价+运输费 processQuotedPriceItemNumber -> {
BigDecimal unitPrice = processQuotedPriceItemNumber.getUnitPrice(); //返回含税单价+运输费
BigDecimal freight = processQuotedPriceItemNumber.getFreight(); BigDecimal unitPrice = processQuotedPriceItemNumber.getUnitPrice();
if (freight != null){ BigDecimal freight = processQuotedPriceItemNumber.getFreight();
return unitPrice.add(freight); if (freight != null){
return unitPrice.add(freight);
}
return unitPrice;
} }
return unitPrice; ).collect(Collectors.toList());
} if (!CollectionUtils.isEmpty(decimals)){
).collect(Collectors.toList()); price = decimals.get(0);
if (!CollectionUtils.isEmpty(decimals)){ }
price = decimals.get(0);
} }
} }
} }
......
...@@ -32,14 +32,15 @@ public class ProcessQuotedPriceItemNumberApplicationImpl extends BaseApplication ...@@ -32,14 +32,15 @@ public class ProcessQuotedPriceItemNumberApplicationImpl extends BaseApplication
if (processQuotedPriceOrderItemNumber.getNumberFrom() == null){ if (processQuotedPriceOrderItemNumber.getNumberFrom() == null){
processQuotedPriceOrderItemNumber.setNumberFrom(BigDecimal.ZERO); processQuotedPriceOrderItemNumber.setNumberFrom(BigDecimal.ZERO);
} }
if (processQuotedPriceOrderItemNumber.getNumberTo() == null){
processQuotedPriceOrderItemNumber.setNumberTo(new BigDecimal(999999999));
}
//拼接数量区间:100<数量<=200 //拼接数量区间:100<数量<=200
processQuotedPriceOrderItemNumber processQuotedPriceOrderItemNumber
.setNumberSection( .setNumberSection(
processQuotedPriceOrderItemNumber.getNumberFrom()+ processQuotedPriceOrderItemNumber.getNumberFrom()+
"<数量"+ "<数量"+ "<=" +
((processQuotedPriceOrderItemNumber.getNumberTo() == null) ? "" : processQuotedPriceOrderItemNumber.getNumberTo());
"<=" + processQuotedPriceOrderItemNumber.getNumberTo()));
processQuotedPriceItemNumberRepository.save(processQuotedPriceOrderItemNumber); processQuotedPriceItemNumberRepository.save(processQuotedPriceOrderItemNumber);
} }
} }
......
...@@ -64,6 +64,9 @@ public class ProcessQuotedPriceController extends CommonController { ...@@ -64,6 +64,9 @@ public class ProcessQuotedPriceController extends CommonController {
*/ */
Operator operator = getOperator(); Operator operator = getOperator();
processQuotedPrice.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName())); processQuotedPrice.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
//默认人民币
processQuotedPrice.setCurrency("CNY");
processQuotedPrice.setCurrencyName("人民币");
return forward("processQuotedPriceDetail",processQuotedPrice); return forward("processQuotedPriceDetail",processQuotedPrice);
} }
......
...@@ -19,5 +19,5 @@ public interface ProcessQuotedPriceItemRepository extends JpaRepository<ProcessQ ...@@ -19,5 +19,5 @@ public interface ProcessQuotedPriceItemRepository extends JpaRepository<ProcessQ
* @param outProcess * @param outProcess
* @return * @return
*/ */
ProcessQuotedPriceItem findByProductCodeAndOutProcess(String productCode,String outProcess); List<ProcessQuotedPriceItem> findByProductCodeAndOutProcess(String productCode,String outProcess);
} }
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping>
<factory-entry name="Entities" />
<factory-entry name="topsun" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
</component>
</module>
\ No newline at end of file
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