lrf402788946 4 年之前
父節點
當前提交
bd2f79df99

+ 3 - 0
src/store/index.js

@@ -19,6 +19,8 @@ import dockVideo from '@common/src/store/dock/dockVideo';
 import dockImgtxt from '@common/src/store/dock/dockImgtxt';
 // 展会vip
 import dockVip from '@common/src/store/dock/dockVip';
+// 交易记录
+import dockTranscation from '@common/src/store/dock/dockTranscation';
 // // 展会图文
 // import dockPw from '@common/src/store/dockPw';
 // // 展会用户
@@ -79,6 +81,7 @@ export default new Vuex.Store({
     dockVideo,
     dockImgtxt,
     dockVip,
+    dockTranscation,
     // dockUser,
     trainLive,
     trainchat,

+ 64 - 64
src/views/admin/live/achieve/trans/deal.vue

@@ -1,64 +1,64 @@
-<template>
-  <div id="deal">
-    <data-table :fields="fields" :opera="opera" :operaWidth="150" :data="list" :total="total" @query="search"></data-table>
-  </div>
-</template>
-
-<script>
-import dataTable from '@common/src/components/frame/filter-page-table.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'deal',
-  props: {},
-  components: { dataTable },
-  data: function() {
-    return {
-      opera: [],
-      fields: [
-        { label: '商品名称', prop: 'product' },
-        { label: '购买人名称', prop: 'd_name' },
-        { label: '营销人名称', prop: 's_name' },
-        {
-          label: '状态',
-          prop: 'status',
-          format: i => {
-            let word = '正在洽谈';
-            if (i == '1') word = '达成意向';
-            else if (i == '2') word = '待确定';
-            else if (i == '3') word = '交易完成';
-            else if (i == '4') word = '交易失败';
-            return word;
-          },
-        },
-      ],
-      list: [],
-      total: 0,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...transaction(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, dock_id: this.user.id, status: '2' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>
+<template>
+  <div id="deal">
+    <data-table :fields="fields" :opera="opera" :operaWidth="150" :data="list" :total="total" @query="search"></data-table>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dockTranscation } = createNamespacedHelpers('dockTranscation');
+export default {
+  name: 'deal',
+  props: {},
+  components: { dataTable },
+  data: function() {
+    return {
+      opera: [],
+      fields: [
+        { label: '商品名称', prop: 'product' },
+        { label: '购买人名称', prop: 'd_name' },
+        { label: '营销人名称', prop: 's_name' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: i => {
+            let word = '正在洽谈';
+            if (i == '1') word = '达成意向';
+            else if (i == '2') word = '待确定';
+            else if (i == '3') word = '交易完成';
+            else if (i == '4') word = '交易失败';
+            return word;
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...dockTranscation(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, dock_id: this.user.id, status: '2' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 63 - 63
src/views/admin/live/achieve/trans/finish.vue

@@ -1,63 +1,63 @@
-<template>
-  <div id="finish">
-    <data-table :fields="fields" :opera="[]" :data="list" :total="total"></data-table>
-  </div>
-</template>
-
-<script>
-import dataTable from '@common/src/components/frame/filter-page-table.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'finish',
-  props: {},
-  components: { dataTable },
-  data: function() {
-    return {
-      fields: [
-        { label: '商品名称', prop: 'product' },
-        { label: '购买人名称', prop: 'd_name' },
-        { label: '营销人名称', prop: 's_name' },
-        {
-          label: '状态',
-          prop: 'status',
-          format: i => {
-            let word = '正在洽谈';
-            if (i == '1') word = '达成意向';
-            else if (i == '2') word = '交易备案';
-            else if (i == '3') word = '交易完成';
-            else if (i == '4') word = '交易失败';
-            return word;
-          },
-        },
-      ],
-      list: [],
-      total: 0,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...transaction(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, dock_id: this.user.id, status: '3' });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>
+<template>
+  <div id="finish">
+    <data-table :fields="fields" :opera="[]" :data="list" :total="total"></data-table>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dockTranscation } = createNamespacedHelpers('dockTranscation');
+export default {
+  name: 'finish',
+  props: {},
+  components: { dataTable },
+  data: function() {
+    return {
+      fields: [
+        { label: '商品名称', prop: 'product' },
+        { label: '购买人名称', prop: 'd_name' },
+        { label: '营销人名称', prop: 's_name' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: i => {
+            let word = '正在洽谈';
+            if (i == '1') word = '达成意向';
+            else if (i == '2') word = '交易备案';
+            else if (i == '3') word = '交易完成';
+            else if (i == '4') word = '交易失败';
+            return word;
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...dockTranscation(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, dock_id: this.user.id, status: '3' });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 66 - 66
src/views/admin/live/achieve/trans/list.vue

@@ -1,66 +1,66 @@
-<template>
-  <div id="deal">
-    <data-table :fields="fields" :opera="opera" :operaWidth="150" :data="list" :total="total" @query="search"></data-table>
-  </div>
-</template>
-
-<script>
-import dataTable from '@common/src/components/frame/filter-page-table.vue';
-import { mapState, createNamespacedHelpers } from 'vuex';
-const { mapActions: transaction } = createNamespacedHelpers('transaction');
-export default {
-  name: 'deal',
-  props: {
-    status: { type: String, default: '1' },
-  },
-  components: { dataTable },
-  data: function() {
-    return {
-      opera: [],
-      fields: [
-        { label: '商品名称', prop: 'product' },
-        { label: '购买人名称', prop: 'd_name' },
-        { label: '营销人名称', prop: 's_name' },
-        {
-          label: '状态',
-          prop: 'status',
-          format: i => {
-            let word = '正在洽谈';
-            if (i == '1') word = '达成意向';
-            else if (i == '2') word = '待确定';
-            else if (i == '3') word = '交易完成';
-            else if (i == '4') word = '交易失败';
-            return word;
-          },
-        },
-      ],
-      list: [],
-      total: 0,
-    };
-  },
-  created() {
-    this.search();
-  },
-  methods: {
-    ...transaction(['query']),
-    async search({ skip = 0, limit = 10, ...info } = {}) {
-      const res = await this.query({ skip, limit, dock_id: this.user.id, status: this.status });
-      if (this.$checkRes(res)) {
-        this.$set(this, `list`, res.data);
-        this.$set(this, `total`, res.total);
-      }
-    },
-  },
-  computed: {
-    ...mapState(['user', 'menuParams']),
-    pageTitle() {
-      return `${this.$route.meta.title}`;
-    },
-  },
-  metaInfo() {
-    return { title: this.$route.meta.title };
-  },
-};
-</script>
-
-<style lang="less" scoped></style>
+<template>
+  <div id="deal">
+    <data-table :fields="fields" :opera="opera" :operaWidth="150" :data="list" :total="total" @query="search"></data-table>
+  </div>
+</template>
+
+<script>
+import dataTable from '@common/src/components/frame/filter-page-table.vue';
+import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: dockTranscation } = createNamespacedHelpers('dockTranscation');
+export default {
+  name: 'deal',
+  props: {
+    status: { type: String, default: '1' },
+  },
+  components: { dataTable },
+  data: function() {
+    return {
+      opera: [],
+      fields: [
+        { label: '商品名称', prop: 'product' },
+        { label: '购买人名称', prop: 'd_name' },
+        { label: '营销人名称', prop: 's_name' },
+        {
+          label: '状态',
+          prop: 'status',
+          format: i => {
+            let word = '正在洽谈';
+            if (i == '1') word = '达成意向';
+            else if (i == '2') word = '待确定';
+            else if (i == '3') word = '交易完成';
+            else if (i == '4') word = '交易失败';
+            return word;
+          },
+        },
+      ],
+      list: [],
+      total: 0,
+    };
+  },
+  created() {
+    this.search();
+  },
+  methods: {
+    ...dockTranscation(['query']),
+    async search({ skip = 0, limit = 10, ...info } = {}) {
+      const res = await this.query({ skip, limit, dock_id: this.user.id, status: this.status });
+      if (this.$checkRes(res)) {
+        this.$set(this, `list`, res.data);
+        this.$set(this, `total`, res.total);
+      }
+    },
+  },
+  computed: {
+    ...mapState(['user', 'menuParams']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>