diff --git a/src/views/custom/detail.vue b/src/views/custom/detail.vue index 7ef535d..bfde519 100644 --- a/src/views/custom/detail.vue +++ b/src/views/custom/detail.vue @@ -8,184 +8,140 @@ - -
客户基本资料1
- - - - {{ formData.name }} - - - - - - {{ formData.custom_type_text - }} - - - - - - {{ formData.parent_company }} - - - - - - {{ formData.phone }} - - - - - - - {{ formData.credit_rating_text }} - - - - - - {{ formData.province_name }} - - - - - - {{ formData.city_name }} - - - - - - {{ formData.area_name }} - - - - - - {{ formData.address }} - - - - - {{ formData.notes }} - - - - -
- -
主要负责人
- - - - - {{ formData.master_name }} - - - - - - {{ formData.master_position }} - - - - - - {{ formData.master_phone }} - - - - - - {{ formData.master_email }} - - - - - - {{ formData.master_telephone }} - - - - - {{ formData.master_notes }} - - - -
- -
其他联系人
- - - - - - - - - - - - - - -
- -
开票信息
- - - - {{ formData.company_name }} - + - - - - {{ formData.company_tin }} - + {{ formData.name }} + {{ formData.custom_type_text }} + {{ formData.parent_company }} + + {{ formData.address }} + + {{ formData.phone + }} + {{ formData.credit_rating_text - - - - {{ formData.bank_open_address }} - + }} - - - - {{ formData.company_telephone }} - + {{ formData.notes - - - - {{ formData.bank_name }} - + }} - - - + + + + + {{ formData.master_name }} + {{ formData.master_position }} + {{ formData.master_phone }} + + {{ formData.master_email }} + + {{ formData.master_telephone + }} + {{ formData.master_notes + + }} + + + + + +
其他联系人
+ + + + + + + + + + + + + + + + + + + + {{ formData.company_name }} + {{ formData.company_tin }} + + + {{ formData.bank_open_address }} + + {{ formData.company_telephone + }} + {{ formData.bank_name + + }} + {{ formData.bank_account + + }} + - {{ formData.bank_account }} -
-
-
-
- Config - Role + +
+ + + + + + + + +
+
+ +
+ +
+ +
+ + + + + + + + + +
+
+ +
+
Task Task Task Task - Task + +
+ + + + + + + + + + +
+
+ +
+
@@ -202,8 +158,10 @@ import { } from "@/api/common"; import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' -import { apiCustomContactsLists } from '@/api/custom_contacts' +import { apiProjectLists } from '@/api/project' +import { apiQuotationLists } from '@/api/quotation' import { apiCustomDetail } from '@/api/custom' +import { apiCustomServiceLists } from '@/api/custom_service' import { timeFormat } from '@/utils/util' import type { TabsPaneContext } from 'element-plus' import type { PropType } from 'vue' @@ -217,11 +175,17 @@ const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() +const tableData1 = ref([]) +const tableData2 = ref([]) +const tableData3 = ref([]) +const tableData4 = ref([]) +const tableData5 = ref([]) +const tableData6 = ref([]) const activeName = ref('new_name_1') const handleClick = (tab: TabsPaneContext, event: Event) => { - console.log(tab, event) + // console.log(tab, event) } const datas = reactive({ provinceOptions: [], @@ -235,7 +199,107 @@ const formData = reactive({ }) +const pager1 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) +const pager2 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) +const pager3 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) +const pager4 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) +const pager5 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) +const pager6 = reactive({ + page_size: 10, + page_no: 1, + custom_id: "" +}) + +const total1 = ref(0) +const total2 = ref(0) +const total3 = ref(0) +const total4 = ref(0) +const total5 = ref(0) +const total6 = ref(0) +const total7 = ref(0) +const total8 = ref(0) + +//条数 +const handleSizeChange1 = (val: number) => { + pager1.page_size = val +} +const handleSizeChange2 = (val: number) => { + pager2.page_size = val + estimateLists() +} +const handleSizeChange3 = (val: number) => { + + pager3.page_size = val + competitorLists() +} +const handleSizeChange4 = (val: number) => { + + pager4.page_size = val + competitorLists() +} +const handleSizeChange5 = (val: number) => { + + pager5.page_size = val + competitorLists() +} +const handleSizeChange6 = (val: number) => { + + pager6.page_size = val + competitorLists() +} + +//分页 +const handleCurrentChange1 = (val: number) => { + console.log(`current page: ${val}`) + pager1.page_no = val + solutionLists() +} +const handleCurrentChange2 = (val: number) => { + console.log(`current page: ${val}`) + pager2.page_no = val + estimateLists() +} +const handleCurrentChange3 = (val: number) => { + pager3.page_no = val + console.log(`current page: ${val}`) + competitorLists() +} +const handleCurrentChange4 = (val: number) => { + pager4.page_no = val + console.log(`current page: ${val}`) + competitorLists() +} +const handleCurrentChange5 = (val: number) => { + pager5page_no = val + console.log(`current page: ${val}`) + competitorLists() +} +const handleCurrentChange6 = (val: number) => { + pager6.page_no = val + console.log(`current page: ${val}`) + competitorLists() +} // 获取详情 const setFormData = async (data: Record) => { // for (const key in formData) { @@ -255,14 +319,16 @@ const setFormData = async (data: Record) => { // } Object.assign(formData, data) + pager1.custom_id = data.id + pager2.custom_id = data.id + pager3.custom_id = data.id + pager4.custom_id = data.id + pager5.custom_id = data.id + pager6.custom_id = data.id - getcontacts(data) -} -const getcontacts = async (row: Record) => { - const data = await apiCustomContactsLists({ - custom_id: row.id - }) - contactsList.value = data.lists + projectLists() + quotationLists() + customServiceLists() } const getDetail = async (row: Record) => { @@ -291,51 +357,27 @@ const handleClose = () => { } -//获取省份 -function province_change(value: string) { - getCityList(); +//项目信息 +const projectLists = () => { + apiProjectLists(pager1).then((res) => { + tableData1.value = res.lists + total1.value = res.count + }) } -function city_change(value: string) { - getAreaList(); +//报价信息 +const quotationLists = () => { + apiQuotationLists(pager2).then((res) => { + tableData2.value = res.lists + total2.value = res.count + }) } - -// function brigade_change(value: string) { -// formData.brigade = value -// } -const getProvinceList = async () => { - const data = await apiProvinceList({}); - datas["provinceOptions"] = data; -}; -const getCityList = async () => { - const data = await apiCityList({ province_code: formData.province }); - datas["cityOptions"] = data; -}; -const getAreaList = async () => { - const data = await apiAreaList({ city_code: formData.city }); - datas["areaOptions"] = data; - -}; -//增加其他联系人 -function other() { - formData.other_contacts.push({ - name: "", - position: "", - phone: "", - email: "", - }); +//售后信息 +const customServiceLists = () => { + apiCustomServiceLists(pager3).then((res) => { + tableData3.value = res.lists + total3.value = res.count + }) } -//删除其他联系人 -function otherdelete() { - formData.other_contacts.pop({ - name: "", - position: "", - phone: "", - email: "", - }); -} - -getProvinceList(); - defineExpose({ open, diff --git a/src/views/custom_service/detail.vue b/src/views/custom_service/detail.vue index 5062d79..df71d4f 100644 --- a/src/views/custom_service/detail.vue +++ b/src/views/custom_service/detail.vue @@ -40,6 +40,7 @@
暂无文件
+ diff --git a/src/views/customer_demand/detail.vue b/src/views/customer_demand/detail.vue index f0b3012..3a1c06e 100644 --- a/src/views/customer_demand/detail.vue +++ b/src/views/customer_demand/detail.vue @@ -207,12 +207,9 @@ const formData = reactive({ //条数 const handleSizeChange1 = (val: number) => { - pager1.page_size = val - solutionLists() } const handleSizeChange2 = (val: number) => { - pager2.page_size = val estimateLists() }