Commit 4359b058 by liuyang

2024-06-10 销售退货

parent 0ebe7125
......@@ -271,10 +271,10 @@ public class ServiceHGYX001 extends ServiceEPBase {
for (Map queryRow:queryBlock) {
HGYX001 hgyx001 = new HGYX001();
hgyx001.fromMap(queryRow);
if (hgyx001.getId() == null || hgyx001.getId() == 0) {
hgyx001.setStatus(1);
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
hgyx001.setOutboundCode(outboundCode);
hgyx001.setStatus(1);
if (hgyx001.getId() == null || hgyx001.getId() == 0) {
this.add(hgyx001);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx001.getId());
......@@ -307,6 +307,13 @@ public class ServiceHGYX001 extends ServiceEPBase {
}
} else {
this.modify(hgyx001);
HGKC004 hgkc004 = new HGKC004();
hgkc004.setParentId(hgyx001.getId());
hgkc004.setReceiptDate(DateUtils.formatShort(DateUtils.date()));
hgkc004.setCompanyCode(hgyx001.getCompanyCode());
hgkc004.setWhCode(hgyx001.getConsWhCode());
hgkc004.setSaleOutCode(outboundCode);
DaoUtils.insert(HGKC004.INSERT, hgkc004);
for (Map resultRow : resultRows) {
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(resultRow);
......@@ -316,6 +323,20 @@ public class ServiceHGYX001 extends ServiceEPBase {
}else {
this.modifyDatail(hgyx001A);
}
HGKC004A hgkc004A = new HGKC004A();
hgkc004A.setInventType(hgyx001A.getInventType());
hgkc004A.setInventCode(hgyx001A.getInventCode());
hgkc004A.setInventName(hgyx001A.getInventName());
hgkc004A.setInventRecordId(hgyx001A.getInventRecordId());
hgkc004A.setSpec(hgyx001A.getSpec());
hgkc004A.setLength(hgyx001A.getLength());
hgkc004A.setThick(hgyx001A.getThick());
hgkc004A.setWidth(hgyx001A.getWidth());
hgkc004A.setQuantity(hgyx001A.getQuantity());
hgkc004A.setUnitWeight(hgyx001A.getUnitWeight());
hgkc004A.setWeight(hgyx001A.getWeight());
hgkc004A.setParentId(hgkc004.getId());
DaoUtils.insert(HGKC004A.INSERT, hgkc004A);
}
}
}
......
......@@ -36,6 +36,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
@Override
public EiInfo initLoad(EiInfo inInfo) {
String id = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001A.FIELD_PARENT_ID);
String type = inInfo.getCellStr(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type");
EiInfo outInfo = super.initLoad(inInfo, new HGYX001A());
outInfo.getBlock(EiConstant.resultBlock).getRows().clear();
if (id != null) {
......@@ -45,6 +46,7 @@ public class ServiceHGYX001A extends ServiceEPBase {
outInfo.getBlock(EiConstant.queryBlock).setRows(Collections.singletonList(hgYx001));
}
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, "type", type);
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
outInfo.getBlock(EiConstant.resultBlock).setBlockMeta(new HGYX001().eiMetadata);
CommonMethod.initBlock(outInfo,
......
......@@ -247,6 +247,7 @@ public class ServiceHGYX002 extends ServiceEPBase {
hgyx002.fromMap(queryRow);
hgyx002.setStatus(1);
String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
hgyx002.setOutboundCode(outboundCode);
if (hgyx002.getId() == null || hgyx002.getId() == 0) {
//String outboundCode = SequenceGenerator.getNextSequence(HGConstant.SequenceId.SALE_OUT_CODE);
//hgyx001.setOutboundCode(outboundCode);
......
......@@ -245,7 +245,7 @@ function update() {
}
let id = rows[0].id;
JSColorbox.open({
href: "HGYX001A??methodName=initLoad&inqu_status-0-parentId=" + id + "&efParentFormEname=HGYX001",
href: "HGYX001A??methodName=initLoad&inqu_status-0-parentId=" + id + "&inqu_status-0-type=update&efParentFormEname=HGYX001",
title: "<div style='text-align: center;'>修改销售发货</div>",
width: "80%",
height: "80%",
......
......@@ -53,8 +53,8 @@
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="proj_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="120" align="center"/>
<EF:EFColumn ename="deliveryCode" cname="发货单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="outboundCode" cname="出库单号" enable="false" width="130" align="center"/>
<EF:EFComboColumn ename="consCode" enable="true" cname="发货方" width="110" align="center"
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="companyBox_block_id" valueField="valueField" textField="textField"/>
......
......@@ -118,6 +118,10 @@ $(function() {
}
$("#inqu_status-0-projCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改项目名称!", "error");
parent.JSColorbox.close();
}
let projCode = $("#inqu_status-0-projCode");
let textField = IPLAT.EFSelect.text(projCode);
let valueField = IPLAT.EFSelect.value(projCode);
......@@ -136,6 +140,10 @@ $(function() {
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
})
$("#inqu_status-0-consCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货方!", "error");
parent.JSColorbox.close();
}
let consCode = $("#inqu_status-0-consCode")
let textField = IPLAT.EFSelect.text(consCode);
let valueField = IPLAT.EFSelect.value(consCode);
......@@ -147,6 +155,10 @@ $(function() {
});
$("#inqu_status-0-consWhCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
NotificationUtil("无法修改发货仓库!", "error");
parent.JSColorbox.close();
}
let textField = IPLAT.EFSelect.text($("#inqu_status-0-consWhCode"));
$("#inqu_status-0-consWhName").val(textField);
});
......
......@@ -30,7 +30,7 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="companyBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -65,8 +65,8 @@
required="true" colWidth="3" disabled="true"
data-regex="/^-?[0-9]{1,15}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFInput blockId="inqu_status" row="0" ename="type" cname="type" type="hidden" colWidth="3"/>
</div>
</EF:EFRegion>
<EF:EFRegion id="result" title="明细信息">
......
......@@ -18,7 +18,7 @@
<EF:EFInput blockId="inqu_status" row="0" ename="id" cname="ID" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......@@ -30,31 +30,31 @@
</EF:EFSelect>
</div>
<div class="row">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" disabled="true" required="true" 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="consName" type="hidden" cname="发货方名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="consWhCode" cname="发货仓库" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="wh_record_box_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFInput blockId="inqu_status" row="0" ename="consAddr" cname="发货地址" disabled="true" placeholder="请输入发货地址" required="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="receName" type="hidden" cname="收货方名称" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFInput blockId="inqu_status" row="0" ename="receAddr" cname="收货地址" disabled="true" placeholder="请输入收货地址" required="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="receUserPhone" cname="收货人电话" disabled="true" required="true" data-rules="mobile_phone" placeholder="请输入电话号码" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="tranType" cname="运输方式" disabled="true" required="true" placeholder="请选择运输方式" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" placeholder="请输入车牌号" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="numPlate" cname="车牌号" disabled="true" placeholder="请输入车牌号" colWidth="3"/>
</div>
<div class="row">
<EF:EFInput blockId="inqu_status" row="0" ename="consQuantity" cname="发货数量" format="{0:N0}"
......
......@@ -29,19 +29,19 @@
<EF:EFOptions blockId="deliveryCodeBox_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" disabled="true" 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="consName" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhCode" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......
......@@ -19,21 +19,21 @@
<EF:EFInput blockId="inqu_status" row="0" ename="companyCode" cname="公司编码" type="hidden" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="companyName" cname="公司名称" type="hidden" required="true" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="returnCode" cname="退货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="deliveryCode" cname="发货单号" disabled="true" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="outboundCode" cname="出库单号" type="hidden" disabled="true" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="projCode" cname="项目名称" required="true" disabled="true" colWidth="3" filter="contains">
<EF:EFOption label="全部" value=""/>
<EF:EFOptions blockId="proj_record_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
<EF:EFInput blockId="inqu_status" row="0" ename="projName" cname="项目名称" type="hidden" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="consCode" cname="发货方" disabled="true" required="true" 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="consCode" type="hidden" cname="发货方编码" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFInput blockId="inqu_status" row="0" ename="consWhName" type="hidden" cname="发货仓库名称" colWidth="3"/>
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" required="true" colWidth="3" filter="contains">
<EF:EFSelect blockId="inqu_status" row="0" ename="receCode" cname="收货方" disabled="true" required="true" colWidth="3" filter="contains">
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="customer_record_all_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect>
......
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