guhongwei 4 år sedan
förälder
incheckning
ff39f3ff12

+ 0 - 105
src/layout/matter/detailinfo.vue

@@ -1,105 +0,0 @@
-<template>
-  <div id="detailinfo">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="top">
-          <p class="textOver">{{ detailInfo.product_name }}</p>
-        </el-col>
-        <el-col :span="24" class="message">
-          <p>
-            <span>营销人名称:</span>
-            <span>{{ detailInfo.market_username || '暂无' }}</span>
-          </p>
-          <p>
-            <span>购买人名称:</span>
-            <span>{{ detailInfo.username || '暂无' }}</span>
-          </p>
-          <p>
-            <span>状态:</span>
-            <span>{{ detailInfo.status === '0' ? '洽谈' : detailInfo.status === '1' ? '意向' : detailInfo.status === '2' ? '交易' : '暂无' }}</span>
-          </p>
-          <div class="introduction">
-            <p>说明:</p>
-            <p>{{ detailInfo.description || '暂无' }}</p>
-          </div>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'detailinfo',
-  props: {
-    detailInfo: null,
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {},
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  .top {
-    background: #fff;
-    min-height: 40px;
-    padding: 0 15px;
-    margin: 0 0 10px 0;
-    .carousel {
-      height: 200px !important;
-      padding: 10px 0;
-    }
-    .el-image {
-      width: 100%;
-      height: 200px;
-    }
-
-    p {
-      font-size: 18px;
-      // color: #7996b1;
-      padding: 10px 0 10px 0;
-    }
-  }
-  .message {
-    background: #fff;
-    padding: 0 15px;
-    min-height: 50px;
-    p {
-      min-height: 50px;
-      line-height: 50px;
-      border-bottom: 1px solid #ccc;
-    }
-    span:first-child {
-      display: inline-block;
-      width: 98px;
-      color: #ccc;
-    }
-    span:last-child {
-      color: #000;
-    }
-    div {
-      p {
-        border-bottom: none;
-      }
-    }
-  }
-}
-/deep/.el-carousel__container {
-  height: 200px !important;
-}
-</style>

+ 4 - 4
src/router/index.js

@@ -94,10 +94,10 @@ const routes = [
   },
   // 用户-申请
   {
-    path: '/userCenter/matter/apply',
-    name: 'apply',
-    meta: { title: '申请', isleftarrow: true },
-    component: () => import('../views/userCenter/matter/apply.vue'),
+    path: '/userCenter/matter/detail',
+    name: 'matter_detail',
+    meta: { title: '交易完成', isleftarrow: true },
+    component: () => import('../views/userCenter/matter/detail.vue'),
   },
   // 用户-展会管理
   {

+ 1 - 2
src/views/user/parts/clickBtn.vue

@@ -5,9 +5,8 @@
         <span v-if="user.role == '4' || user.role == '5' || user.role == '6'">
           <van-cell is-link title="基本信息" @click="$router.push({ path: '/userCenter/user/index' })" />
           <van-cell is-link title="我的发布" @click="$router.push({ path: '/userCenter/myProduct/index' })" />
-          <!-- <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" /> -->
+          <van-cell is-link title="事项管理" @click="$router.push({ path: '/userCenter/matter/index' })" />
           <van-cell is-link title="展会管理" @click="$router.push({ path: '/userCenter/dock/index' })" />
-          <!--<van-cell is-link title="退出登录" @click="$router.push({ path: '/userCenter/out/index' })" /> -->
         </span>
         <span v-else>
           <span v-if="user.role == '0'">

+ 0 - 358
src/views/userCenter/matter/apply.vue

@@ -1,358 +0,0 @@
-<template>
-  <div id="apply">
-    <el-row>
-      <el-col :span="24">
-        <span v-if="type == '0'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="需求名称" label="需求名称" placeholder="需求名称" />
-            <van-field name="radio" label="紧急程度">
-              <template #input>
-                <van-radio-group v-model="form.degreeurgency" direction="horizontal">
-                  <van-radio name="特急">特急</van-radio>
-                  <van-radio name="一般">一般</van-radio>
-                  <van-radio name="长期">长期</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
-            <van-popup v-model="fieldpic" position="bottom">
-              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
-            <van-popup v-model="cooperationpic" position="bottom">
-              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
-            </van-popup>
-            <van-field v-model="form.budget" name="投资预算" label="投资预算" placeholder="投资预算" />
-            <van-field v-model="form.requirementdesc" rows="1" autosize label="技术说明" type="textarea" placeholder="技术说明" />
-            <van-field v-model="form.expect" rows="1" autosize label="预期目标" type="textarea" placeholder="预期目标" />
-            <van-field v-model="form.present" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
-            <van-field name="expertimage" label="产品图片(6)">
-              <template #input
-                ><upload
-                  :limit="6"
-                  :data="form.image"
-                  type="image"
-                  :url="`/files/imgpath/upload`"
-                  @upload="uploadSuccess"
-                  :uploadBtn="true"
-                  @delete="uploadDelete"
-                ></upload>
-              </template>
-            </van-field>
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-        <span v-else-if="type == '1'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="成果名称" label="成果名称" placeholder="成果名称" />
-            <van-field readonly clickable name="picker" :value="form.field" label="所属领域" placeholder="点击选择" @click="fieldpic = true" />
-            <van-popup v-model="fieldpic" position="bottom">
-              <van-picker show-toolbar :columns="field" @confirm="fieldSubmit" @cancel="fieldpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.cooperation" label="合作方式" placeholder="点击选择" @click="cooperationpic = true" />
-            <van-popup v-model="cooperationpic" position="bottom">
-              <van-picker show-toolbar :columns="cooperation" @confirm="cooperationSubmit" @cancel="cooperationpic = false" />
-            </van-popup>
-            <van-field readonly clickable name="picker" :value="form.achievestatus" label="成果状态" placeholder="点击选择" @click="achievestatuspic = true" />
-            <van-popup v-model="achievestatuspic" position="bottom">
-              <van-picker show-toolbar :columns="achievestatus" @confirm="achievestatusOnsubmit" @cancel="achievestatuspic = false" />
-            </van-popup>
-            <van-field v-model="form.achieveown" name="成果权属" label="成果权属" placeholder="成果权属" />
-            <van-field name="radio" label="成果来源">
-              <template #input>
-                <van-radio-group v-model="form.achievesource" direction="horizontal">
-                  <van-radio name="国家项目">国家项目</van-radio>
-                  <van-radio name="省级项目">省级项目</van-radio>
-                  <van-radio name="市级项目">市级项目</van-radio>
-                  <van-radio name="市级项目">市级项目</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field v-model="form.intentionprice" name="意向价格" label="意向价格" placeholder="意向价格" />
-            <van-field name="patent" label="专利信息">
-              <template #input>
-                <el-button type="primary" size="mini" @click="addPatent">添加</el-button>
-                <el-button type="primary" size="mini" @click="viewPatent">查看</el-button>
-              </template>
-            </van-field>
-            <!-- <van-field v-model="form.roadshow" name="项目路演" label="项目路演" placeholder="项目路演" /> -->
-            <van-field v-model="form.achievebrief" rows="1" autosize label="成果简介" type="textarea" placeholder="成果简介" />
-            <van-field v-model="form.features" rows="1" autosize label="技术特点" type="textarea" placeholder="技术特点" />
-            <van-field v-model="form.team" rows="1" autosize label="技术团队" type="textarea" placeholder="技术团队" />
-            <van-field v-model="form.expectations" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
-            <van-field v-model="form.condition" rows="1" autosize label="合作要求" type="textarea" placeholder="合作要求" />
-            <van-field name="expertimage" label="产品图片(6)">
-              <template #input
-                ><upload
-                  :limit="6"
-                  :data="form.image"
-                  type="image"
-                  :url="`/files/imgpath/upload`"
-                  @upload="uploadSuccess"
-                  :uploadBtn="true"
-                  @delete="uploadDelete"
-                ></upload>
-              </template>
-            </van-field>
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-        <span v-else-if="type == '2'">
-          <van-form>
-            <van-field v-model="form.company" name="企业名称" label="企业名称" placeholder="企业名称" readonly />
-            <van-field v-model="form.phone" name="联系电话" label="联系电话" placeholder="联系电话" readonly />
-            <van-field v-model="form.email" name="电子邮箱" label="电子邮箱" placeholder="电子邮箱" readonly />
-            <van-field v-model="form.contacts" name="联系人" label="联系人" placeholder="联系人" />
-            <van-field v-model="form.qqwx" name="QQ/微信" label="QQ/微信" placeholder="QQ/微信" />
-            <van-field v-model="form.name" name="信息名称" label="信息名称" placeholder="信息名称" />
-            <van-field name="radio" label="信息属性">
-              <template #input>
-                <van-radio-group v-model="form.messattribute" direction="horizontal">
-                  <van-radio name="提供方">提供方</van-radio>
-                  <van-radio name="需求方">需求方</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field name="radio" label="需求程度">
-              <template #input>
-                <van-radio-group v-model="form.demand" direction="horizontal">
-                  <van-radio name="特急">特急</van-radio>
-                  <van-radio name="一般">一般</van-radio>
-                  <van-radio name="长期">长期</van-radio>
-                </van-radio-group>
-              </template>
-            </van-field>
-            <van-field v-model="form.informationdesc" rows="1" autosize label="信息描述" type="textarea" placeholder="信息描述" />
-            <van-field v-model="form.coreelements" rows="1" autosize label="核心要素" type="textarea" placeholder="核心要素" />
-            <van-field v-model="form.priceinfo" rows="1" autosize label="价格信息" type="textarea" placeholder="价格信息" />
-            <van-field v-model="form.businessexpect" rows="1" autosize label="商业预期" type="textarea" placeholder="商业预期" />
-            <div style="margin: 16px;">
-              <van-button round block type="info" @click="onSubmit">
-                提交
-              </van-button>
-            </div>
-          </van-form>
-        </span>
-      </el-col>
-    </el-row>
-    <van-dialog v-model="show" title="添加专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
-      <van-form>
-        <van-field v-model="patentform.patentinfo" name="名称" label="名称" placeholder="名称" />
-        <van-field name="radio" label="专利状态">
-          <template #input>
-            <van-radio-group v-model="patentform.patentstatus" direction="horizontal">
-              <van-radio name="已申请">已申请</van-radio>
-              <van-radio name="已授权">已授权</van-radio>
-            </van-radio-group>
-          </template>
-        </van-field>
-        <div style="margin: 16px;">
-          <van-button round block type="info" @click="patentSubmit">
-            提交
-          </van-button>
-        </div>
-      </van-form>
-    </van-dialog>
-    <van-dialog v-model="patentshow" title="查看专利信息" :showConfirmButton="false" :closeOnClickOverlay="true">
-      <div class="patentList" v-for="(item, index) in patentList" :key="index">
-        <p class="textOver">{{ item.patentinfo }}</p>
-        <p>专利状态:{{ item.patentstatus }}</p>
-        <p>
-          <el-button type="primary" size="mini" @click="delPatent(index, item)">刪除</el-button>
-        </p>
-      </div>
-    </van-dialog>
-  </div>
-</template>
-
-<script>
-import upload from '@/components/upload.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'apply',
-  props: {
-    type: { type: String, default: '0' },
-    form: { type: Object },
-    fieldList: { type: Array },
-    cooperationList: { type: Array },
-    achievestatusList: { type: Array },
-  },
-  components: {
-    upload,
-  },
-  data: function() {
-    return {
-      field: [],
-      fieldpic: false,
-      cooperation: [],
-      cooperationpic: false,
-      achievestatus: [],
-      achievestatuspic: false,
-      // 专利信息
-      show: false,
-      patentform: {},
-      patentshow: false,
-      patentList: [],
-    };
-  },
-  created() {},
-  methods: {
-    // 重组数组
-    seachfield() {
-      let field = this.fieldList.map(item => item.name);
-      this.$set(this, `field`, field);
-    },
-    // 所屬領域
-    fieldSubmit(value) {
-      this.$set(this.form, `field`, value);
-      this.fieldpic = false;
-    },
-    // 重组数组
-    searchcooperation() {
-      let cooperation = this.cooperationList.map(item => item.name);
-      this.$set(this, `cooperation`, cooperation);
-    },
-    // 合作方式
-    cooperationSubmit(value) {
-      this.$set(this.form, `cooperation`, value);
-      this.cooperationpic = false;
-    },
-    // 重组数组
-    searchachievestatus() {
-      let achievestatus = this.achievestatusList.map(item => item.name);
-      this.$set(this, `achievestatus`, achievestatus);
-    },
-    // 成果状态
-    achievestatusOnsubmit(value) {
-      this.$set(this.form, `achievestatus`, value);
-      this.achievestatuspic = false;
-    },
-    // 图片上传
-    uploadSuccess({ type, data }) {
-      let arr = _.get(this.form, type);
-      if (_.isArray(arr)) {
-        let datas = { name: data.name, url: data.uri };
-        this.form[type].push({ name: data.name, url: data.uri });
-      } else {
-        let newArr = [{ name: data.name, url: data.uri }];
-        this.$set(this.form, `${type}`, newArr);
-      }
-    },
-    // 删除图片
-    uploadDelete(index) {
-      this.form.image.splice(index, 1);
-    },
-    // 添加专利信息
-    addPatent() {
-      this.show = true;
-    },
-    // 提交专利信息
-    patentSubmit() {
-      this.patentList.push(this.patentform);
-      this.show = false;
-    },
-    // 查看专利信息
-    viewPatent() {
-      this.patentshow = true;
-    },
-    // 删除专利信息
-    delPatent(index, val) {
-      this.patentList.splice(index, 1);
-      this.$notify({
-        message: '删除成功',
-        type: 'success',
-      });
-      this.patentshow = false;
-    },
-    onSubmit() {
-      this.form.patent = this.patentList;
-      this.$emit('onSubmit', { data: this.form });
-    },
-    // 查询专利信息
-    searchpatent() {
-      let data = this.form;
-      if (data.patent) {
-        console.log(data.patent);
-        this.$set(this, `patentList`, data.patent);
-      }
-    },
-  },
-  watch: {
-    fieldList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.seachfield();
-      },
-    },
-    cooperationList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchcooperation();
-      },
-    },
-    achievestatusList: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchachievestatus();
-      },
-    },
-    form: {
-      immediate: true,
-      deep: true,
-      handler(val) {
-        this.searchpatent();
-      },
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.patentList {
-  padding: 0 10px;
-  border-bottom: 1px dashed #ccc;
-  p {
-    font-size: 16px;
-    color: #666;
-    padding: 0 0 5px 0;
-  }
-  p:nth-child(1) {
-    font-size: 18px;
-    color: #000;
-    font-weight: bold;
-  }
-  p:nth-child(3) {
-    text-align: center;
-  }
-}
-</style>

+ 111 - 0
src/views/userCenter/matter/detail.vue

@@ -0,0 +1,111 @@
+<template>
+  <div id="detail">
+    <el-row>
+      <el-col :span="24" class="style">
+        <el-col :span="24" class="top">
+          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
+        </el-col>
+        <el-col :span="24" class="main">
+          <van-form>
+            <van-field v-model="form.product_name" name="产品名称" label="产品名称" placeholder="产品名称" readonly />
+            <van-field v-model="form.market_username" name="营销人名称" label="营销人名称" placeholder="营销人名称" readonly />
+            <van-field v-model="form.username" name="购买人名称" label="购买人名称" placeholder="购买人名称" readonly />
+            <van-field v-model="form.description" rows="1" autosize label="描述" type="textarea" placeholder="描述" />
+            <div style="margin: 16px;">
+              <van-button round block type="info" @click="onSubmit">
+                提交
+              </van-button>
+            </div>
+          </van-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import NavBar from '@/layout/common/topInfo.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
+export default {
+  name: 'detail',
+  props: {},
+  components: {
+    NavBar,
+  },
+  data: function() {
+    return {
+      // 头部标题
+      title: '',
+      // meta为true
+      isleftarrow: '',
+      // 返回
+      navShow: true,
+      form: {},
+    };
+  },
+  async created() {
+    if (this.id) {
+      await this.search();
+    }
+  },
+  methods: {
+    ...transaction({ transactionfetch: 'fetch', transactionlist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+    ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update', productpactCreate: 'create' }),
+    async search() {
+      let res = await this.transactionfetch(this.id);
+      if (this.$checkRes(res)) {
+        this.$set(this, 'form', res.data);
+      }
+    },
+    // 提交
+    async onSubmit() {
+      let data = this.form;
+      data.status = '0';
+      data.transaction_id = this.form.id;
+      const res = await this.productpactCreate(data);
+      if (this.$checkRes(res)) {
+        data.status = '4';
+        const arr = await this.transactionupdate(data);
+        if (this.$checkRes(arr)) {
+          this.$notify({
+            message: '提交交易成功,等待管理员审核,方可交易完成',
+            type: 'success',
+          });
+          this.$router.push({ path: '/userCenter/matter/index' });
+        }
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    id() {
+      return this.$route.query.id;
+    },
+  },
+  mounted() {
+    this.title = this.$route.meta.title;
+    this.isleftarrow = this.$route.meta.isleftarrow;
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.style {
+  width: 100%;
+  min-height: 667px;
+  position: relative;
+  background-color: #f9fafc;
+}
+.top {
+  height: 46px;
+  overflow: hidden;
+}
+.main {
+  min-height: 570px;
+}
+</style>

+ 0 - 79
src/views/userCenter/matter/detailinfo.vue

@@ -1,79 +0,0 @@
-<template>
-  <div id="">
-    <el-row>
-      <el-col :span="24" class="style">
-        <el-col :span="24" class="top">
-          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
-        </el-col>
-        <el-col :span="24" class="main">
-          <detailinfo :detailInfo="detailInfo"></detailinfo>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import NavBar from '@/layout/common/topInfo.vue';
-import detailinfo from '@/layout/matter/detailinfo.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'prodDetail',
-  props: {},
-  components: {
-    NavBar,
-    detailinfo, //详情
-  },
-  data: () => ({
-    // 头部标题
-    title: '',
-    // meta为true
-    isleftarrow: '',
-    // 返回
-    navShow: true,
-    // 产品名称
-    detailInfo: {},
-  }),
-  created() {
-    this.search();
-  },
-  computed: {
-    id() {
-      return this.$route.query.id;
-    },
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update', fetch: 'fetch' }),
-
-    async search() {
-      let res = await this.fetch(this.id);
-      if (this.$checkRes(res)) {
-        this.$set(this, `detailInfo`, res.data);
-      }
-    },
-  },
-  mounted() {
-    this.title = this.$route.meta.title;
-    this.isleftarrow = this.$route.meta.isleftarrow;
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.style {
-  width: 100%;
-  min-height: 667px;
-  position: relative;
-  background-color: #f9fafc;
-}
-.top {
-  height: 46px;
-  overflow: hidden;
-  position: relative;
-  z-index: 999;
-}
-.main {
-  min-height: 570px;
-}
-</style>

+ 75 - 45
src/views/userCenter/matter/index.vue

@@ -6,16 +6,20 @@
           <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
         </el-col>
         <el-col :span="24" class="main">
-          <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>
+          <van-tabs v-model="active">
+            <van-tab title="我的全部">
+              <list :list="oneList" status="3" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的洽谈">
+              <list :list="twoList" status="0" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的意向">
+              <list :list="threeList" status="1" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+            <van-tab title="我的交易">
+              <list :list="fourList" status="2" @query="search" @checkBtn="checkBtn"></list>
+            </van-tab>
+          </van-tabs>
         </el-col>
       </el-col>
     </el-row>
@@ -23,17 +27,16 @@
 </template>
 
 <script>
-import docklist from './parts/docklist.vue';
+import list from './parts/list.vue';
 import NavBar from '@/layout/common/topInfo.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: dock } = createNamespacedHelpers('dock');
-const { mapActions: place } = createNamespacedHelpers('place');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
 export default {
   name: 'index',
   props: {},
   components: {
     NavBar,
-    docklist,
+    list,
   },
   data: function() {
     return {
@@ -43,46 +46,73 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-      active: '1',
-      // 下期直播
-      nextList: [],
-      // 以往直播
-      pastList: [],
-      // 省
-      province: [],
-      // 市
-      place: [],
+      active: 0,
+      oneList: [],
+      twoList: [],
+      threeList: [],
+      fourList: [],
     };
   },
   async created() {
-    await this.searchplace();
-    await this.search();
+    await this.search({ status: '3' });
+    await this.search({ status: '0' });
+    await this.search({ status: '1' });
+    await this.search({ status: '2' });
   },
   methods: {
-    ...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);
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', shenheupdate: 'update' }),
+    async search({ skip = 0, status, ...info } = {}) {
+      let userid = this.user.uid;
+      let market_userid = this.user.uid;
+      if (status == '3') {
+        const res = await this.transactionslist({ skip, userid, ...info });
+        const arr = await this.transactionslist({ skip, market_userid, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `oneList`, newData);
+        }
+      } else if (status == '0') {
+        const res = await this.transactionslist({ skip, market_userid, status: 0, ...info });
+        if (this.$checkRes(res)) {
+          this.$set(this, `twoList`, res.data);
+        }
+      } else if (status == '1') {
+        const res = await this.transactionslist({ skip, market_userid, status: 1, ...info });
+        const arr = await this.transactionslist({ skip, market_userid, status: 4, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `threeList`, newData);
+        }
+      } else if (status == '2') {
+        const res = await this.transactionslist({ skip, market_userid, status: 2, ...info });
+        const arr = await this.transactionslist({ skip, userid, status: 2, ...info });
+        var newData = res.data.concat(arr.data);
+        if (this.$checkRes(newData)) {
+          this.$set(this, `fourList`, newData);
+        }
+      }
     },
-    // 申请
-    detailBtn(data) {
+    // 交易按钮
+    async checkBtn(data) {
+      // 同意交易%交易完成
       if (data.status == '0') {
-        this.$router.push({ path: '/userCenter/matter/apply', query: { id: data.id } });
-      } else {
-        console.log(data);
+        data.status = '1';
+        let res = await this.shenheupdate(data);
+        this.$notify({
+          message: ' 同意交易成功',
+          type: 'success',
+        });
+        this.searchevery();
+      } else if (data.status == '1') {
+        this.$router.push({ path: '/userCenter/matter/detail', query: { id: data.id } });
       }
     },
-    // 查询省市
-    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);
-      }
+    // 提交刷新
+    searchevery() {
+      this.search({ status: '3' });
+      this.search({ status: '0' });
+      this.search({ status: '1' });
+      this.search({ status: '2' });
     },
   },
   computed: {

+ 0 - 104
src/views/userCenter/matter/parts/docklist.vue

@@ -1,104 +0,0 @@
-<template>
-  <div id="docklist">
-    <el-row>
-      <el-col :span="24" class="docklist">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p>
-            <span class="textOver">[{{ item.room_id }}]</span>
-            <span class="textOver">{{ item.title }}</span>
-          </p>
-          <p>
-            <span class="textOver">负责人:{{ item.adminuser }}</span>
-            <span class="textOver">手机号:{{ item.phone }}</span>
-          </p>
-          <p>
-            <span class="textOver">地址:{{ getprovince(item.province) }}-{{ getplace(item.place) }}</span>
-            <span class="textOver">状态:{{ item.status == '0' ? '准备中' : item.status == '1' ? '开始' : '结束' }}</span>
-          </p>
-          <el-col :span="24" class="btn">
-            <!-- <el-button type="primary" size="mini" @click="detailBtn(item)">{{
-              item.status == '0' || item.status == '1' ? '编辑/状态审核' : '查看成果'
-            }}</el-button> -->
-            <el-button v-if="item.status === '0'" type="primary" size="mini" @click="detailBtn(item)">申请</el-button>
-          </el-col>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-export default {
-  name: 'docklist',
-  props: {
-    list: { type: Array },
-    // 省
-    province: { type: Array, default: () => [] },
-    // 市
-    place: { type: Array, default: () => [] },
-  },
-  components: {},
-  data: function() {
-    return {};
-  },
-  created() {},
-  methods: {
-    // 过滤省
-    getprovince(item) {
-      let res = this.province.find(i => i.code == item);
-      if (res) return res.name;
-    },
-    // 过滤市
-    getplace(item) {
-      let res = this.place.find(i => i.code == item);
-      if (res) return res.name;
-    },
-    detailBtn(data) {
-      this.$emit('detailBtn', data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.docklist {
-  padding: 0 10px;
-  .list {
-    border-bottom: 1px dashed #ccc;
-    padding: 10px 0;
-    p {
-      font-size: 16px;
-      color: #666;
-      padding: 0 0 5px 0;
-      span {
-        display: inline-block;
-        width: 50%;
-      }
-    }
-    p:nth-child(1) {
-      font-size: 18px;
-      font-weight: bold;
-      span:nth-child(1) {
-        width: 15%;
-        color: #ff0000;
-      }
-      span:nth-child(2) {
-        width: 85%;
-      }
-    }
-    .btn {
-      text-align: center;
-    }
-  }
-}
-</style>

+ 0 - 103
src/views/userCenter/matter/parts/intentionList.vue

@@ -1,103 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-            <span style="float:right"><van-button type="info" size="small" @click="submit(item)">交易成功</van-button></span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 1, ...info });
-      const arr = await this.transactionList({ skip, limit, market_userid, status: 4, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(newData)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    submit(item) {
-      this.$emit('submit', item);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 82 - 0
src/views/userCenter/matter/parts/list.vue

@@ -0,0 +1,82 @@
+<template>
+  <div id="list">
+    <el-row>
+      <el-col :span="24" class="metter">
+        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
+          <p class="textOver">{{ item.product_name }}</p>
+          <p>
+            <span class="textOver">营销人:{{ item.market_username }}</span>
+            <span class="textOver">购买人:{{ item.username }}</span>
+          </p>
+          <p class="textOver">
+            交易状态:{{
+              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '暂无'
+            }}
+          </p>
+          <p>
+            <el-button type="primary" size="mini" v-if="item.status == '0' || item.status == '1'" @click="checkBtn(item)">{{
+              item.status == '0' ? '同意交易' : item.status == '1' ? '交易完成' : '暂无'
+            }}</el-button>
+          </p>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'list',
+  props: {
+    list: { type: Array },
+  },
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {
+    checkBtn(data) {
+      this.$emit('checkBtn', data);
+    },
+  },
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.metter {
+  padding: 0 10px;
+  .list {
+    padding: 10px 0;
+    border-bottom: 1px dashed #ccc;
+    p {
+      font-size: 16px;
+      color: #000;
+      padding: 0 0 10px 0;
+    }
+    p:nth-child(1) {
+      font-size: 18px;
+      font-weight: bold;
+    }
+    p:nth-child(2) {
+      span {
+        display: inline-block;
+        width: 50%;
+      }
+    }
+    p:nth-child(4) {
+      text-align: center;
+    }
+  }
+}
+</style>

+ 0 - 112
src/views/userCenter/matter/parts/negotiation.vue

@@ -1,112 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-            <span style="float:right"><van-button type="info" size="small" @click="submit(item)">同意交易</van-button> </span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 0, ...info });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-      }
-    },
-    async submit(item) {
-      item.status = '1';
-      let res = await this.shenheupdate(item);
-      if (this.$checkRes(res)) {
-        this.$message({
-          message: '同意交易提交成功',
-          type: 'success',
-        });
-        this.searchInfo();
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.content {
-  padding: 16px 16px 160px;
-  height: 160px;
-  background-color: aqua;
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 0 - 102
src/views/userCenter/matter/parts/transaction.vue

@@ -1,102 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <!-- <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p> -->
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-const { mapActions: expertsaudit } = createNamespacedHelpers('expertsaudit');
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let market_userid = this.user.uid;
-      let userid = this.user.uid;
-      skip = this.skip;
-      const res = await this.transactionList({ skip, limit, market_userid, status: 2, ...info });
-      const arr = await this.transactionList({ skip, limit, userid, status: 2, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    async submit(data) {
-      console.log(data);
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>

+ 0 - 100
src/views/userCenter/matter/parts/wholeList.vue

@@ -1,100 +0,0 @@
-<template>
-  <div id="auditList">
-    <el-row>
-      <el-col :span="24" class="info">
-        <el-col :span="24" class="list" v-for="(item, index) in list" :key="index">
-          <p class="textOver">
-            <span @click="$router.push({ path: '/userCenter/matter/detailinfo', query: { id: item.id } })">{{ item.product_name }}</span>
-          </p>
-          <p>
-            <span class="ptwo"><span>营销人名称:</span>{{ item.market_username || '暂无' }}</span>
-            <span class="ptwo"><span>购买人名称:</span>{{ item.username || '暂无' }}</span>
-          </p>
-          <p class="newptwo">
-            <span>状态:</span
-            >{{
-              item.status == '0' ? '正在洽谈' : item.status == '1' ? '达成意向' : item.status == '2' ? '我的交易' : item.status == '4' ? '合同审核中' : '未识别'
-            }}
-          </p>
-          <p class="textOver"><span>说明:</span>{{ item.description || '暂无' }}</p>
-        </el-col>
-      </el-col>
-    </el-row>
-  </div>
-</template>
-
-<script>
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'auditList',
-  props: {},
-  components: {},
-  data: function() {
-    return {
-      list: [],
-    };
-  },
-  created() {
-    this.searchInfo();
-  },
-  methods: {
-    ...transaction({ transactionList: 'query', transactiondtetle: 'delete', shenheupdate: 'update' }),
-    async searchInfo({ skip = 0, limit = 1000, ...info } = {}) {
-      let userid = this.user.uid;
-      let market_userid = this.user.uid;
-      const res = await this.transactionList({ skip, limit, userid, ...info });
-      const arr = await this.transactionList({ skip, limit, market_userid, ...info });
-      var newData = res.data.concat(arr.data);
-      if (this.$checkRes(newData)) {
-        this.$set(this, `list`, newData);
-      }
-    },
-
-    submit() {
-      console.log('submit');
-    },
-  },
-  computed: {
-    ...mapState(['user']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped>
-.info {
-  border-top: 1px solid #f5f5f5;
-  .list {
-    background: #fff;
-    padding: 0 10px;
-    border-bottom: 1px solid #ccc;
-    p {
-      font-size: 14px;
-      color: #000;
-      padding: 5px 0;
-    }
-    p:first-child {
-      font-size: 16px;
-    }
-    p:nth-child(2) .ptwo {
-      display: inline-block;
-      width: 50%;
-    }
-    p:nth-child(2) .ptwo span:first-child {
-      color: #ccc;
-    }
-    p:last-child span {
-      color: #ccc;
-    }
-  }
-}
-.newptwo {
-  color: #ccc !important;
-}
-</style>