|
@@ -1,22 +1,128 @@
|
|
<template>
|
|
<template>
|
|
<div id="index">
|
|
<div id="index">
|
|
<el-row>
|
|
<el-row>
|
|
- <el-col :span="24" class="main animate__animated animate__backInRight"> test </el-col>
|
|
|
|
|
|
+ <el-col :span="24" class="main animate__animated animate__backInRight">
|
|
|
|
+ <el-col :span="24" class="one">
|
|
|
|
+ <data-table @query="search" :fields="fields" :opera="opera" :data="list" :total="total" @view="toView" @receive="torEceive" @edit="toEdit">
|
|
|
|
+ <template #selfbtn>
|
|
|
|
+ <el-button type="primary" size="mini" @click="toAdd()">添加信息</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </data-table>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <e-dialog :dialog="dialog" @toClose="toClose">
|
|
|
|
+ <template slot="info">
|
|
|
|
+ <form-1 :form="form" v-if="dialog.type == '1'" @toSave="toSave" @orderSave="orderSave" @orderDelete="orderDelete"></form-1>
|
|
|
|
+ <info-1 :form="form" v-else-if="dialog.type == '2'"></info-1>
|
|
|
|
+ </template>
|
|
|
|
+ </e-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
+const moment = require('moment');
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
- components: {},
|
|
|
|
|
|
+ components: {
|
|
|
|
+ form1: () => import('./parts/form-1.vue'),
|
|
|
|
+ info1: () => import('./parts/info-1.vue'),
|
|
|
|
+ },
|
|
data: function () {
|
|
data: function () {
|
|
- return {};
|
|
|
|
|
|
+ return {
|
|
|
|
+ // 数据项
|
|
|
|
+ fields: [
|
|
|
|
+ { label: '联系电话', prop: 'user_phone', filter: true },
|
|
|
|
+ { label: '审核时间', prop: 'examine_date', filter: true },
|
|
|
|
+ { label: '审核状态', prop: 'status_name', filter: true },
|
|
|
|
+ ],
|
|
|
|
+ //操作项
|
|
|
|
+ opera: [
|
|
|
|
+ { label: '详细信息', method: 'view' },
|
|
|
|
+ { label: '领取确定', method: 'receive', type: 'success', confirm: true },
|
|
|
|
+ { label: '修改信息', method: 'edit' },
|
|
|
|
+ ],
|
|
|
|
+ //表格数据
|
|
|
|
+ list: [
|
|
|
|
+ {
|
|
|
|
+ id: '111',
|
|
|
|
+ user_name: '法外狂徒张三',
|
|
|
|
+ user_phone: '12345678901',
|
|
|
|
+ examine_name: '李四',
|
|
|
|
+ examine_date: '2022-5-18',
|
|
|
|
+ status_name: '待审',
|
|
|
|
+ examine_desc: '我想不同意,但我还是同意了',
|
|
|
|
+ order: [{ name: '小洋人', num: '121', desc: '别卖太便宜了,赔钱' }],
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ // 列表数据总数
|
|
|
|
+ total: 0,
|
|
|
|
+ //弹框
|
|
|
|
+ dialog: { title: '详细信息', show: false, type: '1' },
|
|
|
|
+ form: { order: [] },
|
|
|
|
+ };
|
|
|
|
+ },
|
|
|
|
+ async created() {
|
|
|
|
+ await this.search();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ //查询数据
|
|
|
|
+ async search() {},
|
|
|
|
+ //详细信息
|
|
|
|
+ async toView({ data }) {
|
|
|
|
+ this.$set(this, `form`, data);
|
|
|
|
+ this.dialog = { title: '详细信息', show: true, type: '2', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ //领取确定
|
|
|
|
+ async torEceive({ data }) {
|
|
|
|
+ this.$confirm('您是否确认领取?', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '删除成功!',
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消删除',
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ // 添加
|
|
|
|
+ toAdd() {
|
|
|
|
+ this.dialog = { title: '添加信息', show: true, type: '1', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ // 修改
|
|
|
|
+ toEdit({ data }) {
|
|
|
|
+ this.$set(this, `form`, data);
|
|
|
|
+ this.dialog = { title: '修改信息', show: true, type: '1', widths: '40%' };
|
|
|
|
+ },
|
|
|
|
+ // 提交保存,創建/修改
|
|
|
|
+ async toSave({ data }) {
|
|
|
|
+ console.log(data);
|
|
|
|
+ },
|
|
|
|
+ //关闭
|
|
|
|
+ toClose() {
|
|
|
|
+ this.form = { order: [] };
|
|
|
|
+ this.dialog = { title: '详细信息', show: false, type: '1' };
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
|
|
+ // 商品信息保存
|
|
|
|
+ orderSave({ data }) {
|
|
|
|
+ this.form.order.push(data);
|
|
|
|
+ },
|
|
|
|
+ // 删除商品信息
|
|
|
|
+ orderDelete({ index }) {
|
|
|
|
+ this.form.order.splice(index, 1);
|
|
|
|
+ },
|
|
},
|
|
},
|
|
- created() {},
|
|
|
|
- methods: {},
|
|
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
},
|
|
},
|
|
@@ -33,4 +139,8 @@ export default {
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped></style>
|
|
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+/deep/.el-dialog__body {
|
|
|
|
+ min-height: 400px;
|
|
|
|
+}
|
|
|
|
+</style>
|