-
+
@@ -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 @@
-
+
+ {{ protype.find(item => item.id === row.project_type)?.name }}
@@ -118,7 +120,7 @@
-
+
编辑
@@ -126,6 +128,9 @@
删除
+
+ 详情
+
@@ -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 @@
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 @@
-
+
+
+
-
-
-
-
-
+
+
- {{ row.follow_date ? timeFormat(row.follow_date, 'yyyy-mm-dd hh:MM:ss') : '' }}
+ {{ row.follow_date ? row.follow_date : '' }}
-
+
-
-
-
-
-
+
+
+
-
+
-
+
-
+
- {{ row.next_follow_up_date ? timeFormat(row.next_follow_up_date, 'yyyy-mm-dd hh:MM:ss') :
+ {{ row.next_follow_up_date ? row.next_follow_up_date :
'' }}
-
+
编辑
@@ -171,6 +168,9 @@
删除
+
+ 详情
+
@@ -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 @@
+
+