Commit d95e51b2 by 宋祥

1.其他入库规格可编辑,采购入库存货名称可编辑

parent c3aba608
......@@ -89,7 +89,7 @@ public class HPKC001 extends DaoEPBase {
private String receiptDate = " "; /* 单据日期*/
private String whCode = " "; /* 仓库编码*/
private String whName = " "; /* 仓库名称*/
private String inventType = " "; /* 存货类型*/
private Integer inventType; /* 存货类型*/
private String inventCode = " "; /* 存货编码*/
private String inventName = " "; /* 存货名称*/
private Long inventRecordId; /* 存货档案ID*/
......@@ -430,7 +430,7 @@ public class HPKC001 extends DaoEPBase {
* get the inventType - 存货类型.
* @return the inventType
*/
public String getInventType() {
public Integer getInventType() {
return this.inventType;
}
......@@ -439,7 +439,7 @@ public class HPKC001 extends DaoEPBase {
*
* @param inventType - 存货类型
*/
public void setInventType(String inventType) {
public void setInventType(Integer inventType) {
this.inventType = inventType;
}
/**
......@@ -607,7 +607,7 @@ public class HPKC001 extends DaoEPBase {
setReceiptDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_RECEIPT_DATE)), receiptDate));
setWhCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_CODE)), whCode));
setWhName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_WH_NAME)), whName));
setInventType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventType(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_INVENT_TYPE)), inventType));
setInventCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_CODE)), inventCode));
setInventName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_INVENT_NAME)), inventName));
setInventRecordId(NumberUtils.toLong(StringUtils.toString(map.get(FIELD_INVENT_RECORD_ID)), inventRecordId));
......
......@@ -17,6 +17,7 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -140,6 +141,12 @@ public class ServiceHPKC001 extends ServiceBase {
private void addData(HPKC001 fKc001, HPPZ006 fPz006) {
// 设置基础信息
this.setBaseInfo(fKc001);
// 检查存货名称是新增还是已存在
if (StringUtils.isBlank(fKc001.getInventCode())) {
String inventCode = HPPZTools.HpPz004.checkAndSave(fKc001.getInventType(), fKc001.getInventName());
fKc001.setInventCode(inventCode);
fPz006.setInventCode(inventCode);
}
// 检查规格是否已存在,不存在就新增
HPPZ006 dbPz006 = HPPZTools.HpPz006.checkAndSave(fPz006);
fKc001.setInventRecordId(dbPz006.getId());
......@@ -164,9 +171,8 @@ public class ServiceHPKC001 extends ServiceBase {
HPKC001 fKc001 = new HPKC001();
fKc001.fromMap(resultRow);
AssertUtils.isEmpty(fKc001.getWhCode(), "仓库名称不能为空");
AssertUtils.isEmpty(fKc001.getInventCode(), "存货名称不能为空");
// AssertUtils.isEmpty(fKc001.getInventCode(), "存货名称不能为空");
AssertUtils.isGt(BigDecimal.ZERO, fKc001.getAmount(), "数量必须大于0");
AssertUtils.isGt(BigDecimal.ZERO, fKc001.getWeight(), "重量必须大于0");
}
}
......@@ -181,7 +187,7 @@ public class ServiceHPKC001 extends ServiceBase {
// 仓库名称
fKc001.setWhName(HPPZTools.HpPz007.getByCode(fKc001.getWhCode()).getWhName());
// 存货名称
fKc001.setInventName(HPPZTools.HpPz004.getByCode(fKc001.getInventCode()).getInventName());
// fKc001.setInventName(HPPZTools.HpPz004.getByCode(fKc001.getInventCode()).getInventName());
}
/**
......
......@@ -18,6 +18,7 @@ import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.hpjx.util.StringUtil;
import com.baosight.hpjx.util.StringUtils;
import com.baosight.iplat4j.core.ei.EiConstant;
import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.exception.PlatException;
......@@ -83,6 +84,8 @@ public class ServiceHPKC006 extends ServiceBase {
inInfo = super.query(inInfo, HPKC006.QUERY, new HPKC006());
List sum = dao.query(HPSqlConstant.HPKC006.QUERY_SUM, queryRow);
inInfo.getBlock(EiConstant.resultBlock).set(EiConstant.COLUMN_TOTAL_SUM, sum.get(0));
// 设置规格信息
HPPZTools.HpPz006.setSpecInfo(inInfo, HPKC006.FIELD_INVENT_RECORD_ID);
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......@@ -105,8 +108,10 @@ public class ServiceHPKC006 extends ServiceBase {
for (Map resultRow : resultRows) {
HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRow);
HPPZ006 fPz006 = new HPPZ006();
fPz006.fromMap(resultRow);
if (fKc006.getId() == null || fKc006.getId() == 0) {
this.add(fKc006);
this.add(fKc006, fPz006);
} else {
// TODO 库存不支持修改
}
......@@ -124,18 +129,20 @@ public class ServiceHPKC006 extends ServiceBase {
* 新增操作
*
* @param fKc006
* @param fPz006
* @return
*/
private void add(HPKC006 fKc006) {
private void add(HPKC006 fKc006, HPPZ006 fPz006) {
// 设置基础信息
this.setBaseInfo(fKc006);
// 生成入库单号
fKc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
// 检查存货名称是新增还是已存在
if (StringUtils.isBlank(fKc006.getInventCode())) {
String inventCode = HPPZTools.HpPz004.checkAndSave(fKc006.getInventType(), fKc006.getInventName());
fKc006.setInventCode(inventCode);
fPz006.setInventCode(inventCode);
}
// 检查规格,如果不存在就新增
HPPZ006 dbPz006 = HPPZTools.HpPz006.checkAndSave(fKc006.getInventType(), fKc006.getInventName(),
fKc006.getLength(), fKc006.getWidth(), fKc006.getThick(), fKc006.getCoefficient(), fKc006.getMaterial(),
fKc006.getUnit()
);
HPPZ006 dbPz006 = HPPZTools.HpPz006.checkAndSave(fPz006);
// 根据规格计算单重
fKc006.setUnitWeight(HPPZTools.HpPz006.calcUnitWeight(dbPz006));
// 计算总重
......@@ -143,6 +150,8 @@ public class ServiceHPKC006 extends ServiceBase {
fKc006.setInventRecordId(dbPz006.getId());
fKc006.setInventCode(dbPz006.getInventCode());
fKc006.setDeleteFlag(CommonConstant.YesNo.NO_0);
// 生成入库单号
fKc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
DaoUtils.insert(HPKC006.INSERT, fKc006);
// 修改库存
HPKCTools.updateStock(fKc006.getWhCode(), fKc006.getInventRecordId(), fKc006.getAmount(),
......
......@@ -61,7 +61,7 @@ public class ServiceHPPZ006 extends ServiceBase {
@Override
public EiInfo query(EiInfo inInfo) {
try {
inInfo = super.query(inInfo, "HPPZ006.query", new HPPZ006());
inInfo = super.query(inInfo, HPPZ006.QUERY, new HPPZ006());
} catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "查询失败");
}
......
......@@ -318,7 +318,9 @@ public class HPPZTools {
* @return
*/
public static List<HPPZ006> list(List<Long> ids) {
AssertUtils.isNull(ids, "规格ID不能为空");
if (CollectionUtils.isEmpty(ids)) {
return null;
}
Map queryMap = new HashMap();
queryMap.put("ids", ids);
return DaoBase.getInstance().query(HPPZ006.QUERY, queryMap);
......@@ -489,13 +491,7 @@ public class HPPZTools {
*/
public static void setSpecInfo(EiInfo inInfo, String idName) {
List<Map> resultRows = inInfo.getBlock(EiConstant.resultBlock).getRows();
if (CollectionUtils.isEmpty(resultRows)) {
return;
}
List<Long> ids = ObjectUtils.listKey(resultRows, idName);
if (CollectionUtils.isEmpty(ids)) {
return;
}
Map<Long, HPPZ006> resultMap = map(ids);
if (MapUtils.isEmpty(resultMap)) {
return;
......@@ -513,6 +509,8 @@ public class HPPZTools {
resultRow.put(HPPZ006.FIELD_WIDTH, dbPz006 == null ? "" : dbPz006.getWidth());
resultRow.put(HPPZ006.FIELD_THICK, dbPz006 == null ? "" : dbPz006.getThick());
resultRow.put(HPPZ006.FIELD_COEFFICIENT, dbPz006 == null ? "" : dbPz006.getCoefficient());
resultRow.put(HPPZ006.FIELD_MATERIAL, dbPz006 == null ? "" : dbPz006.getMaterial());
resultRow.put(HPPZ006.FIELD_UNIT, dbPz006 == null ? "" : dbPz006.getUnit());
}
}
......
package com.baosight.hpjx.util;
import org.apache.commons.collections.CollectionUtils;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -110,6 +112,9 @@ public class ObjectUtils extends org.apache.commons.lang.ObjectUtils {
* @return
*/
public static <T> List<T> listKey(List<Map> items, String keyName) {
if (CollectionUtils.isEmpty(items)) {
return null;
}
return items.stream().map(item -> (T) item.get(keyName)).filter(ObjectUtils::isNotBlank).distinct()
.collect(Collectors.toList());
}
......
......@@ -40,26 +40,30 @@ $(function() {
refreshSelect(container, inInfo);
}
}, {
field: "inventCode",
field: "inventName",
title: "存货名称",
template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) {
if (inventNameGlobalData[i]['textField'] === dataItem['inventName']) {
dataItem['inventCode'] = inventNameGlobalData[i]['valueField']
return inventNameGlobalData[i]['textField'];
} else {
dataItem['inventCode'] = '';
}
}
return "";
return dataItem['inventName'];
},
editor: function (container, options) {
let inInfo = new EiInfo();
// 1.原料,2.耗材
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryMaterialComboBox");
inInfo.set("blockId", "material_record_block_id");
inInfo.set("serviceName", "HPPZ004");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_name_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
refreshInputSelect(container, inInfo);
}
}, {
field: "spec",
......@@ -86,54 +90,29 @@ $(function() {
refreshInputSelect(container, inInfo);
}
}, {
field: "length",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param3Field'];
}
}
return dataItem['length'];
field: "unitWeight",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "width",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param4Field'];
}
}
return dataItem['width'];
field: "weight",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "thick",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param5Field'];
}
}
return dataItem['thick'];
field: "length",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "material",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param1Field'];
}
}
return dataItem['material'];
field: "width",
template: function (options) {
return options.width == 0 ? "-" : options.width;
}
}, {
field: "unit",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
return inventAllGlobalData[i]['param2Field'];
}
}
return dataItem['unit'];
field: "thick",
template: function (options) {
return options.thick == 0 ? "-" : options.thick;
}
}],
loadComplete: function (grid) {
......@@ -267,7 +246,7 @@ let save = function () {
message("勾选的第" + (i + 1) + "行仓库名称不能为空");
return;
}
if (isBlank(rows[i]['inventCode'])) {
if (isBlank(rows[i]['inventName'])) {
message("勾选的第" + (i + 1) + "行存货名称不能为空");
return;
}
......@@ -275,6 +254,21 @@ let save = function () {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数");
return;
}
let length = rows[i]['length'];
if (!isBlank(length) && (!isNumber(length) || length < 0)) {
message("勾选的第" + (i + 1) + "行长必须是不小于0的数字");
return;
}
let width = rows[i]['width'];
if (!isBlank(width) && (!isNumber(width) || width < 0)) {
message("勾选的第" + (i + 1) + "行宽必须是不小于0的数字");
return;
}
let thick = rows[i]['thick'];
if (!isBlank(width) && (!isNumber(thick) || thick < 0)) {
message("勾选的第" + (i + 1) + "行厚必须是不小于0的数字");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
......
......@@ -54,7 +54,8 @@
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格ID" width="120" align="center" readonly="true" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
......
......@@ -69,14 +69,17 @@ $(function() {
refreshInputSelect(container, inInfo);
}
}, {
field: "inventRecordId",
field: "spec",
template: function (dataItem) {
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['valueField'] === dataItem['inventRecordId']) {
if (inventAllGlobalData[i]['textField'] === dataItem['spec']) {
dataItem['inventRecordId'] = inventAllGlobalData[i]['valueField']
return inventAllGlobalData[i]['textField'];
} else {
dataItem['inventRecordId'] = '';
}
}
return "";
return dataItem['spec'] == null ? "" : dataItem['spec'];
},
editor: function (container, options) {
let inInfo = new EiInfo();
......@@ -87,7 +90,32 @@ $(function() {
inInfo.set("methodName", "queryComboBoxSpec");
inInfo.set("blockId", "invent_spec_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
refreshInputSelect(container, inInfo);
}
}, {
field: "unitWeight",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "weight",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "length",
template: function (options) {
return options.length == 0 ? "-" : options.length;
}
}, {
field: "width",
template: function (options) {
return options.width == 0 ? "-" : options.width;
}
}, {
field: "thick",
template: function (options) {
return options.thick == 0 ? "-" : options.thick;
}
}],
loadComplete: function (grid) {
......@@ -98,30 +126,21 @@ $(function() {
save();
},
afterEdit: function (e) {
if (e.field === "inventRecordId") {
let inventRecordId = e.model.inventRecordId;
if (isBlank(inventRecordId)) {
return;
}
let inInfo = new EiInfo();
// ID为空的情况下需要返回一条空数据
inInfo.set("inqu_status-0-id", inventRecordId);
EiCommunicator.send("HPPZ006", "query", inInfo, {
onSuccess: function (ei) {
let data = ei.blocks.result.rows;
if (data.length > 0) {
resultGrid.setCellValue(e.model, "length", data[0][8])
resultGrid.setCellValue(e.model, "width", data[0][9])
resultGrid.setCellValue(e.model, "thick", data[0][10])
resultGrid.setCellValue(e.model, "material", data[0][11])
resultGrid.setCellValue(e.model, "coefficient", data[0][12])
resultGrid.setCellValue(e.model, "unit", data[0][13])
if (e.field == "spec") {
var tr,index;
// 获取此model元素信息
var item = e.model;
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
resultGrid.refresh();
}
firstLoad = 0;
},
onFail: function (ei) {
}
}, {async: false});
}
},
onSuccess: function (e) {
......@@ -231,7 +250,7 @@ let save = function () {
message("勾选的第" + (i + 1) + "行仓库名称不能为空");
return;
}
if (isBlank(rows[i]['inventCode'])) {
if (isBlank(rows[i]['inventName'])) {
message("勾选的第" + (i + 1) + "行存货名称不能为空");
return;
}
......@@ -239,6 +258,21 @@ let save = function () {
message("勾选的第" + (i + 1) + "行数量必须是大于0的整数");
return;
}
let length = rows[i]['length'];
if (!isBlank(length) && (!isNumber(length) || length < 0)) {
message("勾选的第" + (i + 1) + "行长必须是不小于0的数字");
return;
}
let width = rows[i]['width'];
if (!isBlank(width) && (!isNumber(width) || width < 0)) {
message("勾选的第" + (i + 1) + "行宽必须是不小于0的数字");
return;
}
let thick = rows[i]['thick'];
if (!isBlank(width) && (!isNumber(thick) || thick < 0)) {
message("勾选的第" + (i + 1) + "行厚必须是不小于0的数字");
return;
}
}
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
......
......@@ -48,28 +48,28 @@
<EF:EFColumn ename="otherEnterNo" cname="入库单号" enable="false" width="150" align="center"/>
<EF:EFColumn ename="receiptDate" cname="单据日期" editType="date" dateFormat="yyyy-MM-dd"
parseFormats="['yyyyMMdd']" width="90" align="center" required="true" readonly="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="100" align="center" required="true"
<EF:EFComboColumn ename="inventType" cname="存货类型" width="80" align="center" required="true"
readonly="true">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('1', '2', '5')"/>
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货名称" width="120" align="center" required="true" readonly="true"
hidden="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格Id" width="120" align="center" readonly="true" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
sumType="all" required="true" readonly="true"/>
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="100" align="right" format="{0:N3}"
<EF:EFColumn ename="unitWeight" cname="单重" enable="false" width="120" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="all"/>
<EF:EFColumn ename="length" cname="长" width="120" align="center" format="{0:N3}" required="false"
<EF:EFColumn ename="length" cname="长" width="100" align="center" format="{0:N3}" required="false"
readonly="true"/>
<EF:EFColumn ename="width" cname="宽" width="120" align="center" format="{0:N3}" required="false"
<EF:EFColumn ename="width" cname="宽" width="100" align="center" format="{0:N3}" required="false"
readonly="true"/>
<EF:EFColumn ename="thick" cname="厚" width="120" align="center" format="{0:N3}" required="false"
<EF:EFColumn ename="thick" cname="厚" width="100" align="center" format="{0:N3}" required="false"
readonly="true"/>
<EF:EFColumn ename="material" cname="材质" width="120" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="120" align="center" format="{0:N3}" required="false"
<EF:EFColumn ename="material" cname="材质" width="80" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="coefficient" cname="系数" width="80" align="center" format="{0:N3}" required="false"
readonly="true"/>
<EF:EFColumn ename="unit" cname="单位" width="120" align="center" required="false" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" maxLength="255" readonly="true"/>
......
......@@ -10,6 +10,11 @@ $(function() {
pageSizes: [10, 20, 30, 50, 100, 200]
},
columns: [{
field: "spec",
template: function (options) {
return $.trim(options.spec) == "" ? "无规格" : options.spec;
}
}, {
field: "length",
template: function (options) {
return options.length == 0 ? "-" : options.length;
......
......@@ -45,6 +45,16 @@ function isPositiveInteger(input) {
}
/**
* 正数校验
*
* @param input
* @returns {boolean}
*/
function isPositiveNumber(input) {
return !isBlank(input) && isNumber(input) && (input > 0);
}
/**
* 消息提示
*
* @param msg
......
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