Commit e627a0cf by damodmg

序号校验

parent 0c132b8c
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.ab0f9277d1addaaf9eb8506e5d1115e1.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.27cd306e481cef3c3da3.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.a74591da17b80319dd902eeefd805c8a.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.971c812a87cea35e1b88.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -92,7 +92,7 @@
<template slot-scope="scope">
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)"></i></p>
<div v-if="scope.row.editStatus">
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" type="number" style="width:60px"></el-input>
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" @blur="value => limitSort(value, scope.row)" style="width:60px"></el-input>
<span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
<span class="operate-span" @click="editNumCancel(scope.row)">取消</span>
</div>
......@@ -398,6 +398,16 @@ export default {
item.editStatus = true;
this.refash = !this.refash;
},
limitSort(value, item) {
var reg = /^([1-9]\d*|[0]{1,1})$/; //含0正整数
if (!reg.test(value)) {
this.$message.error('序号要大于0');
this.$nextTick(() => {
item.sort = 0;
});
return false;
}
},
// 确定编辑序号
editNumSubmit(item) {
let params = {
......
......@@ -87,11 +87,11 @@
<p>{{ getSeconds(scope.row.createTime) }}</p>
</template>
</el-table-column>
<el-table-column prop="sort" label="排序" sortable="custom" min-width="140px" :render-header="renderHeader">
<el-table-column prop="sort" label="序号" sortable="custom" min-width="140px" :render-header="renderHeader">
<template slot-scope="scope">
<p v-if="!scope.row.editStatus" class="edit-number intergral-edit">{{ scope.row.sort }}<i class="el-icon-edit" @click="editNumber(scope.row)"></i></p>
<div v-if="scope.row.editStatus">
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" type="number" style="width:60px"></el-input>
<el-input v-if="scope.row.editStatus" v-model="scope.row.sort" placeholder="" size="mini" class="w-180" @blur="value => limitSort(value, scope.row)" style="width:60px"></el-input>
<span class="operate-span" @click="editNumSubmit(scope.row)">确定</span>
<span class="operate-span" @click="editNumCancel(scope.row)">取消</span>
</div>
......@@ -488,6 +488,16 @@ export default {
item.editStatus = true;
this.refash = !this.refash;
},
limitSort(value, item) {
var reg = /^([1-9]\d*|[0]{1,1})$/; //含0正整数
if (!reg.test(value)) {
this.$message.error('序号要大于0');
this.$nextTick(() => {
item.sort = 0;
});
return false;
}
},
// 确定编辑序号
editNumSubmit(item) {
let params = {
......
......@@ -99,14 +99,6 @@
<memberInfo :memberObj="scope.row" :requestProject="requestProject" :placement="placement"></memberInfo>
</template>
</el-table-column>
<el-table-column prop="refundStatus" label="售后">
<template slot-scope="scope">
<p style="line-height:18px" v-if="scope.row.refundStatus === 0">退款中</p>
<p style="line-height:18px" v-else-if="scope.row.refundStatus === 1">退款成功</p>
<p style="line-height:18px" v-else-if="scope.row.refundStatus === 2">退款关闭</p>
<p style="line-height:18px" v-else-if="scope.row.refundStatus === -1">--</p>
</template>
</el-table-column>
<el-table-column prop="complete" label="交易状态" width="170px">
<template slot-scope="scope">
<p style="line-height:18px">
......
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