|
@@ -41,8 +41,8 @@ |
|
|
<view class="welBox" id="StuInfoFreshEmergePeople" v-show="FundsApplyDetail.length != 0"> |
|
|
<view class="welBox" id="StuInfoFreshEmergePeople" v-show="FundsApplyDetail.length != 0"> |
|
|
<view class="welCon" v-for="(item, i) in FundsApplyDetail" :key='i'> |
|
|
<view class="welCon" v-for="(item, i) in FundsApplyDetail" :key='i'> |
|
|
<l-input v-model="item.ProjectContent" title="项目内容" placeholder="请填写" right :disabled="!edit" /> |
|
|
<l-input v-model="item.ProjectContent" title="项目内容" placeholder="请填写" right :disabled="!edit" /> |
|
|
<l-input v-model="item.Number" type="number" @change="SumAmountChange(item)" title="数量" :disabled="!edit" placeholder="请填写" right /> |
|
|
|
|
|
<l-input v-model="item.Price" type="number" @change="SumAmountChange(item)" title="单价(元)" :disabled="!edit" placeholder="请填写" right /> |
|
|
|
|
|
|
|
|
<l-input v-model="item.Number" type="number" @change="SumAmountChange(item,'Number')" title="数量" :disabled="!edit" placeholder="请填写" right /> |
|
|
|
|
|
<l-input v-model="item.Price" type="number" @blur="blurChange(item)" title="单价(元)" :disabled="!edit" placeholder="请填写" right /> |
|
|
<l-input v-model="item.Amount" title="金额(元)" disabled placeholder="请填写" right /> |
|
|
<l-input v-model="item.Amount" title="金额(元)" disabled placeholder="请填写" right /> |
|
|
<view v-if="edit||create" class="welDel" @click="del('FundsApplyDetails', i)"><text |
|
|
<view v-if="edit||create" class="welDel" @click="del('FundsApplyDetails', i)"><text |
|
|
class="text-xxl cuIcon cuIcon-move"></text></view> |
|
|
class="text-xxl cuIcon cuIcon-move"></text></view> |
|
@@ -388,19 +388,32 @@ |
|
|
_this.current.FundsApply.SumAmount = _this.sum(Amounts) |
|
|
_this.current.FundsApply.SumAmount = _this.sum(Amounts) |
|
|
_this.current.FundsApply.UpperAmount = _this.smalltoBIG(_this.current.FundsApply.SumAmount) |
|
|
_this.current.FundsApply.UpperAmount = _this.smalltoBIG(_this.current.FundsApply.SumAmount) |
|
|
}, |
|
|
}, |
|
|
|
|
|
blurChange(item){ |
|
|
|
|
|
console.log(item) |
|
|
|
|
|
let _this = this |
|
|
|
|
|
item.Price = Number(item.Price).toFixed(2) |
|
|
|
|
|
if (item.Number && item.Price) { |
|
|
|
|
|
item.Amount = (item.Number * item.Price).toFixed(2) |
|
|
|
|
|
// _this.current.SumAmount = item.Number * item.Price |
|
|
|
|
|
let Amounts = _this.FundsApplyDetail.map(item => { |
|
|
|
|
|
return Number(item.Amount).toFixed(2) |
|
|
|
|
|
}) |
|
|
|
|
|
_this.current.FundsApply.SumAmount = Number(_this.sum(Amounts)).toFixed(2) |
|
|
|
|
|
_this.current.FundsApply.UpperAmount = _this.smalltoBIG(_this.current.FundsApply.SumAmount) |
|
|
|
|
|
// console.log(_this.smalltoBIG(_this.current.FundsApply.SumAmount)) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
SumAmountChange(item) { |
|
|
SumAmountChange(item) { |
|
|
console.log(item) |
|
|
console.log(item) |
|
|
let _this = this |
|
|
let _this = this |
|
|
if (item.Number && item.Price) { |
|
|
if (item.Number && item.Price) { |
|
|
|
|
|
|
|
|
item.Amount = (item.Number * item.Price).toFixed(2) |
|
|
item.Amount = (item.Number * item.Price).toFixed(2) |
|
|
|
|
|
|
|
|
// _this.current.SumAmount = item.Number * item.Price |
|
|
// _this.current.SumAmount = item.Number * item.Price |
|
|
|
|
|
|
|
|
let Amounts = _this.FundsApplyDetail.map(item => { |
|
|
let Amounts = _this.FundsApplyDetail.map(item => { |
|
|
return item.Amount |
|
|
return item.Amount |
|
|
}) |
|
|
}) |
|
|
|
|
|
|
|
|
_this.current.FundsApply.SumAmount = _this.sum(Amounts) |
|
|
|
|
|
|
|
|
_this.current.FundsApply.SumAmount = Number(_this.sum(Amounts)).toFixed(2) |
|
|
_this.current.FundsApply.UpperAmount = _this.smalltoBIG(_this.current.FundsApply.SumAmount) |
|
|
_this.current.FundsApply.UpperAmount = _this.smalltoBIG(_this.current.FundsApply.SumAmount) |
|
|
// console.log(_this.smalltoBIG(_this.current.FundsApply.SumAmount)) |
|
|
// console.log(_this.smalltoBIG(_this.current.FundsApply.SumAmount)) |
|
|
} |
|
|
} |
|
|