|
|
@ -166,7 +166,7 @@ |
|
|
|
<u-swipe-action v-for="(v,k) in formData.inputList" :key="k"> |
|
|
|
<u-swipe-action-item> |
|
|
|
<view> |
|
|
|
<text>{{v.goodsType}}</text> <text>{{v.substanceName}}</text> <text>{{v.total}}</text> |
|
|
|
<text>{{v.goodsType}}</text> <text>{{v.substanceName}}</text> <text>{{v.inputQuantity*parseFloat(v.specs[0])}}{{v.specs[1]}}</text> |
|
|
|
</view> |
|
|
|
<view slot="button" class="u-swipe-action-item__right__button"> |
|
|
|
<button class="cu-btn bg-red" style="margin:auto;" @click="formData.inputList.splice(k,1)">删除</button> |
|
|
@ -282,7 +282,16 @@ export default { |
|
|
|
uni.navigateTo({ |
|
|
|
url:"/pages/massif/collectList", |
|
|
|
events:{ addSpecs: e=>{ |
|
|
|
this.formData.inputList.push(e) |
|
|
|
if(!this.formData.inputList.some(v=>{ |
|
|
|
if(v.inventoryId==e.inventoryId){ |
|
|
|
v.inputQuantity=Math.round((v.inputQuantity+e.inputQuantity)*100)/100 |
|
|
|
return true |
|
|
|
}else{ |
|
|
|
return false |
|
|
|
} |
|
|
|
})){ |
|
|
|
this.formData.inputList.push(e) |
|
|
|
} |
|
|
|
} } |
|
|
|
}) |
|
|
|
}, |
|
|
|