|
|
@@ -43,7 +43,7 @@
|
|
|
<el-form-item :prop="'oaPurchaseObjs.' + scope.$index + '.money'"
|
|
|
:rules="{ required: true, message: '预算金额不能为空', trigger: 'blur' }">
|
|
|
<el-input v-model="form.oaPurchaseObjs[scope.$index].money" autocomplete="off" size="small"
|
|
|
- placeholder="预算金额" onblur="value=value.match(/\d+\.?\d{0,2}/,'')" @blur="changeMoney(scope.$index)"></el-input>
|
|
|
+ placeholder="预算金额" onblur="value=value.match(/\d+\.?\d{0,2}/,'')" @change="changeMoney()"></el-input>
|
|
|
</el-form-item>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -226,14 +226,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- changeMoney(index){
|
|
|
- if(this.form.oaPurchaseObjs[index].money){
|
|
|
- let money = this.form.oaPurchaseObjs[index].money;
|
|
|
- this.form.oaPurchaseObjs[index].money = money;
|
|
|
- let arr = this.form.oaPurchaseObjs;
|
|
|
- this.form.sunMoney = this.sum(arr);
|
|
|
- }
|
|
|
-
|
|
|
+ changeMoney(){
|
|
|
+ let arr = this.form.oaPurchaseObjs;
|
|
|
+ this.form.sunMoney = this.sum(arr);
|
|
|
},
|
|
|
//求和
|
|
|
sum(arr){
|