|
@@ -405,7 +405,7 @@ export default {
|
|
|
title: '净重/箱',
|
|
|
key: 'netWeight',
|
|
|
width: 120,
|
|
|
- type: JVXETypes.inputNumber
|
|
|
+ type: JVXETypes.input
|
|
|
},
|
|
|
{
|
|
|
title: '总净重',
|
|
@@ -806,15 +806,15 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //判断小数位数
|
|
|
+ // //判断小数位数
|
|
|
var Several = [
|
|
|
{key:'netWeight',value:'净重/箱'},
|
|
|
{key:'grossWeight',value:'毛重/箱'},
|
|
|
]
|
|
|
for(var s=0 ; s<Several.length;s++){
|
|
|
- var position = tableRow[Several[s].key].toString().indexOf('.') + 1; //小数点的位置
|
|
|
- var digit = tableRow[Several[s].key].toString().length - position; //小数的位数
|
|
|
- if(digit > 2){
|
|
|
+ var position = tableRow[Several[s].key].toString().indexOf('.') + 1; //小数点的位置
|
|
|
+ var digit = tableRow[Several[s].key].toString().length - position; //小数的位值
|
|
|
+ if(digit > 2 && position!==0){
|
|
|
this.$message.error('第'+(i+1)+'行'+Several[s].value+'小数超过两位,无法保存');
|
|
|
return
|
|
|
}
|