|
|
@@ -22,21 +22,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="level-price">散客 ¥<text style="margin-right:55upx;">{{skPrice}}</text>银店 ¥<text style="margin-right:55upx;">{{ydPrice}}</text>金店 ¥<text>{{jdPrice}}</text></view>
|
|
|
+ <view class="level-price">
|
|
|
+ 散客 ¥<text style="margin-right:35upx;">{{skPrice}}</text>
|
|
|
+ 普店 ¥<text style="margin-right:35upx;">{{pdPrice}}</text>
|
|
|
+ 银店 ¥<text style="margin-right:35upx;">{{ydPrice}}</text>
|
|
|
+ 金店 ¥<text style="margin-right:8upx;">{{jdPrice}}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
-import { STOCK_TYPE } from "@/utils/declare";
|
|
|
export default {
|
|
|
name: "Commodity",
|
|
|
components: {
|
|
|
},
|
|
|
props: {
|
|
|
- type: {
|
|
|
- type: String,
|
|
|
- default: STOCK_TYPE.WARN
|
|
|
- },
|
|
|
isPrice: {
|
|
|
type: Boolean,
|
|
|
default: true
|
|
|
@@ -51,7 +50,6 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- STOCK_TYPE,
|
|
|
modifyPrice:'',
|
|
|
skPrice:0,
|
|
|
pdPrice:0,
|
|
|
@@ -61,12 +59,8 @@ export default {
|
|
|
},
|
|
|
watch: {
|
|
|
modifyPrice: {
|
|
|
- handler(newPwd, oldPwd) {
|
|
|
- console.log(oldPwd)
|
|
|
- console.log(newPwd)
|
|
|
- if(newPwd > 0){
|
|
|
- this.changeLevelPrice(newPwd)
|
|
|
- }
|
|
|
+ handler(newValue) {
|
|
|
+ this.changeLevelPrice(newValue)
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -81,6 +75,9 @@ export default {
|
|
|
this.$emit("savePrice",this.modifyPrice,this.info.id);
|
|
|
},
|
|
|
changeLevelPrice(pdPrice){
|
|
|
+ if(Number(pdPrice) <= 0 ||this.$util.isEmpty(pdPrice)){
|
|
|
+ pdPrice = this.info.price
|
|
|
+ }
|
|
|
this.pdPrice = parseFloat(pdPrice)
|
|
|
let skSub = (this.info.addPrice - this.info.skAddPrice).toFixed(2)
|
|
|
let ydSub = (this.info.addPrice - this.info.hjAddPrice).toFixed(2)
|
|
|
@@ -99,6 +96,7 @@ export default {
|
|
|
.level-price{
|
|
|
color:#999999;
|
|
|
text-align: right;
|
|
|
+ font-size:22upx;
|
|
|
}
|
|
|
}
|
|
|
.sold-out{
|