Authored by TaoHuang

add event

... ... @@ -6,7 +6,9 @@
:loading="postLoading"
class="modal"
:transfer="true"
@on-sure="onSure">
@on-sure="onSure"
@on-cancel="onCancel"
>
<div class="change-price-modal">
<p class="modal-title">{{leastPriceMsg}}</p>
<InputUfo type="number" placeholder="定价需以9结尾 例如1999" :maxlength="8" class="ipt-number" v-model="chgPrice">
... ... @@ -52,7 +54,7 @@ export default {
};
},
mounted() {
this.inputChange = debounce(this.onChange.bind(this), 200);
this.inputChange = debounce(this.onChange.bind(this), 500);
},
watch: {
chgPrice(newVal) {
... ... @@ -165,10 +167,20 @@ export default {
}).show();
} else {
this.$emit('on-change-price', {skc: this.skc, price: this.chgPrice});
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:changePrice:yes',
price: this.chgPrice
});
}
},
onInput(val) {
this.$emit('input', val);
},
onCancel() {
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:changePrice:no'
});
}
},
components: {Modal, InputUfo}
... ...
... ... @@ -71,11 +71,19 @@ export default {
this.$emit('on-no-sale', Object.assign({
isAdvance: this.value.isAdvance
}, this.value.goodsInfo));
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:nosell'
});
},
onChgPrice() {
this.$emit('on-change-price', Object.assign({
isAdvance: this.value.isAdvance
}, this.value.goodsInfo));
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:changePrice'
});
},
onTouchStart(evt) {
const {clientX, clientY} = evt.touches[0];
... ...
... ... @@ -135,7 +135,16 @@ export default {
},
onCancel: () => {
this.onNoSaleSure({skc, num: 1});
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:nosell:yes'
});
},
onConfirm: () => {
this.$root.reportApp('', 'BUSINESS_UFO_SELL_CHANGE', {
locfun: 'click:nosell:no'
});
}
}).show();
} else {
this.$refs.modalUnstock.show({skc});
... ...