|
@@ -1,29 +1,29 @@
|
|
<template>
|
|
<template>
|
|
<div class="h-full flex p-3 flex-col businessDetail">
|
|
<div class="h-full flex p-3 flex-col businessDetail">
|
|
- <div class="w-full bg-white p-2 mb-2 shadow-md rounded-md flex items-center">
|
|
|
|
|
|
+ <div class="w-full bg-white p-2 mb-2 shadow-md rounded-md flex items-center" v-loading="allLoading.skeletonLoading">
|
|
<div class="icon mr-4">
|
|
<div class="icon mr-4">
|
|
<el-link :underline="false" @click="backPath()">
|
|
<el-link :underline="false" @click="backPath()">
|
|
<el-icon class="el-icon--right"><icon-view /></el-icon> 返回商机列表
|
|
<el-icon class="el-icon--right"><icon-view /></el-icon> 返回商机列表
|
|
</el-link>
|
|
</el-link>
|
|
</div>
|
|
</div>
|
|
<div class="mr-8">
|
|
<div class="mr-8">
|
|
- <el-select v-model="value" placeholder="请选择" style="width: 150px">
|
|
|
|
|
|
+ <el-select v-model="optionVal" placeholder="请选择" style="width: 150px" filterable @change="getDetail()">
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
<div class="flex-1 flex h-full justify-end overflow-auto scroll-bar-hide cursor-pointer" @wheel="handleScroll">
|
|
<div class="flex-1 flex h-full justify-end overflow-auto scroll-bar-hide cursor-pointer" @wheel="handleScroll">
|
|
<div :class="`${index === 0 ? 'startStep' : 'nextStep'} relative rounded-md flex items-center backGray pl-6 pr-6`"
|
|
<div :class="`${index === 0 ? 'startStep' : 'nextStep'} relative rounded-md flex items-center backGray pl-6 pr-6`"
|
|
- v-for="(item, index) in 2" :key="index">
|
|
|
|
- <div class="pr-3 text-nowrap">验证客户</div>
|
|
|
|
- <div class="text-nowrap">30%</div>
|
|
|
|
|
|
+ v-for="(item, index) in stageList" :key="index">
|
|
|
|
+ <div class="pr-3 text-nowrap">{{ item.name }}</div>
|
|
|
|
+ <div class="text-nowrap">{{ item.plan }}</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="relative rounded-md flex items-center itemPing backGray endStep item pl-6 pr-6 mr-4">
|
|
<div class="relative rounded-md flex items-center itemPing backGray endStep item pl-6 pr-6 mr-4">
|
|
<el-select v-model="stageStatusVal" placeholder="结束" style="width: 100px" class="selectClas">
|
|
<el-select v-model="stageStatusVal" placeholder="结束" style="width: 100px" class="selectClas">
|
|
- <el-option v-for="item in stageStatus" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
|
|
+ <el-option v-for="(item, index) in stageListOption" :key="index" :label="item.label" :value="item.value" />
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <div class="bg-[#0052CC] rounded-md text itemPing pl-2 pr-2 flex items-center">
|
|
|
|
|
|
+ <div class="bg-[#0052CC] rounded-md text itemPing pl-2 pr-2 flex items-center aloneText">
|
|
<el-link :underline="false">推进至阶段【验证客户】</el-link>
|
|
<el-link :underline="false">推进至阶段【验证客户】</el-link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -61,39 +61,44 @@ import { ref, reactive, onMounted, inject } from "vue";
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
import type { FormInstance, FormRules } from 'element-plus'
|
|
import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
|
|
import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
|
|
import { backPath } from '@/utils/tools'
|
|
import { backPath } from '@/utils/tools'
|
|
-import { stageStatus } from '../api'
|
|
|
|
|
|
+import { useRoute } from "vue-router";
|
|
|
|
+import { BUSIESS_ALL, BUSIESS_GETSATE, BUSIESS_INFO } from '../api'
|
|
|
|
|
|
import Information from '../component/information.vue'
|
|
import Information from '../component/information.vue'
|
|
import Attachment from '../component/attachment.vue'
|
|
import Attachment from '../component/attachment.vue'
|
|
import RelatedTasks from '../component/relatedTasks.vue';
|
|
import RelatedTasks from '../component/relatedTasks.vue';
|
|
import OperationRecord from '../component/operationRecord.vue';
|
|
import OperationRecord from '../component/operationRecord.vue';
|
|
import Products from '../component/products.vue';
|
|
import Products from '../component/products.vue';
|
|
|
|
+import { post } from "@/utils/request";
|
|
|
|
+import { number } from "echarts";
|
|
|
|
|
|
-const value = ref('')
|
|
|
|
|
|
+type stageListType = {
|
|
|
|
+ name: string,
|
|
|
|
+ plan: string
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const route = useRoute()
|
|
|
|
+const optionVal = ref<any>('')
|
|
const stageStatusVal = ref('')
|
|
const stageStatusVal = ref('')
|
|
-const options = [
|
|
|
|
- {
|
|
|
|
- value: 'Option1',
|
|
|
|
- label: 'Option1',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 'Option2',
|
|
|
|
- label: 'Option2',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 'Option3',
|
|
|
|
- label: 'Option3',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 'Option4',
|
|
|
|
- label: 'Option4',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- value: 'Option5',
|
|
|
|
- label: 'Option5',
|
|
|
|
- },
|
|
|
|
-]
|
|
|
|
|
|
+const options = ref<optionType[]>([])
|
|
|
|
+const allLoading = reactive({
|
|
|
|
+ skeletonLoading: false
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+const businessInfo = ref({})
|
|
|
|
+const stageListOption = ref<optionType[]>([])
|
|
|
|
+const stageList = ref<stageListType[]>([])
|
|
|
|
+
|
|
|
|
|
|
|
|
+function getDetail() {
|
|
|
|
+ allLoading.skeletonLoading
|
|
|
|
+ post(BUSIESS_INFO, { id: optionVal.value }).then(({ data }) => {
|
|
|
|
+ console.log(data, '<====== 数据')
|
|
|
|
+ businessInfo.value = (data || []);
|
|
|
|
+ }).finally(() => {
|
|
|
|
+ allLoading.skeletonLoading
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
function handleScroll(event: any) { // 滚表横向滚动
|
|
function handleScroll(event: any) { // 滚表横向滚动
|
|
if (event.deltaY) {
|
|
if (event.deltaY) {
|
|
@@ -102,6 +107,31 @@ function handleScroll(event: any) { // 滚表横向滚动
|
|
element.scrollLeft += event.deltaY;
|
|
element.scrollLeft += event.deltaY;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+function getOptionAll() {
|
|
|
|
+ post(BUSIESS_ALL, {}).then((res) => {
|
|
|
|
+ const { data } = res
|
|
|
|
+ options.value = (data || []).map((item: any) => ({
|
|
|
|
+ value: item.id + '',
|
|
|
|
+ label: item.name
|
|
|
|
+ }))
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function getSatge() {
|
|
|
|
+ post(BUSIESS_GETSATE, {}).then(({ data }) => {
|
|
|
|
+ stageList.value = (data || []).sort((a: any, b: any) => { return a.seq - b.seq; }).filter((item: any) => !item.isFinish).map((item: any) => ({ name: item.name, plan: item.plan }))
|
|
|
|
+ stageListOption.value = (data || []).sort((a: any, b: any) => { return a.seq - b.seq; }).filter((item: any) => item.isFinish).map((item: any) => ({ label: item.name, value: item.id }))
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+onMounted(() => {
|
|
|
|
+ const { id } = route.query
|
|
|
|
+ optionVal.value = id
|
|
|
|
+ getSatge()
|
|
|
|
+ getOptionAll()
|
|
|
|
+ getDetail()
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@@ -159,5 +189,18 @@ function handleScroll(event: any) { // 滚表横向滚动
|
|
padding-top: 4px;
|
|
padding-top: 4px;
|
|
padding-bottom: 4px;
|
|
padding-bottom: 4px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ .aloneText {
|
|
|
|
+ padding-top: 9px;
|
|
|
|
+ padding-bottom: 9px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<style lang="scss">
|
|
|
|
+.businessDetail {
|
|
|
|
+ .el-select__wrapper {
|
|
|
|
+ background-color: #F4F5F7;
|
|
|
|
+ box-shadow: none !important;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|