Commit 6fb7aae6 by liuyang

2024-06-11 优化销售发货和销售退货

parent 89b88dae
......@@ -230,7 +230,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGKC004 hgkc004 =this.addHGKC004(hgyx001);
List<HGYX001A> hgyx001As = HGYXTools.Hgyx001.getParentId(hgyx001.getId());
if (CollectionUtils.isEmpty(hgyx001As)){
throw new PlatException("销售发货详情不能为空!");
throw new PlatException("销售发货明细不能为空!");
}
this.addHGKC004A(hgyx001As, hgkc004);
}
......
......@@ -52,29 +52,29 @@ public class ServiceHGYX001A extends ServiceEPBase {
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.COMPANY_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID,
DdynamicEnum.CUSTOMER_RECORD_ALL_BLOCK_ID));
CommonMethod.initBlock(outInfo,
Arrays.asList(
DdynamicEnum.PROJ_RECORD_BLOCK_ID,
DdynamicEnum.INVENT_TYPE_BOX_BLOCK_ID,
DdynamicEnum.INVENT_CODE_BOX_BLOCK_ID,
DdynamicEnum.SPEC_BOX_BLOCK_ID),
DdynamicEnum.SPEC_BOX_BLOCK_ID,
DdynamicEnum.WH_RECORD_BOX_BLOCK_ID),
new HashMap<String,Object>(){{
put(HGKC013.FIELD_COMPANY_CODE,userVO.getUsercode());
put(HGKC013A.FIELD_DELETE_FLAG,CommonConstant.YesNo.NO_0);
}}, false);
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_COMPANY_NAME, userVO.getUsername());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_CODE, userVO.getUsercode());
//outInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0,HGYX001.FIELD_CONS_NAME, userVO.getUsername());
return outInfo;
}
@Override
public EiInfo query(EiInfo inInfo) {
inInfo.setCell(EiConstant.queryBlock, ACConstants.ROW_CODE_0, HGYX001.FIELD_DELETE_FLAG, CommonConstant.YesNo.NO_0);
return super.query(inInfo,HGYX001.QUERY,new HGYX001());
return super.query(inInfo,HGYX001A.QUERY,new HGYX001A());
}
@OperationLogAnnotation(operModul = "销售发货详情",operType = "删除",operDesc = "删除操作")
......@@ -87,10 +87,11 @@ public class ServiceHGYX001A extends ServiceEPBase {
String str = "已审核,无法删除!";
throw new PlatException(str);
}
HGYX001A hgyx001A = new HGYX001A();
EiBlock eiBlock = inInfo.getBlock(EiConstant.resultBlock);
for (i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i);
HGYX001A hgyx001A = new HGYX001A();
hgyx001A.fromMap(map);
hgyx001A.setDeleteFlag(CommonConstant.YesNo.YES_1);
......
......@@ -35,6 +35,7 @@ public class HGYXTools {
}
public static List<HGYX001> list(Map params){
params.put("deleteFlag", 0);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isNull(hgyx001s, "销售发货不存在!");
return hgyx001s;
......@@ -44,6 +45,7 @@ public class HGYXTools {
AssertUtils.isNull(ids, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
params.put("deleteFlag", 0);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售发货不存在!");
return hgyx001s;
......@@ -53,8 +55,9 @@ public class HGYXTools {
AssertUtils.isNull(parentId, "销售发货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
params.put("deleteFlag", 0);
List<HGYX001A> hgyx001As = DaoBase.getInstance().query(HGYX001A.QUERY, params);
AssertUtils.isEmpty(hgyx001As, "销售发货详情不存在!");
AssertUtils.isEmpty(hgyx001As, "销售发货明细不存在!");
return hgyx001As;
}
}
......@@ -71,6 +74,7 @@ public class HGYXTools {
}
public static List<HGYX002> list(Map params){
params.put("deleteFlag", 0);
List<HGYX002> hgyx002s = DaoBase.getInstance().query(HGYX002.QUERY, params);
AssertUtils.isNull(hgyx002s, "销售退货不存在!");
return hgyx002s;
......@@ -80,6 +84,7 @@ public class HGYXTools {
AssertUtils.isNull(ids, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("ids", ids);
params.put("deleteFlag", 0);
List<HGYX001> hgyx001s = DaoBase.getInstance().query(HGYX001.QUERY, params);
AssertUtils.isEmpty(hgyx001s, "销售退货不存在!");
return hgyx001s;
......@@ -89,6 +94,7 @@ public class HGYXTools {
AssertUtils.isNull(parentId, "销售退货ID不能为空!");
Map params = new HashMap<>();
params.put("parentId", parentId);
params.put("deleteFlag", 0);
List<HGYX002A> hgyx002As = DaoBase.getInstance().query(HGYX002A.QUERY, params);
AssertUtils.isEmpty(hgyx002As, "销售退货明细不存在!");
return hgyx002As;
......
......@@ -63,18 +63,18 @@
filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="customer_record_all_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn ename="receAddr" cname="收货地址" width="120" align="center"/>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" width="120" align="center" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="tranType" cname="运输方式" width="80" align="center" enable="true" required="true">
<EF:EFColumn ename="receAddr" cname="收货地址" enable="true" readonly="true" width="120" align="center"/>
<EF:EFColumn ename="receUserPhone" cname="收货人电话" enable="true" readonly="true" width="120" align="center" data-rules="mobile_phone"/>
<EF:EFComboColumn ename="tranType" cname="运输方式" width="80" align="center" enable="true" readonly="true" required="true">
<EF:EFCodeOption codeName="hggp.hgyx.tranType"/>
</EF:EFComboColumn>
<EF:EFColumn ename="numPlate" cname="车牌号" width="120" align="center"/>
<EF:EFComboColumn ename="consWhCode" cname="发货仓库" enable="true" width="120" align="center" required="true"
<EF:EFColumn ename="numPlate" cname="车牌号" enable="true" readonly="true" width="120" align="center"/>
<EF:EFComboColumn ename="consWhCode" cname="发货仓库" enable="true" readonly="true" width="120" align="center" required="true"
blockName="wh_record_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="consAddr" cname="发货地址" hidden="true" width="120" align="center"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consQuantity" cname="发货数量" enable="true" readonly="true" width="120" align="center" format="{0:N0}" data-rules="number"/>
<EF:EFColumn ename="consWeight" cname="发货重量" width="120" align="center" format="{0:N3}" data-rules="number"/>
<EF:EFComboColumn ename="status" cname="审核状态" width="80" align="center" enable="false" defaultValue="0" required="true">
<EF:EFCodeOption codeName="hggp.hgyx.status" condition="ITEM_CODE IN ('0','1')"/>
......
......@@ -103,7 +103,7 @@ $(function() {
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
||e.eiInfo.extAttr.methodName == 'delete' ){
query();
resultGrid.dataSource.page(1)
}
},
onSave: function (e) {
......@@ -112,8 +112,11 @@ $(function() {
save();
},
onDelete: function(e) {
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
if ($("#inqu_status-0-type").val()!="update"){
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
}
},
}
......@@ -133,11 +136,13 @@ $(function() {
return item["param1Field"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consWhCode"),whRecord);
IPLAT.EFSelect.value($("#inqu_status-0-consWhCode"),'');
let company = _.filter(companyBox, function (item) {
return item["valueField"] === proj[0]["param1Field"];
})
IPLAT.EFSelect.setDataSource($("#inqu_status-0-consCode"),company);
IPLAT.EFSelect.value($("#inqu_status-0-consCode"),proj[0]["param1Field"]);
})
$("#inqu_status-0-consCode").change(function () {
if ($("#inqu_status-0-type").val()=="update"){
......
......@@ -29,29 +29,29 @@
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="consQuantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consUnitWeight" cname="单重" width="120" enable="true" format="{0:N0}" editType="text"
displayType="0.000" sort="true" align="right"
displayType="0.000" sort="true" align="right" readonly="true"
data-regex="/^-?[0-9]{1,20}([.][0-9]{1,3})?$/" maxLength="20" required="true"
data-errorprompt="请输入数字,该值最大可设置15位整数和3位小数!"/>
<EF:EFColumn ename="consWeight" cname="重量" width="120" enable="false" format="{0:N3}" editType="text"
......
......@@ -118,8 +118,10 @@ $(function() {
save();
},
onDelete: function(e) {
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
if ($("#inqu_status-0-type").val()!="update"){
e.preventDefault();
resultGrid.removeRows(resultGrid.getCheckedRowsIndex())
}
},
}
......
......@@ -28,30 +28,30 @@
<EF:EFRegion id="result" title="记录集">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true">
<EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" width="120" align="center" required="true"
<EF:EFComboColumn ename="inventType" cname="存货类型" enable="true" readonly="true" width="120" align="center" required="true"
blockName="invent_type_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" width="120" align="center" required="true"
<EF:EFComboColumn ename="inventCode" cname="存货名称" enable="true" readonly="true" width="120" align="center" required="true"
blockName="invent_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFComboColumn ename="spec" cname="规格" enable="true" width="120" align="center" required="true"
<EF:EFComboColumn ename="spec" cname="规格" enable="true" readonly="true" width="120" align="center" required="true"
blockName="spec_name_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" enable="true" readonly="true" align="center" hidden="true" maxLength="50"/>
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="false" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" format="{0:N0}" editType="text"
<EF:EFColumn ename="length" cname="长度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="width" cname="宽度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="thick" cname="厚度(MM)" enable="true" readonly="true" width="100" align="right" format="{0:N3}" maxLength="10"/>
<EF:EFColumn ename="quantity" cname="数量" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
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:N0}" editType="text"
<EF:EFColumn ename="unitWeight" cname="单重" width="120" enable="true" readonly="true" format="{0:N0}" editType="text"
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位小数!"/>
......
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