From ec78fa5a6cc3182185f6a811809a7e623ed45074 Mon Sep 17 00:00:00 2001 From: jia <1451658316@qq.com> Date: Thu, 14 Dec 2023 09:37:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=95=86=E6=9C=BA=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86=20=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=AE=A1=E7=90=86=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/customer_demand_solution.ts | 6 + src/api/projecttype.ts | 32 ++ src/components/biddocument/index.vue | 92 +++++ src/components/budget/index.vue | 2 +- src/components/contacts/index.vue | 64 ++++ src/components/custom-dialog/index.vue | 13 +- src/components/customerdemand/index.vue | 73 ++++ src/components/project/index.vue | 3 +- src/components/statistics/index.vue | 1 + src/views/bid_bidding_decision/detail.vue | 204 ++++++++++ src/views/bid_bidding_decision/edit.vue | 31 +- src/views/bid_bidding_decision/index.vue | 24 +- src/views/bid_buy_bidding_document/detail.vue | 193 ++++++++++ src/views/bid_buy_bidding_document/edit.vue | 41 +- src/views/bid_buy_bidding_document/index.vue | 25 +- src/views/bid_document_examination/detail.vue | 185 +++++++++ src/views/bid_document_examination/edit.vue | 202 +++++----- src/views/bid_document_examination/index.vue | 58 +-- .../detail.vue | 204 ++++++++++ .../bid_document_examination_detail/edit.vue | 50 ++- .../bid_document_examination_detail/index.vue | 48 ++- src/views/bid_result/detail.vue | 150 ++++++++ src/views/bid_result/edit.vue | 58 ++- src/views/bid_result/index.vue | 44 +-- src/views/competitor/detail.vue | 172 +++++++++ src/views/competitor/edit.vue | 187 +++++++-- src/views/competitor/index.vue | 44 ++- src/views/contract/detail.vue | 194 ++++++++++ src/views/contract/edit.vue | 273 +++++++------ src/views/contract/index.vue | 55 ++- src/views/contract_negotiation/detail.vue | 171 +++++++++ src/views/contract_negotiation/index.vue | 50 +-- src/views/custom/detail.vue | 362 ++++++++++++++++++ src/views/custom/edit.vue | 36 +- src/views/custom/index.vue | 43 ++- src/views/custom_contacts/detail.vue | 171 +++++++++ src/views/custom_contacts/edit.vue | 42 +- src/views/custom_contacts/index.vue | 30 +- src/views/custom_follow/detail.vue | 167 ++++++++ src/views/custom_follow/edit.vue | 2 +- src/views/custom_follow/index.vue | 21 +- src/views/custom_service/detail.vue | 175 +++++++++ src/views/custom_service/edit.vue | 50 ++- src/views/custom_service/index.vue | 35 +- src/views/customer_demand/detail.vue | 159 ++++++++ src/views/customer_demand/edit.vue | 171 +++++++-- src/views/customer_demand/index.vue | 53 +-- src/views/customer_demand_solution/detail.vue | 156 ++++++++ src/views/customer_demand_solution/edit.vue | 169 ++++++-- src/views/customer_demand_solution/index.vue | 51 ++- src/views/organization/department/edit.vue | 3 +- src/views/project/detail.vue | 243 ++++++++++++ src/views/project/edit.vue | 11 +- src/views/project/index.vue | 35 +- src/views/project_estimate/detail.vue | 163 ++++++++ src/views/project_estimate/edit.vue | 204 ++++++++-- src/views/project_estimate/index.vue | 51 +-- src/views/project_follow_up/detail.vue | 187 +++++++++ src/views/project_follow_up/edit.vue | 234 +++++++---- src/views/project_follow_up/index.vue | 56 +-- .../project_pre_sales_members/detail.vue | 128 +++++++ src/views/project_pre_sales_members/edit.vue | 88 ++++- src/views/project_pre_sales_members/index.vue | 21 +- src/views/quotation/detail.vue | 174 +++++++++ src/views/quotation/index.vue | 20 +- 65 files changed, 5657 insertions(+), 803 deletions(-) create mode 100644 src/api/projecttype.ts create mode 100644 src/components/biddocument/index.vue create mode 100644 src/components/contacts/index.vue create mode 100644 src/components/customerdemand/index.vue create mode 100644 src/views/bid_bidding_decision/detail.vue create mode 100644 src/views/bid_buy_bidding_document/detail.vue create mode 100644 src/views/bid_document_examination/detail.vue create mode 100644 src/views/bid_document_examination_detail/detail.vue create mode 100644 src/views/bid_result/detail.vue create mode 100644 src/views/competitor/detail.vue create mode 100644 src/views/contract/detail.vue create mode 100644 src/views/contract_negotiation/detail.vue create mode 100644 src/views/custom/detail.vue create mode 100644 src/views/custom_contacts/detail.vue create mode 100644 src/views/custom_follow/detail.vue create mode 100644 src/views/custom_service/detail.vue create mode 100644 src/views/customer_demand/detail.vue create mode 100644 src/views/customer_demand_solution/detail.vue create mode 100644 src/views/project/detail.vue create mode 100644 src/views/project_estimate/detail.vue create mode 100644 src/views/project_follow_up/detail.vue create mode 100644 src/views/project_pre_sales_members/detail.vue create mode 100644 src/views/quotation/detail.vue diff --git a/src/api/customer_demand_solution.ts b/src/api/customer_demand_solution.ts index 7f28ee9..aa6ccd8 100644 --- a/src/api/customer_demand_solution.ts +++ b/src/api/customer_demand_solution.ts @@ -23,4 +23,10 @@ export function apiCustomerDemandSolutionDelete(params: any) { // 客户需求解决方案详情 export function apiCustomerDemandSolutionDetail(params: any) { return request.get({ url: '/custom.customer_demand_solution/detail', params }) +} + +//获取某个项目id的客户需求列表 + +export function getListByProjectId(params: any) { + return request.get({ url: '/custom.customer_demand/getListByProjectId', params }) } \ No newline at end of file diff --git a/src/api/projecttype.ts b/src/api/projecttype.ts new file mode 100644 index 0000000..023b631 --- /dev/null +++ b/src/api/projecttype.ts @@ -0,0 +1,32 @@ +import request from '@/utils/request' + +// 项目类型表列表 +export function apiProjecttypeLists(params: any) { + return request.get({ url: '/project.project_type_set/lists', params }) +} + +// 添加项目类型 +export function apiProjecttypeAdd(params: any) { + return request.post({ url: '/project.project_type_set/add', params }) +} + +// 编辑项目类型 +export function apiProjecttypeEdit(params: any) { + return request.post({ url: '/project.project_type_set/edit', params }) +} + +// 删除项目类型 +export function apiProjecttypeDelete(params: any) { + return request.post({ url: '/project.project_type_set/delete', params }) +} + + +// 项目类型详情 +export function apiProjectDelete(params: any) { + return request.post({ url: '/project.project_type_set/detail', params }) +} + +//获取所有项目类型 +export function getAllProjectTypes(params: any) { + return request.post({ url: '/project.project_type_set/getAllProjectTypes', params }) +} \ No newline at end of file diff --git a/src/components/biddocument/index.vue b/src/components/biddocument/index.vue new file mode 100644 index 0000000..873fea4 --- /dev/null +++ b/src/components/biddocument/index.vue @@ -0,0 +1,92 @@ + + + \ No newline at end of file diff --git a/src/components/budget/index.vue b/src/components/budget/index.vue index 7e495fc..23839a7 100644 --- a/src/components/budget/index.vue +++ b/src/components/budget/index.vue @@ -14,7 +14,7 @@
- + diff --git a/src/components/contacts/index.vue b/src/components/contacts/index.vue new file mode 100644 index 0000000..5d049d4 --- /dev/null +++ b/src/components/contacts/index.vue @@ -0,0 +1,64 @@ + + + \ No newline at end of file diff --git a/src/components/custom-dialog/index.vue b/src/components/custom-dialog/index.vue index 8f26545..98e4417 100644 --- a/src/components/custom-dialog/index.vue +++ b/src/components/custom-dialog/index.vue @@ -15,11 +15,15 @@
- + + + - + @@ -43,7 +47,8 @@ const queryParams = reactive({ name: '' }); - +// 获取字典数据 +const { dictData } = useDictData('custom_type') // 选中数据 const emits = defineEmits(["customEvent"]); diff --git a/src/components/customerdemand/index.vue b/src/components/customerdemand/index.vue new file mode 100644 index 0000000..7353280 --- /dev/null +++ b/src/components/customerdemand/index.vue @@ -0,0 +1,73 @@ + + + \ No newline at end of file diff --git a/src/components/project/index.vue b/src/components/project/index.vue index 893cc9e..b692d0f 100644 --- a/src/components/project/index.vue +++ b/src/components/project/index.vue @@ -15,7 +15,7 @@
- + @@ -23,7 +23,6 @@ - + diff --git a/src/views/bid_bidding_decision/edit.vue b/src/views/bid_bidding_decision/edit.vue index aa3dc43..6e83196 100644 --- a/src/views/bid_bidding_decision/edit.vue +++ b/src/views/bid_bidding_decision/edit.vue @@ -4,17 +4,17 @@ - - + + - + - + @@ -101,6 +101,10 @@ + + + +
@@ -108,6 +112,9 @@ import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import reviewprocess from '@/components/reviewprocess/index.vue' + +import projectTable from "@/components/project/index.vue" + import { apiBidBiddingDecisionAdd, apiBidBiddingDecisionEdit, apiBidBiddingDecisionDetail } from '@/api/bid_bidding_decision' import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' @@ -117,10 +124,14 @@ defineProps({ default: () => ({}) } }) +const matsname = ref('') +const project_name = ref('') +const project_code = ref('') const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() const mode = ref('add') +const showDialog = ref(false) import configs from "@/config" const base_url = configs.baseUrl + configs.urlPrefix import useUserStore from "@/stores/modules/user"; @@ -143,7 +154,14 @@ const handleAvatarSuccess_four = ( const delFileFn = (index: number) => { formData.annex.splice(index, 1) } - +//获取值 +const customEvent = (e: any) => { + formData.project_id = e.id; + matsname.value = e.person + project_name.value = e.custom_name + project_code.value = e.project_code + showDialog.value = false; +}; // 弹窗标题 const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑投标决策' : '新增投标决策' @@ -180,6 +198,9 @@ const formRules = reactive({ // 获取详情 const setFormData = async (data: Record) => { + matsname.value = data.project.person + project_name.value = data.project.name + project_code.value = data.project.project_code for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore diff --git a/src/views/bid_bidding_decision/index.vue b/src/views/bid_bidding_decision/index.vue index d619f31..ffe4f32 100644 --- a/src/views/bid_bidding_decision/index.vue +++ b/src/views/bid_bidding_decision/index.vue @@ -67,7 +67,7 @@ - + @@ -83,6 +86,7 @@
+
@@ -90,15 +94,18 @@ diff --git a/src/views/bid_buy_bidding_document/detail.vue b/src/views/bid_buy_bidding_document/detail.vue new file mode 100644 index 0000000..645feb5 --- /dev/null +++ b/src/views/bid_buy_bidding_document/detail.vue @@ -0,0 +1,193 @@ + + + + + + + diff --git a/src/views/bid_buy_bidding_document/edit.vue b/src/views/bid_buy_bidding_document/edit.vue index 8b4ff9a..7ff0e43 100644 --- a/src/views/bid_buy_bidding_document/edit.vue +++ b/src/views/bid_buy_bidding_document/edit.vue @@ -4,16 +4,18 @@ - - - - - - - - + + - + + + + + + + + + @@ -91,6 +93,10 @@ + + + + @@ -98,6 +104,7 @@ import type { FormInstance } from 'element-plus' import reviewprocess from '@/components/reviewprocess/index.vue' import Popup from '@/components/popup/index.vue' +import projectTable from "@/components/project/index.vue" import { apiBidBuyBiddingDocumentAdd, apiBidBuyBiddingDocumentEdit, apiBidBuyBiddingDocumentDetail } from '@/api/bid_buy_bidding_document' import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' @@ -107,6 +114,9 @@ defineProps({ default: () => ({}) } }) +const matsname = ref('') +const project_name = ref('') +const project_code = ref('') const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() @@ -116,6 +126,7 @@ const base_url = configs.baseUrl + configs.urlPrefix import useUserStore from "@/stores/modules/user"; const userStore = useUserStore(); const formannex = reactive([]) +const showDialog = ref(false) // 上传文件 const handleAvatarSuccess_four = ( response, @@ -164,9 +175,19 @@ const formRules = reactive({ }) - +//获取值 +const customEvent = (e: any) => { + formData.project_id = e.id; + matsname.value = e.person + project_name.value = e.custom_name + project_code.value = e.project_code + showDialog.value = false; +}; // 获取详情 const setFormData = async (data: Record) => { + matsname.value = data.project.person + project_name.value = data.project.name + project_code.value = data.project.project_code for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore diff --git a/src/views/bid_buy_bidding_document/index.vue b/src/views/bid_buy_bidding_document/index.vue index 8d71e31..fea37bc 100644 --- a/src/views/bid_buy_bidding_document/index.vue +++ b/src/views/bid_buy_bidding_document/index.vue @@ -75,7 +75,7 @@ - + @@ -91,6 +94,7 @@
+ @@ -98,15 +102,19 @@ diff --git a/src/views/bid_document_examination/detail.vue b/src/views/bid_document_examination/detail.vue new file mode 100644 index 0000000..dffbb63 --- /dev/null +++ b/src/views/bid_document_examination/detail.vue @@ -0,0 +1,185 @@ + + + + + + + diff --git a/src/views/bid_document_examination/edit.vue b/src/views/bid_document_examination/edit.vue index e7ae263..32b1fd9 100644 --- a/src/views/bid_document_examination/edit.vue +++ b/src/views/bid_document_examination/edit.vue @@ -1,117 +1,95 @@ diff --git a/src/views/bid_document_examination_detail/detail.vue b/src/views/bid_document_examination_detail/detail.vue new file mode 100644 index 0000000..7a9d618 --- /dev/null +++ b/src/views/bid_document_examination_detail/detail.vue @@ -0,0 +1,204 @@ + + + + + + + diff --git a/src/views/bid_document_examination_detail/edit.vue b/src/views/bid_document_examination_detail/edit.vue index ce6a292..f1ca2c1 100644 --- a/src/views/bid_document_examination_detail/edit.vue +++ b/src/views/bid_document_examination_detail/edit.vue @@ -1,19 +1,12 @@ diff --git a/src/views/bid_result/detail.vue b/src/views/bid_result/detail.vue new file mode 100644 index 0000000..1842636 --- /dev/null +++ b/src/views/bid_result/detail.vue @@ -0,0 +1,150 @@ + + + + + + + diff --git a/src/views/bid_result/edit.vue b/src/views/bid_result/edit.vue index 8f8340f..46e4b70 100644 --- a/src/views/bid_result/edit.vue +++ b/src/views/bid_result/edit.vue @@ -1,19 +1,18 @@ diff --git a/src/views/competitor/detail.vue b/src/views/competitor/detail.vue new file mode 100644 index 0000000..15485c3 --- /dev/null +++ b/src/views/competitor/detail.vue @@ -0,0 +1,172 @@ + + + + + diff --git a/src/views/competitor/edit.vue b/src/views/competitor/edit.vue index 98eed1d..8ce953e 100644 --- a/src/views/competitor/edit.vue +++ b/src/views/competitor/edit.vue @@ -1,42 +1,41 @@ @@ -62,6 +79,10 @@ import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import { apiCompetitorAdd, apiCompetitorEdit, apiCompetitorDetail } from '@/api/competitor' import { timeFormat } from '@/utils/util' +import { deptAll } from '@/api/org/department' +import { getAll } from '@/api/org/organization' +import projectTable from "@/components/project/index.vue" +import customerdemand from "@/components/customerdemand/index.vue" import type { PropType } from 'vue' defineProps({ dictData: { @@ -72,9 +93,77 @@ defineProps({ const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() + + const mode = ref('add') +const orglist = reactive([]) +const jobs = reactive([]) +const project_name + = ref('') +const project_code + = ref('') +const custom_name + = ref('') +const customer_demand_name = ref('') +const formDataannex = reactive([]) +import configs from "@/config" +const base_url = configs.baseUrl + configs.urlPrefix +import useUserStore from "@/stores/modules/user"; +const userStore = useUserStore(); +// 上传文件 +const handleAvatarSuccess_four = ( + response, + uploadFile +) => { + if (response.code == 0) { + ElMessage.error(response.msg); + return; + } + formDataannex.push( + { uri: response.data.uri, name: response.data.name } + ); +}; +// 删除上传的文件 +const delFileFn = (index: number) => { + formDataannex.splice(index, 1) +} +// dialog +const showDialog = ref(false) +const showDialog1 = ref(false) +const customEvent = (e: any) => { + formData.project_id = e.id; + project_name.value = e.name; + project_code + .value = e.project_code; + custom_name + .value = e.custom_name; + showDialog.value = false; +}; +const customEvent1 = (e: any) => { + formData.customer_demand_id = e.id; + customer_demand_name.value = e.theme; + + showDialog1.value = false; +}; +const getlista = () => { + getAll().then((res) => { + // orglist = res.data + + Object.assign(orglist, res) + + }) +} + +const area_change = (e: any) => { + formData.org_id = e + let data = { 'org_id': e } + // console.log(data) + deptAll(data).then((res) => { + Object.assign(jobs, res) + }) +} // 弹窗标题 const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑竞争对手' : '新增竞争对手' @@ -84,7 +173,7 @@ const popupTitle = computed(() => { const formData = reactive({ id: '', org_id: '', - department_id: '', + dept_id: '', project_id: '', customer_demand_id: '', competitor_name: '', @@ -97,7 +186,20 @@ const formData = reactive({ annex: '', }) +const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => { + const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ + // if (!value) { + // return callback(new Error('电话号码不能为空')) + // } + setTimeout(() => { + if (phoneReg.test(value)) { + callback() + } else { + callback(new Error('电话号码格式不正确')) + } + }, 100) +} // 表单验证 const formRules = reactive({ @@ -106,6 +208,30 @@ const formRules = reactive({ // 获取详情 const setFormData = async (data: Record) => { + deptAll({ 'org_id': data.org_id }).then((res) => { + Object.assign(jobs, res) + }) + if (data.annex.length > 0) { + if (data.annex.includes(",")) { + const arry1 = data.annex.split(',').map((item: any, index: any) => { + return { + name: `文件${index + 1}`, + uri: item + }; + }); + Object.assign(formDataannex, arry1) + } else { + const arry1 = [{ name: `文件1`, uri: data.annex }] + Object.assign(formDataannex, arry1) + + } + } + // console.log(jobs) + project_name.value = data.project_name + custom_name.value = data.custom_name + project_code.value = data.project_code + customer_demand_name.value = data.customer_demand_name + for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore @@ -126,6 +252,9 @@ const getDetail = async (row: Record) => { // 提交按钮 const handleSubmit = async () => { + if (formDataannex.length > 0) { + formData.annex = formDataannex.map((item) => item.uri).toString() + } await formRef.value?.validate() const data = { ...formData, } mode.value == 'edit' @@ -147,7 +276,7 @@ const handleClose = () => { } - +getlista() defineExpose({ open, setFormData, diff --git a/src/views/competitor/index.vue b/src/views/competitor/index.vue index 83d4783..13f0833 100644 --- a/src/views/competitor/index.vue +++ b/src/views/competitor/index.vue @@ -21,38 +21,30 @@ 新增 - + 删除
- - - - - - - + + - + @@ -61,22 +53,26 @@
+ + diff --git a/src/views/contract/detail.vue b/src/views/contract/detail.vue new file mode 100644 index 0000000..27301d1 --- /dev/null +++ b/src/views/contract/detail.vue @@ -0,0 +1,194 @@ + + + + + diff --git a/src/views/contract/edit.vue b/src/views/contract/edit.vue index ebe48d3..01650cb 100644 --- a/src/views/contract/edit.vue +++ b/src/views/contract/edit.vue @@ -1,127 +1,120 @@ @@ -141,7 +134,37 @@ const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() const mode = ref('add') +const formDataannex = reactive([]) +import configs from "@/config" +const base_url = configs.baseUrl + configs.urlPrefix +import useUserStore from "@/stores/modules/user"; +const showDialog = ref(false) +const custom_name = ref('') +const userStore = useUserStore(); +// 上传文件 +const handleAvatarSuccess_four = ( + response, + uploadFile +) => { + if (response.code == 0) { + ElMessage.error(response.msg); + return; + } + formDataannex.push( + { uri: response.data.uri, name: response.data.name } + ); +}; +// 删除上传的文件 +const delFileFn = (index: number) => { + formDataannex.splice(index, 1) +} + +const customEvent = (e: any) => { + formData.customer_id = e.id; + custom_name.value = e.name; + showDialog.value = false; +}; // 弹窗标题 const popupTitle = computed(() => { @@ -195,8 +218,8 @@ const setFormData = async (data: Record) => { formData[key] = data[key] } } - - + + } const getDetail = async (row: Record) => { @@ -210,9 +233,9 @@ const getDetail = async (row: Record) => { // 提交按钮 const handleSubmit = async () => { await formRef.value?.validate() - const data = { ...formData, } - mode.value == 'edit' - ? await apiContractEdit(data) + const data = { ...formData, } + mode.value == 'edit' + ? await apiContractEdit(data) : await apiContractAdd(data) popupRef.value?.close() emit('success') diff --git a/src/views/contract/index.vue b/src/views/contract/index.vue index 8e17dbf..6d26930 100644 --- a/src/views/contract/index.vue +++ b/src/views/contract/index.vue @@ -1,23 +1,14 @@ 新增
- + 删除
@@ -67,22 +54,15 @@ @@ -91,6 +71,7 @@
+ @@ -98,15 +79,18 @@ diff --git a/src/views/contract_negotiation/detail.vue b/src/views/contract_negotiation/detail.vue new file mode 100644 index 0000000..caa07c4 --- /dev/null +++ b/src/views/contract_negotiation/detail.vue @@ -0,0 +1,171 @@ + + + + + diff --git a/src/views/contract_negotiation/index.vue b/src/views/contract_negotiation/index.vue index bb580b7..53014b4 100644 --- a/src/views/contract_negotiation/index.vue +++ b/src/views/contract_negotiation/index.vue @@ -1,11 +1,7 @@ 新增
- + 删除
@@ -50,29 +42,22 @@ @@ -81,6 +66,7 @@
+ @@ -88,15 +74,17 @@ diff --git a/src/views/custom/detail.vue b/src/views/custom/detail.vue new file mode 100644 index 0000000..bc2e597 --- /dev/null +++ b/src/views/custom/detail.vue @@ -0,0 +1,362 @@ + + + + + + + diff --git a/src/views/custom/edit.vue b/src/views/custom/edit.vue index 04b26ae..1ded019 100644 --- a/src/views/custom/edit.vue +++ b/src/views/custom/edit.vue @@ -25,7 +25,7 @@ - + @@ -90,13 +90,13 @@ - + - + @@ -130,12 +130,12 @@ - + - + @@ -228,7 +228,33 @@ const datas = reactive({ const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑客户表' : '新增客户表' }) +const checkPhone = (rule: any, value: any, callback: (arg0: Error) => any) => { + const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ + // if (!value) { + // return callback(new Error('电话号码不能为空')) + // } + setTimeout(() => { + if (phoneReg.test(value)) { + callback() + } else { + callback(new Error('电话号码格式不正确')) + } + }, 100) +} +const userEmail = (rule: any, value: string, callback: (arg0: Error | undefined) => void) => { + const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/ + // if (!value) { + // return callback(new Error('邮箱不能为空')) + // } + setTimeout(() => { + if (mailReg.test(value)) { + callback() + } else { + callback(new Error('请输入正确的邮箱格式')) + } + }, 100) +}; // 表单数据 const formData = reactive({ id: '', diff --git a/src/views/custom/index.vue b/src/views/custom/index.vue index 95fe8d5..760623a 100644 --- a/src/views/custom/index.vue +++ b/src/views/custom/index.vue @@ -44,16 +44,28 @@ - + + + + + + + - + - - - + + + @@ -73,7 +89,9 @@ + + @@ -84,11 +102,13 @@ import { apiCustomLists, apiCustomDelete, apiCustomDetail } from '@/api/custom' import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import DetailPopup from './detail.vue' import Statistics from '@/components/statistics/index.vue' const editRef = shallowRef>() +const detailRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) +const showDtail = ref(false) const list = reactive([ { name: "全部客户", @@ -163,13 +183,22 @@ const handleAdd = async () => { // 编辑 const handleEdit = async (data: any) => { - let res = await apiCustomDetail({ id: data.id }) showEdit.value = true + await nextTick() editRef.value?.open('edit') editRef.value?.setFormData(res) } +//详情 +const handleDetail = async (data: any) => { + let res = await apiCustomDetail({ id: data.id }) + showDtail.value = true + await nextTick() + console.log(detailRef) + detailRef.value?.open() + detailRef.value?.setFormData(res) +} // 删除 const handleDelete = async (id: number | any[]) => { diff --git a/src/views/custom_contacts/detail.vue b/src/views/custom_contacts/detail.vue new file mode 100644 index 0000000..73adec1 --- /dev/null +++ b/src/views/custom_contacts/detail.vue @@ -0,0 +1,171 @@ + + + + + + + diff --git a/src/views/custom_contacts/edit.vue b/src/views/custom_contacts/edit.vue index 1d7387b..cac8070 100644 --- a/src/views/custom_contacts/edit.vue +++ b/src/views/custom_contacts/edit.vue @@ -5,8 +5,7 @@ - + @@ -20,16 +19,16 @@ - + - + - + @@ -44,9 +43,7 @@ --> -
- + 删除
@@ -35,17 +34,18 @@ - - + + @@ -55,6 +55,7 @@
+ @@ -65,12 +66,13 @@ import { apiCustomContactsLists, apiCustomContactsDelete, apiCustomContactsDetai import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import DetailPopup from './detail.vue' +const detailRef = shallowRef>() const editRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) - +const showDtail = ref(false) // 查询条件 const queryParams = reactive({ custom_id: '', @@ -123,7 +125,15 @@ const handleDelete = async (id: number | any[]) => { await apiCustomContactsDelete({ id }) getLists() } +//详情 +const handledetail = async (data: any) => { + let res = await apiCustomContactsDetail({ id: data.id }) + showDtail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} getLists() diff --git a/src/views/custom_follow/detail.vue b/src/views/custom_follow/detail.vue new file mode 100644 index 0000000..8d07968 --- /dev/null +++ b/src/views/custom_follow/detail.vue @@ -0,0 +1,167 @@ + + + + + diff --git a/src/views/custom_follow/edit.vue b/src/views/custom_follow/edit.vue index 5762d8a..88d3893 100644 --- a/src/views/custom_follow/edit.vue +++ b/src/views/custom_follow/edit.vue @@ -18,7 +18,7 @@ - + diff --git a/src/views/custom_follow/index.vue b/src/views/custom_follow/index.vue index af1da7f..502f24e 100644 --- a/src/views/custom_follow/index.vue +++ b/src/views/custom_follow/index.vue @@ -42,7 +42,7 @@ @@ -68,6 +68,9 @@ 删除 + + 详情 + @@ -77,6 +80,7 @@ + @@ -88,10 +92,13 @@ import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import Statistics from '@/components/statistics/index.vue' +import DetailPopup from './detail.vue' +const detailRef = shallowRef>() const editRef = shallowRef>() // 是否显示编辑框 - const showEdit = ref(false) + +const showDtail = ref(false) const list = reactive([ { name: "今日跟进", @@ -156,7 +163,7 @@ const handleSelectionChange = (val: any[]) => { } // 获取字典数据 -const { dictData } = useDictData('types') +const { dictData } = useDictData('follow_type') // 分页相关 const { pager, getLists, resetParams, resetPage } = usePaging({ @@ -187,6 +194,14 @@ const handleDelete = async (id: number | any[]) => { await apiCustomFollowDelete({ id }) getLists() } +//详情 +const handledetail = async (data: any) => { + let res = await apiCustomFollowDetail({ id: data.id }) + showDtail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} getLists() diff --git a/src/views/custom_service/detail.vue b/src/views/custom_service/detail.vue new file mode 100644 index 0000000..636991f --- /dev/null +++ b/src/views/custom_service/detail.vue @@ -0,0 +1,175 @@ + + + + + diff --git a/src/views/custom_service/edit.vue b/src/views/custom_service/edit.vue index eb0d1b7..bd74511 100644 --- a/src/views/custom_service/edit.vue +++ b/src/views/custom_service/edit.vue @@ -4,21 +4,21 @@ - - + + - - + + - + @@ -89,7 +89,7 @@
-
+ @@ -122,13 +122,23 @@ import useUserStore from "@/stores/modules/user"; import configs from "@/config" import reviewprocess from '@/components/reviewprocess/index.vue' import costDialog from '@/components/budget/index.vue' -import peojectDialog from '@/components/ptoject/index.vue' +import peojectDialog from '@/components/project/index.vue' const base_url = configs.baseUrl + configs.urlPrefix const userStore = useUserStore(); const list = reactive([]) const showDialog = ref(false) +const custom_name = ref('') +const project_name = ref('') +const formDataannex = reactive([]) const customEvent = (e: any) => { + console.log(e) + formData.custom_id = e.custom_id + custom_name.value = e.custom_name + formData.project_id = e.id + project_name.value = e.name showDialog.value = false; + + }; @@ -141,14 +151,14 @@ const handleAvatarSuccess_four = ( ElMessage.error(response.msg); return; } - formData.annex.push( + formDataannex.push( { uri: response.data.uri, name: response.data.name } ); }; // 删除上传的文件 const delFileFn = (index: number) => { - formData.annex.splice(index, 1) + formDataannex.splice(index, 1) } defineProps({ @@ -197,6 +207,23 @@ const formRules = reactive({ // 获取详情 const setFormData = async (data: Record) => { + custom_name.value = data.custom.name + project_name.value = data.project.name + if (data.annex && data.annex.length > 0) { + if (data.annex.includes(",")) { + const arry1 = data.annex.split(',').map((item: any, index: any) => { + return { + name: `文件${index + 1}`, + uri: item + }; + }); + Object.assign(formDataannex, arry1) + } else { + const arry1 = [{ name: `文件1`, uri: data.annex }] + Object.assign(formDataannex, arry1) + + } + } for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore @@ -218,6 +245,9 @@ const getDetail = async (row: Record) => { // 提交按钮 const handleSubmit = async () => { + if (formDataannex.length > 0) { + formData.annex = formDataannex.map((item) => item.uri).toString() + } await formRef.value?.validate() const data = { ...formData, } mode.value == 'edit' diff --git a/src/views/custom_service/index.vue b/src/views/custom_service/index.vue index c6de6b2..393ff86 100644 --- a/src/views/custom_service/index.vue +++ b/src/views/custom_service/index.vue @@ -2,7 +2,7 @@
- + @@ -12,8 +12,7 @@ - + @@ -29,8 +28,7 @@ 新增 - + 删除
@@ -38,7 +36,6 @@ - @@ -62,16 +59,17 @@ - + @@ -81,6 +79,7 @@
+
@@ -91,11 +90,14 @@ import { apiCustomServiceLists, apiCustomServiceDelete, apiCustomServiceDetail } import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import DetailPopup from './detail.vue' +const detailRef = shallowRef>() const editRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) +const showDtail = ref(false) + // 查询条件 const queryParams = reactive({ @@ -155,6 +157,15 @@ const handleDelete = async (id: number | any[]) => { await apiCustomServiceDelete({ id }) getLists() } +//详情 +const handledetail = async (data: any) => { + let res = await apiCustomServiceDetail({ id: data.id }) + + showDtail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} getLists() diff --git a/src/views/customer_demand/detail.vue b/src/views/customer_demand/detail.vue new file mode 100644 index 0000000..65fbfa2 --- /dev/null +++ b/src/views/customer_demand/detail.vue @@ -0,0 +1,159 @@ + + + + + diff --git a/src/views/customer_demand/edit.vue b/src/views/customer_demand/edit.vue index 67c0805..7c98817 100644 --- a/src/views/customer_demand/edit.vue +++ b/src/views/customer_demand/edit.vue @@ -1,29 +1,27 @@ diff --git a/src/views/customer_demand_solution/detail.vue b/src/views/customer_demand_solution/detail.vue new file mode 100644 index 0000000..a42cb18 --- /dev/null +++ b/src/views/customer_demand_solution/detail.vue @@ -0,0 +1,156 @@ + + + + + diff --git a/src/views/customer_demand_solution/edit.vue b/src/views/customer_demand_solution/edit.vue index 7773877..546733f 100644 --- a/src/views/customer_demand_solution/edit.vue +++ b/src/views/customer_demand_solution/edit.vue @@ -1,33 +1,36 @@ diff --git a/src/views/organization/department/edit.vue b/src/views/organization/department/edit.vue index 85a0621..602659a 100644 --- a/src/views/organization/department/edit.vue +++ b/src/views/organization/department/edit.vue @@ -39,6 +39,7 @@ import type { FormInstance } from 'element-plus' import { deptEdit, deptAdd, deptDetail, deptAll } from '@/api/org/department' import { getAll } from '@/api/org/organization' import Popup from '@/components/popup/index.vue' + import { useDictOptions } from '@/hooks/useDictOptions' const emit = defineEmits(['success', 'close']) const formRef = shallowRef() @@ -145,7 +146,7 @@ const getDetail = async (row: Record) => { const data = await deptDetail({ id: row.id }) - + setFormData(data) } diff --git a/src/views/project/detail.vue b/src/views/project/detail.vue new file mode 100644 index 0000000..6272b1d --- /dev/null +++ b/src/views/project/detail.vue @@ -0,0 +1,243 @@ + + + + + diff --git a/src/views/project/edit.vue b/src/views/project/edit.vue index d88d88f..fdbbb3d 100644 --- a/src/views/project/edit.vue +++ b/src/views/project/edit.vue @@ -11,10 +11,11 @@ - + + @@ -219,11 +220,12 @@ import customDialog from '@/components/custom-dialog/index.vue' import type { FormInstance } from 'element-plus' import Popup from '@/components/popup/index.vue' import { apiProjectAdd, apiProjectEdit, apiProjectDetail } from '@/api/project' +import { getAllProjectTypes } from '@/api/projecttype' import { timeFormat } from '@/utils/util' import type { PropType } from 'vue' import configs from "@/config" import useUserStore from "@/stores/modules/user"; - +const protype = reactive([]) const base_url = configs.baseUrl + configs.urlPrefix const userStore = useUserStore(); // 上传文件 @@ -348,6 +350,11 @@ const handleSubmit = async () => { const open = (type = 'add') => { mode.value = type popupRef.value?.open() + + getAllProjectTypes().then((res) => { + + protype.splice(0, protype.length, ...res); + }) } // 关闭回调 diff --git a/src/views/project/index.vue b/src/views/project/index.vue index 6a463f7..3be8c11 100644 --- a/src/views/project/index.vue +++ b/src/views/project/index.vue @@ -55,7 +55,7 @@ - + @@ -75,6 +75,7 @@ 删除 +
@@ -83,7 +84,8 @@ @@ -118,7 +120,7 @@ - + @@ -135,6 +140,7 @@
+
@@ -143,13 +149,19 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiProjectLists, apiProjectDelete, apiProjectDetail } from '@/api/project' import { timeFormat } from '@/utils/util' +import { getAllProjectTypes } from '@/api/projecttype' +const protype = reactive([]) import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import DetailPopup from './detail.vue' +const detailRef = shallowRef>() const editRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) +const showDtail = ref(false) + + // 查询条件 const queryParams = reactive({ @@ -209,6 +221,21 @@ const handleDelete = async (id: number | any[]) => { await apiProjectDelete({ id }) getLists() } +const handledetail = async (data: any) => { + let res = await apiProjectDetail({ id: data.id }) + showDtail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} +//获取项目类型 +const list = () => { + getAllProjectTypes().then((res) => { + protype.splice(0, protype.length, ...res); + }) +} + +list() getLists() diff --git a/src/views/project_estimate/detail.vue b/src/views/project_estimate/detail.vue new file mode 100644 index 0000000..9cc5717 --- /dev/null +++ b/src/views/project_estimate/detail.vue @@ -0,0 +1,163 @@ + + + + + diff --git a/src/views/project_estimate/edit.vue b/src/views/project_estimate/edit.vue index 1ea63de..e04f2c3 100644 --- a/src/views/project_estimate/edit.vue +++ b/src/views/project_estimate/edit.vue @@ -2,36 +2,41 @@
- - - + + + - - - + + + - - + + - - + + + + + + + + + + + + + + + + - + {{ item.name }} @@ -40,8 +45,7 @@ - + @@ -53,7 +57,11 @@ - + + + + + @@ -61,17 +69,42 @@ - - + + + +
+
+ {{ item.name }} + x +
+
+ + + + + + + + +
diff --git a/src/views/project_follow_up/detail.vue b/src/views/project_follow_up/detail.vue new file mode 100644 index 0000000..e5e4a24 --- /dev/null +++ b/src/views/project_follow_up/detail.vue @@ -0,0 +1,187 @@ + + + + + diff --git a/src/views/project_follow_up/edit.vue b/src/views/project_follow_up/edit.vue index f90285d..5d23079 100644 --- a/src/views/project_follow_up/edit.vue +++ b/src/views/project_follow_up/edit.vue @@ -1,81 +1,109 @@ @@ -96,17 +124,41 @@ const emit = defineEmits(['success', 'close']) const formRef = shallowRef() const popupRef = shallowRef>() const mode = ref('add') -const project_name1 = ref('') -const project_name2 = ref('') -const project_name3 = ref('') +const project_name = ref('') +const project_code = ref('') +const custom_name = ref('') +const formDataannex = reactive([]) +import feedback from '@/utils/feedback' +import configs from "@/config" +const base_url = configs.baseUrl + configs.urlPrefix +import useUserStore from "@/stores/modules/user"; +const userStore = useUserStore(); +// 上传文件 +const handleAvatarSuccess_four = ( + response, + uploadFile +) => { + if (response.code == 0) { + ElMessage.error(response.msg); + return; + } + formDataannex.push( + { uri: response.data.uri, name: response.data.name } + + ); +}; +// 删除上传的文件 +const delFileFn = (index: number) => { + formDataannex.splice(index, 1) +} // dialog const showDialog = ref(false) const customEvent = (e: any) => { - formData.project_id = e.id; - project_name1.value = e.name; - project_name2.value = e.project_code; - project_name3.value = e.custom_name; + project_name.value = e.name; + project_code.value = e.project_code; + custom_name + .value = e.custom_name; showDialog.value = false; }; @@ -146,6 +198,26 @@ const formRules = reactive({ // 获取详情 const setFormData = async (data: Record) => { + custom_name.value = data.custom_name + project_name.value = data.project_name + project_code.value = data.project_code + if (data.file.length > 0) { + if (data.file.includes(",")) { + const arry1 = data.file.split(',').map((item: any, index: any) => { + return { + name: `文件${index + 1}`, + uri: item + }; + }); + Object.assign(formDataannex, arry1) + } else { + const arry1 = [{ name: `文件1`, uri: data.file }] + Object.assign(formDataannex, arry1) + + } + } + + for (const key in formData) { if (data[key] != null && data[key] != undefined) { //@ts-ignore @@ -154,9 +226,9 @@ const setFormData = async (data: Record) => { } //@ts-ignore - formData.follow_date = timeFormat(formData.follow_date, 'yyyy-mm-dd hh:MM:ss') + // formData.follow_date = timeFormat(formData.follow_date, 'yyyy-mm-dd hh:MM:ss') //@ts-ignore - formData.next_follow_up_date = timeFormat(formData.next_follow_up_date, 'yyyy-mm-dd hh:MM:ss') + // formData.next_follow_up_date = timeFormat(formData.next_follow_up_date, 'yyyy-mm-dd hh:MM:ss') } const getDetail = async (row: Record) => { @@ -166,10 +238,22 @@ const getDetail = async (row: Record) => { setFormData(data) } +const validatephone = (e: any) => { + const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/ + if (phoneReg.test(formData.contact_information)) { + } else { + feedback.msgError('电话号码格式不正确') + } +} // 提交按钮 const handleSubmit = async () => { + if (formDataannex.length > 0) { + formData.file = formDataannex.map((item) => item.uri).toString() + } + await formRef.value?.validate() + const data = { ...formData, } mode.value == 'edit' ? await apiProjectFollowUpEdit(data) diff --git a/src/views/project_follow_up/index.vue b/src/views/project_follow_up/index.vue index f1d3c9d..7f1a6cc 100644 --- a/src/views/project_follow_up/index.vue +++ b/src/views/project_follow_up/index.vue @@ -120,50 +120,47 @@
- + + + - - - - - + + - + - - - + + + - + - + - + - + @@ -180,21 +180,25 @@
+
diff --git a/src/views/project_pre_sales_members/detail.vue b/src/views/project_pre_sales_members/detail.vue new file mode 100644 index 0000000..6e14103 --- /dev/null +++ b/src/views/project_pre_sales_members/detail.vue @@ -0,0 +1,128 @@ + + + + + diff --git a/src/views/project_pre_sales_members/edit.vue b/src/views/project_pre_sales_members/edit.vue index e57d429..048f051 100644 --- a/src/views/project_pre_sales_members/edit.vue +++ b/src/views/project_pre_sales_members/edit.vue @@ -42,7 +42,7 @@
- + @@ -160,7 +160,8 @@ diff --git a/src/views/quotation/detail.vue b/src/views/quotation/detail.vue new file mode 100644 index 0000000..5e22617 --- /dev/null +++ b/src/views/quotation/detail.vue @@ -0,0 +1,174 @@ + + + + + diff --git a/src/views/quotation/index.vue b/src/views/quotation/index.vue index 6c83e0b..fa7e815 100644 --- a/src/views/quotation/index.vue +++ b/src/views/quotation/index.vue @@ -44,7 +44,7 @@ - + @@ -60,6 +63,7 @@ + @@ -71,11 +75,15 @@ import { apiQuotationLists, apiQuotationDelete, apiQuotationDetail } from '@/api import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' - +import DetailPopup from './detail.vue' +const detailRef = shallowRef>() const editRef = shallowRef>() // 是否显示编辑框 const showEdit = ref(false) +const showDtail = ref(false) + + // 查询条件 const queryParams = reactive({ @@ -128,7 +136,15 @@ const handleDelete = async (id: number | any[]) => { await apiQuotationDelete({ id }) getLists() } +// 详情 +const handleDetail = async (data: any) => { + let res = await apiQuotationDetail({ id: data.id }) + showDtail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} getLists()