guhongwei преди 4 години
родител
ревизия
d732e0e51c

+ 1 - 1
README.md

@@ -30,7 +30,7 @@ See [Configuration Reference](https://cli.vuejs.org/config/).
 http://free.liaoningdoupo.com/api/auth/wxchattest?redirect_uri=http://localhost:8002/live/index&type=0&openid=o3ORKt5VIqOJ_8F3eE69qYMu7I2o
 
 展会负责人
-http://free.liaoningdoupo.com/api/auth/wxchattest?redirect_uri=http://localhost:8002/live/index&type=0&openid=
+http://free.liaoningdoupo.com/api/auth/wxchattest?redirect_uri=http://localhost:8002/live/index&type=0&openid=o3ORKt8yN1OHAJWrX1ApOf2vWM5U
 
 
 展会vip用户

+ 18 - 2
src/views/dockCenter/applyInfo/index.vue

@@ -63,6 +63,7 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
@@ -96,10 +97,25 @@ export default {
           status: '1',
         },
       ],
+      dock_id:''
     };
   },
-  created() {},
-  methods: {},
+  created() {
+        this.searchInfo();
+  },
+  methods: {
+    ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+    async searchInfo() {
+      let res = await this.dockfetch(this.user.uid);
+      if (this.$checkRes(res)) {
+        var oneList = res.data.apply.filter(item => item.status === '0');
+        var twoList = res.data.apply.filter(item => item.status === '1');
+        this.$set(this, `oneList`, oneList);
+        this.$set(this, `twoList`, twoList);
+        this.$set(this, `dock_id`, res.data.id);
+      }
+    },
+  },
   computed: { ...mapState(['user']) },
   mounted() {
     this.title = this.$route.meta.title;

+ 2 - 2
src/views/dockCenter/dockInfo/index.vue

@@ -98,8 +98,8 @@ export default {
     ...place({ palcequery: 'query', transactiondtetle: 'delete' }),
     ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
     ...authUser({authUserUpdate: 'update',}),
-     async searchInfo() {
-      let res = await this.dockfetch('5f0c09a268972785441dfa1c');
+    async searchInfo() {
+      let res = await this.dockfetch(this.user.uid);
      if (this.$checkRes(res)) {
         this.$set(this, `form`, res.data);
       }

+ 24 - 23
src/views/dockCenter/dynamicInfo/index.vue

@@ -29,6 +29,8 @@ import dcyx from './parts/dcyx.vue';
 import jywc from './parts/jywc.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'index',
   props: {},
@@ -42,31 +44,30 @@ export default {
       // 返回
       navShow: true,
       activeName: 'first',
-      zzqtList: [
-        {
-          product_name: '产品名称',
-          username: '营销人',
-          market_username: '后买人',
-        },
-      ],
-      dcyxList: [
-        {
-          product_name: '产品名称',
-          username: '营销人',
-          market_username: '后买人',
-        },
-      ],
-      jywcList: [
-        {
-          product_name: '产品名称',
-          username: '营销人',
-          market_username: '后买人',
-        },
-      ],
+      zzqtList: [ ],
+      dcyxList: [],
+      jywcList: [],
+      dock_id:''
     };
   },
-  created() {},
-  methods: {},
+  created() {
+     this.searchInfo();
+  },
+  methods: {
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+    ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+    async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
+       let res = await this.dockfetch(this.user.uid);
+      this.$set(this, `dock_id`, res.data.id);
+      let arr = await this.transactionslist({ skip, limit, dockid: this.dock_id, ...info });
+      var zzqt = arr.data.filter(item => item.status === '0');
+      var dcyx = arr.data.filter(item => item.status === '1');
+      var jywc = arr.data.filter(item => item.status === '2');
+      this.$set(this, `zzqtList`, zzqt);
+      this.$set(this, `dcyxList`, dcyx);
+      this.$set(this, `jywcList`, jywc);
+    },
+  },
   computed: { ...mapState(['user']) },
   mounted() {
     this.title = this.$route.meta.title;

+ 16 - 10
src/views/dockCenter/statisInfo/parts/achievements.vue

@@ -68,6 +68,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'achievements',
   props: {},
@@ -76,21 +77,26 @@ export default {
     return {
       // 筛选
       field: '',
-      list: [
-        {
-          name: '产品名称产品名称产品名称产品名称',
-          field: '0',
-          coopermode: '0',
-          business: '0',
-        },
-      ],
+      list: [],
+      newArr:[]
     };
   },
-  created() {},
+  created() {
+        this.search();
+  },
   methods: {
+    ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+        async search() {
+          let res = await this.dockfetch(this.user.uid);
+          let arr = res.data.apply.map(item => item.goodsList);
+          arr = _.flattenDeep(arr);
+          var newArr = arr.filter(item => item.totaltype === '0');
+                this.$set(this, `newArr`, newArr);
+          this.$set(this, `list`, newArr);
+    },
     // 筛选技术领域
     changeField(value) {
-      var arr = this.applyList.filter(item => item.field === value);
+      var arr = this.newArr.filter(item => item.field === value);
       this.$set(this, `list`, arr);
     },
   },

+ 16 - 10
src/views/dockCenter/statisInfo/parts/technology.vue

@@ -68,6 +68,7 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dock } = createNamespacedHelpers('dock');
 export default {
   name: 'technology',
   props: {},
@@ -76,21 +77,26 @@ export default {
     return {
       // 筛选
       field: '',
-      list: [
-        {
-          name: '产品名称产品名称产品名称产品名称',
-          field: '0',
-          coopermode: '0',
-          business: '0',
-        },
-      ],
+      list: [ ],
+      newArr:[]
     };
   },
-  created() {},
+  created() {
+    this.search();
+  },
   methods: {
+        ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+        async search() {
+          let res = await this.dockfetch(this.user.uid);
+          let arr = res.data.apply.map(item => item.goodsList);
+          arr = _.flattenDeep(arr);
+          var newArr = arr.filter(item => item.totaltype === '0');
+                this.$set(this, `newArr`, newArr);
+          this.$set(this, `list`, newArr);
+    },
     // 筛选技术领域
     changeField(value) {
-      var arr = this.applyList.filter(item => item.field === value);
+      var arr = this.newArr.filter(item => item.field === value);
       this.$set(this, `list`, arr);
     },
   },

+ 36 - 13
src/views/dockCenter/transaction/index.vue

@@ -33,7 +33,7 @@
               </span>
             </el-col>
             <el-col :span="24" class="btn">
-              <el-button type="primary" size="mini" @click="clickBtn()">交易确定</el-button>
+              <el-button type="primary" size="mini" @click="clickBtn(item.id)">交易确定</el-button>
             </el-col>
           </el-col>
         </el-col>
@@ -68,6 +68,9 @@
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
 import NavBar from '@/layout/common/topInfo.vue';
+const { mapActions: dock } = createNamespacedHelpers('dock');
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
+const { mapActions: productpact } = createNamespacedHelpers('productpact');
 export default {
   name: 'index',
   props: {},
@@ -80,27 +83,47 @@ export default {
       isleftarrow: '',
       // 返回
       navShow: true,
-      list: [
-        {
-          product_name: '产品名称',
-          username: '购买人',
-          market_username: '营销人名称',
-          status: '0',
-        },
-      ],
+      list: [],
       dialogVisible: false,
       form: {},
     };
   },
-  created() {},
+  created() {
+    this.search()
+  },
   methods: {
+    ...dock({ dockQuery: 'query', dockfetch: 'fetch',dockupdate:'update' }),
+    ...transaction({ transactionsfetch: 'fetch', transactionslist: 'query', transactiondetele: 'detele', transactionupdate: 'update' }),
+        ...productpact({ transactionQuery: 'query', productpactFetch: 'findpact', productpactUpdate: 'update' }),
+     async search({ skip = 0, limit = 1000, ...info } = {}) {
+      const res = await this.dockfetch(this.user.uid);
+      const arr = await this.transactionslist({ skip, dockid: res.data.id, limit, status: '4', ...info });
+      this.$set(this, `list`, arr.data);
+    },
     // 交易确定打开
-    clickBtn() {
+    async clickBtn(id) {
       this.dialogVisible = true;
+       const res = await this.productpactFetch(id);
+      if (this.$checkRes(res)) {
+        this.$set(this, `form`, res.data);
+      }
     },
     // 提交
-    onSubmit() {
-      this.dialogVisible = false;
+    async onSubmit() {
+      const res = await this.productpactUpdate(this.form);
+      if (this.$checkRes(res)) {
+        this.form.status = '2';
+        this.form.id = this.form.transaction_id;
+        const arr = await this.transactionupdate(this.form);
+        if (this.$checkRes(arr)) {
+         this.$notify({
+            message: '审核通过',
+            type: 'success',
+          });
+        }
+        this.dialogVisible = false;
+      }
+     this.search()
     },
     handleClose(done) {
       done();

+ 0 - 9
src/views/user/parts/clickBtn.vue

@@ -43,14 +43,6 @@
             <van-cell is-link title="统计报表" @click="$router.push({ path: '/vipDockCenter/statisInfo/index' })" />
             <van-cell is-link title="动态监测" @click="$router.push({ path: '/vipDockCenter/dynamicInfo/index' })" />
           </span>
-          <span v-if="role=='3'">
-            <van-cell is-link title="展会管理" @click="$router.push({ path: '/dockCenter/dockInfo/index' })" />
-            <van-cell is-link title="申请管理" @click="$router.push({ path: '/dockCenter/applyInfo/index' })" />
-            <van-cell is-link title="VIP用户" @click="$router.push({ path: '/dockCenter/vipInfo/index' })" />
-            <van-cell is-link title="交易备案" @click="$router.push({ path: '/dockCenter/transaction/index' })" />
-            <van-cell is-link title="统计报表" @click="$router.push({ path: '/dockCenter/statisInfo/index' })" />
-            <van-cell is-link title="动态监测" @click="$router.push({ path: '/dockCenter/dynamicInfo/index' })" />
-          </span>
         </span>
       </el-col>
     </el-row>
@@ -70,7 +62,6 @@ export default {
       twoName: '',
       threeName: '',
       fourName: '',
-      role: '3'
     };
   },
   created() {