d36573b4 by lxs Committed by lihua

数据定价更新

1 parent aa347f07
......@@ -730,7 +730,7 @@ const setSignatoryTableInfo = (row, isEdit = false) => {
},
{
label: "默认值", field: "defaultValue", width: 180, align: 'right', getName: (scope) => {
return changeNum(scope.row.defaultValue, 2) || '-'
return scope.row.defaultValue !== null && scope.row.defaultValue !== '' ? changeNum(scope.row.defaultValue, 2) : '-'
}
},
{
......@@ -842,11 +842,11 @@ const inputChange = (val, scope, field) => {
let strArr = val.split(".");
if (strArr.length > 1) {
let right = strArr[1];
if (right === "" || right.length < 2) {
row[field] = val = parseFloat(val || 0).toFixed(2);
if (right === "" || right.length < 3) {
row[field] = val = parseFloat(val || 0).toFixed(3);
}
} else {
row[field] = val = parseFloat(val || 0).toFixed(2);
row[field] = val = parseFloat(val || 0).toFixed(3);
}
}
......@@ -857,7 +857,7 @@ const inputEventChange = (val, scope, field) => {
row[field] = row[field].toString().replace(/\.{2,}/g, ".")
row[field] = row[field].toString().replace(".", "$#$").replace(/\./g, "").replace("$#$", ".")
row[field] = row[field].toString().replace(/^(\-)*(\d+)\.(\d\d\d\d\d\d).*$/, "$1$2.$3")
row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,2})?).*$/g, "$1")
row[field] = row[field].toString().replace(/^\D*(\d{0,12}(?:\.\d{0,3})?).*$/g, "$1")
}
// 设置表格合并下标
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!