123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <template>
- <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="icon mr-4">
- <el-link :underline="false" @click="backPath()">
- <el-icon class="el-icon--right"><icon-view /></el-icon> 返回客户列表
- </el-link>
- </div>
- <div class="mr-8">
- <el-select v-model="values" placeholder="请选择" style="width: 250px" @change="getDetail()">
- <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
- </el-select>
- </div>
- </div>
- <!-- 内容 -->
- <div class="flex-1 flex flex-col overflow-y-auto overflow-x-hidden scroll-bar"
- v-loading="allLoading.customerDetailLoading">
- <div class="w-full h-auto flex justify-between">
- <div class="bg-white shadow-md rounded-md" style="width: 46%;">
- <Information :data="information" @refreshData="getDetail" />
- </div>
- <div class="bg-white ml-2 shadow-md rounded-md flex-1">
- <Attachment :data="information" @refreshData="getDetail" />
- </div>
- </div>
- <div class="w-full h-auto flex justify-between mt-2">
- <div class="bg-white shadow-md rounded-md" style="width: 65%;">
- <DetailCompinents :data="detailCompinentsData" :information="information" :formTaskType="0"
- :filed="'customId'" :disabledList="['taskType', 'customId']"
- @refreshData="getDetail" />
- </div>
- <div class="bg-white ml-2 shadow-md rounded-md flex-1">
- <OperationRecord :data="information" />
- </div>
- </div>
- <div class="w-full h-auto flex justify-between mt-2">
- <div class="bg-white shadow-md rounded-md w-full">
- <RelatedContacts :data="information" @refreshData="getDetail" />
- </div>
- </div>
- <div class="w-full h-auto flex justify-between mt-2">
- <div class="bg-white shadow-md rounded-md w-full">
- <RelatedBusiness :data="information" @refreshData="getDetail" />
- </div>
- </div>
- <div class="w-full h-auto flex justify-between mt-2">
- <div class="bg-white shadow-md rounded-md w-full">
- <RelatedOrders :data="information" @refreshData="getDetail" />
- </div>
- </div>
- </div>
- </div>
- </template>
-
- <script lang="ts" setup>
- import { ref, reactive, onMounted, inject } from "vue";
- import type { FormInstance, FormRules } from 'element-plus'
- import { backPath } from '@/utils/tools'
- import { Edit, ArrowLeft as IconView } from '@element-plus/icons-vue'
- import { URL_FETALL, URL_GETDETAIL } from '../api'
- import { post, get } from "@/utils/request";
- import { useRoute } from "vue-router";
- import Information from '../component/information.vue'
- import Attachment from '../component/attachment.vue'
- import RelatedTasks from '../component/relatedTasks.vue';
- import OperationRecord from '../component/operationRecord.vue';
- import RelatedBusiness from '../component/relatedBusiness.vue';
- import RelatedContacts from "../component/relatedContacts.vue";
- import RelatedOrders from "../component/relatedOrders.vue"
- import DetailCompinents from '@/components/detailcompinents/relatedTasks.vue'
- import { formatDate } from "@/utils/times";
- const route = useRoute()
- const globalPopup = inject<GlobalPopup>('globalPopup')
- const rowId = ref(+(route.query.id || ''))
- const values = ref<any>('')
- const options = ref<optionType[]>([])
- const information = ref<any>({})
- const detailCompinentsData = ref([])
- const allLoading = reactive({
- customerDetailLoading: false
- })
- function getDetail() {
- allLoading.customerDetailLoading = true
- post(URL_GETDETAIL, { id: values.value }).then((res) => {
- res.data.newCreateTime = formatDate(new Date(res.data.createTime)),
- information.value = res.data
- detailCompinentsData.value = res.data.tasks || []
- }).finally(() => {
- allLoading.customerDetailLoading = false
- })
- }
- function getAllCustomer() {
- get(URL_FETALL).then(({ data }) => {
- options.value = data.map((item: any) => ({
- value: item.id,
- label: item.customName
- }))
- })
- }
- onMounted(() => {
- values.value = rowId.value || ''
- getAllCustomer()
- getDetail()
- })
- </script>
-
- <style lang="scss" scoped>
- .businessDetail {
- .icon {
- .el-link {
- color: #0052CC;
- }
- }
- .text {
- .el-link {
- color: #fff;
- font-size: 14px;
- }
- }
- .backDarkBlue {
- background-color: #0052CC;
- color: #fff;
- }
- .backGray {
- background-color: #F4F5F7;
- color: #000;
- }
- .startStep {
- clip-path: polygon(0% 0%,
- 90% 0%,
- 100% 50%,
- 90% 100%,
- 0% 100%);
- }
- .nextStep {
- clip-path: polygon(0% 0%,
- 90% 0%,
- 100% 50%,
- 90% 100%,
- 0% 100%,
- 10% 50%);
- }
- .endStep {
- clip-path: polygon(0% 0%,
- 100% 0%,
- 100% 100%,
- 0% 100%,
- 10% 50%);
- }
- .itemPing {
- padding-top: 4px;
- padding-bottom: 4px;
- }
- }
- </style>
|