删除index1-3文件及路由
This commit is contained in:
@ -132,174 +132,7 @@ export const constantRoutes = [
|
||||
hidden: true
|
||||
}
|
||||
];
|
||||
export const asyncRouterMap = [
|
||||
// // {
|
||||
// // path: '',
|
||||
// // // component: Layout,
|
||||
// // redirect: 'index1',
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'index1',
|
||||
// // component: resolve => require(['@/views/index1'], resolve),
|
||||
// // name: 'index1',
|
||||
// // meta: { title: '客户管理', noCache: true, affix: true, icon: 'user' }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '',
|
||||
// // // component: Layout,
|
||||
// // redirect: 'index2',
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'index2',
|
||||
// // component: resolve => require(['@/views/index2'], resolve),
|
||||
// // name: 'index2',
|
||||
// // meta: {
|
||||
// // title: '权益商品',
|
||||
// // noCache: true,
|
||||
// // affix: true,
|
||||
// // icon: 'shopping'
|
||||
// // }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '',
|
||||
// // // component: Layout,
|
||||
// // redirect: 'index3',
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'index3',
|
||||
// // component: resolve => require(['@/views/index3'], resolve),
|
||||
// // name: 'index3',
|
||||
// // meta: { title: '提现订单', noCache: true, affix: true, icon: 'list' }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '/ums',
|
||||
// // // component: Layout,
|
||||
// // redirect: '/ums/admin',
|
||||
// // name: 'ums',
|
||||
// // meta: { title: '系统设置', noCache: true, affix: true, icon: 'system' },
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'admin',
|
||||
// // name: 'admin',
|
||||
// // component: () => import('@/views/ums/admin/index'),
|
||||
// // meta: { title: '用户列表', icon: 'list' }
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'role',
|
||||
// // name: 'role',
|
||||
// // component: () => import('@/views/ums/role/index'),
|
||||
// // meta: { title: '角色列表', icon: 'list' }
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'allocMenu',
|
||||
// // name: 'allocMenu',
|
||||
// // component: () => import('@/views/ums/role/allocMenu'),
|
||||
// // meta: { title: '分配菜单' },
|
||||
// // hidden: true
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'allocResource',
|
||||
// // name: 'allocResource',
|
||||
// // component: () => import('@/views/ums/role/allocResource'),
|
||||
// // meta: { title: '分配资源' },
|
||||
// // hidden: true
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'menu',
|
||||
// // name: 'menu',
|
||||
// // component: () => import('@/views/ums/menu/index'),
|
||||
// // meta: { title: '菜单列表', icon: 'list' }
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'addMenu',
|
||||
// // name: 'addMenu',
|
||||
// // component: () => import('@/views/ums/menu/add'),
|
||||
// // meta: { title: '添加菜单' },
|
||||
// // hidden: true
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'updateMenu',
|
||||
// // name: 'updateMenu',
|
||||
// // component: () => import('@/views/ums/menu/update'),
|
||||
// // meta: { title: '修改菜单' },
|
||||
// // hidden: true
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'resource',
|
||||
// // name: 'resource',
|
||||
// // component: () => import('@/views/ums/resource/index'),
|
||||
// // meta: { title: '资源列表', icon: 'list' }
|
||||
// // },
|
||||
// // {
|
||||
// // path: 'resourceCategory',
|
||||
// // name: 'resourceCategory',
|
||||
// // component: () => import('@/views/ums/resource/categoryList'),
|
||||
// // meta: { title: '资源分类' },
|
||||
// // hidden: true
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '/user',
|
||||
// // // component: Layout,
|
||||
// // hidden: true,
|
||||
// // redirect: 'noredirect',
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'profile',
|
||||
// // component: resolve =>
|
||||
// // require(['@/views/system/user/profile/index'], resolve),
|
||||
// // name: 'Profile',
|
||||
// // meta: { title: '个人中心', icon: 'user' }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '/dict',
|
||||
// // // component: Layout,
|
||||
// // hidden: true,
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'type/data/:dictId(\\d+)',
|
||||
// // component: resolve => require(['@/views/system/dict/data'], resolve),
|
||||
// // name: 'Data',
|
||||
// // meta: { title: '字典数据', icon: '' }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '/job',
|
||||
// // // component: Layout,
|
||||
// // hidden: true,
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'log',
|
||||
// // component: resolve => require(['@/views/monitor/job/log'], resolve),
|
||||
// // name: 'JobLog',
|
||||
// // meta: { title: '调度日志' }
|
||||
// // }
|
||||
// // ]
|
||||
// // },
|
||||
// // {
|
||||
// // path: '/gen',
|
||||
// // // component: Layout,
|
||||
// // hidden: true,
|
||||
// // children: [
|
||||
// // {
|
||||
// // path: 'edit/:tableId(\\d+)',
|
||||
// // component: resolve => require(['@/views/tool/gen/editTable'], resolve),
|
||||
// // name: 'GenEdit',
|
||||
// // meta: { title: '修改生成配置' }
|
||||
// // }
|
||||
// ]
|
||||
// }
|
||||
];
|
||||
export const asyncRouterMap = [];
|
||||
|
||||
export default new Router({
|
||||
mode: 'history', // 去掉url中的#
|
||||
|
@ -1,296 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="never">
|
||||
<div>
|
||||
<i class="el-icon-search"></i>
|
||||
<span>筛选搜索</span>
|
||||
<div style="float:right">
|
||||
<el-button type="primary" @click="handleSearchList" size="small">
|
||||
查询
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 15px">
|
||||
<el-form
|
||||
size="small"
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.phone" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets"></i>
|
||||
<span>数据列表</span>
|
||||
<div class="btn-add">
|
||||
<el-button @click="handleAdd" size="small">添加顾客</el-button>
|
||||
<el-button @click="handleImport" size="small">批量导入</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-table style="width: 100%" class="table-container" :data="dataList">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="手机号"
|
||||
prop="phone"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="返现金额"
|
||||
align="center"
|
||||
prop="money"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="机构"
|
||||
align="center"
|
||||
prop="company"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="城市"
|
||||
align="center"
|
||||
prop="city"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="渠道"
|
||||
align="center"
|
||||
prop="channel"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="车牌号"
|
||||
align="center"
|
||||
prop="carNum"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="客户经理"
|
||||
align="center"
|
||||
prop="own"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleUpdate(scope.row)" type="text" size="small"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button @click="handleDelete(scope.row)" type="text" size="small"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 添加修改 -->
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="返现金额" prop="money">
|
||||
<el-input-number v-model="form.money" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构">
|
||||
<el-input v-model="form.company"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市">
|
||||
<el-input v-model="form.city"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道">
|
||||
<el-input v-model="form.channel"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号">
|
||||
<el-input v-model="form.carNum"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户经理">
|
||||
<el-input v-model="form.own"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" slot="tip">
|
||||
<el-link type="info" style="font-size:12px" @click="importTemplate"
|
||||
>下载模板</el-link
|
||||
>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getList, handleUser, addUser } from '@/api/index';
|
||||
import { getToken } from '@/utils/auth';
|
||||
export default {
|
||||
name: 'Index',
|
||||
data() {
|
||||
return {
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/customer/importDate'
|
||||
},
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
phone: ''
|
||||
},
|
||||
total: 0,
|
||||
dataList: [],
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
form: {},
|
||||
rules: {
|
||||
phone: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||
money: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
importTemplate() {
|
||||
window.location.href =
|
||||
'http://140.143.229.114:9000/pic/20210729/1420581901814599680.xlsx';
|
||||
},
|
||||
handleSearchList() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
getDataList() {
|
||||
getList(this.queryParams).then(({ data }) => {
|
||||
this.dataList = data.list;
|
||||
this.total = data.total;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.form = {};
|
||||
this.resetForm('form');
|
||||
this.dialogVisible = true;
|
||||
this.title = '添加顾客';
|
||||
},
|
||||
// 编辑
|
||||
handleUpdate(row) {
|
||||
this.form = {};
|
||||
this.resetForm('form');
|
||||
row.status = 0;
|
||||
this.form = Object.assign({}, row);
|
||||
this.dialogVisible = true;
|
||||
this.title = '修改顾客';
|
||||
},
|
||||
// 提交
|
||||
submitForm() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title == '修改顾客') {
|
||||
handleUser(this.form).then(response => {
|
||||
this.msgSuccess('修改成功');
|
||||
this.dialogVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
} else {
|
||||
addUser(this.form).then(response => {
|
||||
this.msgSuccess('新增成功');
|
||||
this.dialogVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '导入顾客';
|
||||
this.upload.open = true;
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(response.data, '导入结果', {
|
||||
dangerouslyUseHTMLString: true
|
||||
});
|
||||
this.getDataList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除该数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(function() {
|
||||
row.status = -1;
|
||||
return handleUser(row);
|
||||
})
|
||||
.then(() => {
|
||||
this.getDataList();
|
||||
this.msgSuccess('删除成功');
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDataList();
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,224 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card class="operate-container" shadow="never" style="margin-top:0">
|
||||
<i class="el-icon-tickets"></i>
|
||||
<span>数据列表</span>
|
||||
<el-button class="btn-add" @click="handleAdd" size="small"
|
||||
>添加商品</el-button
|
||||
>
|
||||
</el-card>
|
||||
<el-table style="width: 100%" class="table-container" :data="dataList">
|
||||
<el-table-column
|
||||
label="序号"
|
||||
align="center"
|
||||
type="index"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="商品名称"
|
||||
align="center"
|
||||
prop="name"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="对应积分"
|
||||
align="center"
|
||||
prop="integral"
|
||||
></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleUpdate(scope.row)" type="text" size="small"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button @click="handleDelete(scope.row)" type="text" size="small"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 添加修改 -->
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="对应积分" prop="integral">
|
||||
<el-input-number
|
||||
v-model="form.integral"
|
||||
:min="1"
|
||||
:step="100"
|
||||
step-strictly
|
||||
></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="pic">
|
||||
<multi-upload
|
||||
v-model="selectProductPics"
|
||||
:maxCount="1"
|
||||
></multi-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细信息" prop="note">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:autosize="{ minRows: 2, maxRows: 10 }"
|
||||
v-model="form.note"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getList2, handleProduct, addProduct } from '@/api/index';
|
||||
import MultiUpload from '@/components/Upload/multiUpload';
|
||||
export default {
|
||||
name: 'Index2',
|
||||
components: {
|
||||
MultiUpload
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
phone: ''
|
||||
},
|
||||
total: 0,
|
||||
dataList: [],
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
form: {},
|
||||
rules: {
|
||||
name: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||
integral: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||
pic: [{ required: true, message: '请上传', trigger: 'blur' }],
|
||||
note: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
//主图和画册图片
|
||||
selectProductPics: {
|
||||
get: function() {
|
||||
let pics = [];
|
||||
if (
|
||||
this.form.pic === undefined ||
|
||||
this.form.pic == null ||
|
||||
this.form.pic === ''
|
||||
) {
|
||||
return pics;
|
||||
}
|
||||
pics.push(this.form.pic);
|
||||
if (
|
||||
this.form.albumPics === undefined ||
|
||||
this.form.albumPics == null ||
|
||||
this.form.albumPics === ''
|
||||
) {
|
||||
return pics;
|
||||
}
|
||||
let albumPics = this.form.albumPics.split(',');
|
||||
for (let i = 0; i < albumPics.length; i++) {
|
||||
pics.push(albumPics[i]);
|
||||
}
|
||||
return pics;
|
||||
},
|
||||
set: function(newValue) {
|
||||
if (newValue == null || newValue.length === 0) {
|
||||
this.form.pic = null;
|
||||
this.form.albumPics = null;
|
||||
} else {
|
||||
this.form.pic = newValue[0];
|
||||
this.form.albumPics = '';
|
||||
if (newValue.length > 1) {
|
||||
for (let i = 1; i < newValue.length; i++) {
|
||||
this.form.albumPics += newValue[i];
|
||||
if (i !== newValue.length - 1) {
|
||||
this.form.albumPics += ',';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSearchList() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
getDataList() {
|
||||
getList2(this.queryParams).then(({ data }) => {
|
||||
this.dataList = data.list;
|
||||
this.total = data.total;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.form = { integral: 100 };
|
||||
this.resetForm('form');
|
||||
this.dialogVisible = true;
|
||||
this.title = '添加商品';
|
||||
},
|
||||
// 编辑
|
||||
handleUpdate(row) {
|
||||
this.form = {};
|
||||
this.resetForm('form');
|
||||
row.status = 0;
|
||||
this.form = Object.assign({}, row);
|
||||
this.dialogVisible = true;
|
||||
this.title = '修改商品';
|
||||
},
|
||||
// 提交
|
||||
submitForm() {
|
||||
this.$refs['form'].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.title == '修改商品') {
|
||||
handleProduct(this.form).then(response => {
|
||||
this.msgSuccess('修改成功');
|
||||
this.dialogVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
} else {
|
||||
addProduct(this.form).then(response => {
|
||||
this.msgSuccess('新增成功');
|
||||
this.dialogVisible = false;
|
||||
this.getDataList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
// 跳转页面
|
||||
handlePage(id) {
|
||||
this.$router.push({ path: '/front/addUnscramble', query: { id } });
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm('确认删除该数据?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
})
|
||||
.then(function() {
|
||||
row.status = -1;
|
||||
return handleProduct(row);
|
||||
})
|
||||
.then(() => {
|
||||
this.getDataList();
|
||||
this.msgSuccess('删除成功');
|
||||
});
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDataList();
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,313 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-card shadow="never">
|
||||
<div>
|
||||
<i class="el-icon-search"></i>
|
||||
<span>筛选搜索</span>
|
||||
<div style="float:right">
|
||||
<el-button type="primary" @click="handleSearchList" size="small">
|
||||
查询
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 15px">
|
||||
<el-form
|
||||
size="small"
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<el-form-item label="手机号">
|
||||
<el-input v-model="queryParams.phone" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="处理状态" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.status"
|
||||
clearable
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-card class="operate-container" shadow="never">
|
||||
<i class="el-icon-tickets"></i>
|
||||
<span>数据列表</span>
|
||||
<div class="btn-add">
|
||||
<el-button
|
||||
@click="handleExport"
|
||||
size="small"
|
||||
:disabled="!total ? true : false"
|
||||
>报表导出</el-button
|
||||
>
|
||||
<el-button @click="handleImport" size="small">报表导入</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-table style="width: 100%" class="table-container" :data="dataList">
|
||||
<el-table-column
|
||||
label="订单号"
|
||||
align="center"
|
||||
prop="id"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="手机号"
|
||||
align="center"
|
||||
prop="phone"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
align="center"
|
||||
prop="username"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="银行卡号"
|
||||
align="center"
|
||||
prop="moneyCar"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="对应金额"
|
||||
align="center"
|
||||
prop="money"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="申请时间"
|
||||
align="center"
|
||||
prop="createTime"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="处理状态"
|
||||
align="center"
|
||||
prop="status"
|
||||
width="120px"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model="scope.row.status"
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
@change="handleChange($event, scope.row)"
|
||||
@visible-change="aaa($event, scope.row.status)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<!-- 添加修改 -->
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="form.phone" maxlength="11"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="返现金额" prop="money">
|
||||
<el-input-number v-model="form.money" :min="1"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="机构">
|
||||
<el-input v-model="form.company"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市">
|
||||
<el-input v-model="form.city"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="渠道">
|
||||
<el-input v-model="form.channel"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号">
|
||||
<el-input v-model="form.carNum"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户经理">
|
||||
<el-input v-model="form.own"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<!-- 用户导入对话框 -->
|
||||
<el-dialog
|
||||
:title="upload.title"
|
||||
:visible.sync="upload.open"
|
||||
width="400px"
|
||||
append-to-body
|
||||
>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div class="el-upload__tip" style="color:red" slot="tip">
|
||||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getList3, handleOrder, addUser } from '@/api/index';
|
||||
import { getToken } from '@/utils/auth';
|
||||
export default {
|
||||
name: 'Index3',
|
||||
data() {
|
||||
return {
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/webOrder/importDate'
|
||||
},
|
||||
status: null,
|
||||
statusOptions: [
|
||||
{
|
||||
value: 0,
|
||||
label: '处理中'
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: '已打款'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '打款失败'
|
||||
}
|
||||
],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
phone: '',
|
||||
status: ''
|
||||
},
|
||||
total: 0,
|
||||
dataList: [],
|
||||
dialogVisible: false,
|
||||
title: '',
|
||||
form: {},
|
||||
rules: {
|
||||
phone: [{ required: true, message: '请输入', trigger: 'blur' }],
|
||||
money: [{ required: true, message: '请输入', trigger: 'blur' }]
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
handleSearchList() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getDataList();
|
||||
},
|
||||
getDataList() {
|
||||
getList3(this.queryParams).then(({ data }) => {
|
||||
this.dataList = data.list;
|
||||
this.total = data.total;
|
||||
});
|
||||
},
|
||||
handleChange(e, row) {
|
||||
this.$confirm(
|
||||
`确定将该提取订单的处理状态改为 “ ${
|
||||
this.statusOptions.filter(item => item.value == e)[0].label
|
||||
} ” ?`,
|
||||
'提示',
|
||||
{
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
handleOrder(row).then(res => {
|
||||
this.msgSuccess('操作成功');
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消修改'
|
||||
});
|
||||
row.status = this.status;
|
||||
});
|
||||
},
|
||||
aaa(e, status) {
|
||||
if (e) this.status = status;
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.$confirm('是否确认导出所有数据项?', '警告', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(res => {
|
||||
const baseURL = process.env.VUE_APP_BASE_API;
|
||||
window.location.href =
|
||||
baseURL + '/webOrder/export?status=' + this.queryParams.status;
|
||||
});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = '导入订单';
|
||||
this.upload.open = true;
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
console.log(this.upload);
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(response.data, '导入结果', {
|
||||
dangerouslyUseHTMLString: true
|
||||
});
|
||||
this.getDataList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getDataList();
|
||||
}
|
||||
};
|
||||
</script>
|
Reference in New Issue
Block a user