Commit ee227f8b by liuyang

2024-05-31 调拨单

parent 36086a52
......@@ -35,10 +35,13 @@ public class ServiceHGKC013 extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
inInfo = super.query(inInfo,HGKC013.QUERY,new HGKC013());
inInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGKC013().eiMetadata);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.COMPANY_BOX_BLOCK_ID,DdynamicEnum.WH_RECORD_BOX_BLOCK_ID));
inInfo.set(HGKC013.FIELD_COMPANY_CODE, userVO.getUsercode());
//inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGKC013.FIELD_COMPANY_CODE, userVO.getUsercode());
return inInfo;
}
......@@ -106,6 +109,8 @@ public class ServiceHGKC013 extends ServiceEPBase {
*/
public void add(HGKC013 hgkc013) {
hgkc013.setAllotNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.ALLOT_NO));
hgkc013.setCompanyCode(hgkc013.getCalloutCompanyCode());
hgkc013.setCompanyName(hgkc013.getCalloutCompanyName());
DaoUtils.insert(HGKC013.INSERT, hgkc013);
}
......@@ -143,7 +148,6 @@ public class ServiceHGKC013 extends ServiceEPBase {
public void addKC006(HGKC013 hgkc013, List<HGKC013A> hgkc013AList){
HGKC006 hgkc006 = new HGKC006();
hgkc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HGConstant.SequenceId.OTHER_ENTER_NO));
//UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(hgkc013.getCallinCompanyCode());
hgkc006.setCompanyName(hgkc013.getCallinCompanyName());
hgkc006.setOtherEnterDate(DateUtils.formatShort(DateUtils.date()));
......
$(function () {
$(".row").children().attr("class", "col-md-3");
var companyCode = __eiInfo.get("companyCode");
var companyCodeBox = __eiInfo.getBlock("companyBox_block_id").getMappedRows();
var whCodeBox = __eiInfo.getBlock("wh_record_box_block_id").getMappedRows();
......@@ -26,34 +27,19 @@ $(function () {
return template;
}
}, {
field: "companyCode",
title: "公司名称",
template: function (item) {
let companyCode = item.companyCode;
for (let i = 0; i < companyCodeBox.length; i++) {
if (companyCode === companyCodeBox[i]['valueField']) {
item['companyName'] = companyCodeBox[i]['textField'];
return companyCodeBox[i]['textField'];
}
}
return companyCode;
}
}, {
field: "receiptDate",
defaultValue: currShortDate()
}, {
field: "calloutCompanyCode",
title: "调出公司名称",
/*filter: function (options) {
let allotType = options.model["allotType"];
let companyCode = options.model["companyCode"];
if (allotType === "1" && companyCode){
filter: function (options) {
if (companyCode){
return _.filter(options.values, function (item) {
return item["valueField"]===companyCode;
})
}
return options.values;
},*/
},
template: function (item) {
let calloutCompanyCode = item.calloutCompanyCode;
for (let i = 0; i < companyCodeBox.length; i++) {
......@@ -217,18 +203,18 @@ let save = function () {
}
let flag = true;
$.each(rows, function(index, item) {
let companyCode= item.get("companyCode");
//let companyCode= item.get("companyCode");
let allotType= item.get("allotType");
let receiptDate= item.get("receiptDate");
let calloutCompanyCode= item.get("calloutCompanyCode");
let calloutWhCode= item.get("calloutWhCode");
let callinCompanyCode= item.get("callinCompanyCode");
let callinWhCode= item.get("callinWhCode");
if(isBlank(companyCode)){
/*if(isBlank(companyCode)){
message("选中的第"+(index+1)+"行\"公司名称\",不能为空!");
flag = false;
return false;
}
}*/
if(isBlank(allotType)){
message("选中的第"+(index+1)+"行\"调拨类型\",不能为空!");
flag = false;
......
......@@ -17,16 +17,8 @@
<div class="row">
<EF:EFDatePicker blockId="inqu_status" row="0" ename="receiptDate" cname="单据日期" colWidth="3" format="yyyy-MM-dd"/>
<EF:EFInput blockId="inqu_status" row="0" ename="allotNo" cname="调拨单号" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhName" cname="调入仓库名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调出仓库名称" colWidth="3" placeholder="模糊查询"/>
<%--<EF:EFSelect blockId="inqu_status" row="0" ename="status" cname="状态" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgkc.status"/>
</EF:EFSelect>
<EF:EFSelect blockId="inqu_status" row="0" ename="companyCode" cname="公司名称" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>--%>
<EF:EFInput blockId="inqu_status" row="0" ename="calloutWhName" cname="调出仓库名称" colWidth="3" placeholder="模糊查询"/>
<EF:EFInput blockId="inqu_status" row="0" ename="callinWhName" cname="调入仓库名称" colWidth="3" placeholder="模糊查询"/>
</div>
</EF:EFRegion>
......@@ -34,10 +26,10 @@
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" locked="true" enable="false" width="150" align="center"/>
<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
<%--<EF:EFComboColumn ename="companyCode" enable="true" cname="公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
</EF:EFComboColumn>--%>
<EF:EFComboColumn ename="allotType" cname="调拨类型" width="80" align="center" enable="true" required="true">
<EF:EFCodeOption codeName="hggp.hgkc.allotType"/>
</EF:EFComboColumn>
......@@ -53,7 +45,7 @@
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFComboColumn ename="callinCompanyCode" enable="true" cname="调入公司名称" width="110" align="center"
filter="contains" readonly="true" required="true">
filter="contains" readonly="false" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFComboColumn ename="callinWhCode" cname="调入仓库名称" enable="true" width="120" align="center" required="true"
......
......@@ -11,7 +11,7 @@ $(function() {
IPLATUI.EFGrid.result = {
pageable: {
pageSize: 20,
pageSize: 10,
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
......@@ -104,37 +104,25 @@ $(function() {
e.items[0]["width"] = specIdBox[i]['param2Field'];
e.items[0]["thick"] = specIdBox[i]['param3Field'];
e.items[0]["quantity"] = specIdBox[i]['param4Field'];
e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
e.items[0]["weight"] = specIdBox[i]['param6Field'];
resultGrid.setCellValue(e.items[0],"unitWeight",specIdBox[i]['param5Field']);
resultGrid.setCellValue(e.items[0],"weight",specIdBox[i]['param6Field']);
//e.items[0]["unitWeight"] = specIdBox[i]['param5Field'];
//e.items[0]["weight"] = specIdBox[i]['param6Field'];
}
}
loadChange(grid,e,"length");
loadChange(grid,e,"width");
loadChange(grid,e,"thick");
loadChange(grid,e,"unitWeight");
loadChange(grid,e,"weight");
//loadChange(grid,e,"unitWeight");
//loadChange(grid,e,"weight");
loadChange(grid,e,"quantity");
}else if (e.field === "quantity"){
if (e.items[0].quantity != 0 && e.items[0].unitWeight > 0){
e.items[0].weight = e.items[0].unitWeight*e.items[0].quantity;
loadChange(grid,e,"weight");
}else if (e.items[0].unitWeight == 0){
loadChange(grid,e,"unitWeight");
}
}else if (e.field === "unitWeight"){
if (e.items[0].unitWeight != 0){
e.items[0].weight = e.items[0].quantity*e.items[0].unitWeight;
loadChange(grid,e,"weight");
}
}else if (e.field === "weight"){
if (e.items[0].quantity != 0){
e.items[0].unitWeight = e.items[0].weight/e.items[0].quantity;
loadChange(grid,e,"unitWeight");
resultGrid.setCellValue(e.items[0],"weight",e.items[0].unitWeight*e.items[0].quantity);
}
}else if (e.field === "inventCode"){
loadChange(grid,e,"spec");
}else if (e.field === "inventRecordId"){
loadChange(grid,e,"spec");
}
});
},
......@@ -211,7 +199,7 @@ let save = function () {
flag = false;
return false;
}
if(isBlank(unitWeight) || parseFloat(unitWeight) <= 0){
/*if(isBlank(unitWeight) || parseFloat(unitWeight) <= 0){
message("选中的第" + (index + 1) + "行\"单重\",必须是数值并且数量必须大于0!");
flag = false;
return false;
......@@ -220,7 +208,7 @@ let save = function () {
message("选中的第" + (index + 1) + "行\"重量\",必须是数值!");
flag = false;
return false;
}
}*/
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -54,11 +54,11 @@
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="weight" cname="重量" width="120" enable="true" format="{0:N3}" editType="text"
<EF:EFColumn ename="weight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
displayType="0.000" sort="true" align="right"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/" maxLength="15" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
......
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