|
@@ -6,127 +6,95 @@
|
|
|
<NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="main">
|
|
|
- <el-col :span="24" class="one">
|
|
|
- <van-tabs v-model="active" animated>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="todo-list" />
|
|
|
- <p>我的全部</p>
|
|
|
- </template>
|
|
|
- <wholeList></wholeList>
|
|
|
- </van-tab>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="column" />
|
|
|
- <p>我的洽谈</p>
|
|
|
- </template>
|
|
|
- <negotiation></negotiation>
|
|
|
- </van-tab>
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="label" />
|
|
|
- <p>我的意向</p>
|
|
|
- </template>
|
|
|
- <intentionList @submit="submit"></intentionList>
|
|
|
- </van-tab>
|
|
|
-
|
|
|
- <van-tab>
|
|
|
- <template #title>
|
|
|
- <van-icon name="label" />
|
|
|
- <p>我的交易</p>
|
|
|
- </template>
|
|
|
- <transaction></transaction>
|
|
|
- </van-tab>
|
|
|
- </van-tabs>
|
|
|
- </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-tabs v-model="active">
|
|
|
+ <van-tab title="下期直播">
|
|
|
+ <docklist :list="nextList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
|
|
|
+ </van-tab>
|
|
|
+ <van-tab title="以往直播">
|
|
|
+ <docklist :list="pastList" @detailBtn="detailBtn" :province="province" :place="place"></docklist>
|
|
|
+ </van-tab>
|
|
|
+ </van-tabs>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
- <van-popup v-model="show" position="bottom"
|
|
|
- ><van-form @submit="onSubmit">
|
|
|
- <van-field
|
|
|
- v-model="newform.product_name"
|
|
|
- name="产品名称"
|
|
|
- label="产品名称"
|
|
|
- placeholder="用户名"
|
|
|
- :rules="[{ required: true, message: '请填写用户名' }]"
|
|
|
- />
|
|
|
- <van-field
|
|
|
- v-model="newform.username"
|
|
|
- name="购买人名称"
|
|
|
- label="购买人名称"
|
|
|
- placeholder="购买人名称"
|
|
|
- :rules="[{ required: true, message: '请填写购买人名称' }]"
|
|
|
- />
|
|
|
- <van-field v-model="newform.market_username" name="营销人名称" label="营销人名称" placeholder="营销人名称" />
|
|
|
- <van-field v-model="newform.description" name="描述" label="描述" placeholder="描述" />
|
|
|
- <div style="margin: 16px;">
|
|
|
- <van-button round block type="info" native-type="submit">
|
|
|
- 提交
|
|
|
- </van-button>
|
|
|
- </div>
|
|
|
- </van-form></van-popup
|
|
|
- >
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import docklist from './parts/docklist.vue';
|
|
|
import NavBar from '@/layout/common/topInfo.vue';
|
|
|
-import wholeList from './parts/wholeList.vue';
|
|
|
-import negotiation from './parts/negotiation.vue';
|
|
|
-import intentionList from './parts/intentionList.vue';
|
|
|
-import transaction from './parts/transaction.vue';
|
|
|
-const { mapActions: transactions } = createNamespacedHelpers('transaction');
|
|
|
-const { mapActions: productpact } = createNamespacedHelpers('productpact');
|
|
|
+import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
+const { mapActions: place } = createNamespacedHelpers('place');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
|
- components: { NavBar, wholeList, negotiation, intentionList, transaction },
|
|
|
- data: () => ({
|
|
|
- // 头部标题
|
|
|
- title: '',
|
|
|
- // meta为true
|
|
|
- isleftarrow: '',
|
|
|
- // 返回
|
|
|
- navShow: true,
|
|
|
- img_path: require('@/assets/logo.png'),
|
|
|
- active: 0,
|
|
|
- show: false,
|
|
|
- newform: {},
|
|
|
- }),
|
|
|
- created() {},
|
|
|
- computed: {},
|
|
|
+ components: {
|
|
|
+ NavBar,
|
|
|
+ docklist,
|
|
|
+ },
|
|
|
+ data: function() {
|
|
|
+ return {
|
|
|
+ // 头部标题
|
|
|
+ title: '',
|
|
|
+ // meta为true
|
|
|
+ isleftarrow: '',
|
|
|
+ // 返回
|
|
|
+ navShow: true,
|
|
|
+ active: '1',
|
|
|
+ // 下期直播
|
|
|
+ nextList: [],
|
|
|
+ // 以往直播
|
|
|
+ pastList: [],
|
|
|
+ // 省
|
|
|
+ province: [],
|
|
|
+ // 市
|
|
|
+ place: [],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async created() {
|
|
|
+ await this.searchplace();
|
|
|
+ await this.search();
|
|
|
+ },
|
|
|
methods: {
|
|
|
- ...transactions({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
|
|
|
- ...productpact({ productpactCreate: 'create' }),
|
|
|
- submit(data) {
|
|
|
- this.show = true;
|
|
|
- this.$set(this, `newform`, data);
|
|
|
+ ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
|
|
|
+ ...dock(['query', 'delete', 'update', 'create']),
|
|
|
+ async search() {
|
|
|
+ let res = await this.query({ status: '0' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `nextList`, res.data);
|
|
|
+ res = await this.query({ status: '2' });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `pastList`, res.data);
|
|
|
+ },
|
|
|
+ // 申请
|
|
|
+ detailBtn(data) {
|
|
|
+ if (data.status == '0') {
|
|
|
+ this.$router.push({ path: '/userCenter/matter/apply', query: { id: data.id } });
|
|
|
+ } else {
|
|
|
+ console.log(data);
|
|
|
+ }
|
|
|
},
|
|
|
- async onSubmit() {
|
|
|
- this.newform.status = '0';
|
|
|
- this.newform.transaction_id = this.newform.id;
|
|
|
- const res = await this.productpactCreate(this.newform);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- this.newform.status = '4';
|
|
|
- const arr = await this.shenheupdate(this.newform);
|
|
|
- if (this.$checkRes(arr)) {
|
|
|
- this.$message({
|
|
|
- message: '提交交易成功,等待管理员审核,方可交易完成',
|
|
|
- type: 'success',
|
|
|
- });
|
|
|
- }
|
|
|
+ // 查询省市
|
|
|
+ async searchplace() {
|
|
|
+ let res = await this.palcequery({ level: 1 });
|
|
|
+ let arr = await this.palcequery({ level: 2 });
|
|
|
+ if (res || arr) {
|
|
|
+ this.$set(this, `province`, res.data);
|
|
|
+ this.$set(this, `place`, arr.data);
|
|
|
}
|
|
|
- this.show = false;
|
|
|
},
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ ...mapState(['user']),
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.title = this.$route.meta.title;
|
|
|
this.isleftarrow = this.$route.meta.isleftarrow;
|
|
|
},
|
|
|
+ metaInfo() {
|
|
|
+ return { title: this.$route.meta.title };
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|
|
@@ -140,36 +108,8 @@ export default {
|
|
|
.top {
|
|
|
height: 46px;
|
|
|
overflow: hidden;
|
|
|
- position: relative;
|
|
|
- z-index: 999;
|
|
|
}
|
|
|
.main {
|
|
|
min-height: 570px;
|
|
|
- .two {
|
|
|
- position: fixed;
|
|
|
- top: 80%;
|
|
|
-
|
|
|
- left: 10px;
|
|
|
- z-index: 999;
|
|
|
- }
|
|
|
-}
|
|
|
-/deep/.van-tab {
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-/deep/.van-tabs--line .van-tabs__wrap {
|
|
|
- height: 70px;
|
|
|
- margin: 0 0 10px 0;
|
|
|
-}
|
|
|
-/deep/.van-tab--active {
|
|
|
- color: red;
|
|
|
-}
|
|
|
-.van-icon {
|
|
|
- font-size: 20px;
|
|
|
-}
|
|
|
-/deep/.van-popup--bottom {
|
|
|
- bottom: 0;
|
|
|
- left: 0;
|
|
|
- width: 100%;
|
|
|
- height: 300px;
|
|
|
}
|
|
|
</style>
|