|
@@ -1,9 +1,7 @@
|
|
|
<template>
|
|
|
<div class="tenant">
|
|
|
<div style="padding: 20px; background: #fff; margin-bottom: 20px">
|
|
|
- <el-button type="primary" style="margin-left: 10px" @click="openModal()"
|
|
|
- >添加客户</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" style="margin-left: 10px" @click="openModal()">添加客户</el-button>
|
|
|
</div>
|
|
|
|
|
|
<byTable
|
|
@@ -16,22 +14,11 @@
|
|
|
highlight-current-row
|
|
|
@moreSearch="moreSearch"
|
|
|
@get-list="getList"
|
|
|
- ref="table"
|
|
|
- >
|
|
|
+ ref="table">
|
|
|
<template #isTop="{ item }">
|
|
|
<div>
|
|
|
- <img
|
|
|
- style="cursor: pointer; width: 20px; transform: translateY(5px)"
|
|
|
- :src="'/img/isTop.png'"
|
|
|
- @click="deleteTop(item)"
|
|
|
- v-if="item.isTop === 1"
|
|
|
- />
|
|
|
- <img
|
|
|
- style="cursor: pointer; width: 20px; transform: translateY(5px)"
|
|
|
- :src="'/img/noTop.png'"
|
|
|
- @click="addTop(item)"
|
|
|
- v-else
|
|
|
- />
|
|
|
+ <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/isTop.png'" @click="deleteTop(item)" v-if="item.isTop === 1" />
|
|
|
+ <img style="cursor: pointer; width: 20px; transform: translateY(5px)" :src="'/img/noTop.png'" @click="addTop(item)" v-else />
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #address="{ item }">
|
|
@@ -40,23 +27,13 @@
|
|
|
<span v-if="item.cityName"> ,{{ item.cityName }}</span>
|
|
|
</template>
|
|
|
<template #name="{ item }">
|
|
|
- <div
|
|
|
- style="cursor: pointer; color: #409eff; word-break: break-all"
|
|
|
- @click="handleClickName(item)"
|
|
|
- >
|
|
|
+ <div style="cursor: pointer; color: #409eff; word-break: break-all" @click="handleClickName(item)">
|
|
|
{{ item.name }}
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #tags="{ item }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-tag
|
|
|
- style="margin-right: 8px"
|
|
|
- type="success"
|
|
|
- v-for="(tag, index) in item.tag"
|
|
|
- closable
|
|
|
- :key="index"
|
|
|
- @close="tagClose(tag, item)"
|
|
|
- >
|
|
|
+ <el-tag style="margin-right: 8px" type="success" v-for="(tag, index) in item.tag" closable :key="index" @close="tagClose(tag, item)">
|
|
|
{{ dictValueLabel(tag, customerTag) }}
|
|
|
</el-tag>
|
|
|
<template v-if="item.tag.length !== customerTag.length">
|
|
@@ -68,36 +45,17 @@
|
|
|
(val) => {
|
|
|
return changeTag(val, item);
|
|
|
}
|
|
|
- "
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="tag in customerTag"
|
|
|
- :key="tag.value"
|
|
|
- :label="tag.label"
|
|
|
- :value="tag.value"
|
|
|
- :disabled="judgeTagSelect(item.tag, tag.value)"
|
|
|
- />
|
|
|
+ ">
|
|
|
+ <el-option v-for="tag in customerTag" :key="tag.value" :label="tag.label" :value="tag.value" :disabled="judgeTagSelect(item.tag, tag.value)" />
|
|
|
</el-select>
|
|
|
- <el-tag
|
|
|
- style="cursor: pointer"
|
|
|
- type="success"
|
|
|
- @click="showSelect(item)"
|
|
|
- v-else
|
|
|
- >
|
|
|
- +
|
|
|
- </el-tag>
|
|
|
+ <el-tag style="cursor: pointer" type="success" @click="showSelect(item)" v-else> + </el-tag>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #follow="{ item }">
|
|
|
<div :class="'getWidth' + item.id" style="width: 100%">
|
|
|
<div style="width: 100%; display: flex">
|
|
|
- <template
|
|
|
- v-if="
|
|
|
- item.customerFollowRecordsList &&
|
|
|
- item.customerFollowRecordsList.length > 0
|
|
|
- "
|
|
|
- >
|
|
|
+ <template v-if="item.customerFollowRecordsList && item.customerFollowRecordsList.length > 0">
|
|
|
<div
|
|
|
:style="
|
|
|
index > 2
|
|
@@ -105,59 +63,35 @@
|
|
|
: 'line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer'
|
|
|
"
|
|
|
v-for="(record, index) in item.customerFollowRecordsList"
|
|
|
- :key="record.id"
|
|
|
- >
|
|
|
- <el-popover
|
|
|
- placement="bottom"
|
|
|
- :width="300"
|
|
|
- trigger="hover"
|
|
|
- @show="recordShow(record)"
|
|
|
- >
|
|
|
+ :key="record.id">
|
|
|
+ <el-popover placement="bottom" :width="300" trigger="hover" @show="recordShow(record)">
|
|
|
<template #reference>
|
|
|
<div>
|
|
|
- <span v-if="record.date">{{
|
|
|
- record.date.substr(0, 10)
|
|
|
- }}</span>
|
|
|
- <el-icon
|
|
|
- style="margin-left: 8px; transform: translateY(2px)"
|
|
|
- @click="deleteFollow(record)"
|
|
|
- ><DeleteFilled
|
|
|
- /></el-icon>
|
|
|
+ <span v-if="record.date">{{ record.date.substr(0, 10) }}</span>
|
|
|
+ <el-icon style="margin-left: 8px; transform: translateY(2px)" @click="deleteFollow(record)"><DeleteFilled /></el-icon>
|
|
|
</div>
|
|
|
</template>
|
|
|
<template #default>
|
|
|
<div style="width: 100%">
|
|
|
- <div style="color: #909399; margin: 8px 0">
|
|
|
- 跟进时间: {{ record.date }}
|
|
|
- </div>
|
|
|
+ <div style="color: #909399; margin: 8px 0">跟进时间: {{ record.date }}</div>
|
|
|
<div style="margin: 8px 0">
|
|
|
跟进人:
|
|
|
{{ dictValueLabel(record.createUser, userList) }}
|
|
|
</div>
|
|
|
<div v-if="record.type == '30'">
|
|
|
- <div
|
|
|
- style="word-wrap: break-word; margin: 8px 0"
|
|
|
- v-html="getStyle(record.content)"
|
|
|
- v-if="record.content"
|
|
|
- ></div>
|
|
|
+ <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
|
|
|
<div v-else>跟进记录:</div>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<div style="word-wrap: break-word; margin: 8px 0">
|
|
|
<!-- {{ getContent(record) }} -->
|
|
|
- <span v-if="record.type === '10'"
|
|
|
- >跟进记录:报价单总金额
|
|
|
- </span>
|
|
|
- <span v-if="record.type === '20'"
|
|
|
- >跟进记录:合同总金额
|
|
|
- </span>
|
|
|
+ <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
|
|
|
+ <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
|
|
|
<span>{{ moneyFormat(record.amount, 2) }}</span>
|
|
|
<span
|
|
|
v-if="record.type === '10' && record.code"
|
|
|
:class="{ 'code-class': isHave }"
|
|
|
- @click="
|
|
|
- isHaveOne ? handlePushRoute(record) : () => {}
|
|
|
- "
|
|
|
+ @click="isHaveOne ? handlePushRoute(record) : () => {}"
|
|
|
>({{ record.code }})</span
|
|
|
>
|
|
|
<span
|
|
@@ -168,21 +102,11 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="margin: 8px 0; display: flex"
|
|
|
- v-if="record.fileList && record.fileList.length > 0"
|
|
|
- >
|
|
|
+ <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
|
|
|
<div style="width: 36px">附件:</div>
|
|
|
<div style="width: calc(100% - 36px)">
|
|
|
- <div
|
|
|
- v-for="(file, index) in record.fileList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer"
|
|
|
- @click="openFile(file.fileUrl)"
|
|
|
- >{{ file.fileName }}</a
|
|
|
- >
|
|
|
+ <div v-for="(file, index) in record.fileList" :key="index">
|
|
|
+ <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -191,17 +115,9 @@
|
|
|
</el-popover>
|
|
|
</div>
|
|
|
<div
|
|
|
- style="
|
|
|
- line-height: 32px;
|
|
|
- margin-right: 8px;
|
|
|
- padding: 0 8px;
|
|
|
- background-color: #eeeeee;
|
|
|
- border-radius: 4px;
|
|
|
- cursor: pointer;
|
|
|
- "
|
|
|
+ style="line-height: 32px; margin-right: 8px; padding: 0 8px; background-color: #eeeeee; border-radius: 4px; cursor: pointer"
|
|
|
@click="clickMore(item)"
|
|
|
- v-if="item.customerFollowRecordsList.length >= 3"
|
|
|
- >
|
|
|
+ v-if="item.customerFollowRecordsList.length >= 3">
|
|
|
更多
|
|
|
</div>
|
|
|
</template>
|
|
@@ -210,20 +126,8 @@
|
|
|
</template>
|
|
|
</byTable>
|
|
|
|
|
|
- <el-dialog
|
|
|
- :title="modalType == 'add' ? '新增' : '编辑'"
|
|
|
- v-if="dialogVisible"
|
|
|
- v-model="dialogVisible"
|
|
|
- width="800"
|
|
|
- v-loading="loadingOperation"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formData.data"
|
|
|
- :rules="rules"
|
|
|
- ref="submit"
|
|
|
- >
|
|
|
+ <el-dialog :title="modalType == 'add' ? '新增' : '编辑'" v-if="dialogVisible" v-model="dialogVisible" width="800" v-loading="loadingOperation">
|
|
|
+ <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit">
|
|
|
<template #address>
|
|
|
<el-row style="width: 100%">
|
|
|
<el-col :span="8">
|
|
@@ -233,13 +137,8 @@
|
|
|
placeholder="国家"
|
|
|
filterable
|
|
|
@change="(val) => getCityData(val, '20', true)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in countryData"
|
|
|
- :label="item.chineseName"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ :no-match-text="'无数据,请联系管理员添加'">
|
|
|
+ <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -251,28 +150,20 @@
|
|
|
addressId="provinceId"
|
|
|
addressName="provinceName"
|
|
|
v-model="formData.data"
|
|
|
- :data="provinceData"
|
|
|
- >
|
|
|
+ :data="provinceData">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="cityName">
|
|
|
- <selectCity
|
|
|
- placeholder="城市"
|
|
|
- addressId="cityId"
|
|
|
- addressName="cityName"
|
|
|
- v-model="formData.data"
|
|
|
- :data="cityData"
|
|
|
- ></selectCity>
|
|
|
+ <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="formData.data" :data="cityData"></selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row style="margin-top: 20px; width: 100%">
|
|
|
<el-col :span="24">
|
|
|
<el-form-item prop="address">
|
|
|
- <el-input v-model="formData.data.address" type="textarea">
|
|
|
- </el-input>
|
|
|
+ <el-input v-model="formData.data.address" type="textarea"> </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -280,18 +171,11 @@
|
|
|
<template #person>
|
|
|
<div style="width: 100%">
|
|
|
<el-button type="primary" @click="clickAddPerson">添 加</el-button>
|
|
|
- <el-table
|
|
|
- :data="formData.data.customerUserList"
|
|
|
- style="width: 100%; margin-top: 16px"
|
|
|
- >
|
|
|
+ <el-table :data="formData.data.customerUserList" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="联系人" width="160">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'customerUserList.' + $index + '.name'"
|
|
|
- :rules="rules.name2"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
+ <el-form-item :prop="'customerUserList.' + $index + '.name'" :rules="rules.name2" :inline-message="true">
|
|
|
<el-input v-model="row.name" placeholder="请输入联系人" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -300,35 +184,16 @@
|
|
|
<el-table-column label="电子邮箱">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'customerUserList.' + $index + '.email'"
|
|
|
- :rules="rules.email"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="row.email"
|
|
|
- placeholder="请输入电子邮箱"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'customerUserList.' + $index + '.email'" :rules="rules.email" :inline-message="true">
|
|
|
+ <el-input v-model="row.email" placeholder="请输入电子邮箱" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="操作"
|
|
|
- width="120"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
+ <el-table-column align="center" label="操作" width="120" fixed="right">
|
|
|
<template #default="{ row, $index }">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- @click="clickInformationMore(row, $index)"
|
|
|
- >更多</el-button
|
|
|
- >
|
|
|
- <el-button type="primary" link @click="clickDelete($index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" link @click="clickInformationMore(row, $index)">更多</el-button>
|
|
|
+ <el-button type="primary" link @click="clickDelete($index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -337,28 +202,12 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="dialogVisible = false" size="large">取 消</el-button>
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- @click="submitForm()"
|
|
|
- size="large"
|
|
|
- :loading="submitLoading"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitForm()" size="large" :loading="submitLoading">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="更多联系方式"
|
|
|
- v-if="openPerson"
|
|
|
- v-model="openPerson"
|
|
|
- width="700"
|
|
|
- >
|
|
|
- <el-form
|
|
|
- :label-position="'top'"
|
|
|
- :model="formPerson.data"
|
|
|
- :rules="rulesPerson"
|
|
|
- ref="person"
|
|
|
- >
|
|
|
+ <el-dialog title="更多联系方式" v-if="openPerson" v-model="openPerson" width="700">
|
|
|
+ <el-form :label-position="'top'" :model="formPerson.data" :rules="rulesPerson" ref="person">
|
|
|
<el-form-item label="联系人" prop="name">
|
|
|
<el-input v-model="formPerson.data.name" />
|
|
|
</el-form-item>
|
|
@@ -367,32 +216,14 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="更多联系方式">
|
|
|
<div style="width: 100%">
|
|
|
- <el-button type="primary" @click="clickAddMoreInformation"
|
|
|
- >添 加</el-button
|
|
|
- >
|
|
|
- <el-table
|
|
|
- :data="formPerson.data.contact"
|
|
|
- style="width: 100%; margin-top: 16px"
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="clickAddMoreInformation">添 加</el-button>
|
|
|
+ <el-table :data="formPerson.data.contact" style="width: 100%; margin-top: 16px">
|
|
|
<el-table-column label="类型" width="180">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'contact.' + $index + '.type'"
|
|
|
- :rules="rulesPerson.type"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-model="row.type"
|
|
|
- placeholder="请选择类型"
|
|
|
- style="width: 100%"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in contactType"
|
|
|
- :key="item.value"
|
|
|
- :label="item.label"
|
|
|
- :value="item.value"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'contact.' + $index + '.type'" :rules="rulesPerson.type" :inline-message="true">
|
|
|
+ <el-select v-model="row.type" placeholder="请选择类型" style="width: 100%">
|
|
|
+ <el-option v-for="item in contactType" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
@@ -401,32 +232,15 @@
|
|
|
<el-table-column label="联系号码">
|
|
|
<template #default="{ row, $index }">
|
|
|
<div style="width: 100%">
|
|
|
- <el-form-item
|
|
|
- :prop="'contact.' + $index + '.contactNo'"
|
|
|
- :rules="rulesPerson.contactNo"
|
|
|
- :inline-message="true"
|
|
|
- >
|
|
|
- <el-input
|
|
|
- v-model="row.contactNo"
|
|
|
- placeholder="请输入联系号码"
|
|
|
- />
|
|
|
+ <el-form-item :prop="'contact.' + $index + '.contactNo'" :rules="rulesPerson.contactNo" :inline-message="true">
|
|
|
+ <el-input v-model="row.contactNo" placeholder="请输入联系号码" />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column
|
|
|
- align="center"
|
|
|
- label="操作"
|
|
|
- width="120"
|
|
|
- fixed="right"
|
|
|
- >
|
|
|
+ <el-table-column align="center" label="操作" width="120" fixed="right">
|
|
|
<template #default="{ $index }">
|
|
|
- <el-button
|
|
|
- type="primary"
|
|
|
- link
|
|
|
- @click="clickInformationDelete($index)"
|
|
|
- >删除</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" link @click="clickInformationDelete($index)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -435,26 +249,12 @@
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
<el-button @click="openPerson = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitPerson()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitPerson()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="添加跟进记录"
|
|
|
- v-if="openFollow"
|
|
|
- v-model="openFollow"
|
|
|
- width="500"
|
|
|
- destroy-on-close
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formConfigAFollow"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="formFollow.data"
|
|
|
- :rules="rulesFollow"
|
|
|
- ref="follow"
|
|
|
- >
|
|
|
+ <el-dialog title="添加跟进记录" v-if="openFollow" v-model="openFollow" width="500" destroy-on-close>
|
|
|
+ <byForm :formConfig="formConfigAFollow" :formOption="formOption" v-model="formFollow.data" :rules="rulesFollow" ref="follow">
|
|
|
<template #fileSlot>
|
|
|
<div style="width: 100%">
|
|
|
<el-upload
|
|
@@ -463,8 +263,7 @@
|
|
|
:data="uploadData"
|
|
|
multiple
|
|
|
:before-upload="uploadFile"
|
|
|
- :on-preview="onPreviewFile"
|
|
|
- >
|
|
|
+ :on-preview="onPreviewFile">
|
|
|
<el-button type="primary">文件上传</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
@@ -472,73 +271,35 @@
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="openFollow = false" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitFollow()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitFollow()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="跟进记录"
|
|
|
- v-if="openRecordMore"
|
|
|
- v-model="openRecordMore"
|
|
|
- width="800"
|
|
|
- destroy-on-close
|
|
|
- >
|
|
|
+ <el-dialog title="跟进记录" v-if="openRecordMore" v-model="openRecordMore" width="800" destroy-on-close>
|
|
|
<div>
|
|
|
<div style="padding: 8px 0">
|
|
|
- <el-button type="primary" @click="clickFollowUp(rowData)" plain
|
|
|
- >添加跟进记录</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="clickFollowUp(rowData)" plain>添加跟进记录</el-button>
|
|
|
</div>
|
|
|
<div style="padding-top: 16px">
|
|
|
- <div
|
|
|
- v-infinite-scroll="infiniteScroll"
|
|
|
- class="infinite-scroll"
|
|
|
- :infinite-scroll-disabled="judgeTotal()"
|
|
|
- >
|
|
|
+ <div v-infinite-scroll="infiniteScroll" class="infinite-scroll" :infinite-scroll-disabled="judgeTotal()">
|
|
|
<el-timeline>
|
|
|
- <el-timeline-item
|
|
|
- v-for="(record, index) in recordList"
|
|
|
- :key="index"
|
|
|
- :timestamp="record.date"
|
|
|
- hide-timestamp
|
|
|
- >
|
|
|
+ <el-timeline-item v-for="(record, index) in recordList" :key="index" :timestamp="record.date" hide-timestamp>
|
|
|
<div>
|
|
|
- <div
|
|
|
- style="
|
|
|
- padding: 0 0 8px 0;
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- "
|
|
|
- >
|
|
|
- <span>{{
|
|
|
- dictValueLabel(record.createUser, userList)
|
|
|
- }}</span>
|
|
|
+ <div style="padding: 0 0 8px 0; display: flex; justify-content: space-between">
|
|
|
+ <span>{{ dictValueLabel(record.createUser, userList) }}</span>
|
|
|
<span>{{ record.date }}</span>
|
|
|
</div>
|
|
|
<div v-if="record.type == '30'">
|
|
|
- <div
|
|
|
- style="word-wrap: break-word; margin: 8px 0"
|
|
|
- v-html="getStyle(record.content)"
|
|
|
- v-if="record.content"
|
|
|
- ></div>
|
|
|
+ <div style="word-wrap: break-word; margin: 8px 0" v-html="getStyle(record.content)" v-if="record.content"></div>
|
|
|
<div v-else>跟进记录:</div>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
<div style="word-wrap: break-word; margin: 8px 0">
|
|
|
<!-- {{ getContent(record) }} -->
|
|
|
- <span v-if="record.type === '10'"
|
|
|
- >跟进记录:报价单总金额
|
|
|
- </span>
|
|
|
- <span v-if="record.type === '20'"
|
|
|
- >跟进记录:合同总金额
|
|
|
- </span>
|
|
|
+ <span v-if="record.type === '10'">跟进记录:报价单总金额 </span>
|
|
|
+ <span v-if="record.type === '20'">跟进记录:合同总金额 </span>
|
|
|
<span>{{ moneyFormat(record.amount, 2) }}</span>
|
|
|
- <span
|
|
|
- v-if="record.type === '10' && record.code"
|
|
|
- :class="{ 'code-class': isHave }"
|
|
|
- @click="isHaveOne ? handlePushRoute(record) : () => {}"
|
|
|
+ <span v-if="record.type === '10' && record.code" :class="{ 'code-class': isHave }" @click="isHaveOne ? handlePushRoute(record) : () => {}"
|
|
|
>({{ record.code }})</span
|
|
|
>
|
|
|
<span
|
|
@@ -549,21 +310,11 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- style="margin: 8px 0; display: flex"
|
|
|
- v-if="record.fileList && record.fileList.length > 0"
|
|
|
- >
|
|
|
+ <div style="margin: 8px 0; display: flex" v-if="record.fileList && record.fileList.length > 0">
|
|
|
<div style="width: 36px">附件:</div>
|
|
|
<div style="width: calc(100% - 36px)">
|
|
|
- <div
|
|
|
- v-for="(file, index) in record.fileList"
|
|
|
- :key="index"
|
|
|
- >
|
|
|
- <a
|
|
|
- style="color: #409eff; cursor: pointer"
|
|
|
- @click="openFile(file.fileUrl)"
|
|
|
- >{{ file.fileName }}</a
|
|
|
- >
|
|
|
+ <div v-for="(file, index) in record.fileList" :key="index">
|
|
|
+ <a style="color: #409eff; cursor: pointer" @click="openFile(file.fileUrl)">{{ file.fileName }}</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -574,24 +325,12 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<template #footer>
|
|
|
- <el-button @click="openRecordMore = false" size="large"
|
|
|
- >关 闭</el-button
|
|
|
- >
|
|
|
+ <el-button @click="openRecordMore = false" size="large">关 闭</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
|
|
|
- <el-dialog
|
|
|
- title="高级检索"
|
|
|
- v-if="openSearch"
|
|
|
- v-model="openSearch"
|
|
|
- width="600"
|
|
|
- :before-close="cancelSearch"
|
|
|
- >
|
|
|
- <byForm
|
|
|
- :formConfig="formSearchConfig"
|
|
|
- :formOption="formOption"
|
|
|
- v-model="sourceList.pagination"
|
|
|
- >
|
|
|
+ <el-dialog title="高级检索" v-if="openSearch" v-model="openSearch" width="600" :before-close="cancelSearch">
|
|
|
+ <byForm :formConfig="formSearchConfig" :formOption="formOption" v-model="sourceList.pagination">
|
|
|
<template #address>
|
|
|
<el-row style="width: 100%">
|
|
|
<el-col :span="8">
|
|
@@ -602,13 +341,8 @@
|
|
|
clearable
|
|
|
filterable
|
|
|
@change="(val) => getCitySearchData(val, '20', true)"
|
|
|
- >
|
|
|
- <el-option
|
|
|
- v-for="item in countrySearchData"
|
|
|
- :label="item.chineseName"
|
|
|
- :value="item.id"
|
|
|
- >
|
|
|
- </el-option>
|
|
|
+ :no-match-text="'无数据,请联系管理员添加'">
|
|
|
+ <el-option v-for="item in countryData" :key="item.id" :label="item.chineseName + '(' + item.name + ')'" :value="item.id"> </el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -620,72 +354,39 @@
|
|
|
addressId="provinceId"
|
|
|
addressName="provinceName"
|
|
|
v-model="sourceList.pagination"
|
|
|
- :data="provinceSearchData"
|
|
|
- >
|
|
|
+ :data="provinceSearchData">
|
|
|
</selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item prop="cityName">
|
|
|
- <selectCity
|
|
|
- placeholder="城市"
|
|
|
- addressId="cityId"
|
|
|
- addressName="cityName"
|
|
|
- v-model="sourceList.pagination"
|
|
|
- :data="citySearchData"
|
|
|
- ></selectCity>
|
|
|
+ <selectCity placeholder="城市" addressId="cityId" addressName="cityName" v-model="sourceList.pagination" :data="citySearchData"></selectCity>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</template>
|
|
|
<template #tags>
|
|
|
<div style="width: 100%">
|
|
|
- <el-tag
|
|
|
- style="margin-right: 8px"
|
|
|
- type="info"
|
|
|
- v-for="(tag, index) in sourceList.pagination.tags"
|
|
|
- closable
|
|
|
- :key="index"
|
|
|
- @close="tagSearchClose(tag)"
|
|
|
- >
|
|
|
+ <el-tag style="margin-right: 8px" type="info" v-for="(tag, index) in sourceList.pagination.tags" closable :key="index" @close="tagSearchClose(tag)">
|
|
|
{{ dictValueLabel(tag, customerTag) }}
|
|
|
</el-tag>
|
|
|
- <template
|
|
|
- v-if="sourceList.pagination.tags.length !== customerTag.length"
|
|
|
- >
|
|
|
- <el-select
|
|
|
- v-if="addTagSearchShow"
|
|
|
- v-model="addSearchTag"
|
|
|
- style="margin-top: 8px"
|
|
|
- @change="changeSearchTag"
|
|
|
- >
|
|
|
+ <template v-if="sourceList.pagination.tags.length !== customerTag.length">
|
|
|
+ <el-select v-if="addTagSearchShow" v-model="addSearchTag" style="margin-top: 8px" @change="changeSearchTag">
|
|
|
<el-option
|
|
|
v-for="tag in customerTag"
|
|
|
:key="tag.value"
|
|
|
:label="tag.label"
|
|
|
:value="tag.value"
|
|
|
- :disabled="
|
|
|
- judgeTagSelect(sourceList.pagination.tags, tag.value)
|
|
|
- "
|
|
|
- />
|
|
|
+ :disabled="judgeTagSelect(sourceList.pagination.tags, tag.value)" />
|
|
|
</el-select>
|
|
|
- <el-tag
|
|
|
- style="cursor: pointer"
|
|
|
- type="info"
|
|
|
- @click="addTagSearchShow = true"
|
|
|
- v-else
|
|
|
- >
|
|
|
- +
|
|
|
- </el-tag>
|
|
|
+ <el-tag style="cursor: pointer" type="info" @click="addTagSearchShow = true" v-else> + </el-tag>
|
|
|
</template>
|
|
|
</div>
|
|
|
</template>
|
|
|
</byForm>
|
|
|
<template #footer>
|
|
|
<el-button @click="cancelSearch()" size="large">取 消</el-button>
|
|
|
- <el-button type="primary" @click="submitSearch()" size="large"
|
|
|
- >确 定</el-button
|
|
|
- >
|
|
|
+ <el-button type="primary" @click="submitSearch()" size="large">确 定</el-button>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
@@ -1137,10 +838,7 @@ const getCityData = (id, type, isChange) => {
|
|
|
};
|
|
|
getCityData("0");
|
|
|
const clickAddPerson = () => {
|
|
|
- if (
|
|
|
- formData.data.customerUserList &&
|
|
|
- formData.data.customerUserList.length > 0
|
|
|
- ) {
|
|
|
+ if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
|
|
|
formData.data.customerUserList.push({
|
|
|
name: "",
|
|
|
email: "",
|
|
@@ -1167,29 +865,24 @@ const submitFollow = () => {
|
|
|
} else {
|
|
|
formFollow.data.fileList = [];
|
|
|
}
|
|
|
- proxy
|
|
|
- .post("/customerFollowRecords/" + modalType.value, formFollow.data)
|
|
|
- .then(
|
|
|
- () => {
|
|
|
- ElMessage({
|
|
|
- message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- openFollow.value = false;
|
|
|
- getList();
|
|
|
- },
|
|
|
- (err) => {
|
|
|
- console.log(err);
|
|
|
- }
|
|
|
- );
|
|
|
+ proxy.post("/customerFollowRecords/" + modalType.value, formFollow.data).then(
|
|
|
+ () => {
|
|
|
+ ElMessage({
|
|
|
+ message: modalType.value == "add" ? "添加成功" : "编辑成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ openFollow.value = false;
|
|
|
+ getList();
|
|
|
+ },
|
|
|
+ (err) => {
|
|
|
+ console.log(err);
|
|
|
+ }
|
|
|
+ );
|
|
|
});
|
|
|
};
|
|
|
const submitForm = () => {
|
|
|
submit.value.handleSubmit(() => {
|
|
|
- if (
|
|
|
- formData.data.customerUserList &&
|
|
|
- formData.data.customerUserList.length > 0
|
|
|
- ) {
|
|
|
+ if (formData.data.customerUserList && formData.data.customerUserList.length > 0) {
|
|
|
formData.data.tag = formData.data.tags.join(",");
|
|
|
submitLoading.value = true;
|
|
|
proxy.post("/customer/" + modalType.value, formData.data).then(
|
|
@@ -1214,31 +907,24 @@ const submitForm = () => {
|
|
|
});
|
|
|
};
|
|
|
const getDict = () => {
|
|
|
- proxy
|
|
|
- .getDictOne([
|
|
|
- "customer_tag",
|
|
|
- "customer_source",
|
|
|
- "customer_status",
|
|
|
- "contact_type",
|
|
|
- ])
|
|
|
- .then((res) => {
|
|
|
- customerTag.value = res["customer_tag"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- customerSource.value = res["customer_source"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- customerStatus.value = res["customer_status"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- contactType.value = res["contact_type"].map((x) => ({
|
|
|
- label: x.dictValue,
|
|
|
- value: x.dictKey,
|
|
|
- }));
|
|
|
- });
|
|
|
+ proxy.getDictOne(["customer_tag", "customer_source", "customer_status", "contact_type"]).then((res) => {
|
|
|
+ customerTag.value = res["customer_tag"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ customerSource.value = res["customer_source"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ customerStatus.value = res["customer_status"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ contactType.value = res["contact_type"].map((x) => ({
|
|
|
+ label: x.dictValue,
|
|
|
+ value: x.dictKey,
|
|
|
+ }));
|
|
|
+ });
|
|
|
proxy
|
|
|
.get("/tenantUser/list", {
|
|
|
pageNum: 1,
|
|
@@ -1365,24 +1051,14 @@ const getContent = (item) => {
|
|
|
if (item.type === "10") {
|
|
|
return "跟进记录: " + "报价单总金额 " + proxy.moneyFormat(item.amount, 2);
|
|
|
} else if (item.type === "20") {
|
|
|
- return (
|
|
|
- "跟进记录: " +
|
|
|
- "合同总金额 " +
|
|
|
- proxy.moneyFormat(item.amount, 2) +
|
|
|
- ` (${item.contractCode}) `
|
|
|
- );
|
|
|
+ return "跟进记录: " + "合同总金额 " + proxy.moneyFormat(item.amount, 2) + ` (${item.contractCode}) `;
|
|
|
}
|
|
|
};
|
|
|
const recordShow = (item) => {
|
|
|
- if (
|
|
|
- !(item.fileList && item.fileList.length > 0) &&
|
|
|
- JSON.stringify(item.fileList) !== "[]"
|
|
|
- ) {
|
|
|
- proxy
|
|
|
- .post("/fileInfo/getList", { businessIdList: [item.id] })
|
|
|
- .then((fileObj) => {
|
|
|
- item.fileList = fileObj[item.id] || [];
|
|
|
- });
|
|
|
+ if (!(item.fileList && item.fileList.length > 0) && JSON.stringify(item.fileList) !== "[]") {
|
|
|
+ proxy.post("/fileInfo/getList", { businessIdList: [item.id] }).then((fileObj) => {
|
|
|
+ item.fileList = fileObj[item.id] || [];
|
|
|
+ });
|
|
|
}
|
|
|
};
|
|
|
const openFile = (path) => {
|
|
@@ -1413,19 +1089,8 @@ const clickMore = (item) => {
|
|
|
})
|
|
|
.then((fileObj) => {
|
|
|
for (let i = 0; i < res.rows.length; i++) {
|
|
|
- recordList.value[
|
|
|
- parseInt(
|
|
|
- i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize
|
|
|
- )
|
|
|
- ].fileList =
|
|
|
- fileObj[
|
|
|
- recordList.value[
|
|
|
- parseInt(
|
|
|
- i +
|
|
|
- (queryParams.value.pageNum - 1) * queryParams.value.pageSize
|
|
|
- )
|
|
|
- ].id
|
|
|
- ] || [];
|
|
|
+ recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].fileList =
|
|
|
+ fileObj[recordList.value[parseInt(i + (queryParams.value.pageNum - 1) * queryParams.value.pageSize)].id] || [];
|
|
|
}
|
|
|
});
|
|
|
});
|
|
@@ -1436,10 +1101,7 @@ const infiniteScroll = () => {
|
|
|
clickMore();
|
|
|
};
|
|
|
const judgeTotal = () => {
|
|
|
- if (
|
|
|
- queryParams.value.pageNum * queryParams.value.pageSize >=
|
|
|
- queryParams.value.total
|
|
|
- ) {
|
|
|
+ if (queryParams.value.pageNum * queryParams.value.pageSize >= queryParams.value.total) {
|
|
|
return true;
|
|
|
}
|
|
|
return false;
|
|
@@ -1501,19 +1163,14 @@ const statisticalData = ref({
|
|
|
customerList: [],
|
|
|
});
|
|
|
const obtainStatisticalData = () => {
|
|
|
- proxy
|
|
|
- .post("/customer/sourceStatistics", sourceList.value.paginationTwo)
|
|
|
- .then((res) => {
|
|
|
- statisticalData.value = res;
|
|
|
- });
|
|
|
+ proxy.post("/customer/sourceStatistics", sourceList.value.paginationTwo).then((res) => {
|
|
|
+ statisticalData.value = res;
|
|
|
+ });
|
|
|
};
|
|
|
obtainStatisticalData();
|
|
|
const getNum = (val) => {
|
|
|
let num = 0;
|
|
|
- if (
|
|
|
- statisticalData.value.customerList &&
|
|
|
- statisticalData.value.customerList.length > 0
|
|
|
- ) {
|
|
|
+ if (statisticalData.value.customerList && statisticalData.value.customerList.length > 0) {
|
|
|
statisticalData.value.customerList.map((item) => {
|
|
|
if (sourceList.value.paginationTwo.statisticsType === 1) {
|
|
|
if (item.source === val) {
|
|
@@ -1605,8 +1262,7 @@ const addTagSearchShow = ref(false);
|
|
|
let copySearch = ref({});
|
|
|
const moreSearch = () => {
|
|
|
if (sourceList.value.pagination.tag) {
|
|
|
- sourceList.value.pagination.tags =
|
|
|
- sourceList.value.pagination.tag.split(",");
|
|
|
+ sourceList.value.pagination.tags = sourceList.value.pagination.tag.split(",");
|
|
|
} else {
|
|
|
sourceList.value.pagination.tags = [];
|
|
|
}
|
|
@@ -1619,12 +1275,8 @@ const cancelSearch = () => {
|
|
|
openSearch.value = false;
|
|
|
};
|
|
|
const submitSearch = () => {
|
|
|
- if (
|
|
|
- sourceList.value.pagination.tags &&
|
|
|
- sourceList.value.pagination.tags.length > 0
|
|
|
- ) {
|
|
|
- sourceList.value.pagination.tag =
|
|
|
- sourceList.value.pagination.tags.join(",");
|
|
|
+ if (sourceList.value.pagination.tags && sourceList.value.pagination.tags.length > 0) {
|
|
|
+ sourceList.value.pagination.tag = sourceList.value.pagination.tags.join(",");
|
|
|
} else {
|
|
|
sourceList.value.pagination.tag = "";
|
|
|
}
|
|
@@ -1634,9 +1286,7 @@ const submitSearch = () => {
|
|
|
getList();
|
|
|
};
|
|
|
const tagSearchClose = (val) => {
|
|
|
- sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter(
|
|
|
- (item) => item !== val
|
|
|
- );
|
|
|
+ sourceList.value.pagination.tags = sourceList.value.pagination.tags.filter((item) => item !== val);
|
|
|
};
|
|
|
const changeSearchTag = (val) => {
|
|
|
sourceList.value.pagination.tags.push(val);
|
|
@@ -1645,18 +1295,12 @@ const changeSearchTag = (val) => {
|
|
|
};
|
|
|
// 判断当前用户有无销售合同页面权限
|
|
|
const isHave = ref(false);
|
|
|
-if (
|
|
|
- useUserStore().permissions &&
|
|
|
- useUserStore().permissions.includes("contract")
|
|
|
-) {
|
|
|
+if (useUserStore().permissions && useUserStore().permissions.includes("contract")) {
|
|
|
isHave.value = true;
|
|
|
}
|
|
|
// 判断当前用户有无报价单页面权限
|
|
|
const isHaveOne = ref(false);
|
|
|
-if (
|
|
|
- useUserStore().permissions &&
|
|
|
- useUserStore().permissions.includes("priceSheet")
|
|
|
-) {
|
|
|
+if (useUserStore().permissions && useUserStore().permissions.includes("priceSheet")) {
|
|
|
isHaveOne.value = true;
|
|
|
}
|
|
|
|