|
@@ -0,0 +1,168 @@
|
|
|
+<template>
|
|
|
+ <div id="nextLive">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-table :data="nextData" stripe style="width: 100%" border>
|
|
|
+ <el-table-column prop="title" label="对接会标题" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column prop="start_time" label="开始时间" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column prop="join_end" label="报名截止时间" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column prop="sheng" label="省" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column prop="shi" label="市" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column prop="desc" label="简介" align="center" :show-overflow-tooltip="true"> </el-table-column>
|
|
|
+ <el-table-column label="操作" style="width:200px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button size="mini" type="text" @click.prevent="handleEdit(scope.row.id)"
|
|
|
+ ><el-tooltip class="item" effect="dark" content="申请" placement="top-start"> <i class="el-icon-view"></i> </el-tooltip
|
|
|
+ ></el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-col class="page" :span="24">
|
|
|
+ <page :total="nextTotal" position="right"></page>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-dialog title="申请" :visible.sync="dialogFormVisible" :before-close="handleClose">
|
|
|
+ <el-form :model="applyForm" :rules="rules" ref="applyForm">
|
|
|
+ <el-form-item label="申请人身份" label-width="120px">
|
|
|
+ <el-radio-group v-model="applyForm.buyer" @change="changeuser">
|
|
|
+ <el-radio label="0">买家</el-radio>
|
|
|
+ <el-radio label="1">卖家</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="选择产品" label-width="120px" v-if="this.resource == '1' || this.resource == ''">
|
|
|
+ <el-select v-model="applyForm.goodsList" placeholder="请选择选择产品">
|
|
|
+ <el-option v-for="(item, index) in goodsLists" :key="index" :label="item.name" :value="item.id"> </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系人" label-width="120px">
|
|
|
+ <el-input v-model="applyForm.contact" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="联系电话" label-width="120px">
|
|
|
+ <el-input v-model="applyForm.contact_tel" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="电子邮箱" label-width="120px">
|
|
|
+ <el-input v-model="applyForm.email" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单位名称" label-width="120px">
|
|
|
+ <el-input v-model="applyForm.company" autocomplete="off"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="text-align:center;">
|
|
|
+ <el-button @click="resetBtn">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="submitBtn">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import page from '@/components/pagination.vue';
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
+const { mapActions: apply } = createNamespacedHelpers('apply');
|
|
|
+const { mapActions: login } = createNamespacedHelpers('login');
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
+const { mapActions: mapProduct } = createNamespacedHelpers('marketproduct');
|
|
|
+export default {
|
|
|
+ name: 'nextLive',
|
|
|
+ props: {},
|
|
|
+ components: {
|
|
|
+ page,
|
|
|
+ },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ // 下期直播
|
|
|
+ nextData: [],
|
|
|
+ nextTotal: 0,
|
|
|
+
|
|
|
+ rules: {
|
|
|
+ oldpasswd: [{ required: true, message: '请输入旧密码', trigger: 'blur' }],
|
|
|
+ newpasswd: [{ required: true, message: '请输入新密码', trigger: 'blur' }],
|
|
|
+ },
|
|
|
+ // 选择产品
|
|
|
+ resource: '',
|
|
|
+ goodsLists: [],
|
|
|
+ // 申请直播
|
|
|
+ dialogFormVisible: false,
|
|
|
+ applyForm: {},
|
|
|
+ dock_id: '',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...dock(['query', 'delete', 'update']),
|
|
|
+ ...apply({ applyupdate: 'update', applyCreate: 'create' }),
|
|
|
+ ...login({ logout: 'logout', transactiondtetle: 'delete' }),
|
|
|
+ ...place({ palcequery: 'query', palcefetch: 'fetch' }),
|
|
|
+ ...mapProduct({ mapProductQuery: 'query', mapProductFetch: 'fetch' }),
|
|
|
+ async search({ skip = 0, limit = 0 } = { skip: 0, limit: 0 }) {
|
|
|
+ let res = await this.query({ skip, limit, status: '0' });
|
|
|
+ for (const val of res.data) {
|
|
|
+ let parent = val.province;
|
|
|
+ let places = val.place;
|
|
|
+ let reslte = await this.palcequery({ level: 1, parent });
|
|
|
+ let resltes = await this.palcequery({ level: 2, parent });
|
|
|
+ var arr = reslte.data.filter(item => item.code === parent);
|
|
|
+ var cre = resltes.data.filter(item => item.code === places);
|
|
|
+ for (const shi of cre) {
|
|
|
+ val.shi = shi.name;
|
|
|
+ }
|
|
|
+ for (const sheng of arr) {
|
|
|
+ val.sheng = sheng.name;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this, `nextData`, res.data);
|
|
|
+ this.$set(this, `nextTotal`, res.total);
|
|
|
+ res = await this.mapProductQuery({ userid: this.user.uid });
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$set(this, `goodsLists`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 申请对接会
|
|
|
+ handleEdit(id) {
|
|
|
+ this.dialogFormVisible = true;
|
|
|
+ this.$set(this, `dock_id`, id);
|
|
|
+ },
|
|
|
+ // 提交申请
|
|
|
+ async submitBtn() {
|
|
|
+ this.applyForm.user_id = this.user.uid;
|
|
|
+ this.applyForm.user_name = this.user.name;
|
|
|
+ const res = await this.applyCreate({ id: this.dock_id, ...this.applyForm });
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '申请参加对接会成功,等待管理员审核',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ this.resetBtn();
|
|
|
+ },
|
|
|
+ // 取消申请
|
|
|
+ resetBtn() {
|
|
|
+ this.applyForm = {};
|
|
|
+ this.dialogFormVisible = false;
|
|
|
+ },
|
|
|
+ handleClose(done) {
|
|
|
+ this.resetBtn();
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ // 选择产品
|
|
|
+ changeuser(label) {
|
|
|
+ this.$set(this, 'resource', label);
|
|
|
+ },
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ pageTitle() {
|
|
|
+ return `${this.$route.meta.title}`;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less" scoped></style>
|