D4THYL3\long před 3 roky
rodič
revize
03cf2f7059

+ 106 - 109
operationSupport/src/utils/utils.js

@@ -6,28 +6,28 @@
  * @Description: In User Settings Edit
  * @FilePath: \vue-manage-system-master\src\utils\utils.js
  */
-import Vue from 'vue'
+import Vue from 'vue';
 import newValidate from './newValidate.js';
 Vue.prototype.$valid = newValidate;
 
 //全局混入
 //mix_path为权限前缀
 Vue.mixin({
-  computed: {
-    $add() {
-      return this.$store.getters["hasPermission"](this.mix_path + ":add")
-    },
-    $del() {
-      return this.$store.getters["hasPermission"](this.mix_path + ":del")
-    },
-    $edit() {
-      return this.$store.getters["hasPermission"](this.mix_path + ":edit")
-    },
-    $query() {
-      return this.$store.getters["hasPermission"](this.mix_path + ":query")
-    },
-  }
-})
+    computed: {
+        $add() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':add');
+        },
+        $del() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':del');
+        },
+        $edit() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':edit');
+        },
+        $query() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':query');
+        }
+    }
+});
 /**
  * @description: 弹出确认提示框
  * @param {String} msg: 主消息
@@ -36,39 +36,40 @@ Vue.mixin({
  * @param {Object} params: 扩展参数
  * @return {type}: null
  */
-Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否继续?', type = 'error', params = {}) => new Promise((resolve, reject) => {
-  const config = {
-    width: '374px',
-    showCancelButton: true,
-    confirmButtonText: '确认',
-    showClose: true
-  }
-  Object.assign(config, params)
-  const MsgBox = Vue.extend({
-    data() {
-      return {
-        showMsg: true,
-        close: false,
-        config
-      }
-    },
-    methods: {
-      cancel() {
-        this.close = true
-        setTimeout(() => {
-          this.showMsg = false
-        }, 300)
-        reject()
-      },
-      confirm() {
-        this.close = true
-        setTimeout(() => {
-          this.showMsg = false
-        }, 300)
-        resolve()
-      }
-    },
-    template: `
+Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否继续?', type = 'error', params = {}) =>
+    new Promise((resolve, reject) => {
+        const config = {
+            width: '374px',
+            showCancelButton: true,
+            confirmButtonText: '确认',
+            showClose: true
+        };
+        Object.assign(config, params);
+        const MsgBox = Vue.extend({
+            data() {
+                return {
+                    showMsg: true,
+                    close: false,
+                    config
+                };
+            },
+            methods: {
+                cancel() {
+                    this.close = true;
+                    setTimeout(() => {
+                        this.showMsg = false;
+                    }, 300);
+                    reject();
+                },
+                confirm() {
+                    this.close = true;
+                    setTimeout(() => {
+                        this.showMsg = false;
+                    }, 300);
+                    resolve();
+                }
+            },
+            template: `
     <div class="alert" v-if='showMsg' style="z-index: 9999">
       <div class="message-box" :class='{"up": close}' :style="{width: config.width}">
         <div class="row-1">
@@ -84,77 +85,73 @@ Vue.prototype.$msgBox = (msg = '', tipMsg = '删除后将无法恢复,是否
       </div>
     </div>
     `
-  })
-  const dom = new MsgBox().$mount()
-  document.getElementById('app').appendChild(dom.$el)
-})
+        });
+        const dom = new MsgBox().$mount();
+        document.getElementById('app').appendChild(dom.$el);
+    });
 /**
-   * @description: 遍历节点是否存在当前值
-   * @param {Array} dataArr 数组对象
-   * @param {String|Number} val 比对值
-   * @param {String} valStr  比对字段
-   * @return {Boolean}  返回存在或不存在
-   */
+ * @description: 遍历节点是否存在当前值
+ * @param {Array} dataArr 数组对象
+ * @param {String|Number} val 比对值
+ * @param {String} valStr  比对字段
+ * @return {Boolean}  返回存在或不存在
+ */
 Vue.prototype.__calleArr = function (dataArr, val, valStr) {
-  for (let i in dataArr) {
-    var data = dataArr[i];
-    if (data[valStr] === val) {
-      return true;
-    } else {
-      if (data.children) {
-        this.__calleArr(data.children, val, valStr)
-      }
+    for (let i in dataArr) {
+        var data = dataArr[i];
+        if (data[valStr] === val) {
+            return true;
+        } else {
+            if (data.children) {
+                this.__calleArr(data.children, val, valStr);
+            }
+        }
     }
-  }
-}
+};
 
 // 确认提示框
 Vue.prototype.__confirm = function (msg = '确认要删除该数据?', title = '提示', settings) {
-  let sets = Object.assign(settings || {}, {
-    cancelButtonClass: 'el-button--medium',
-    confirmButtonClass: 'el-button--medium',
-    dangerouslyUseHTMLString: true,
-  })
-  return this.$confirm(`<p class="text_normal bold">${msg}</p>`, title, sets);
-}
+    let sets = Object.assign(settings || {}, {
+        cancelButtonClass: 'el-button--medium',
+        confirmButtonClass: 'el-button--medium',
+        dangerouslyUseHTMLString: true
+    });
+    return this.$confirm(`<p class="text_normal bold">${msg}</p>`, title, sets);
+};
 
 /*
 设置弹出组件 datakey 集合下各字段的值,根据params.data
 */
 Vue.prototype.__setValue = function (datakey) {
-  let obj = this[datakey];
-  for (let item in obj) {
-    const str = this.params.data[item];
-    obj[item] = str ? str : _.isNumber(str) ? str : ''
-  }
-}
+    let obj = this[datakey];
+    for (let item in obj) {
+        const str = this.params.data[item];
+        obj[item] = str ? str : _.isNumber(str) ? str : '';
+    }
+};
 
 // Excel表格下载
-Vue.prototype.__exportExcel = (
-  url = "Abnormal/getAllAbnormalExcel",
-  params = {},
-  token = localStorage.getItem("SC_token")
-) => {
-  // eslint-disable-next-line no-param-reassign
-  delete params.pageNum;
-  // eslint-disable-next-line no-param-reassign
-  delete params.pageSize;
-  let link;
-  if (document.getElementById("exportATag")) {
-    link = document.getElementById("exportATag");
-  } else {
-    link = document.createElement("a");
-    link.setAttribute("id", "exportATag");
-    link.style.display = "none";
-  }
-  const httpReg = /(http|https):\/\/([\w.]+\/?)\S*/;
-  let urlStr = httpReg.test(url) ? `${url}&` : `${url}?`;
-  _.mapKeys(params, (val, key) => {
-    if (!_.isEmpty(String(val)) && (val == 0 || val)) {
-      urlStr += `${key}=${val}&`;
+Vue.prototype.__exportExcel = (url = 'Abnormal/getAllAbnormalExcel', params = {}, token = localStorage.getItem('SC_token')) => {
+    // eslint-disable-next-line no-param-reassign
+    delete params.pageNum;
+    // eslint-disable-next-line no-param-reassign
+    delete params.pageSize;
+    let link;
+    if (document.getElementById('exportATag')) {
+        link = document.getElementById('exportATag');
+    } else {
+        link = document.createElement('a');
+        link.setAttribute('id', 'exportATag');
+        link.style.display = 'none';
     }
-  });
-  link.href = `${urlStr}access_token=${token}`;
-  document.body.appendChild(link);
-  link.click();
-};
+    const httpReg = /(http|https):\/\/([\w.]+\/?)\S*/;
+    let urlStr = httpReg.test(url) ? `${url}&` : `${url}?`;
+    _.mapKeys(params, (val, key) => {
+        if (!_.isEmpty(String(val)) && (val == 0 || val)) {
+            urlStr += `${key}=${val}&`;
+        }
+    });
+    link.href = `${urlStr}access_token=${token}`;
+    document.body.appendChild(link);
+    link.click();
+};

+ 1 - 1
operationSupport/src/views/assetManagement/housingManagement/index.vue

@@ -130,7 +130,7 @@ export default {
                 },
                 {
                     label: '房屋类型',
-                    prop: 'buildingTypeDict',
+                    prop: 'buildingTypeDict'
                 },
                 {
                     label: '使用状态',

+ 1 - 1
operationSupport/src/views/businessManagement/InvestmentResources/index.vue

@@ -195,4 +195,4 @@ export default {
         this.mixins_search();
     }
 };
-</script>
+</script>

+ 73 - 0
operationSupport/src/views/businessManagement/opportunityManagement/index.js

@@ -0,0 +1,73 @@
+export default {
+    data() {
+        return {
+            cols: [
+                {
+                    label: '客户名称',
+                    prop: 'clientName'
+                },
+                {
+                    label: '客户电话',
+                    prop: 'clientPhone'
+                },
+                {
+                    label: '商机来源',
+                    prop: 'businessSource'
+                },
+                {
+                    label: '意向等级',
+                    prop: 'intentionGrade',
+                    format(val) {
+                        if (val == 0) {
+                            return '高';
+                        } else if (val == 1) {
+                            return '中';
+                        } else if (val == 2) {
+                            return '低';
+                        }
+                    }
+                },
+                {
+                    label: '招商进度',
+                    prop: 'businessStatus',
+                    format(val) {
+                        if (val == 1) {
+                            return '意向';
+                        } else if (val == 2) {
+                            return '参观';
+                        } else if (val == '3') {
+                            return '商务洽谈';
+                        } else if (val == '4') {
+                            return '签订合同';
+                        } else if (val == 5) {
+                            return '失败';
+                        }
+                    }
+                },
+                {
+                    label: '需求类型',
+                    prop: 'demandSource',
+                    format(val) {
+                        if (val == 1) {
+                            return '住宅';
+                        } else if (val == 2) {
+                            return '商业';
+                        }
+                    }
+                },
+                {
+                    label: '招商人员',
+                    prop: 'username'
+                },
+                {
+                    label: '创建时间',
+                    prop: 'createDate'
+                },
+                {
+                    label: '操作',
+                    slot: 'opt'
+                }
+            ]
+        };
+    }
+};

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

+ 423 - 0
operationSupport/src/views/businessManagement/opportunityManagement/setpPage/add.vue

@@ -0,0 +1,423 @@
+<template>
+    <div class="formContent">
+        <el-form ref="ruleForm" :model="formData" :rules="rules" label-width="85px">
+            <div class="formContent-item_title">客户信息</div>
+            <el-form-item label="客户姓名" prop="name" class="show-required-icon-star">
+                <el-input v-model="formData.name" clearable placeholder="请输入客户名称"></el-input>
+            </el-form-item>
+            <el-form-item label="客户手机" prop="telephon">
+                <el-input v-model="formData.telephon" clearable placeholder="请输入客户手机"></el-input>
+            </el-form-item>
+            <el-form-item label="客户类型" prop="customerType">
+                <el-select v-model="formData.customerType" @change="changeInformType" clearable class="dialog-select" placeholder="请选择">
+                    <el-option v-for="(item, index) in informTypes" :key="index" :label="item.label" :value="item.status"></el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="商机来源" prop="businessOpportunity">
+                <el-select
+                    v-model="formData.businessOpportunity"
+                    @change="changeInformType"
+                    clearable
+                    class="dialog-select"
+                    placeholder="请选择"
+                >
+                    <el-option v-for="(item, index) in Business" :key="index" :label="item.label" :value="item.status">{{
+                        item.label
+                    }}</el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="需求类型" prop="demandType">
+                <el-select v-model="formData.demandType" @change="changeInformType" clearable class="dialog-select" placeholder="请选择">
+                    <el-option v-for="(item, index) in Demand" :key="index" :label="item.label" :value="item.status">{{
+                        item.label
+                    }}</el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="意向等级" prop="intentionLevel">
+                <el-select
+                    v-model="formData.intentionLevel"
+                    @change="changeInformType"
+                    clearable
+                    class="dialog-select"
+                    placeholder="请选择"
+                >
+                    <el-option v-for="(item, index) in Intention" :key="index" :label="item.label" :value="item.status">{{
+                        item.label
+                    }}</el-option>
+                </el-select>
+            </el-form-item>
+            <el-form-item label="备注" prop="remarks">
+                <el-input type="textarea" :rows="4" show-word-limit v-model="formData.remarks" maxlength="300"></el-input>
+            </el-form-item>
+
+            <div class="formContent-item_title">物业信息</div>
+            <div v-for="(item, indexs) in timePeriod" :key="indexs">
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="意向房屋" prop="timePeriod">
+                            <el-select v-model="item.communityid" clearable class="dialog-select" placeholder="社区">
+                                <el-option
+                                    v-for="(items, index) in community"
+                                    :key="index"
+                                    :label="items.name"
+                                    :value="items.value"
+                                    label-width="100px"
+                                    @click.native="changeInformcommunity(items, indexs)"
+                                ></el-option>
+                            </el-select>
+                        </el-form-item>
+                    </el-col>
+                    <el-col :span="4">
+                        <el-select v-model="item.buildingid" clearable class="dialog-select" placeholder="楼栋">
+                            <el-option
+                                v-for="(buildingids, index) in Building[indexs]"
+                                :key="index"
+                                :label="buildingids.name"
+                                :value="buildingids.value"
+                                label-width="100px"
+                                @click.native="changeInformbuilding(buildingids, indexs)"
+                            ></el-option>
+                        </el-select>
+                    </el-col>
+                    <el-col :span="4">
+                        <el-select v-model="item.unitid" clearable class="dialog-select" placeholder="单元">
+                            <el-option
+                                v-for="(unitids, index) in unit[indexs]"
+                                :key="index"
+                                :label="unitids.name"
+                                :value="unitids.value"
+                                label-width="100px"
+                                @click.native="changeInformunit(unitids, indexs)"
+                            ></el-option>
+                        </el-select>
+                    </el-col>
+                    <el-col :span="4">
+                        <el-select v-model="item.roomNumberid" clearable class="dialog-select" placeholder="房间号">
+                            <el-option
+                                v-for="(roomNumberids, index) in roomNumber[indexs]"
+                                :key="index"
+                                :label="roomNumberids.name"
+                                :value="roomNumberids.value"
+                                label-width="100px"
+                                @click.native="changeInformroomNumber(roomNumberids)"
+                            >
+                            </el-option>
+                        </el-select>
+                    </el-col>
+                    <div class="sunm" @click="addTime(indexs, 1)" style="display: inline-block; line-height: 30px">
+                        <i class="zoniot_font zoniot-icon-tianjia1"></i>
+                    </div>
+                    <div
+                        class="sunm"
+                        @click="addTime(indexs, -1)"
+                        v-if="timePeriod.length > 1 && indexs != 0"
+                        style="display: inline-block; line-height: 30px"
+                    >
+                        <i class="zoniot_font zoniot-icon-shanjian"></i>
+                    </div>
+                </el-row>
+            </div>
+            <template>
+                <div class="formContent-item_title">招商信息</div>
+                <el-row>
+                    <el-col :span="8">
+                        <el-form-item label="招商人员" prop="username">
+                            <el-cascader
+                                ref="userName"
+                                v-model="formData.userId"
+                                :props="defaultProps"
+                                :options="findUser"
+                                @change="findUserToggle"
+                            ></el-cascader>
+                        </el-form-item>
+                    </el-col>
+                </el-row>
+            </template>
+        </el-form>
+    </div>
+</template>
+
+<script>
+import list from '@utils/list';
+export default {
+    props: ['params'],
+    data() {
+        return {
+            formData: {
+                name: '',
+                telephon: '',
+                customerType: '',
+                businessOpportunity: '',
+                demandType: '',
+                intentionLevel: '',
+                remarks: '',
+                communityid: '',
+                buildingid: '',
+                unitid: '',
+                roomNumberid: '',
+
+                userId: '',
+                username: '',
+                FnroomNumberid: []
+            },
+            timePeriod: [
+                {
+                    communityid: '',
+                    Buildingid: '',
+                    unitid: '',
+                    roomNumberid: ''
+                }
+            ],
+            informTypes: [
+                {
+                    status: 0,
+                    label: '个人'
+                },
+                {
+                    status: 1,
+                    label: '企业'
+                }
+            ],
+            Business: [
+                {
+                    status: 0,
+                    label: '线上预约'
+                },
+                {
+                    status: 1,
+                    label: '线上电话'
+                },
+                {
+                    status: 2,
+                    label: '线下访问'
+                }
+            ],
+            Demand: [
+                {
+                    status: 0,
+                    label: '住宅'
+                },
+                {
+                    status: 1,
+                    label: '商业'
+                }
+            ],
+            Intention: [
+                {
+                    status: 0,
+                    label: '高'
+                },
+                {
+                    status: 1,
+                    label: '中'
+                },
+                {
+                    status: 2,
+                    label: '低'
+                }
+            ],
+            // 社区
+            community: [],
+            // 楼栋
+            Building: [],
+            // 单元
+            unit: [],
+            // 房间号
+            roomNumber: [],
+            Merchants: [],
+            listRes: [],
+            room: 'false',
+            urlencoded: [],
+            findUser: [],
+            defaultProps: {
+                value: 'id', // 唯一标识
+                label: 'label', // 标签显示
+                children: 'children',
+                emitPath: false
+            }
+        };
+    },
+    methods: {
+        addTime(inx, sun) {
+            if (sun > 0) {
+                this.timePeriod.push({
+                    communityid: '',
+                    Buildingid: '',
+                    unitid: '',
+                    roomNumberid: ''
+                });
+                this.room = 'true';
+            } else {
+                this.timePeriod.splice(inx, 1);
+                this.room = 'false';
+            }
+        },
+        close() {
+            this.$emit('initPage');
+        },
+        submit() {
+            console.log('this.formData.intentionLevel', this.formData.intentionLevel);
+            this.$refs.ruleForm.validate((valid) => {
+                if (valid) {
+                    let url = '/sc-community-web/business/add';
+                    if (this.params.todo == 'edit') {
+                        url = '/sc-community-web/business/edit';
+                    }
+                    let houseIds = [];
+                    this.timePeriod.map((item) => {
+                        houseIds.push(item.roomNumberid);
+                    });
+                    let installparams = {
+                        id: this.params.data,
+                        clientName: this.formData.name,
+                        clientPhone: this.formData.telephon,
+                        clientType: this.formData.customerType,
+                        businessSource: this.formData.businessOpportunity,
+                        demandSource: this.formData.demandType,
+                        intentionGrade: this.formData.intentionLevel,
+                        remark: this.formData.remarks,
+                        houseIds: houseIds,
+                        userId: this.formData.userId,
+                        username: this.formData.username
+                    };
+
+                    this.$http
+                        .post(url, installparams)
+                        .then(({ status, msg }) => {
+                            if (status == 0) {
+                                this.$message.success(msg);
+                                this.params.callback && this.params.callback();
+                                this.$emit('close');
+                            } else {
+                                this.$message.error(msg);
+                            }
+                        })
+                        .catch(() => {});
+                }
+            });
+        },
+        // 社区名称
+        changeInformcommunity(items, index) {
+            console.log(items);
+            this.Fncommunity(items, index);
+        },
+        Fncommunity(items, index) {
+            let BuildingArr = [];
+
+            if (!!this.Building[index]) {
+                this.Building[index] = items.children;
+            } else {
+                this.Building.push(items.children);
+            }
+        },
+        // 单元
+        changeInformbuilding(items, index) {
+            this.Fnbuilding(items, index);
+        },
+        Fnbuilding(items, index) {
+            let unitArr = [];
+            for (let i = 0; i < items.length; i++) {
+                unitArr.push({
+                    id: items[i].id,
+                    name: items[i].name,
+                    children: items.children
+                });
+            }
+            debugger;
+            if (items.children[0].type == 'room') {
+                if (!!this.roomNumber[index]) {
+                    this.roomNumber[index] = items.children;
+                } else {
+                    this.roomNumber.push(items.children);
+                }
+            } else {
+                if (!!this.unit[index]) {
+                    this.unit[index] = items.children;
+                } else {
+                    this.unit.push(items.children);
+                }
+            }
+        },
+        changeInformunit(items, index) {
+            this.Fnunit(items, index);
+        },
+        Fnunit(items, index) {
+            let roomNumberArr = [];
+            for (let i = 0; i < items.length; i++) {
+                roomNumberArr.push({
+                    id: items[i].id,
+                    name: items[i].name,
+                    children: items.children
+                });
+            }
+
+            if (!!this.roomNumber[index]) {
+                this.roomNumber[index] = items.children;
+            } else {
+                this.roomNumber.push(items.children);
+            }
+        },
+        changeInformroomNumber(items) {
+            // if (this.room == 'false') {
+            //     this.formData.FnroomNumberid = [];
+            // }
+            // this.formData.FnroomNumberid.push(items.value);
+        },
+        findUserToggle() {
+            this.formData.username = this.$refs.userName.getCheckedNodes()[0].label;
+        }
+    },
+    created() {
+        this.findUser = this.params.arrData;
+
+        let url = '/sc-community/assets/tree/community/find?buildingType=1';
+        this.$http.get(url).then(({ status, msg, data }) => {
+            if (status == 0) {
+                this.close();
+                this.urlencoded = data;
+            } else {
+                this.$message.error(msg);
+            }
+        });
+        if (this.params.todo == 'edit') {
+            console.log(this.params.data);
+            let url = `/sc-community-web/business/find/${this.params.data}`;
+            this.$http.get(url).then(({ status, msg, data }) => {
+                if (status == 0) {
+                    this.close();
+                    console.log('data', data);
+                    this.formData = {
+                        name: data.clientName + '',
+                        telephon: data.clientPhone + '',
+                        customerType: data.clientType,
+                        businessOpportunity: data.businessSource,
+                        demandType: data.demandSource,
+                        intentionLevel: data.intentionGrade,
+                        remarks: data.remark + '',
+                        userId: data.userId,
+                        username: data.username
+                    };
+                    let timePeriodObj = [];
+                    for (let i = 0; i < data.houseList.length; i++) {
+                        timePeriodObj.push({
+                            communityid: data.houseList[i].communityName,
+                            buildingid: data.houseList[i].buildingName,
+                            unitid: data.houseList[i].unitName,
+                            roomNumberid: data.houseList[i].roomNumber
+                        });
+                        // this.timePeriod = {
+                        //     communityid: data.houseList[i].communityName,
+                        //     buildingid: data.houseList[i].buildingName,
+                        //     unitid: data.houseList[i].unitName,
+                        //     roomNumberid: data.houseList[i].roomNumber
+                        // };
+                    }
+                    this.timePeriod = timePeriodObj;
+                } else {
+                    this.$message.error(msg);
+                }
+            });
+        }
+    }
+};
+</script>

+ 220 - 0
operationSupport/src/views/businessManagement/opportunityManagement/setpPage/details.vue

@@ -0,0 +1,220 @@
+<template>
+    <div class="lookDetail">
+        <div class="left">
+            <div class="list-item">
+                <div class="formContent-item_title">商机信息</div>
+                <el-form ref="form" label-width="110px">
+                    <template v-for="(item, index) in formLook">
+                        <el-col :span="!!item.span ? item.span : 12" :key="index">
+                            <el-form-item :label="item.label">
+                                <template v-if="item.slot">
+                                    <!-- 意向来源 -->
+                                    <template v-if="item.slot === 'businessSource'">
+                                        <span v-if="thisItem['businessSource'] == 1">线上预约</span>
+                                        <span v-else-if="thisItem['businessSource'] == 2">线上电话</span>
+                                        <span v-else-if="thisItem['businessSource'] == 3">线下访问</span>
+                                        <span v-else>--</span>
+                                    </template>
+                                    <!-- 需求类型 -->
+                                    <template v-if="item.slot === 'demandSource'">
+                                        <span v-if="thisItem['demandSource'] == 1">住宅</span>
+                                        <span v-else-if="thisItem['demandSource'] == 2">商业</span>
+                                        <span v-else>--</span>
+                                    </template>
+                                    <!-- 客户类型 -->
+                                    <template v-if="item.slot === 'clientType'">
+                                        <span v-if="thisItem['clientType'] == 1">个人</span>
+                                        <span v-else-if="thisItem['clientType'] == 2">企业</span>
+                                        <span v-else>--</span>
+                                    </template>
+                                    <!-- 意向等级 -->
+                                    <template v-if="item.slot === 'intentionGrade'">
+                                        <span v-if="thisItem['intentionGrade'] == 1">高</span>
+                                        <span v-else-if="thisItem['intentionGrade'] == 2">中</span>
+                                        <span v-else-if="thisItem['intentionGrade'] == 3">低</span>
+                                        <span v-else>--</span>
+                                    </template>
+                                </template>
+                                <template v-else>{{ thisItem[item.prop] || '--' }}</template>
+                            </el-form-item>
+                        </el-col></template
+                    >
+                </el-form>
+            </div>
+        </div>
+        <div class="right">
+            <div class="list-item">
+                <div class="formContent-item_title">招商跟进记录</div>
+                <template v-for="(item, index) in thisItem['businessRecordList']">
+                    <div class="steps" :key="index">
+                        <div class="steps-left">
+                            <img src="@assets/img/point_yiwancheng@2x.png" alt />
+                            <div class="steps-left-line" v-if="index !== thisItem['businessRecordList'].length - 1"></div>
+                        </div>
+                        <div class="steps-right">
+                            <div class="steps-right-title">
+                                <span>{{ item.createDate }}</span>
+                                <span class="status" v-if="index === thisItem['businessRecordList'].length - 1">{{
+                                    thisItem.businessStatus == '1'
+                                        ? '意向'
+                                        : thisItem.businessStatus == '2'
+                                        ? '参观'
+                                        : thisItem.businessStatus == '3'
+                                        ? '商务洽谈'
+                                        : thisItem.businessStatus == '4'
+                                        ? '签订合同'
+                                        : '失败'
+                                }}</span>
+                            </div>
+                            <div class="steps-right-content">
+                                <span>招商人:</span>
+                                <span>{{ thisItem['username'] }}</span>
+                            </div>
+                            <div class="steps-right-content">
+                                <span>进度描述:</span>
+                                <span>{{ item.progressDescription }}</span>
+                            </div>
+                        </div>
+                    </div>
+                </template>
+            </div>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    props: ['params'],
+    data() {
+        return {
+            formLook: [
+                { label: '客户信息:', prop: 'clientName' },
+                { label: '客户手机:', prop: 'clientPhone' },
+                {
+                    label: '意向来源:',
+                    prop: 'businessSource',
+                    slot: 'businessSource'
+                },
+                { label: '需求类型:', prop: 'demandSource', slot: 'demandSource' },
+                { label: '客户类型:', prop: 'clientType', slot: 'clientType' },
+                {
+                    label: '意向等级:',
+                    prop: 'intentionGrade',
+                    slot: 'intentionGrade'
+                },
+                { label: '备注:', prop: 'remark' }
+            ],
+            thisItem: {},
+            thisActive: 0
+        };
+    },
+    methods: {
+        getDatali(id) {
+            this.$http
+                .get('/sc-community-web/business/find/' + id)
+                .then(({ data, msg, status }) => {
+                    if (status == 0) {
+                        this.thisItem = data;
+                        this.thisActive = !!data.businessRecordList.length ? Number(data.businessRecordList.length) - 1 : 0;
+                        this.params.callback && this.params.callback();
+                    }
+                })
+                .catch(() => {});
+        }
+    },
+    created() {
+        this.getDatali(this.params.id);
+    }
+};
+</script>
+<style lang="scss" scoped>
+@import '@assets/css/public-style.scss';
+.lookDetail {
+    /deep/ .el-form-item__label,
+    /deep/.el-form-item__content {
+        font-size: 12px;
+    }
+    /deep/ .el-step__title.is-finish,
+    /deep/ .el-step__title.is-process,
+    /deep/ .el-step__description.is-finish {
+        font-weight: 500 !important;
+        color: #424656 !important;
+    }
+
+    display: flex;
+    justify-content: space-between;
+    .formContent-item_title {
+        clear: both;
+    }
+    .left {
+        width: 600px;
+    }
+    .right {
+        width: calc(100% - 620px);
+    }
+    .list-item {
+        clear: inherit;
+    }
+}
+.imgVdio {
+    width: 80px;
+    height: 60px;
+    display: inline-block;
+    margin-right: 10px;
+    video,
+    img {
+        width: 100%;
+        height: 100%;
+        cursor: pointer;
+    }
+}
+
+.steps {
+    display: flex;
+    img {
+        width: 20px;
+        vertical-align: -webkit-baseline-middle;
+    }
+    .steps-left {
+        margin-right: 10px;
+        .steps-left-line {
+            width: 2px;
+            height: calc(100% - 40px);
+            margin: 10px auto;
+            background-color: $mainBgColor;
+        }
+    }
+    .steps-right {
+        width: 100%;
+        line-height: 30px;
+        // margin-bottom: 10px;
+        .steps-right-title {
+            font-weight: 600;
+            display: flex;
+            justify-content: space-between;
+            .status {
+                color: $mainBgColor;
+                font-weight: 400;
+            }
+        }
+        .steps-right-content {
+            font-size: 12px;
+            color: #303133;
+            display: flex;
+            span:first-child {
+                margin-right: 10px;
+            }
+        }
+    }
+}
+.grate {
+    margin-left: 30px;
+    .grate-rate {
+        display: -webkit-box;
+        align-items: center;
+        font-size: 12px;
+        color: #303133;
+        margin-bottom: 10px;
+    }
+}
+</style>

+ 1 - 1
operationSupport/src/views/businessManagement/rentalAndSale/index.vue

@@ -104,4 +104,4 @@ export default {
         }
     }
 };
-</script>
+</script>

+ 2 - 2
operationSupport/src/views/workOrders/popups/dispatchTsk.vue

@@ -29,7 +29,7 @@
         ></el-cascader>
     </zz-form>
 </template>
-<script >
+<script>
 export default {
     props: ['params'],
     data() {
@@ -121,4 +121,4 @@ export default {
         this.findUser = this.params.arrData;
     }
 };
-</script>
+</script>