Commit f2a12697 by wancheng

其他入库单,其他出库单

parent 5aff4d51
......@@ -108,6 +108,15 @@ public enum DdynamicEnum {
INVENT_ALL_BOX_BLOCK_ID("invent_all_box_block_id", "id", "spec", "material", "unit", "length", "width", "thick",
"coefficient","status", "HGPZ005.queryInventBoxAll"),
/**
* 模块:存货档案(ALL 不默认状态)
* 用途:存货档案下拉框
* 编写:
*/
INVENT_NAME_BOX_BLOCK_ID("invent_name_box_block_id", "inventCode", "inventText","inventName", "spec", "inventType", "length", "width", "thick",
"coefficient","id", "HGPZ005.queryInventNameBox"),
/**
* 模块:规格
* 用途:存货档案下拉框
......@@ -347,6 +356,8 @@ public enum DdynamicEnum {
private String param8;
private String param9;
private String param10;
/** 数据源 */
private final String dbSource;
......@@ -456,6 +467,22 @@ public enum DdynamicEnum {
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 = param7;
this.param8 = param8;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String dbSource) {
this.blockId = blockId;
this.value = value;
......@@ -472,6 +499,7 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3,
String param4, String param5, String param6, String param7, String param8, String param9,
String dbSource, Map paramMap) {
......@@ -594,6 +622,13 @@ public enum DdynamicEnum {
this.param9 = param9;
}
public String getParam10() {
return param10;
}
public void setParam10(String param10) {
this.param10 = param10;
}
public Map getParamMap() {
return paramMap;
}
......
......@@ -64,6 +64,9 @@ public class HGConstants {
public static final String PARAM9_FIELD = "param9Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String PARAM10_FIELD = "param10Field";
/** 前后台交互下拉框字段 字段名 dzg */
public static final String VALUE_FIELD = "valueField";
public static final String PARAM_FILENAME = "fileName";
......
......@@ -263,6 +263,21 @@ public class HGConstant {
/**
*
* 数据来源
* @author:songx
* @date:2024/5/15,15:18
*/
public static class Source {
// 盘点
public static final Integer PD = 1;
// 调拨
public static final Integer DB = 2;
// 其他
public static final Integer QT = 3;
}
/**
*
* 物料变动状态
* @author:songx
* @date:2024/5/15,15:18
......
......@@ -136,7 +136,7 @@ public class ServiceHGKC006 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc006.setCompanyCode(userVO.getUsercode());
hgkc006.setCompanyName(userVO.getUsername());
hgkc006.setSource(1);
hgkc006.setSource(HGConstant.Source.QT);
DaoUtils.insert(HGKC006.INSERT, hgkc006);
}
......
......@@ -124,7 +124,6 @@ public class ServiceHGKC006A extends ServiceBase {
*/
private void add(HGKC006A hgkc006A,HGKC006 hgkc006) throws Exception {
hgkc006A.setPrimaryId(hgkc006.getId());
hgkc006A.setSource(1);
hgkc006A.setOtherEnterNo(hgkc006.getOtherEnterNo());
DaoUtils.insert(HGKC006A.INSERT, hgkc006A);
// 更新库存数量
......
......@@ -137,7 +137,7 @@ public class ServiceHGKC007 extends ServiceBase {
UserVO userVO = HGCWTools.HgCw002.getUserCompany();
hgkc007.setCompanyCode(userVO.getUsercode());
hgkc007.setCompanyName(userVO.getUsername());
hgkc007.setSource(1);
hgkc007.setSource(HGConstant.Source.QT);
DaoUtils.insert(HGKC007.INSERT, hgkc007);
}
......
......@@ -126,7 +126,6 @@ public class ServiceHGKC007A extends ServiceBase {
*/
private void add(HGKC007A hgkc007A,HGKC007 hgkc007) throws Exception {
hgkc007A.setPrimaryId(hgkc007.getId());
hgkc007A.setSource(1);
hgkc007A.setOtherOutNo(hgkc007.getOtherOutNo());
DaoUtils.insert(HGKC007A.INSERT, hgkc007A);
// 更新库存数量
......
......@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
......@@ -260,7 +260,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
......@@ -215,7 +215,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
......@@ -260,7 +260,7 @@
$orderBy$
</isNotEmpty>
<isEmpty property="orderBy">
ID asc
CREATED_TIME desc
</isEmpty>
</dynamic>
......
......@@ -301,6 +301,18 @@ public class ServiceHGPZ005 extends ServiceBase {
return inInfo;
}
public EiInfo queryInventNameBox(EiInfo inInfo) {
try {
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.INVENT_NAME_BOX_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, EiInfoUtils.getFirstRow(inInfo), false);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询规格失败");
}
return inInfo;
}
@OperationLogAnnotation(operModul = "存货档案",operType = "导入",operDesc = "导入操作")
public EiInfo importDate(EiInfo inInfo) {
try {
......
......@@ -386,6 +386,25 @@
<include refid="condition"/>
ORDER BY ID
</select>
<select id="queryInventNameBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
INVENT_CODE as "inventCode",
CONCAT('[',INVENT_CODE,']',INVENT_NAME,(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END)) as "inventText",
INVENT_NAME as "inventName",
(CASE WHEN SPEC = '' THEN '无规格' ELSE SPEC END) AS "spec",
INVENT_TYPE as "inventType",
LENGTH AS "length" , <!-- 长 -->
WIDTH AS "width" , <!-- 宽 -->
THICK AS "thick" , <!-- 厚 -->
COEFFICIENT AS "coefficient", <!-- 系数 -->
ID AS "id"
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
AND STATUS = 1
<include refid="condition"/>
ORDER BY INVENT_CODE
</select>
<!---->
<select id="queryInventBoxAll" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT DISTINCT
......
......@@ -105,6 +105,7 @@ public class CommonMethod {
row.put(HGConstants.PARAM7_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam7())));
row.put(HGConstants.PARAM8_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam8())));
row.put(HGConstants.PARAM9_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam9())));
row.put(HGConstants.PARAM10_FIELD, (tryValue.get(tableParam.getValue()) + HGConstants.SPLICING_SYMBOL + tryValue.get(tableParam.getParam10())));
} else {
row.put(HGConstants.TEXT_FIELD, String.valueOf(tryValue.get(tableParam.getText())));
row.put(HGConstants.PARAM1_FIELD, String.valueOf(tryValue.get(tableParam.getParam1())));
......@@ -116,6 +117,7 @@ public class CommonMethod {
row.put(HGConstants.PARAM7_FIELD, String.valueOf(tryValue.get(tableParam.getParam7())));
row.put(HGConstants.PARAM8_FIELD, String.valueOf(tryValue.get(tableParam.getParam8())));
row.put(HGConstants.PARAM9_FIELD, String.valueOf(tryValue.get(tableParam.getParam9())));
row.put(HGConstants.PARAM10_FIELD, String.valueOf(tryValue.get(tableParam.getParam10())));
}
resultRows.add(row);
}
......
......@@ -54,6 +54,9 @@
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -17,7 +17,7 @@ $(function () {
template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
dataItem['inventName'] = InventNameGlobalData[i]['textField'];
dataItem['inventName'] = InventNameGlobalData[i]['param1Field'];
return InventNameGlobalData[i]['textField'];
}
}
......@@ -25,35 +25,10 @@ $(function () {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "inventRecordId",
filter: function (options) {
return _.filter(inventAllGlobalData, function (item) {
return item["param7Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryInventBoxAll");
inInfo.set("blockId", "invent_all_box_block_id");
inInfo.set("methodName", "queryInventNameBox");
inInfo.set("blockId", "invent_name_box_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
......@@ -96,31 +71,23 @@ $(function () {
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field === "inventCode"){
loadChange(grid,e,"inventRecordId");
}
else if (e.field == "inventRecordId") {
if (e.field == "inventCode") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'partLength', inventAllGlobalData[i]['param3Field'])
resultGrid.setCellValue(item, 'partWidth', inventAllGlobalData[i]['param4Field'])
resultGrid.setCellValue(item, 'partThick', inventAllGlobalData[i]['param5Field'])
}
}
if (inventAllGlobalData[i]['valueField'] === item.inventCode) {
resultGrid.setCellValue(item, 'partSpec', inventAllGlobalData[i]['param2Field'])
resultGrid.setCellValue(item, 'inventType', inventAllGlobalData[i]['param3Field'])
resultGrid.setCellValue(item, 'partLength', inventAllGlobalData[i]['param4Field'])
resultGrid.setCellValue(item, 'partWidth', inventAllGlobalData[i]['param5Field'])
resultGrid.setCellValue(item, 'partThick', inventAllGlobalData[i]['param6Field'])
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param7Field'])
resultGrid.setCellValue(item, 'inventRecordId', inventAllGlobalData[i]['param8Field'])
calUnitWeight(item,inventAllGlobalData[i]['param4Field'],inventAllGlobalData[i]['param5Field'],inventAllGlobalData[i]['param6Field'],inventAllGlobalData[i]['param7Field']);
}
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
});
},
onSave: function (e) {
......@@ -192,9 +159,9 @@ let initSpec = function () {
let inInfo = new EiInfo();
//inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryInventBoxAll", inInfo, {
EiCommunicator.send("HGPZ005", "queryInventNameBox", inInfo, {
onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_box_block_id").getMappedRows();
inventAllGlobalData = ei.getBlock("invent_name_box_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -223,6 +190,13 @@ let selectTaskCallback = function () {
JSColorbox.close();
}
let calUnitWeight = function (item,length,width,thick,coefficient) {
if(length && width && thick && coefficient){
let amount = length * width * thick * coefficient/1000000;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'invUnitWeight', amount);
}
}
/**
* 保存
......@@ -248,11 +222,6 @@ let save = function () {
flag = false;
return false;
}
if(isBlank(inventRecordId)){
message("选中的第"+(index+1)+"行\"规格\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -32,15 +32,17 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" required="true" enable="false"/>
<EF:EFColumn ename="inventRecordId" cname="规格id" width="120" align="center" required="true" enable="false" hidden="true"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="coefficient" cname="系数" width="80" align="right" format="{0:N2}" maxLength="10" enable="false" hidden="true"/>
<EF:EFColumn ename="invQty" cname="数量" width="120" align="right" format="{0:N0}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
......
......@@ -55,7 +55,9 @@
<EF:EFComboColumn cname="状态" ename="submitStatus" width="90" align="center" enable="false" >
<EF:EFCodeOption codeName="hggp.hpkc.submitStatus"/>
</EF:EFComboColumn>
<EF:EFComboColumn cname="数据来源" ename="source" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hggp.hpkc.source"/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFRegion>
......
......@@ -17,7 +17,7 @@ $(function () {
template: function (dataItem) {
for (let i = 0; i < InventNameGlobalData.length; i++) {
if (InventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
dataItem['inventName'] = InventNameGlobalData[i]['textField'];
dataItem['inventName'] = InventNameGlobalData[i]['param1Field'];
return InventNameGlobalData[i]['textField'];
}
}
......@@ -25,35 +25,10 @@ $(function () {
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
},{
field: "inventRecordId",
filter: function (options) {
return _.filter(inventAllGlobalData, function (item) {
return item["param7Field"]=="true";
})
},
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventCode", options.model["inventCode"]);
inInfo.set("serviceName", "HGPZ005");
inInfo.set("methodName", "queryInventBoxAll");
inInfo.set("blockId", "invent_all_box_block_id");
inInfo.set("methodName", "queryInventNameBox");
inInfo.set("blockId", "invent_name_box_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
}
......@@ -96,31 +71,23 @@ $(function () {
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field === "inventCode"){
loadChange(grid,e,"inventRecordId");
}
else if (e.field == "inventRecordId") {
if (e.field == "inventCode") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'partLength', inventAllGlobalData[i]['param3Field'])
resultGrid.setCellValue(item, 'partWidth', inventAllGlobalData[i]['param4Field'])
resultGrid.setCellValue(item, 'partThick', inventAllGlobalData[i]['param5Field'])
if (inventAllGlobalData[i]['valueField'] === item.inventCode) {
resultGrid.setCellValue(item, 'partSpec', inventAllGlobalData[i]['param2Field'])
resultGrid.setCellValue(item, 'inventType', inventAllGlobalData[i]['param3Field'])
resultGrid.setCellValue(item, 'partLength', inventAllGlobalData[i]['param4Field'])
resultGrid.setCellValue(item, 'partWidth', inventAllGlobalData[i]['param5Field'])
resultGrid.setCellValue(item, 'partThick', inventAllGlobalData[i]['param6Field'])
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param7Field'])
resultGrid.setCellValue(item, 'inventRecordId', inventAllGlobalData[i]['param8Field'])
calUnitWeight(item,inventAllGlobalData[i]['param4Field'],inventAllGlobalData[i]['param5Field'],inventAllGlobalData[i]['param6Field'],inventAllGlobalData[i]['param7Field']);
}
}
}
/* if (e.field == "invQty") {
loadChange(grid,e,"invWeight");
loadChange(grid,e,"amount");
}
if (e.field == "invUnitWeight") {
loadChange(grid,e,"invWeight");
}
if (e.field == "price") {
loadChange(grid,e,"amount");
}*/
});
},
onSave: function (e) {
......@@ -192,9 +159,9 @@ let initSpec = function () {
let inInfo = new EiInfo();
//inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HGPZ005", "queryInventBoxAll", inInfo, {
EiCommunicator.send("HGPZ005", "queryInventNameBox", inInfo, {
onSuccess: function (ei) {
inventAllGlobalData = ei.getBlock("invent_all_box_block_id").getMappedRows();
inventAllGlobalData = ei.getBlock("invent_name_box_block_id").getMappedRows();
},
onFail: function (ei) {
}
......@@ -224,7 +191,13 @@ let selectTaskCallback = function () {
JSColorbox.close();
}
let calUnitWeight = function (item,length,width,thick,coefficient) {
if(length && width && thick && coefficient){
let amount = length * width * thick * coefficient/1000000;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'invUnitWeight', amount);
}
}
/**
* 保存
......@@ -250,11 +223,6 @@ let save = function () {
flag = false;
return false;
}
if(isBlank(inventRecordId)){
message("选中的第"+(index+1)+"行\"规格\",不能为空!");
flag = false;
return false;
}
});
if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
......
......@@ -24,12 +24,13 @@
<EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="true"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="false"
columnTemplate="#=textField#" itemTemplate="#=textField#" enable="false"
filter="contains">
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" hidden="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="partSpec" cname="规格" width="120" align="center" enable="false"/>
<EF:EFColumn ename="inventRecordId" cname="规格id" width="120" align="center" required="true" enable="false" hidden="true"/>
<EF:EFColumn ename="partLength" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partWidth" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="partThick" cname="厚(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
......
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