|
@@ -14,19 +14,18 @@
|
|
|
<span>闲置天数:{{ customerBaseMsg.unUsedDayCount }}</span>
|
|
<span>闲置天数:{{ customerBaseMsg.unUsedDayCount }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="action">
|
|
<div class="action">
|
|
|
- <el-button class="button_background" @click=""><img :src="peopleAuthenticationIcon" alt=""> 认领</el-button>
|
|
|
|
|
|
|
+ <el-button class="button_background" @click="ClaimCustomer"><img :src="peopleAuthenticationIcon" alt=""> 认领</el-button>
|
|
|
<el-button class="button_border" @click="OpenConcactPeoplelFormDialog"><img :src="addIcon" alt=""> 新增联系人</el-button>
|
|
<el-button class="button_border" @click="OpenConcactPeoplelFormDialog"><img :src="addIcon" alt=""> 新增联系人</el-button>
|
|
|
<el-button class="button_refresh" @click="OpenSchoolFormDialog"><img :src="editIcon" alt="" > 编辑</el-button>
|
|
<el-button class="button_refresh" @click="OpenSchoolFormDialog"><img :src="editIcon" alt="" > 编辑</el-button>
|
|
|
<el-button class="button_refresh" @click="OpenOperationRecordDialog"><img :src="logIcon" alt=""> 操作记录</el-button>
|
|
<el-button class="button_refresh" @click="OpenOperationRecordDialog"><img :src="logIcon" alt=""> 操作记录</el-button>
|
|
|
- <el-button class="delete_button_border_no_bg" @click=""><el-icon class="img"><Delete /></el-icon>删除</el-button>
|
|
|
|
|
|
|
+ <el-button class="delete_button_border_no_bg" @click="OpenDeleteDialog"><el-icon class="img"><Delete /></el-icon>删除</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
</TopBackNav>
|
|
</TopBackNav>
|
|
|
<div class="page_item bottom_detail end_item">
|
|
<div class="page_item bottom_detail end_item">
|
|
|
<TabSearch :defaultTabKey="defaultShowTab"
|
|
<TabSearch :defaultTabKey="defaultShowTab"
|
|
|
tabType="line" :tabList="tabList"
|
|
tabType="line" :tabList="tabList"
|
|
|
- @tabChange="HandleTabChange"
|
|
|
|
|
- />
|
|
|
|
|
|
|
+ @tabChange="HandleTabChange"/>
|
|
|
<div class="page_solid_line" />
|
|
<div class="page_solid_line" />
|
|
|
<div class="page_jg_20" style="flex-shrink: 0 !important;"></div>
|
|
<div class="page_jg_20" style="flex-shrink: 0 !important;"></div>
|
|
|
|
|
|
|
@@ -72,13 +71,20 @@
|
|
|
:defaultFormData="concactPeopleDefaultFormData"
|
|
:defaultFormData="concactPeopleDefaultFormData"
|
|
|
@confirm="HandleAddPeoplelConfirm">
|
|
@confirm="HandleAddPeoplelConfirm">
|
|
|
</ConcactPeopleFormDialog>
|
|
</ConcactPeopleFormDialog>
|
|
|
|
|
+
|
|
|
|
|
+ <!-- 删除客户弹窗 -->
|
|
|
|
|
+ <DeleteCustomerDialog
|
|
|
|
|
+ :currentDeleteRow="customerBaseMsg"
|
|
|
|
|
+ v-model:dialogVisible="deleteDialogVisible"
|
|
|
|
|
+ @confirm="HandleDeleteConfirm">
|
|
|
|
|
+ </DeleteCustomerDialog>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { ref, computed, onMounted } from 'vue';
|
|
import { ref, computed, onMounted } from 'vue';
|
|
|
-import { useRoute } from 'vue-router';
|
|
|
|
|
|
|
+import { useRoute, useRouter } from 'vue-router';
|
|
|
|
|
|
|
|
import TopBackNav from '@/baseComponents/TopBackNav.vue';
|
|
import TopBackNav from '@/baseComponents/TopBackNav.vue';
|
|
|
import addIcon from '@/assets/icon/add.svg';
|
|
import addIcon from '@/assets/icon/add.svg';
|
|
@@ -97,19 +103,16 @@ import FollowCard from '@/components/FollowCard.vue';
|
|
|
import Pagination from '@/baseComponents/Pagination.vue';
|
|
import Pagination from '@/baseComponents/Pagination.vue';
|
|
|
import SchoolFormDialog from '@/components/SchoolFormDialog/index.vue'
|
|
import SchoolFormDialog from '@/components/SchoolFormDialog/index.vue'
|
|
|
import ConcactPeopleFormDialog from '@/components/ConcactPeopleFormDialog/index.vue'
|
|
import ConcactPeopleFormDialog from '@/components/ConcactPeopleFormDialog/index.vue'
|
|
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
|
|
|
|
|
|
|
+import DeleteCustomerDialog from '../components/DeleteCustomerDialog.vue';
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
addContactPeopleApi,
|
|
addContactPeopleApi,
|
|
|
claimHighSeasCustomerApi,
|
|
claimHighSeasCustomerApi,
|
|
|
updateHighSeasCustomerApi,
|
|
updateHighSeasCustomerApi,
|
|
|
- deleteHighSeasCustomerApi,
|
|
|
|
|
getOperationLogApi,
|
|
getOperationLogApi,
|
|
|
} from '@/api/highSeasCustomer'
|
|
} from '@/api/highSeasCustomer'
|
|
|
-import { ElMessage } from 'element-plus';
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-const route = useRoute()
|
|
|
|
|
|
|
|
|
|
interface CustomerBaseMsg {
|
|
interface CustomerBaseMsg {
|
|
|
name:string, //学校名称
|
|
name:string, //学校名称
|
|
@@ -123,107 +126,22 @@ interface CustomerBaseMsg {
|
|
|
resetDatetime:string, //进入公海时间
|
|
resetDatetime:string, //进入公海时间
|
|
|
unUsedDayCount:string, //闲置天数
|
|
unUsedDayCount:string, //闲置天数
|
|
|
}
|
|
}
|
|
|
-const customerBaseMsg = ref<CustomerBaseMsg>({});
|
|
|
|
|
|
|
|
|
|
-// 默认列表的tab切换
|
|
|
|
|
|
|
+const route = useRoute()
|
|
|
|
|
+const router = useRouter()
|
|
|
|
|
+
|
|
|
|
|
+const customerBaseMsg = ref<CustomerBaseMsg>({}); //客户基础信息
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 1. 信息展示切换
|
|
|
|
|
+ */
|
|
|
const defaultShowTab = ref('messageOverview')
|
|
const defaultShowTab = ref('messageOverview')
|
|
|
const HandleTabChange = (val)=>{
|
|
const HandleTabChange = (val)=>{
|
|
|
defaultShowTab.value = val
|
|
defaultShowTab.value = val
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-/** 操作记录相关内容及操作 */
|
|
|
|
|
-const operationRecordDialogVisible = ref(false)
|
|
|
|
|
-const OpenOperationRecordDialog=()=>{
|
|
|
|
|
- console.log('打开操作记录弹窗')
|
|
|
|
|
- operationRecordDialogVisible.value = true
|
|
|
|
|
-}
|
|
|
|
|
-const CloseOperationRecordDialog=()=>{
|
|
|
|
|
- operationRecordDialogVisible.value = false
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-/** 操作记录有关数据 */
|
|
|
|
|
-const operationLogList = ref([
|
|
|
|
|
- {
|
|
|
|
|
- id:1,
|
|
|
|
|
- operationTime: '26-02-19 19:00',
|
|
|
|
|
- operatorName: '张安顺',
|
|
|
|
|
- schoolName: '北京师达学校',
|
|
|
|
|
- operationType: '编辑学校信息',
|
|
|
|
|
- operationContent: '学校名称【北京109中学】学段【初中】调整为学校名称【北京一零九中学】学段【九年一贯】。'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id:2,
|
|
|
|
|
- operationTime: '26-02-19 19:00',
|
|
|
|
|
- operatorName: '张安顺',
|
|
|
|
|
- schoolName: '北京师达学校',
|
|
|
|
|
- operationType: '删除联系人',
|
|
|
|
|
- operationContent: '删除 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id:3,
|
|
|
|
|
- operationTime: '26-02-19 19:00',
|
|
|
|
|
- operatorName: '张安顺',
|
|
|
|
|
- schoolName: '北京师达学校',
|
|
|
|
|
- operationType: '新增联系人',
|
|
|
|
|
- operationContent: '新增 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id:4,
|
|
|
|
|
- operationTime: '26-02-19 19:00',
|
|
|
|
|
- operatorName: '张安顺',
|
|
|
|
|
- schoolName: '北京师达学校',
|
|
|
|
|
- operationType: '编辑联系人',
|
|
|
|
|
- operationContent: '联系人姓名【张三】职务【校长】手机电话【17820681226】备注【文案文案】调整为 联系人姓名【李四】职务【校长】手机电话【17820681226】备注【文案文案】。'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- id:5,
|
|
|
|
|
- operationTime: '26-02-19 19:00',
|
|
|
|
|
- operatorName: '张安顺',
|
|
|
|
|
- schoolName: '北京师达学校',
|
|
|
|
|
- operationType: '转至公海',
|
|
|
|
|
- operationContent: '将客户转至公海。'
|
|
|
|
|
- }
|
|
|
|
|
-]);
|
|
|
|
|
-
|
|
|
|
|
-const finalOperationLogRenderData = computed(()=>{
|
|
|
|
|
- return operationLogList.value.map(item=>{
|
|
|
|
|
- return {
|
|
|
|
|
- headerTitleList:[
|
|
|
|
|
- item.operationTime,
|
|
|
|
|
- item.operatorName,
|
|
|
|
|
- item.schoolName,
|
|
|
|
|
- item.operationType
|
|
|
|
|
- ],
|
|
|
|
|
- headerTags:[],
|
|
|
|
|
- middleDesc:[],
|
|
|
|
|
- bottomDesc:`操作内容:${item.operationContent}`
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-})
|
|
|
|
|
-// 分页参数 有关数据 *
|
|
|
|
|
-const currentPage = ref(1)
|
|
|
|
|
-const pageSize = ref(20)
|
|
|
|
|
-const totalNum = ref(0)
|
|
|
|
|
-
|
|
|
|
|
-const GetOperationList = async ()=>{
|
|
|
|
|
- let params = {
|
|
|
|
|
- "customerId": 0,
|
|
|
|
|
- "operUserId": 0,
|
|
|
|
|
- "groupId": 0,
|
|
|
|
|
- "startDate": "",
|
|
|
|
|
- "endDate": "",
|
|
|
|
|
- "pageNum": 0,
|
|
|
|
|
- "pageSize": 0
|
|
|
|
|
- }
|
|
|
|
|
- await getOperationLogApi()
|
|
|
|
|
-
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-/** 1. 新增联系人有关数据 及操作 */
|
|
|
|
|
|
|
+/** 2. 新增联系人有关数据 及操作 */
|
|
|
const concactPeopleVisible = ref(false)
|
|
const concactPeopleVisible = ref(false)
|
|
|
const concactPeopleDefaultFormData = ref({})
|
|
const concactPeopleDefaultFormData = ref({})
|
|
|
const concactPeopleSubmitLoading = ref(false)
|
|
const concactPeopleSubmitLoading = ref(false)
|
|
@@ -262,7 +180,7 @@ const HandleAddPeoplelConfirm = async (params:any)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-/** 2. 编辑学校 有关数据 及操作 */
|
|
|
|
|
|
|
+/** 3. 编辑学校 有关数据 及操作 */
|
|
|
const schoolVisible = ref(false)
|
|
const schoolVisible = ref(false)
|
|
|
const schoolSubmitLoading = ref(false)
|
|
const schoolSubmitLoading = ref(false)
|
|
|
|
|
|
|
@@ -297,7 +215,6 @@ const OpenSchoolFormDialog = ()=>{
|
|
|
const HandleSchoolDialogConfirm = async (params)=>{
|
|
const HandleSchoolDialogConfirm = async (params)=>{
|
|
|
schoolSubmitLoading.value = true
|
|
schoolSubmitLoading.value = true
|
|
|
const {formData,formRef} = params
|
|
const {formData,formRef} = params
|
|
|
-
|
|
|
|
|
let transferParams = {
|
|
let transferParams = {
|
|
|
id: formData.id,
|
|
id: formData.id,
|
|
|
name: formData.name,
|
|
name: formData.name,
|
|
@@ -311,19 +228,165 @@ const HandleSchoolDialogConfirm = async (params)=>{
|
|
|
}
|
|
}
|
|
|
let res = undefined
|
|
let res = undefined
|
|
|
try{
|
|
try{
|
|
|
- // 修改
|
|
|
|
|
res = await updateHighSeasCustomerApi(transferParams)
|
|
res = await updateHighSeasCustomerApi(transferParams)
|
|
|
}catch{}
|
|
}catch{}
|
|
|
|
|
|
|
|
if(res?.code == 200){
|
|
if(res?.code == 200){
|
|
|
|
|
+ customerBaseMsg.value = {
|
|
|
|
|
+ ...customerBaseMsg.value,
|
|
|
|
|
+ name:formData.name,
|
|
|
|
|
+ stageId: JSON.parse(formData.schoolStage || '{}')?.value,
|
|
|
|
|
+ stageName: JSON.parse(formData.schoolStage || '{}')?.label,
|
|
|
|
|
+ provinceId: JSON.parse(formData.provinceArea.province || '{}')?.value,
|
|
|
|
|
+ provinceName: JSON.parse(formData.provinceArea.province || '{}')?.label,
|
|
|
|
|
+ cityId: JSON.parse(formData.provinceArea.district || '{}')?.value,
|
|
|
|
|
+ cityName: JSON.parse(formData.provinceArea.district || '{}')?.label,
|
|
|
|
|
+ address: formData.address,
|
|
|
|
|
+ }
|
|
|
|
|
+ sessionStorage.setItem('customerMsg',JSON.stringify(customerBaseMsg.value))
|
|
|
CloseSchoolFormDialog()
|
|
CloseSchoolFormDialog()
|
|
|
- // 待完善----
|
|
|
|
|
- // 重新查询学校基础信息
|
|
|
|
|
}else{
|
|
}else{
|
|
|
schoolSubmitLoading.value = false
|
|
schoolSubmitLoading.value = false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/** 4. 操作记录相关内容及操作 */
|
|
|
|
|
+const operationRecordDialogVisible = ref(false)
|
|
|
|
|
+const OpenOperationRecordDialog = async ()=>{
|
|
|
|
|
+ console.log('打开操作记录弹窗')
|
|
|
|
|
+ operationRecordDialogVisible.value = true
|
|
|
|
|
+
|
|
|
|
|
+ await GetOperationList()
|
|
|
|
|
+}
|
|
|
|
|
+const CloseOperationRecordDialog=()=>{
|
|
|
|
|
+ operationRecordDialogVisible.value = false
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/** 操作记录有关数据 */
|
|
|
|
|
+const operationLogList = ref([
|
|
|
|
|
+ {
|
|
|
|
|
+ id:1,
|
|
|
|
|
+ operationTime: '26-02-19 19:00',
|
|
|
|
|
+ operatorName: '张安顺',
|
|
|
|
|
+ schoolName: '北京师达学校',
|
|
|
|
|
+ operationType: '编辑学校信息',
|
|
|
|
|
+ operationContent: '学校名称【北京109中学】学段【初中】调整为学校名称【北京一零九中学】学段【九年一贯】。'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id:2,
|
|
|
|
|
+ operationTime: '26-02-19 19:00',
|
|
|
|
|
+ operatorName: '张安顺',
|
|
|
|
|
+ schoolName: '北京师达学校',
|
|
|
|
|
+ operationType: '删除联系人',
|
|
|
|
|
+ operationContent: '删除 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id:3,
|
|
|
|
|
+ operationTime: '26-02-19 19:00',
|
|
|
|
|
+ operatorName: '张安顺',
|
|
|
|
|
+ schoolName: '北京师达学校',
|
|
|
|
|
+ operationType: '新增联系人',
|
|
|
|
|
+ operationContent: '新增 姓名【张三】职务【校长】手机电话【17820681226】办公电话【17820681226】备注【文案文案】。'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id:4,
|
|
|
|
|
+ operationTime: '26-02-19 19:00',
|
|
|
|
|
+ operatorName: '张安顺',
|
|
|
|
|
+ schoolName: '北京师达学校',
|
|
|
|
|
+ operationType: '编辑联系人',
|
|
|
|
|
+ operationContent: '联系人姓名【张三】职务【校长】手机电话【17820681226】备注【文案文案】调整为 联系人姓名【李四】职务【校长】手机电话【17820681226】备注【文案文案】。'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ id:5,
|
|
|
|
|
+ operationTime: '26-02-19 19:00',
|
|
|
|
|
+ operatorName: '张安顺',
|
|
|
|
|
+ schoolName: '北京师达学校',
|
|
|
|
|
+ operationType: '转至公海',
|
|
|
|
|
+ operationContent: '将客户转至公海。'
|
|
|
|
|
+ }
|
|
|
|
|
+]);
|
|
|
|
|
+
|
|
|
|
|
+const finalOperationLogRenderData = computed(()=>{
|
|
|
|
|
+ return operationLogList.value.map(item=>{
|
|
|
|
|
+ return {
|
|
|
|
|
+ headerTitleList:[
|
|
|
|
|
+ item.operationTime,
|
|
|
|
|
+ item.operatorName,
|
|
|
|
|
+ item.schoolName,
|
|
|
|
|
+ item.operationType
|
|
|
|
|
+ ],
|
|
|
|
|
+ headerTags:[],
|
|
|
|
|
+ middleDesc:[],
|
|
|
|
|
+ bottomDesc:`操作内容:${item.operationContent}`
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+})
|
|
|
|
|
+// 分页参数 有关数据 *
|
|
|
|
|
+const currentPage = ref(1)
|
|
|
|
|
+const pageSize = ref(20)
|
|
|
|
|
+const totalNum = ref(0)
|
|
|
|
|
+
|
|
|
|
|
+const GetOperationList = async ()=>{
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ customerId: route.params.id,
|
|
|
|
|
+ "operUserId": '',
|
|
|
|
|
+ // "groupId": 0,
|
|
|
|
|
+ // "startDate": "",
|
|
|
|
|
+ // "endDate": "",
|
|
|
|
|
+ pageNum: currentPage.value,
|
|
|
|
|
+ pageSize: pageSize.value
|
|
|
|
|
+ }
|
|
|
|
|
+ let res = await getOperationLogApi(params)
|
|
|
|
|
+ if(res?.code == 200){
|
|
|
|
|
+ const {data:operationData, dateData, groupData, memberData} = res?.data
|
|
|
|
|
+ totalNum.value = operationData.total
|
|
|
|
|
+
|
|
|
|
|
+ finalOperationLogRenderData = operationData.records.map(item=>{
|
|
|
|
|
+ return {
|
|
|
|
|
+ headerTitleList:[
|
|
|
|
|
+ item.operDatetime,
|
|
|
|
|
+ item.operName,
|
|
|
|
|
+ item.operationType
|
|
|
|
|
+ ],
|
|
|
|
|
+ headerTags:[],
|
|
|
|
|
+ middleDesc:[],
|
|
|
|
|
+ bottomDesc:`操作内容:${item.operationContent}`
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 5. 认领 有关操作
|
|
|
|
|
+ */
|
|
|
|
|
+const ClaimCustomer = async ()=>{
|
|
|
|
|
+ let res = await claimHighSeasCustomerApi(route.query.id)
|
|
|
|
|
+ if(res?.code == 200){
|
|
|
|
|
+ ElMessage.success(res?.msg)
|
|
|
|
|
+ router.go(-1)
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+/**
|
|
|
|
|
+ * 6. 删除弹窗 有关操作
|
|
|
|
|
+ */
|
|
|
|
|
+const deleteDialogVisible = ref(false)
|
|
|
|
|
+const OpenDeleteDialog = ()=>{
|
|
|
|
|
+ deleteDialogVisible.value = true
|
|
|
|
|
+}
|
|
|
|
|
+// 删除后执行的操作
|
|
|
|
|
+const HandleDeleteConfirm = ()=>{
|
|
|
|
|
+ router.go(-1)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
onMounted(async ()=>{
|
|
onMounted(async ()=>{
|
|
|
// 获取学校的基础信息
|
|
// 获取学校的基础信息
|
|
|
customerBaseMsg.value = JSON.parse(sessionStorage.getItem('customerMsg') || '{}')
|
|
customerBaseMsg.value = JSON.parse(sessionStorage.getItem('customerMsg') || '{}')
|