|
@@ -85,7 +85,9 @@ class ScaleItem extends Component {
|
|
|
showFormula(id,it){
|
|
|
const {formulaData} = this.state;
|
|
|
const obj = JSON.parse(JSON.stringify(formulaData)||{});
|
|
|
- obj[id] = it;
|
|
|
+ if(!obj[id]){
|
|
|
+ obj[id] = it;
|
|
|
+ }
|
|
|
this.setState({
|
|
|
formulaId:id,
|
|
|
formulaData:obj
|
|
@@ -102,10 +104,12 @@ class ScaleItem extends Component {
|
|
|
formulaId:null
|
|
|
})
|
|
|
}
|
|
|
- calcuFormula(j, v, i) { //计算公式计算
|
|
|
+ calcuFormula(j, v, ii) { //计算公式计算
|
|
|
const { calcuFormula,chronicPushItems } = this.props;
|
|
|
const {formulaId,formulaData} = this.state;
|
|
|
const it =formulaData&&formulaData[formulaId];
|
|
|
+ let pushObj = deepClone(chronicPushItems);
|
|
|
+ pushObj[ii].details[j]=it;
|
|
|
let allHasInfo = true
|
|
|
for (let i = 0; i < it.content.details.length; i++) {
|
|
|
if(it.content.details[i].controlType == 2) { //输入框类型的有没有填值
|
|
@@ -132,9 +136,9 @@ class ScaleItem extends Component {
|
|
|
data: it,
|
|
|
disId: v.id,
|
|
|
pIndex: j,
|
|
|
- ppIndex: i,
|
|
|
+ ppIndex: ii,
|
|
|
}
|
|
|
- calcuFormula({param,chronicPushItems,isPop:true})
|
|
|
+ calcuFormula({param,chronicPushItems:pushObj})
|
|
|
} else { //不是所有值都填过了
|
|
|
Notify.info('请填写计算公式内容')
|
|
|
}
|