Commit 76b027b8 authored by 黄奎's avatar 黄奎

新增验证

parent 679a8028
......@@ -56,13 +56,12 @@
<td>
<!--买送-->
<template v-if="item.PriceDiscountType==1">
<q-input filled stack-label maxlength="2" :dense="false" v-model="item.BuyNum" ref="BuyNum"
<q-input filled stack-label maxlength="3" :dense="false" v-model="item.BuyNum" ref="BuyNum"
class="col-6 q-pr-lg q-pb-lg" label="买" @keyup.native="checkPrice(item,'BuyNum')"
:rules="[val => !!val || '买']" style="width:80px;display:inline-block;" suffix="" />
<q-input filled stack-label maxlength="2" :dense="false" v-model="item.SendNum" ref="SendNum"
style="width:80px;display:inline-block;" suffix="" />
<q-input filled stack-label maxlength="3" :dense="false" v-model="item.SendNum" ref="SendNum"
class="col-6 q-pr-lg q-pb-lg" label="送" @keyup.native="checkPrice(item,'SendNum')"
:rules="[val => !!val || '送']" style="width:80px;display:inline-block;" suffix="">
style="width:80px;display:inline-block;" suffix="">
</q-input>
</template>
<!--刷卡分期-->
......@@ -72,20 +71,18 @@
<template v-else>
<q-input filled stack-label maxlength="4" :dense="false" v-model="item.PriceMoney" ref="PriceMoney"
class="q-pr-lg q-pb-lg" label="优惠" @keyup.native="checkPrice(item,'PriceMoney')" style="width:100px"
:rules="[val => !!val || '优惠']" suffix="%" />
suffix="%" />
</template>
</td>
<td>
<q-input filled stack-label maxlength="4" :dense="false" v-model="item.B2BCommissionMoney"
ref="B2BCommissionMoney" class="q-pr-lg q-pb-lg" label="同行返佣"
@keyup.native="checkPrice(item,'B2BCommissionMoney')" :rules="[val => !!val || '同行返佣']"
style="width:100px" suffix="%" />
@keyup.native="checkPrice(item,'B2BCommissionMoney')" style="width:100px" suffix="%" />
</td>
<td>
<q-input filled stack-label maxlength="4" :dense="false" v-model="item.SaleCommissionMoney"
ref="SaleCommissionMoney" class="q-pr-lg q-pb-lg" label="销售返佣"
@keyup.native="checkPrice(item,'SaleCommissionMoney')" :rules="[val => !!val || '销售返佣']"
style="width:100px" suffix="%" />
@keyup.native="checkPrice(item,'SaleCommissionMoney')" style="width:100px" suffix="%" />
</td>
<td>
<q-btn flat size="xs" icon="iconfont icon-shanchu" title="删除" color="negative" style="font-weight:400"
......@@ -205,6 +202,25 @@
//保存菜单
saveCourse() {
this.saveCourseLoading = true;
if (this.priceObj.priceList && this.priceObj.priceList.length > 0) {
this.priceObj.priceList.forEach(item => {
if (item.BuyNum == '') {
item.BuyNum = 0;
}
if (item.SendNum == '') {
item.SendNum = 0;
}
if (item.PriceMoney == '') {
item.PriceMoney = 0;
}
if (item.B2BCommissionMoney == '') {
item.B2BCommissionMoney = 0;
}
if (item.SaleCommissionMoney == '') {
item.SaleCommissionMoney = 0;
}
})
}
saveCoursePreferential(this.priceObj).then(res => {
this.saveCourseLoading = false
this.$q.notify({
......
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