Commit c92c8d02 authored by dragondean@qq.com's avatar dragondean@qq.com

优惠券金额满减不让修改减货币

parent d1e819d0
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" /> <el-option v-for="item in currencyList" :key="item.id" :label="item.titleZh" :value="item.id" />
</el-select> --> </el-select> -->
<selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 2" v-model="item.combUnit" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" /> <selector v-if="form.type == 2" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
<span v-if="[4].indexOf(form.type) > -1">{{$t('折扣率')}}</span> <span v-if="[4].indexOf(form.type) > -1">{{$t('折扣率')}}</span>
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
<el-input v-if="[2,3,4].indexOf(form.type) > -1" v-model="item.reduceAmount" @keyup.native="checkPositive(item, 'reduceAmount')" style="width:100px" /> <el-input v-if="[2,3,4].indexOf(form.type) > -1" v-model="item.reduceAmount" @keyup.native="checkPositive(item, 'reduceAmount')" style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span> <span v-if="[4].indexOf(form.type) > -1">%</span>
</template> </template>
<template v-if="form.type==7"> <template v-if="form.type==7">
...@@ -100,7 +100,7 @@ ...@@ -100,7 +100,7 @@
<template v-if="[1,2,3,4,5].indexOf(form.type) > -1"> <template v-if="[1,2,3,4,5].indexOf(form.type) > -1">
{{$t('')}} {{$t('')}}
<el-input v-model="item.fullAmount" @keyup.native="checkPositive(item, 'fullAmount')" style="width:100px" /> <el-input v-model="item.fullAmount" @keyup.native="checkPositive(item, 'fullAmount')" style="width:100px" />
<selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="syncClearanceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="form.type == 3" v-model="item.prodUnit" :options="unitList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[2].indexOf(form.type) > -1">{{$t('')}}</span>
...@@ -110,7 +110,7 @@ ...@@ -110,7 +110,7 @@
<el-input v-if="[2,3,4].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'reduceAmount')" v-model="item.reduceAmount" style="width:100px" /> <el-input v-if="[2,3,4].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'reduceAmount')" v-model="item.reduceAmount" style="width:100px" />
<selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[2,3].indexOf(form.type) > -1" v-model="item.reduceCurrencyId" :disabled="form.type==2" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<span v-if="[4].indexOf(form.type) > -1">%</span> <span v-if="[4].indexOf(form.type) > -1">%</span>
</template> </template>
<template v-if="form.type==7"> <template v-if="form.type==7">
...@@ -468,6 +468,24 @@ export default { ...@@ -468,6 +468,24 @@ export default {
this.reset() this.reset()
}, },
methods: { methods: {
// 满减清关费修改满的货币后需要同步减的货币
syncClearanceCurrency(item){
if(this.form.type != 2) return
item.reduceCurrencyId = item.fullCurrencyId
},
// 满减活动如果选择的满多少金额减,则在选择满货币后需要同步减的货币,且禁用减的货币修改
checkReduceCurrency(item){
if(this.form.type == 2 && item.combUnit.split('_')[0] == 'fullCurrencyId'){
this.$set(item, 'reduceCurrencyDisabled', true)
this.$set(item, 'reduceCurrencyId', +item.combUnit.split('_')[1])
return
}
if(item.reduceCurrencyDisabled){
this.$set(item, 'reduceCurrencyDisabled', false)
}
},
getCouponSelect(){ getCouponSelect(){
getCouponSelect().then(res => { getCouponSelect().then(res => {
this.couponList = res.data this.couponList = res.data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment