|
@@ -239,6 +239,17 @@
|
|
|
></el-input>
|
|
|
<span v-else>{{ row.matMoney }}</span>
|
|
|
</template>
|
|
|
+ <template slot="otheramt" slot-scope="{ row }">
|
|
|
+ <el-input
|
|
|
+ v-if="row.$cellEdit"
|
|
|
+ v-model="row.otheramt"
|
|
|
+ placeholder="请输入"
|
|
|
+ size="small"
|
|
|
+ oninput='this.value=this.value.replace(/[^(\d.)]/g,"").replace(/^(\d+)\.(\d\d).*$/, "$1.$2")'
|
|
|
+ @input="costCount(row)"
|
|
|
+ ></el-input>
|
|
|
+ <span v-else>{{ row.otheramt }}</span>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
<containerTitle title="补充信息"></containerTitle>
|
|
@@ -959,9 +970,9 @@
|
|
|
// if(type==='代垫'){
|
|
|
// this.formTwo.matMoney = matMoneyList.reduce((n,m) => n + m)
|
|
|
// }
|
|
|
- if(row.serviceCharge && row.matMoney){
|
|
|
- if(row.amount < _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney))){
|
|
|
- this.$message.error("服务费代垫费不能超过合同金额!")
|
|
|
+ if(row.serviceCharge && row.matMoney && row.otheramt && row.amount){
|
|
|
+ if(row.amount < (parseFloat(row.serviceCharge) + parseFloat(row.matMoney) + parseFloat(row.otheramt))){
|
|
|
+ this.$message.error("费用之和不能超过合计金额!")
|
|
|
row.serviceCharge = 0;
|
|
|
row.matMoney = 0;
|
|
|
}
|
|
@@ -969,8 +980,8 @@
|
|
|
},
|
|
|
//费用计算计算
|
|
|
costCount(row){
|
|
|
- if(row.serviceCharge && row.matMoney){
|
|
|
- row.amount = _.add(parseFloat(row.serviceCharge),parseFloat(row.matMoney));
|
|
|
+ if(row.serviceCharge && row.matMoney && row.otheramt){
|
|
|
+ row.amount = parseFloat(row.serviceCharge) + parseFloat(row.matMoney) + parseFloat(row.otheramt)
|
|
|
}
|
|
|
},
|
|
|
//删除列表后面的删除按钮触发触发(row, index, done)
|