|
|
@@ -8,6 +8,7 @@
|
|
|
<view class="kc">库存{{ info.stock }}</view>
|
|
|
<view class="num-open_bx">
|
|
|
<view class="price">¥{{ info.price }}</view>
|
|
|
+<!-- <view class="price" style="text-decoration:line-through;">{{ info.price }}</view>-->
|
|
|
<view class="open-bx" v-if="type == COMMODITY_TYPE.COMMON">
|
|
|
<i
|
|
|
class="iconfont iconjian"
|
|
|
@@ -22,6 +23,7 @@
|
|
|
<i class="iconfont iconzeng" @click="addEvent"></i>
|
|
|
</view>
|
|
|
<view class="open-bx" v-else-if="type == COMMODITY_TYPE.CHANGE">
|
|
|
+ <view class="change-input" v-if="info.priceLabel==2&&isShowAutoPrice" @click="isShowAutoPrice=false">{{info.price}}</view>
|
|
|
<!-- <input v-if="info.priceLabel==2"-->
|
|
|
<!-- class="change-input"-->
|
|
|
<!-- :value="info.price"-->
|
|
|
@@ -30,13 +32,7 @@
|
|
|
<!-- @focus="changeAutoPrice=''"-->
|
|
|
<!-- @change="changeAutoPriceEvent"-->
|
|
|
<!-- />-->
|
|
|
- <input
|
|
|
- class="change-input"
|
|
|
- v-model="changeAutoPrice"
|
|
|
- type="digit"
|
|
|
- placeholder="自动调价"
|
|
|
- @focus="changeAutoPrice=''"
|
|
|
- />
|
|
|
+ <input v-show="!isShowAutoPrice||info.priceLabel!=2" :focus="!isShowAutoPrice" class="change-input" v-model="changeAutoPrice" type="digit" placeholder="自动调价" @focus="changeAutoPrice=''"/>
|
|
|
<!--@change="changePriceEvent"-->
|
|
|
<i :class="isShowSucceed?'position iconfont iconjihuo':'position'" ></i>
|
|
|
<view class="btn-box" v-if="changeAutoPrice==''" @click="removeEvent">确定</view>
|
|
|
@@ -85,6 +81,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
COMMODITY_TYPE,
|
|
|
+ isShowAutoPrice:true,
|
|
|
isShowSucceed:false,
|
|
|
changeAutoPrice:'',
|
|
|
};
|
|
|
@@ -137,10 +134,11 @@ export default {
|
|
|
productId: this.info.id,
|
|
|
price: this.changeAutoPrice
|
|
|
})
|
|
|
+ this.isShowAutoPrice = true;
|
|
|
this.isShowSucceed = true;
|
|
|
setTimeout(()=>{
|
|
|
this.isShowSucceed = false
|
|
|
- this.changeAutoPrice = '';
|
|
|
+ // this.changeAutoPrice = '';
|
|
|
// this.autoPrice = '';
|
|
|
},2000)
|
|
|
this.$emit("changePrice", this.info, this.changeAutoPrice);
|