更新:增加充值商品类型
This commit is contained in:
@@ -25,7 +25,7 @@ module.exports = {
|
||||
|
||||
// Various Dev Server settings
|
||||
host: 'localhost', // can be overwritten by process.env.HOST
|
||||
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
port: 8002, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
|
||||
autoOpenBrowser: true,
|
||||
errorOverlay: true,
|
||||
notifyOnErrors: true,
|
||||
|
||||
Binary file not shown.
75
src/views/modules/migration/migrationList.vue
Normal file
75
src/views/modules/migration/migrationList.vue
Normal file
@@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :inline="true">
|
||||
<el-form-item label="登录账号">
|
||||
<el-input v-model="migrationObj.bookName" placeholder="手机号/邮箱" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="date" label="日期">
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="姓名">
|
||||
</el-table-column>
|
||||
<el-table-column fixed="right" label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleClick()" type="text" size="small">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="tableData.length"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<el-dialog title="详细信息" :visible.sync="migrationState">
|
||||
<el-descriptions border>
|
||||
<el-descriptions-item label="用户名">kooriookami</el-descriptions-item>
|
||||
<el-descriptions-item label="手机号">18100000000</el-descriptions-item>
|
||||
<el-descriptions-item label="居住地">苏州市</el-descriptions-item>
|
||||
<el-descriptions-item label="联系地址">江苏省苏州市吴中区吴中大道 1188 号</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
||||
<el-button type="primary" @click="migrationState = false">取消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎'
|
||||
}],
|
||||
migrationObj: {
|
||||
bookName: ''
|
||||
},
|
||||
pageSize: 10,
|
||||
pageIndex: 1,
|
||||
migrationState: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick() {
|
||||
this.migrationState = true
|
||||
},
|
||||
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.pageSize = val;
|
||||
this.pageIndex = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.pageIndex = val;
|
||||
this.getDataList();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -42,6 +42,12 @@
|
||||
align="center"
|
||||
label="充值 支付 赠送优惠券.....">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="productName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="商品名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="changeAmount"
|
||||
header-align="center"
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
>新增</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
<el-radio-group v-model="radio" style="margin-bottom: 20px;" @change="selectMethod">
|
||||
<el-radio label="IOS">IOS商品</el-radio>
|
||||
<el-radio label="Google">Google商品</el-radio>
|
||||
</el-radio-group>
|
||||
<el-table
|
||||
height="70vh"
|
||||
:data="dataList"
|
||||
@@ -139,6 +142,7 @@ import AddOrUpdate from "./views/add.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
radio: 'Google',
|
||||
dataForm: {
|
||||
key: "",
|
||||
qudao: "Android"
|
||||
@@ -202,6 +206,11 @@ export default {
|
||||
// this.bookIds = e.bookIds
|
||||
// })
|
||||
},
|
||||
selectMethod() {
|
||||
console.log(this.radio);
|
||||
this.getDataList()
|
||||
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true;
|
||||
@@ -215,8 +224,8 @@ export default {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
type: "point",
|
||||
|
||||
qudao: this.dataForm.qudao
|
||||
//qudao: "Google"
|
||||
qudao: this.radio
|
||||
},
|
||||
header: {
|
||||
//默认 无 说明:请求头
|
||||
|
||||
@@ -37,6 +37,10 @@
|
||||
<el-radio v-model="dataForm.effective" :label="0">长期有效</el-radio>
|
||||
<el-radio v-model="dataForm.effective" :label="1">短期有效</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品类型">
|
||||
<el-radio v-model="dataForm.qudao" label="IOS">IOS商品</el-radio>
|
||||
<el-radio v-model="dataForm.qudao" label="Google">Google商品</el-radio>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
label="开始时间"
|
||||
@@ -113,7 +117,7 @@ export default {
|
||||
realMoney: 0, // 优惠金额
|
||||
effective: 0, // 优惠金额
|
||||
type: "point", // 充值类型
|
||||
qudao: "Android", //
|
||||
qudao: "Google", // Google Android
|
||||
|
||||
description: "", // 充值描述
|
||||
startTime: "", // 充值描述
|
||||
@@ -202,7 +206,7 @@ export default {
|
||||
realMoney: 0, // 优惠金额
|
||||
effective: 0, // 优惠金额
|
||||
type: "point", // 充值类型
|
||||
qudao: "Android", //
|
||||
qudao: "Google", // Google Android
|
||||
|
||||
description: "", // 充值描述
|
||||
startTime: "", //
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
node-key="menuId"
|
||||
ref="menuListTree"
|
||||
@current-change="menuListTreeCurrentChangeHandle"
|
||||
:default-expand-all="true"
|
||||
:default-expand-all="false"
|
||||
:highlight-current="true"
|
||||
:expand-on-click-node="false">
|
||||
</el-tree>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@close="handlereset">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
|
||||
label-width="120px">
|
||||
<el-form-item label="电话" prop="tel">
|
||||
<el-form-item label="电话" prop="tel" v-if="dataForm.id">
|
||||
<el-input v-model="dataForm.tel" placeholder="电话" type="number"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮箱" prop="email">
|
||||
@@ -97,7 +97,7 @@
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handlereset">取消</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmit('dataRule')">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@@ -163,6 +163,11 @@
|
||||
message: '密码不能为空',
|
||||
trigger: 'blur'
|
||||
}],
|
||||
email: [{
|
||||
required: true,
|
||||
message: '邮箱不能为空',
|
||||
trigger: 'blur'
|
||||
},{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }]
|
||||
// tel: [{
|
||||
// validator: function(rule, value, callback) {
|
||||
// if (/^1[34578]\d{9}$/.test(value) == false) {
|
||||
@@ -237,31 +242,16 @@
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
// if (!this.dataForm.email && !this.dataForm.tel) {
|
||||
/// this.$message.error("手机号或邮箱不为空!")
|
||||
// return
|
||||
// }
|
||||
|
||||
// if (this.dataForm.email) {
|
||||
// if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){
|
||||
// this.$message.error("邮箱格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (this.dataForm.tel) {
|
||||
// if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) {
|
||||
// this.$message.error("手机格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
dataFormSubmit(formName) {
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
if (valid) {
|
||||
let myData = {}
|
||||
if (!this.dataForm.id) {
|
||||
myData = {
|
||||
'name': this.dataForm.name,
|
||||
'tel': this.dataForm.tel,
|
||||
// 'name': this.dataForm.name,
|
||||
// 'tel': this.dataForm.tel,
|
||||
'email': this.dataForm.email,
|
||||
'password': this.dataForm.password,
|
||||
}
|
||||
} else {
|
||||
myData = {
|
||||
@@ -313,6 +303,33 @@
|
||||
this.$message.error(data.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// if (!this.dataForm.email && !this.dataForm.tel) {
|
||||
/// this.$message.error("手机号或邮箱不为空!")
|
||||
// return
|
||||
// }
|
||||
|
||||
// if (this.dataForm.email) {
|
||||
// if (/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(this.dataForm.email) == false){
|
||||
// this.$message.error("邮箱格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (this.dataForm.tel) {
|
||||
// if (/^1[3456789]\d{9}$/.test(this.dataForm.tel) == false) {
|
||||
// this.$message.error("手机格式错误!")
|
||||
// return
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user