12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <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>
|