|
@@ -7,51 +7,29 @@
|
|
|
<el-image :src="topUrl"></el-image>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="two">
|
|
|
- <el-col :span="24" class="top">
|
|
|
- <span></span>
|
|
|
- </el-col>
|
|
|
<el-col :span="24" class="info">
|
|
|
<el-col :span="1" class="infoTop">
|
|
|
<p>项目详情</p>
|
|
|
<p><span></span></p>
|
|
|
</el-col>
|
|
|
<el-col :span="22" class="infoMess">
|
|
|
- <el-col :span="6" class="infoMessStep">
|
|
|
- <el-steps direction="vertical" :active="dealDetails.status">
|
|
|
- <el-step title="正在洽谈"></el-step>
|
|
|
- <el-step title="达成意向"></el-step>
|
|
|
- <el-step title="交易成功"></el-step>
|
|
|
- </el-steps>
|
|
|
- </el-col>
|
|
|
- <el-col :span="18" class="infoMessInfo">
|
|
|
- <!-- <el-image :src="infoUrl"></el-image> -->
|
|
|
- <el-col :span="24" class="message">
|
|
|
- <el-col :span="12" class="content">
|
|
|
- <p>项目名称</p>
|
|
|
- <p>服务名称:{{ dealDetails.product_name }}</p>
|
|
|
- <p>发布时间:{{ dealDetails.meta | getDate }}</p>
|
|
|
- <p>服务说明:{{ dealDetails.description }}</p>
|
|
|
- </el-col>
|
|
|
- <el-col :span="12" class="image">
|
|
|
- <el-col :span="24" class="user"> 购买人:{{ dealDetails.username }} </el-col>
|
|
|
- <el-col :span="24" class="images" v-if="dealDetails.pic">
|
|
|
- <el-image style="width:100%;height:380px;" :src="dealDetails.pic"></el-image>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="btn">
|
|
|
- <el-button @click.native="onclick()">我要对接</el-button>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
- </el-col>
|
|
|
+ <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
|
|
+ <el-tab-pane label="正在洽谈" name="first">
|
|
|
+ <zzqt :zzqtList="zzqtList" :total="zzqtTotal"></zzqt>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="达成意向" name="second">
|
|
|
+ <dcyx :dcyxList="dcyxList" :total="dxyxTotal"></dcyx>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="交易完成" name="third">
|
|
|
+ <jywc :jywcList="jywcList" :total="jywcTotal"></jywc>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
</el-col>
|
|
|
<el-col :span="1" class="infoDown">
|
|
|
<p><span></span></p>
|
|
|
<p>项目详情</p>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
- <el-col :span="24" class="top down">
|
|
|
- <span></span>
|
|
|
- </el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -60,63 +38,56 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import zzqt from './parts/zzqt.vue';
|
|
|
+import dcyx from './parts/dcyx.vue';
|
|
|
+import jywc from './parts/jywc.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
-const { mapActions: product } = createNamespacedHelpers('enterpriseproject');
|
|
|
-const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
export default {
|
|
|
name: 'dealDetail',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ zzqt,
|
|
|
+ dcyx,
|
|
|
+ jywc,
|
|
|
+ },
|
|
|
data: () => ({
|
|
|
topUrl: require('@/assets/dynamic6.png'),
|
|
|
infoUrl: require('@/assets/dynamic7.png'),
|
|
|
- dealDetails: {},
|
|
|
+ activeName: 'first',
|
|
|
+ zzqtList: [],
|
|
|
+ zzqtTotal: 0,
|
|
|
+ dcyxList: [],
|
|
|
+ dxyxTotal: 0,
|
|
|
+ jywcList: [],
|
|
|
+ jywcTotal: 0,
|
|
|
}),
|
|
|
created() {
|
|
|
this.search();
|
|
|
},
|
|
|
- computed: {
|
|
|
- id() {
|
|
|
- return this.$route.query.id;
|
|
|
- },
|
|
|
- },
|
|
|
methods: {
|
|
|
- ...transaction(['fetch']),
|
|
|
- ...product({ list: 'newquery', newfetch: 'newfetch' }),
|
|
|
- ...expertsuser({ expertsuserFetch: 'fetch' }),
|
|
|
+ ...transaction(['productquery']),
|
|
|
async search() {
|
|
|
- let res = await this.fetch(this.id);
|
|
|
- res.data.status = parseInt(res.data.status);
|
|
|
- res.data.status = res.data.status + 1;
|
|
|
- this.$set(this, `dealDetails`, res.data);
|
|
|
- },
|
|
|
- async onclick() {
|
|
|
- if (this.dealDetails.type == '0') {
|
|
|
- let product_id = this.dealDetails.product_id;
|
|
|
- const res = await this.newfetch(product_id);
|
|
|
- if (res.data.totaltype == '0') {
|
|
|
- this.$router.push({ path: '/market/marketlists', query: { totaltype: 0, id: product_id, column_name: '技术供求', display: 2 } });
|
|
|
- } else if (res.data.totaltype == '1') {
|
|
|
- this.$router.push({ path: '/market/marketlists', query: { totaltype: 1, id: product_id, column_name: '科技产品', display: 2 } });
|
|
|
- } else if (res.data.totaltype == '2') {
|
|
|
- this.$router.push({ path: '/market/marketlists', query: { totaltype: 2, id: product_id, column_name: '科技产品', display: 2 } });
|
|
|
- }
|
|
|
- } else {
|
|
|
- let export_id = this.dealDetails.product_id;
|
|
|
- const res = await this.expertsuserFetch(export_id);
|
|
|
- this.$router.push({ path: '/market/marketlists', query: { id: export_id, column_name: '专家供求', display: 3 } });
|
|
|
+ let res = await this.productquery({ product_id: this.id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ var zzqt = res.data.filter(item => item.status === '0');
|
|
|
+ var dcyx = res.data.filter(item => item.status === '1');
|
|
|
+ var jywc = res.data.filter(item => item.status === '2');
|
|
|
+ this.$set(this, `zzqtList`, zzqt);
|
|
|
+ this.$set(this, `zzqtTotal`, zzqt.length);
|
|
|
+ this.$set(this, `dcyxList`, dcyx);
|
|
|
+ this.$set(this, `dxyxTotal`, dcyx.length);
|
|
|
+ this.$set(this, `jywcList`, jywc);
|
|
|
+ this.$set(this, `jywcTotal`, jywc.length);
|
|
|
}
|
|
|
},
|
|
|
+ handleClick(tab, event) {
|
|
|
+ console.log(tab, event);
|
|
|
+ },
|
|
|
},
|
|
|
- filters: {
|
|
|
- getDate(meta) {
|
|
|
- let createdAt = _.get(meta, `createdAt`);
|
|
|
- let date = new Date(createdAt)
|
|
|
- .toLocaleDateString()
|
|
|
- .replace('/', '-')
|
|
|
- .replace('/', '-');
|
|
|
- return date;
|
|
|
+ computed: {
|
|
|
+ id() {
|
|
|
+ return this.$route.query.id;
|
|
|
},
|
|
|
},
|
|
|
};
|