|
@@ -1,14 +1,24 @@
|
|
|
-rookieCode<template>
|
|
|
|
|
|
|
+<template>
|
|
|
<div class="app-container calendar-list-container">
|
|
<div class="app-container calendar-list-container">
|
|
|
|
|
|
|
|
<!-- 查询和其他操作 -->
|
|
<!-- 查询和其他操作 -->
|
|
|
<div class="filter-container">
|
|
<div class="filter-container">
|
|
|
- <el-input clearable class="filter-item" style="width: 200px;" placeholder="物流公司名称" v-model="listQuery.logisticsName">
|
|
|
|
|
|
|
+ <el-input clearable class="filter-item" style="width: 200px;" placeholder="会员姓名" v-model="listQuery.customerName">
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <el-select v-model="listQuery.sex" clearable placeholder="性别" class="filter-item" style="width: 200px;">
|
|
|
|
|
+ <el-option :key="item.type" v-for="item in sexList" :label="item.name" :value="item.type">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ <el-input clearable class="filter-item" style="width: 200px;" placeholder="注册渠道"
|
|
|
|
|
+ v-model="listQuery.registerChannel">
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ <el-input clearable class="filter-item" style="width: 200px;" placeholder="会员等级"
|
|
|
|
|
+ v-model="listQuery.customerLevel">
|
|
|
</el-input>
|
|
</el-input>
|
|
|
<el-select v-model="listQuery.status" clearable placeholder="状态" class="filter-item" style="width: 200px;">
|
|
<el-select v-model="listQuery.status" clearable placeholder="状态" class="filter-item" style="width: 200px;">
|
|
|
- <el-option :key="item.type" v-for="item in statusList" :label="item.name" :value="item.type">
|
|
|
|
|
- </el-option>
|
|
|
|
|
- </el-select>
|
|
|
|
|
|
|
+ <el-option :key="item.type" v-for="item in statusList" :label="item.name" :value="item.type">
|
|
|
|
|
+ </el-option>
|
|
|
|
|
+ </el-select>
|
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleQuery">查找</el-button>
|
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleQuery">查找</el-button>
|
|
|
<el-button class="filter-item" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
<el-button class="filter-item" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
|
|
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleCreate">添加</el-button>
|
|
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleCreate">添加</el-button>
|
|
@@ -22,20 +32,29 @@ rookieCode<template>
|
|
|
<el-table-column type="index" label="序号" header-align="center" align="center">
|
|
<el-table-column type="index" label="序号" header-align="center" align="center">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column align="center" min-width="100px" label="物流公司名称" prop="logisticsName">
|
|
|
|
|
|
|
+ <el-table-column align="center" min-width="80px" label="会员编号" prop="customerCode">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column align="center" min-width="100px" label="会员姓名" prop="customerName">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column align="center" min-width="80px" label="性别" prop="sex">
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+
|
|
|
|
|
+ <el-table-column align="center" min-width="80px" label="注册渠道" prop="registerChannel">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column align="center" min-width="80px" label="快递查询代码" prop="queryCode">
|
|
|
|
|
|
|
+ <el-table-column align="center" min-width="80px" label="会员生日" prop="customerBirthday">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
- <el-table-column align="center" min-width="80px" label="菜鸟代码" prop="rookieCode">
|
|
|
|
|
|
|
+ <el-table-column align="center" min-width="80px" label="会员等级" prop="customerLevel">
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column align="center" min-width="50px" label="状态">
|
|
<el-table-column align="center" min-width="50px" label="状态">
|
|
|
- <template slot-scope="props">
|
|
|
|
|
- <span v-if="props.row.status == 0" style="color: #67C23A;font-weight: bold;">启用</span>
|
|
|
|
|
- <span v-if="props.row.status == 1" style="color: #E6A23C;font-weight: bold;">停用</span>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <template slot-scope="props">
|
|
|
|
|
+ <span v-if="props.row.status == 0" style="color: #67C23A;font-weight: bold;">启用</span>
|
|
|
|
|
+ <span v-if="props.row.status == 1" style="color: #E6A23C;font-weight: bold;">停用</span>
|
|
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<!-- <el-table-column align="center" min-width="150px" label="备注" prop="remarks">
|
|
<!-- <el-table-column align="center" min-width="150px" label="备注" prop="remarks">
|
|
|
</el-table-column> -->
|
|
</el-table-column> -->
|
|
@@ -44,9 +63,9 @@ rookieCode<template>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">编辑</el-button>
|
|
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">编辑</el-button>
|
|
|
<el-button v-if="scope.row.status == 1" type="success" size="small"
|
|
<el-button v-if="scope.row.status == 1" type="success" size="small"
|
|
|
- @click="changeState(scope.row.id, scope.row.status)">启用</el-button>
|
|
|
|
|
|
|
+ @click="changeState(scope.row.id, scope.row.status)">启用</el-button>
|
|
|
<el-button v-if="scope.row.status == 0" type="warning" size="small"
|
|
<el-button v-if="scope.row.status == 0" type="warning" size="small"
|
|
|
- @click="changeState(scope.row.id, scope.row.status)">停用</el-button>
|
|
|
|
|
|
|
+ @click="changeState(scope.row.id, scope.row.status)">停用</el-button>
|
|
|
<el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
|
|
<el-button type="danger" size="small" @click="handleDelete(scope.row)">删除</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -63,20 +82,34 @@ rookieCode<template>
|
|
|
<!-- 添加或修改对话框 -->
|
|
<!-- 添加或修改对话框 -->
|
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="600px">
|
|
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" width="600px">
|
|
|
<el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="110px">
|
|
<el-form :rules="rules" ref="dataForm" :model="dataForm" status-icon label-position="left" label-width="110px">
|
|
|
- <el-form-item label="物流公司名称" prop="logisticsName">
|
|
|
|
|
- <el-input v-model="dataForm.logisticsName"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="会员编号" prop="customerCode">
|
|
|
|
|
+ <el-input v-model="dataForm.customerCode"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="会员名称" prop="customerName">
|
|
|
|
|
+ <el-input v-model="dataForm.customerName"></el-input>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="性别" prop="sex">
|
|
|
|
|
+ <el-radio-group v-model="dataForm.sex">
|
|
|
|
|
+ <el-radio :key="item.type" v-for="item in sexList" :label="item.type">{{ item.name }}</el-radio>
|
|
|
|
|
+ </el-radio-group>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="注册渠道" prop="registerChannel">
|
|
|
|
|
+ <el-input v-model="dataForm.registerChannel"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="快递查询代码" prop="queryCode">
|
|
|
|
|
- <el-input v-model="dataForm.queryCode"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="会员生日" prop="customerBirthday">
|
|
|
|
|
+ <el-date-picker style="width: 100%;" v-model="dataForm.customerBirthday" type="date" placeholder="选择日期" value-format="yyyy-MM-dd"></el-date-picker>
|
|
|
|
|
+ </el-form-item>
|
|
|
|
|
+ <el-form-item label="会员等级" prop="customerLevel">
|
|
|
|
|
+ <el-input v-model="dataForm.customerLevel"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="菜鸟代码" prop="rookieCode">
|
|
|
|
|
- <el-input v-model="dataForm.rookieCode"></el-input>
|
|
|
|
|
|
|
+ <el-form-item label="积分余额" prop="pointsBalance">
|
|
|
|
|
+ <el-input v-model="dataForm.pointsBalance"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="备注" prop="remarks">
|
|
|
|
|
|
|
+ <el-form-item label="备注" prop="remarks">
|
|
|
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入"
|
|
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="请输入"
|
|
|
v-model="dataForm.remarks">
|
|
v-model="dataForm.remarks">
|
|
|
</el-input>
|
|
</el-input>
|
|
|
- </el-form-item> -->
|
|
|
|
|
|
|
+ </el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
|
@@ -88,7 +121,7 @@ rookieCode<template>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
<script>
|
|
<script>
|
|
|
-import { listExpress, createExpress, updateExpress, deleteExpress, setState } from '@/api/express'
|
|
|
|
|
|
|
+import { listVip, createVip, updateVip, deleteVip, setState } from '@/api/vip'
|
|
|
import waves from '@/directive/waves' // 水波纹指令
|
|
import waves from '@/directive/waves' // 水波纹指令
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
@@ -98,26 +131,43 @@ export default {
|
|
|
list: undefined,
|
|
list: undefined,
|
|
|
total: undefined,
|
|
total: undefined,
|
|
|
listLoading: true,
|
|
listLoading: true,
|
|
|
|
|
+ sexList: [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 0,
|
|
|
|
|
+ name: '男'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ name: '女'
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
statusList: [
|
|
statusList: [
|
|
|
- {
|
|
|
|
|
- type: 0,
|
|
|
|
|
- name: '启用'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: 1,
|
|
|
|
|
- name: '停用'
|
|
|
|
|
- },
|
|
|
|
|
- ],
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 0,
|
|
|
|
|
+ name: '启用'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 1,
|
|
|
|
|
+ name: '停用'
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
listQuery: {
|
|
listQuery: {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
limit: 10,
|
|
limit: 10,
|
|
|
- logisticsName: undefined,
|
|
|
|
|
|
|
+ customerName: undefined,
|
|
|
|
|
+ sex: undefined,
|
|
|
|
|
+ registerChannel: undefined,
|
|
|
|
|
+ customerLevel: undefined,
|
|
|
status: undefined,
|
|
status: undefined,
|
|
|
},
|
|
},
|
|
|
dataForm: {
|
|
dataForm: {
|
|
|
- logisticsName: undefined,
|
|
|
|
|
- queryCode: undefined,
|
|
|
|
|
- rookieCode: undefined,
|
|
|
|
|
|
|
+ customerCode: undefined,
|
|
|
|
|
+ customerName: undefined,
|
|
|
|
|
+ sex: undefined,
|
|
|
|
|
+ registerChannel: undefined,
|
|
|
|
|
+ customerBirthday: undefined,
|
|
|
|
|
+ customerLevel: undefined,
|
|
|
|
|
+ pointsBalance: undefined,
|
|
|
remarks: undefined,
|
|
remarks: undefined,
|
|
|
},
|
|
},
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
@@ -127,9 +177,8 @@ export default {
|
|
|
create: '创建'
|
|
create: '创建'
|
|
|
},
|
|
},
|
|
|
rules: {
|
|
rules: {
|
|
|
- logisticsName: [{ required: true, message: '物流公司名称不能为空', trigger: 'blur' }],
|
|
|
|
|
- queryCode: [{ required: true, message: '快递查询代码不能为空', trigger: 'blur' }],
|
|
|
|
|
- rookieCode: [{ required: true, message: '菜鸟代码不能为空', trigger: 'blur' }],
|
|
|
|
|
|
|
+ customerCode: [{ required: true, message: '会员编号不能为空', trigger: 'blur' }],
|
|
|
|
|
+ customerName: [{ required: true, message: '会员姓名不能为空', trigger: 'blur' }],
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -142,14 +191,17 @@ export default {
|
|
|
this.listQuery = {
|
|
this.listQuery = {
|
|
|
page: 1,
|
|
page: 1,
|
|
|
limit: 10,
|
|
limit: 10,
|
|
|
- logisticsName: undefined,
|
|
|
|
|
|
|
+ customerName: undefined,
|
|
|
|
|
+ sex: undefined,
|
|
|
|
|
+ registerChannel: undefined,
|
|
|
|
|
+ customerLevel: undefined,
|
|
|
status: undefined,
|
|
status: undefined,
|
|
|
};
|
|
};
|
|
|
this.handleQuery();
|
|
this.handleQuery();
|
|
|
},
|
|
},
|
|
|
getList() {
|
|
getList() {
|
|
|
this.listLoading = true
|
|
this.listLoading = true
|
|
|
- listExpress(this.listQuery).then(response => {
|
|
|
|
|
|
|
+ listVip(this.listQuery).then(response => {
|
|
|
this.list = response.data.data.items
|
|
this.list = response.data.data.items
|
|
|
this.total = response.data.data.total
|
|
this.total = response.data.data.total
|
|
|
this.listLoading = false
|
|
this.listLoading = false
|
|
@@ -173,9 +225,13 @@ export default {
|
|
|
},
|
|
},
|
|
|
resetForm() {
|
|
resetForm() {
|
|
|
this.dataForm = {
|
|
this.dataForm = {
|
|
|
- logisticsName: undefined,
|
|
|
|
|
- queryCode: undefined,
|
|
|
|
|
- rookieCode: undefined,
|
|
|
|
|
|
|
+ customerCode: undefined,
|
|
|
|
|
+ customerName: undefined,
|
|
|
|
|
+ sex: undefined,
|
|
|
|
|
+ registerChannel: undefined,
|
|
|
|
|
+ customerBirthday: undefined,
|
|
|
|
|
+ customerLevel: undefined,
|
|
|
|
|
+ pointsBalance: undefined,
|
|
|
remarks: undefined,
|
|
remarks: undefined,
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -190,7 +246,7 @@ export default {
|
|
|
createData() {
|
|
createData() {
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- createExpress(this.dataForm).then(response => {
|
|
|
|
|
|
|
+ createVip(this.dataForm).then(response => {
|
|
|
this.list.unshift(response.data.data)
|
|
this.list.unshift(response.data.data)
|
|
|
this.dialogFormVisible = false
|
|
this.dialogFormVisible = false
|
|
|
this.$notify({
|
|
this.$notify({
|
|
@@ -215,7 +271,7 @@ export default {
|
|
|
updateData() {
|
|
updateData() {
|
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
this.$refs['dataForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- updateExpress(this.dataForm).then(() => {
|
|
|
|
|
|
|
+ updateVip(this.dataForm).then(() => {
|
|
|
for (const v of this.list) {
|
|
for (const v of this.list) {
|
|
|
if (v.id === this.dataForm.id) {
|
|
if (v.id === this.dataForm.id) {
|
|
|
const index = this.list.indexOf(v)
|
|
const index = this.list.indexOf(v)
|
|
@@ -237,37 +293,37 @@ export default {
|
|
|
},
|
|
},
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
this.$confirm('确认删除吗?', '提示', {
|
|
this.$confirm('确认删除吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
- type: 'warning'
|
|
|
|
|
- }).then(() => {
|
|
|
|
|
- deleteExpress({id:row.id}).then(response => {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '成功',
|
|
|
|
|
- message: '删除成功',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
- this.getList()
|
|
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ }).then(() => {
|
|
|
|
|
+ deleteVip({ id: row.id }).then(response => {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '成功',
|
|
|
|
|
+ message: '删除成功',
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ duration: 2000
|
|
|
})
|
|
})
|
|
|
- }).catch(() => {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.getList()
|
|
|
})
|
|
})
|
|
|
|
|
+ }).catch(() => {
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
handleDownload() {
|
|
handleDownload() {
|
|
|
window.location.href = process.env.BASE_API + '/product/export';
|
|
window.location.href = process.env.BASE_API + '/product/export';
|
|
|
},
|
|
},
|
|
|
changeState(id, status) {
|
|
changeState(id, status) {
|
|
|
- setState({ id: id, status: status }).then(response => {
|
|
|
|
|
- this.$notify({
|
|
|
|
|
- title: '成功',
|
|
|
|
|
- message: '状态修改成功',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
- duration: 2000
|
|
|
|
|
- })
|
|
|
|
|
- this.getList()
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ setState({ id: id, status: status }).then(response => {
|
|
|
|
|
+ this.$notify({
|
|
|
|
|
+ title: '成功',
|
|
|
|
|
+ message: '状态修改成功',
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ duration: 2000
|
|
|
|
|
+ })
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|