Parcourir la source

更新 'operationSupport/src/views/businessManagement/opportunityManagement/index.vue'

Gogs il y a 3 ans
Parent
commit
952a49ca2e

+ 138 - 0
operationSupport/src/views/businessManagement/opportunityManagement/index.vue

@@ -0,0 +1,138 @@
+<template>
+    <div class="main">
+        <div class="search">
+            <el-input placeholder="输入客户姓名/电话" class="search-input" clearable v-model="mixins_query.name"></el-input>
+            <el-select placeholder="意向等级" clearable v-model="mixins_query.intentionGrade">
+                <el-option label="高" :value="0"></el-option>
+                <el-option label="中" :value="1"></el-option>
+                <el-option label="低" :value="2"></el-option>
+            </el-select>
+            <el-select placeholder="招商进度" clearable v-model="mixins_query.businessStatus">
+                <el-option label="意向" :value="0"></el-option>
+                <el-option label="参观" :value="1"></el-option>
+                <el-option label="商务洽谈" :value="2"></el-option>
+                <el-option label="签订合同" :value="3"></el-option>
+                <el-option label="失败" :value="4"></el-option>
+            </el-select>
+            <el-date-picker
+                value-format="yyyy-MM-dd"
+                type="daterange"
+                range-separator="至"
+                start-placeholder="开始日期"
+                end-placeholder="结束日期"
+                @change="timeToggle"
+                v-model="pickerTime"
+                :editable="false"
+            ></el-date-picker>
+            <el-button type="primary" class="search-btn" @click="mixins_search" icon="el-icon-search">查询</el-button>
+            <div class="search-icon">
+                <el-tooltip class="item" effect="light" placement="bottom" content="新增">
+                    <i class="zoniot_font zoniot-icon-tianjia2" @click="add('add')"></i>
+                </el-tooltip>
+                <el-tooltip class="item" effect="light" placement="bottom" content="导出">
+                    <i class="zoniot_font zoniot-icon-daochu2" @click="exportExcel()"></i>
+                </el-tooltip>
+            </div>
+        </div>
+        <zz-table
+            :cols="cols"
+            :settings="{ showCheckbox: true, showIndex: true, stripe: true }"
+            :data="mixins_list"
+            :pageset="mixins_pageset"
+            @page-change="pageChange"
+            @selection-change="selectionChange"
+        >
+            <template slot-scope="scope" slot="opt">
+                <div class="opt">
+                    <el-tooltip class="item" effect="light" placement="bottom" content="编辑">
+                        <i class="zoniot_font zoniot-icon-bianji" @click="add('edit', scope.row.id)"></i>
+                    </el-tooltip>
+                    <el-tooltip class="item" effect="light" placement="bottom" content="查看">
+                        <i class="zoniot_font zoniot-icon-xiangqing" @click="lookDetails(scope.row)"></i>
+                    </el-tooltip>
+                </div>
+            </template>
+        </zz-table>
+    </div>
+</template>
+
+<script>
+import index from './index';
+import list from '@utils/list';
+export default {
+    mixins: [index, list],
+    data() {
+        return {
+            mixins_post: 'get',
+            pickerTime: [],
+            findUser: []
+        };
+    },
+    created() {
+        this.mixins_dataUrl = '/sc-community-web/business/page';
+        this.mixins_query = {};
+        this.mixins_search();
+        this.getUserList();
+    },
+    mounted() {},
+    methods: {
+        timeToggle(e) {
+            console.log(e);
+            let start = '00:00:00',
+                end = '23:59:59';
+            if (!!e) {
+                this.mixins_query.startDate = `${e[0]} ${start}`;
+                this.mixins_query.endDate = `${e[1]} ${end}`;
+            } else {
+                this.mixins_query.startDate = ``;
+                this.mixins_query.endDate = ``;
+            }
+        },
+        add(todo, data) {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/businessManagement/opportunityManagement/setpPage/add.vue',
+                    width: '665px',
+                    height: '700px',
+                    props: {
+                        todo,
+                        data,
+                        callback: resolve,
+                        arrData: this.findUser
+                    },
+                    title: todo == 'add' ? '添加商机' : '修改商机'
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        lookDetails(row) {
+            new Promise((resolve) => {
+                this.$store.dispatch('addPopup', {
+                    url: '/businessManagement/opportunityManagement/setpPage/details.vue',
+                    width: '900px',
+                    height: '581px',
+                    props: {
+                        id: row.id,
+                        callback: resolve
+                    },
+                    showConfirmButton: true,
+                    showCancelButton: true,
+                    hideStar: true,
+                    title: '商机详情'
+                });
+            }).then(() => {
+                this.mixins_search();
+            });
+        },
+        exportExcel() {
+            this.__exportExcel('/sc-community-web/business/excel', this.mixins_query);
+        },
+        getUserList() {
+            this.$http.get('/sc-user-center/user/findUserList').then(({ data, status, msg }) => {
+                this.findUser = data;
+            });
+        }
+    }
+};
+</script>