|
@@ -24,7 +24,9 @@
|
|
|
<div class="form-title">
|
|
<div class="form-title">
|
|
|
<span class="fl">价格梯度<span>(PCS)</span></span>
|
|
<span class="fl">价格梯度<span>(PCS)</span></span>
|
|
|
<span class="fr">
|
|
<span class="fr">
|
|
|
- <span v-text="sayPriceObj.currency" @click="showCurrencyList = !showCurrencyList"></span>
|
|
|
|
|
|
|
+ <span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
|
|
|
|
|
+ <!--<span v-if="!purchaseDetail.currency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
|
|
|
|
|
+ <!--<span v-if="purchaseDetail.currency" v-text="purchaseDetail.currency"></span>-->
|
|
|
<img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
|
|
<img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
|
|
|
<img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
|
|
<img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
|
|
|
<ul v-if="showCurrencyList">
|
|
<ul v-if="showCurrencyList">
|
|
@@ -71,6 +73,11 @@
|
|
|
components: {
|
|
components: {
|
|
|
RemindBox
|
|
RemindBox
|
|
|
},
|
|
},
|
|
|
|
|
+ mounted () {
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ document.addEventListener('click', this.checkCurrencySelect)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
filters: {
|
|
filters: {
|
|
|
date: function (date) {
|
|
date: function (date) {
|
|
|
if (date) {
|
|
if (date) {
|
|
@@ -94,6 +101,13 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ checkCurrencySelect: function () {
|
|
|
|
|
+ this.showCurrencyList = false
|
|
|
|
|
+ },
|
|
|
|
|
+ setShowCurrencyList: function (event) {
|
|
|
|
|
+ event.stopPropagation()
|
|
|
|
|
+ this.showCurrencyList = !this.showCurrencyList
|
|
|
|
|
+ },
|
|
|
setCurrency: function (type) {
|
|
setCurrency: function (type) {
|
|
|
this.sayPriceObj.currency = type
|
|
this.sayPriceObj.currency = type
|
|
|
this.showCurrencyList = false
|
|
this.showCurrencyList = false
|
|
@@ -112,15 +126,10 @@
|
|
|
},
|
|
},
|
|
|
setReplies: function (type, index) {
|
|
setReplies: function (type, index) {
|
|
|
if (type === 'add' && this.sayPriceObj.replies.length < 5) {
|
|
if (type === 'add' && this.sayPriceObj.replies.length < 5) {
|
|
|
- if (this.sayPriceObj.replies[index].lapQty && this.sayPriceObj.replies[index].price) {
|
|
|
|
|
- this.sayPriceObj.replies.splice(this.sayPriceObj.replies.length, 0, {
|
|
|
|
|
- lapQty: '',
|
|
|
|
|
- price: ''
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
-// this.$message.error('请填完整信息')
|
|
|
|
|
- this.onRemind('请填完整信息')
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.sayPriceObj.replies.splice(this.sayPriceObj.replies.length, 0, {
|
|
|
|
|
+ lapQty: '',
|
|
|
|
|
+ price: ''
|
|
|
|
|
+ })
|
|
|
} else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
|
|
} else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
|
|
|
this.sayPriceObj.replies.splice(index, 1)
|
|
this.sayPriceObj.replies.splice(index, 1)
|
|
|
}
|
|
}
|
|
@@ -154,18 +163,18 @@
|
|
|
// this.showLoading = false
|
|
// this.showLoading = false
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- this.onRemind('报价信息为空或梯度不合法')
|
|
|
|
|
|
|
+ this.onRemind('请输入正确的报价信息')
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
checkValid: function () {
|
|
checkValid: function () {
|
|
|
for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
|
|
for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
|
|
|
- if (!this.sayPriceObj.replies[i].lapQty || !this.sayPriceObj.replies[i].price) {
|
|
|
|
|
|
|
+ if (!this.sayPriceObj.replies[i].lapQty || this.sayPriceObj.replies[i].lapQty <= 0 || !this.sayPriceObj.replies[i].price || this.sayPriceObj.replies[i].price <= 0) {
|
|
|
return false
|
|
return false
|
|
|
} else if (i > 0 && ((this.sayPriceObj.replies[i].lapQty <= this.sayPriceObj.replies[i - 1].lapQty) || (this.sayPriceObj.replies[i].price <= this.sayPriceObj.replies[i - 1].price))) {
|
|
} else if (i > 0 && ((this.sayPriceObj.replies[i].lapQty <= this.sayPriceObj.replies[i - 1].lapQty) || (this.sayPriceObj.replies[i].price <= this.sayPriceObj.replies[i - 1].price))) {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- return this.sayPriceObj.leadtime
|
|
|
|
|
|
|
+ return this.sayPriceObj.leadtime && this.sayPriceObj.leadtime > 0
|
|
|
},
|
|
},
|
|
|
onRemind: function (str) {
|
|
onRemind: function (str) {
|
|
|
this.remindText = str
|
|
this.remindText = str
|