Commit 05d8a905 authored by 1650842865's avatar 1650842865

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

parent b1ad5e50
......@@ -21,7 +21,8 @@ function initGrid() {
url: web_app.name + '/exceptionReport/addExceptionReportDetail.job?billType=produce'
});
}
}
},
//exportExcelHandler: exportExcelHandler,
/* addPurchaseHandler: {id: 'purchaseException', text: '添加采购异常单', img: 'fa-building-o', className: 'btn-gray',
click: function () {
UICtrl.addTabItem({
......@@ -61,6 +62,7 @@ function initGrid() {
}
} */
, {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: "exceptionDate", width: 100, minWidth: 60, type: "date", align: "center"}
......@@ -203,3 +205,8 @@ function resetForm(obj) {
$(obj).formClean();
}
//导出Excel
function exportExcelHandler() {
UICtrl.gridExport(gridManager);
}
......@@ -158,13 +158,13 @@
<%--<x:inputC name="" 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="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="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"/>
......
......@@ -559,7 +559,7 @@ function getBklas(mtart){ //获取评估分类
$('#bklas').val("3000");
} else if (mtart=='ZMYP') {
$('#bklas').val("7930");
} else if (mtart==' ZSHB'|| mtart=='ZZCP') {
} else if (mtart=='ZSHB'|| mtart=='ZZCP') {
$('#bklas').val("7920");
} else if (mtart=='ZSRV') {
$('#bklas').val("7940");
......
......@@ -412,6 +412,15 @@ function getExtendedData(processAction) {
if (!datas) {
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);
}
......
......@@ -34,12 +34,12 @@ function loadItemNumberGrid() {
columns: [
{
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",
editor: {
required: false, type: "text",mask: '9999999.999'
required: false, type: "text",mask: '999999999.99'
}
},
{
......
......@@ -35,11 +35,13 @@
</div>
<table cellspacing="0px" cellpadding="0px" class="tablePrint">
<colgroup>
<col width="73%"/>
<col width="2%"/>
<col width="71%"/>
<#--<col width="52%"/>-->
<col width="27%"/>
</colgroup>
<tr>
<td class="left"></td>
<td class="left" style="font-size: 14px;font-weight:bold;">${changeNo?default("")?html}</td>
<#-- <td class="right">-->
<#-- <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
@Override
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;
if (quotedPriceItem != null){
ProcessQuotedPrice quotedPrice = processQuotedPriceRepository.findOne(quotedPriceItem.getProcessQuotedPriceId());
//审批完成的
if (quotedPrice.getStatusId() == BizBillStatus.COMPLETED.getId() && lifnr.equals(quotedPrice.getSupplier())){
List<ProcessQuotedPriceItemNumber> numberList = processQuotedPriceItemNumberApplication.findByProcessQuotedPriceItemId(quotedPriceItem.getId());
List<BigDecimal> decimals = numberList
.stream()
.filter(processQuotedPriceItemNumber ->
(processQuotedPriceItemNumber.getNumberFrom().compareTo(number) < 0
&& processQuotedPriceItemNumber.getNumberTo().compareTo(number) >= 0))
.map(
processQuotedPriceItemNumber -> {
//返回含税单价+运输费
BigDecimal unitPrice = processQuotedPriceItemNumber.getUnitPrice();
BigDecimal freight = processQuotedPriceItemNumber.getFreight();
if (freight != null){
return unitPrice.add(freight);
if (!CollectionUtils.isEmpty(quotedPriceItemList)){
for (ProcessQuotedPriceItem quotedPriceItem : quotedPriceItemList) {
ProcessQuotedPrice quotedPrice = processQuotedPriceRepository.findOne(quotedPriceItem.getProcessQuotedPriceId());
//审批完成的;已启用的;对应供应商
if (quotedPrice.getStatusId() == BizBillStatus.COMPLETED.getId() && lifnr.equals(quotedPrice.getSupplier()) && "1".equals(quotedPriceItem.getStatus())){
List<ProcessQuotedPriceItemNumber> numberList = processQuotedPriceItemNumberApplication.findByProcessQuotedPriceItemId(quotedPriceItem.getId());
List<BigDecimal> decimals = numberList
.stream()
.filter(processQuotedPriceItemNumber ->
(processQuotedPriceItemNumber.getNumberFrom().compareTo(number) < 0
&& processQuotedPriceItemNumber.getNumberTo().compareTo(number) >= 0))
.map(
processQuotedPriceItemNumber -> {
//返回含税单价+运输费
BigDecimal unitPrice = processQuotedPriceItemNumber.getUnitPrice();
BigDecimal freight = processQuotedPriceItemNumber.getFreight();
if (freight != null){
return unitPrice.add(freight);
}
return unitPrice;
}
return unitPrice;
}
).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(decimals)){
price = decimals.get(0);
).collect(Collectors.toList());
if (!CollectionUtils.isEmpty(decimals)){
price = decimals.get(0);
}
}
}
}
......
......@@ -32,14 +32,15 @@ public class ProcessQuotedPriceItemNumberApplicationImpl extends BaseApplication
if (processQuotedPriceOrderItemNumber.getNumberFrom() == null){
processQuotedPriceOrderItemNumber.setNumberFrom(BigDecimal.ZERO);
}
if (processQuotedPriceOrderItemNumber.getNumberTo() == null){
processQuotedPriceOrderItemNumber.setNumberTo(new BigDecimal(999999999));
}
//拼接数量区间:100<数量<=200
processQuotedPriceOrderItemNumber
.setNumberSection(
processQuotedPriceOrderItemNumber.getNumberFrom()+
"<数量"+
((processQuotedPriceOrderItemNumber.getNumberTo() == null) ? "" :
"<=" + processQuotedPriceOrderItemNumber.getNumberTo()));
"<数量"+ "<=" +
processQuotedPriceOrderItemNumber.getNumberTo());
processQuotedPriceItemNumberRepository.save(processQuotedPriceOrderItemNumber);
}
}
......
......@@ -64,6 +64,9 @@ public class ProcessQuotedPriceController extends CommonController {
*/
Operator operator = getOperator();
processQuotedPrice.setDefaultValues(new OrgUnit(operator.getFullId(), operator.getFullName()));
//默认人民币
processQuotedPrice.setCurrency("CNY");
processQuotedPrice.setCurrencyName("人民币");
return forward("processQuotedPriceDetail",processQuotedPrice);
}
......
......@@ -19,5 +19,5 @@ public interface ProcessQuotedPriceItemRepository extends JpaRepository<ProcessQ
* @param outProcess
* @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