D4THYL3\long 3 年之前
父節點
當前提交
6cc83f354c

+ 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'
+                }
+            ]
+        };
+    }
+};

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

@@ -0,0 +1,428 @@
+<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 = [];
+                    if (data.houseList.length == 0) {
+                        timePeriodObj = [
+                            {
+                                communityid: '',
+                                buildingid: '',
+                                unitid: '',
+                                roomNumberid: ''
+                            }
+                        ];
+                    } else {
+                        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 = 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>