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

优惠编辑页面二选一的提示

parent a71fe96f
...@@ -61,8 +61,8 @@ ...@@ -61,8 +61,8 @@
<!-- <el-select v-model="item.fullCurrencyId" style="width:100px" > <!-- <el-select v-model="item.fullCurrencyId" style="width:100px" >
<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" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[4].indexOf(form.type) > -1" v-model="item.fullCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" 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" /> <selector v-if="form.type == 2 || form.type == 5" 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>
...@@ -95,6 +95,8 @@ ...@@ -95,6 +95,8 @@
<el-button v-if="fee[1].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[1].splice(index,1)" /> <el-button v-if="fee[1].length > 1" class="el-icon-minus" size="mini" type="danger" @click="fee[1].splice(index,1)" />
</template> </template>
<!-- <div class="red-tips" v-if="errTips[1] && errTips[1][index]">{{errTips[1][index]}}</div> --> <!-- <div class="red-tips" v-if="errTips[1] && errTips[1][index]">{{errTips[1][index]}}</div> -->
<span style="color:red; margin-left: 10px;" v-if="index == 0 && (form.type == 2 || form.type == 4)">注意:运费/清关费 方案二选一</span>
</div> </div>
</el-form-item> </el-form-item>
...@@ -370,8 +372,8 @@ export default { ...@@ -370,8 +372,8 @@ export default {
}, },
watch:{ watch:{
'form.type'(val){ 'form.type'(val){
// 方数满减3和特价6需要单位 // 方数满减3和特价6、优惠5 需要单位
if((val == 3 || val == 6 || val == 2) && !this.unitList.length){ if((val == 3 || val == 6 || val == 2 || val == 5) && !this.unitList.length){
this.getUnitList() this.getUnitList()
} }
...@@ -620,8 +622,8 @@ export default { ...@@ -620,8 +622,8 @@ export default {
this.errTips = {} this.errTips = {}
let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount) let discountDetailedVOs = this.costType == 3 ? this.fee[3] : this.fee[1].concat(this.fee[2]).filter(item => item.netReceiptsAmount || item.fullAmount)
discountDetailedVOs.map(item => { discountDetailedVOs.map(item => {
// 目前只有满减使用组合单位 // 目前只有满减(1)和优惠(5)使用组合单位
if(this.form.type == 2 && item.combUnit){ if((this.form.type == 2 || this.form.type == 5) && item.combUnit){
// 满减需要 先删除单位,防止编辑的时候切换单位导致两个同时存在 // 满减需要 先删除单位,防止编辑的时候切换单位导致两个同时存在
delete item.fullCurrencyId delete item.fullCurrencyId
delete item.prodUnit delete item.prodUnit
......
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