fmui-base 2.1.56 → 2.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.1.57:计算值时保留的小数位数根据当前字段的位数
6
7
  - 2.1.56:子表字段关联多个字段关联一个字段冲突问题处理
7
8
  - 2.1.55:主子表支持时间differHalfDay函数
8
9
  - 2.1.54:子表必填项校验定位位置不对
package/lib/form/table.js CHANGED
@@ -1135,9 +1135,9 @@ var PageHome = function (_React$Component) {
1135
1135
  } else {
1136
1136
  var fieldType = itemParam.inputFormat;
1137
1137
  var decimalPlace = itemParam.decimalPlace;
1138
- var mainTblData = data.mainTblData;
1139
- mainTblData.map(function (item, index) {
1140
- if (item.key == resultKey) {
1138
+ var formItem = data.formItem;
1139
+ formItem.map(function (item, index) {
1140
+ if (item.itemCode == resultKey) {
1141
1141
  fieldType = item.inputFormat;
1142
1142
  decimalPlace = item.decimalPlace;
1143
1143
  }
@@ -1177,6 +1177,7 @@ var PageHome = function (_React$Component) {
1177
1177
  value: function forSubCalculateExpList(data, itemParam, uniqueName, subTblNo) {
1178
1178
  var that = this;
1179
1179
  var calculateExpList = data.subCalculateExpList;
1180
+ var formItem = data.formItem;
1180
1181
  if (calculateExpList) {
1181
1182
  var calculateExpValue = calculateExpList[uniqueName];
1182
1183
  if (calculateExpValue) {
@@ -1286,20 +1287,22 @@ var PageHome = function (_React$Component) {
1286
1287
  } else {
1287
1288
  var fieldType = itemParam.inputFormat;
1288
1289
  var decimalPlace = itemParam.decimalPlace;
1289
- // var subTbl = data.subTbl;
1290
- // subTbl.map(function (item, index) {
1291
- // if (item.subTblName == itemParam.tableName) {
1292
- // var subTblData = item.subTblData;
1293
- // var subTblDatas = subTblData[data.subTblNo];
1294
- // for (var k = 0; k < subTblDatas.length; k++) {
1295
- // if (subTblDatas[k].key == resultKey) {
1296
- // fieldType = subTblDatas[k].inputFormat;
1297
- // decimalPlace = subTblDatas[k].decimalPlace;
1298
- // }
1299
- // }
1300
-
1301
- // }
1302
- // });
1290
+ var subTbl = data.subTbl;
1291
+ if (formItem) {
1292
+ for (var c = 0; c < formItem.length; c++) {
1293
+ var item = formItem[c];
1294
+ if (item.itemType == 'detail' && item.itemCode == itemParam.tableName) {
1295
+ var children = item.children;
1296
+ for (var k = 0; k < children.length; k++) {
1297
+ if (children[k].itemCode == resultKey) {
1298
+ fieldType = children[k].inputFormat;
1299
+ decimalPlace = children[k].decimalPlace;
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ }
1305
+
1303
1306
  // fieldType = data.subTbl[h].subTblData[l].inputFormat;
1304
1307
  // decimalPlace = data.subTbl[h].subTblData[l].decimalPlace;
1305
1308
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.56",
3
+ "version": "2.1.57",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",