|
|
@@ -47,7 +47,7 @@
|
|
|
<input v-model="form.hjPrice" style="width:130upx;border:1upx solid #CCCCCC;text-align:center;height:50upx;" placeholder-class="phcolor"
|
|
|
class="tui-input" name="hjPrice" @focus="form.hjPrice=''" placeholder="大客价" type="digit" />
|
|
|
<input v-model="form.price" style="width:130upx;border:1upx solid #3385FF;text-align:center;height:50upx;color:#3385FF;margin-left:30upx;" placeholder-class="phcolor"
|
|
|
- class="tui-input" name="price" @focus="form.price=''" placeholder="批发价" type="digit" @input="priceLinkage()" />
|
|
|
+ class="tui-input" name="price" @focus="form.price=''" placeholder="批发价" type="digit" />
|
|
|
<input v-model="form.skPrice" style="width:130upx;border:1upx solid #CCCCCC;text-align:center;height:50upx;margin-left:30upx;" placeholder-class="phcolor"
|
|
|
class="tui-input" name="skPrice" @focus="form.skPrice=''" placeholder="零售价" type="digit" />
|
|
|
</block>
|
|
|
@@ -62,7 +62,7 @@
|
|
|
<block v-else>
|
|
|
<input v-model="form.hjDiscountPrice" style="width:130upx;border:1upx solid #CCCCCC;text-align:center;height:50upx;" placeholder-class="phcolor"
|
|
|
class="tui-input" name="hjDiscountPrice" @focus="form.hjDiscountPrice=''" placeholder="会员特价" type="digit" />
|
|
|
- <input v-model="form.discountPrice" style="width:130upx;border:1upx solid #3385FF;margin-left:30upx;color:#3385FF;text-align:center;height:50upx;" placeholder-class="phcolor" @input="tjLinkage()"
|
|
|
+ <input v-model="form.discountPrice" style="width:130upx;border:1upx solid #3385FF;margin-left:30upx;color:#3385FF;text-align:center;height:50upx;" placeholder-class="phcolor"
|
|
|
class="tui-input" name="discountPrice" @focus="form.discountPrice=''" placeholder="无特价填0" maxlength="50" type="digit" />
|
|
|
<input v-model="form.skDiscountPrice" style="width:130upx;border:1upx solid #CCCCCC;text-align:center;height:50upx;margin-left:30upx;" placeholder-class="phcolor"
|
|
|
class="tui-input" name="skDiscountPrice" @focus="form.skDiscountPrice=''" placeholder="零售特价" type="digit" />
|
|
|
@@ -887,73 +887,6 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- tjLinkage(){
|
|
|
- if(this.form.discountPrice && Number(this.form.discountPrice)>0){
|
|
|
- let skMore = this.form.skMore ? Number(this.form.skMore) : 0
|
|
|
- let hjAddPrice = this.form.hjAddPrice ? Number(this.form.hjAddPrice) : 0
|
|
|
- let addPrice = this.form.addPrice ? Number(this.form.addPrice) : 0
|
|
|
-
|
|
|
- let skAddNum = Number(skMore) - Number(addPrice)
|
|
|
- skAddNum = skAddNum.toFixed(2)
|
|
|
- let skAmount = Number(skAddNum) + Number(this.form.discountPrice)
|
|
|
- if(skAmount>0){
|
|
|
- skAmount = skAmount.toFixed(2)
|
|
|
- skAmount = parseFloat(skAmount)
|
|
|
- this.form.skDiscountPrice = skAmount
|
|
|
- }else{
|
|
|
- this.form.skDiscountPrice = 0.01
|
|
|
- }
|
|
|
-
|
|
|
- let hjSubNum = Number(addPrice) - Number(hjAddPrice)
|
|
|
- hjSubNum = hjSubNum.toFixed(2)
|
|
|
- let hjAmount = Number(this.form.discountPrice) - Number(hjSubNum)
|
|
|
- if(hjAmount > 0){
|
|
|
- hjAmount = hjAmount.toFixed(2)
|
|
|
- hjAmount = parseFloat(hjAmount)
|
|
|
- this.form.hjDiscountPrice = hjAmount
|
|
|
- }else{
|
|
|
- this.form.hjDiscountPrice = 0.01
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.form.skDiscountPrice = 0
|
|
|
- this.form.hjDiscountPrice = 0
|
|
|
- }
|
|
|
- },
|
|
|
- priceLinkage(){
|
|
|
- if(this.form.price && Number(this.form.price)>0){
|
|
|
- let skMore = this.form.skMore ? Number(this.form.skMore) : 0
|
|
|
- let hjAddPrice = this.form.hjAddPrice ? Number(this.form.hjAddPrice) : 0
|
|
|
- let addPrice = this.form.addPrice ? Number(this.form.addPrice) : 0
|
|
|
-
|
|
|
- let skAddNum = Number(skMore) - Number(addPrice)
|
|
|
- skAddNum = skAddNum.toFixed(2)
|
|
|
- let skAmount = Number(skAddNum) + Number(this.form.price)
|
|
|
- if(skAmount>0){
|
|
|
- skAmount = skAmount.toFixed(2)
|
|
|
- skAmount = parseFloat(skAmount)
|
|
|
- this.form.skPrice = skAmount
|
|
|
- }else{
|
|
|
- this.form.skPrice = ''
|
|
|
- }
|
|
|
-
|
|
|
- let hjSubNum = Number(addPrice) - Number(hjAddPrice)
|
|
|
- hjSubNum = hjSubNum.toFixed(2)
|
|
|
- let hjAmount = Number(this.form.price) - Number(hjSubNum)
|
|
|
- if(hjAmount > 0){
|
|
|
- hjAmount = hjAmount.toFixed(2)
|
|
|
- hjAmount = parseFloat(hjAmount)
|
|
|
- this.form.hjPrice = hjAmount
|
|
|
- }else{
|
|
|
- this.form.hjPrice = ''
|
|
|
- }
|
|
|
- }else{
|
|
|
- this.form.skPrice = ''
|
|
|
- this.form.hjPrice = ''
|
|
|
- this.form.discountPrice = 0
|
|
|
- this.form.skDiscountPrice = 0
|
|
|
- this.form.hjDiscountPrice = 0
|
|
|
- }
|
|
|
- },
|
|
|
blur() {
|
|
|
this.printFocus = false
|
|
|
},
|