|
@@ -20,7 +20,7 @@
|
|
|
<text class="name" @click="pageTo({url:'/admin/item/detail?id='+ res.productId})">{{res.name}}</text>
|
|
<text class="name" @click="pageTo({url:'/admin/item/detail?id='+ res.productId})">{{res.name}}</text>
|
|
|
<text class="cg-cost">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
|
|
<text class="cg-cost">¥{{res.bigPrice?parseFloat(res.bigPrice):0}}</text>
|
|
|
<text class="cost-price">¥{{res.cost?parseFloat(res.cost):0}}</text>
|
|
<text class="cost-price">¥{{res.cost?parseFloat(res.cost):0}}</text>
|
|
|
- <input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" placeholder="花店价" />
|
|
|
|
|
|
|
+ <input type="digit" v-model="res.suggestPrice" @focus="clearPrice(i)" @input="linkChange(i)" placeholder="花店价" />
|
|
|
<input type="digit" v-model="res.suggestSkPrice" @focus="clearSkPrice(i)" placeholder="个人价" />
|
|
<input type="digit" v-model="res.suggestSkPrice" @focus="clearSkPrice(i)" placeholder="个人价" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -53,6 +53,14 @@ export default {
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ linkChange(i){
|
|
|
|
|
+ if(this.flowersList[i].suggestPrice && Number(this.flowersList[i].suggestPrice)>0){
|
|
|
|
|
+ let skMore = this.flowersList[i].skMore ? Number(this.flowersList[i].skMore) : 0
|
|
|
|
|
+ let num = Number(this.flowersList[i].suggestPrice) + skMore
|
|
|
|
|
+ num = parseFloat(num)
|
|
|
|
|
+ this.flowersList[i].suggestSkPrice = num
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
clearPrice(i){
|
|
clearPrice(i){
|
|
|
this.flowersList[i].suggestPrice =''
|
|
this.flowersList[i].suggestPrice =''
|
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|