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

优惠设置支持0.0.1

parent ab31343d
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="fee-item" v-for="(item, index) in fee[1]" :key="index"> <div class="fee-item" v-for="(item, index) in fee[1]" :key="index">
<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" @blur="checkPositive(item, 'fullAmount')" style="width:100px" />
<!-- <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> -->
...@@ -69,14 +69,14 @@ ...@@ -69,14 +69,14 @@
<span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span>
<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" @blur="checkPositive(item, 'reduceAmount')" 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" /> <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">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" /> > <el-input v-model="item.startAmount" @blur="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" /> <el-input v-model="item.endAmount" @blur="checkPositive(item, 'endAmount')" style="width:100px" />
<!-- <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <!-- <selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
--> -->
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
{{$t('价格')}} {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" @blur="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6"> <template v-if="form.type == 6">
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<div class="fee-item" v-for="(item, index) in fee[2]" :key="index"> <div class="fee-item" v-for="(item, index) in fee[2]" :key="index">
<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" @blur="checkPositive(item, 'fullAmount')" style="width:100px" />
<!-- <selector v-if="[2,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="[2,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="[2,4,5].indexOf(form.type) > -1" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" /> <selector v-if="[2,4,5].indexOf(form.type) > -1" v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" 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" />
...@@ -118,20 +118,20 @@ ...@@ -118,20 +118,20 @@
<span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span> <span v-if="[5].indexOf(form.type) > -1">{{$t('')}}</span>
<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" @blur="checkPositive(item, 'reduceAmount')" v-model="item.reduceAmount" 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" /> <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">
> <el-input v-model="item.startAmount" @keyup.native="checkPositive(item, 'startAmount')" style="width:100px" /> > <el-input v-model="item.startAmount" @blur="checkPositive(item, 'startAmount')" style="width:100px" />
<el-input v-model="item.endAmount" @keyup.native="checkPositive(item, 'endAmount')" style="width:100px" /> <el-input v-model="item.endAmount" @blur="checkPositive(item, 'endAmount')" style="width:100px" />
<!-- <Selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> --> <!-- <Selector v-model="item.startAndEndCurrencyId" @input="checkReduceCurrency(item)" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> -->
<selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" /> <selector v-model="item.combUnit" @input="checkReduceCurrency(item)" :options="combUnitList" label-field="label" value-field="value" defaultable style="width:100px" />
{{$t('价格')}} {{$t('价格')}}
</template> </template>
<el-input v-if="[5,6,7].indexOf(form.type) > -1" @keyup.native="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" /> <el-input v-if="[5,6,7].indexOf(form.type) > -1" @blur="checkPositive(item, 'netReceiptsAmount')" v-model="item.netReceiptsAmount" style="width:100px" />
<selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" /> <selector v-if="[5,6,7].indexOf(form.type) > -1" v-model="item.netReceiptsCurrencyId" :disabled="!!item.reduceCurrencyDisabled" :options="currencyList" label-field="titleZh" value-field="id" defaultable style="width:100px" />
<template v-if="form.type == 6"> <template v-if="form.type == 6">
...@@ -617,6 +617,7 @@ export default { ...@@ -617,6 +617,7 @@ export default {
// 检查正数 // 检查正数
checkPositive(object, field){ checkPositive(object, field){
console.log('checkPositive', object, field)
const lastChar = object[field].split('').pop() const lastChar = object[field].split('').pop()
object[field] = parseFloat(object[field]) object[field] = parseFloat(object[field])
if(isNaN(object[field]) || object[field] < 0) object[field] = '' if(isNaN(object[field]) || object[field] < 0) object[field] = ''
......
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