Commit 34d0e94b by 李长胜

限制金钱额度

1 parent 3acb3ee0
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<div class="cardDetail editForm" v-else> <div class="cardDetail editForm" v-else>
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width:500px"> <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" class="demo-ruleForm" style="width:500px">
<el-form-item label="会员卡名" prop="cardName" size="small"> <el-form-item label="会员卡名" prop="cardName" size="small">
<el-input v-model="ruleForm.cardName" size="small" placeholder="请输入会员卡名" maxlength="10"></el-input> <el-input v-model="ruleForm.cardName" size="small" placeholder="请输入会员卡名" maxlength="15"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="售价" size="small" prop="price" style="width:300px"> <el-form-item label="售价" size="small" prop="price" style="width:300px">
<el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)"> <el-input v-model="ruleForm.price" size="small" placeholder="请输入合理价格" @keyup.native="ruleForm.price = oninput(ruleForm.price)">
...@@ -261,7 +261,9 @@ export default { ...@@ -261,7 +261,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(Number(value)>=99999){
return str=99999
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
</el-form> </el-form>
</div> </div>
<GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberOrderRef" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<!-- <span slot="shareImgUrl" slot-scope="scope">
<img class="img-60" :src="scope.scope.shareImgUrl" />
</span> -->
<span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope"> <span class="table-btns" slot="auth-button" slot-scope="scope" :data="scope.scope">
<el-button type="text" @click="handleDetail(scope.scope)">详情</el-button> <el-button type="text" @click="handleDetail(scope.scope)">详情</el-button>
</span> </span>
......
...@@ -379,7 +379,9 @@ export default { ...@@ -379,7 +379,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(Number(value)>=99999){
return str=99999
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
......
...@@ -339,7 +339,9 @@ export default { ...@@ -339,7 +339,9 @@ export default {
if (len1 == '-') { if (len1 == '-') {
str = '' str = ''
} //限制只能输入一个小数点 } //限制只能输入一个小数点
if(Number(value)>=99999){
return str=99999
}
if (str.indexOf('.') != -1) { if (str.indexOf('.') != -1) {
let str_ = str.substr(str.indexOf('.') + 1) let str_ = str.substr(str.indexOf('.') + 1)
if (str_.indexOf('.') != -1) { if (str_.indexOf('.') != -1) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!