diff --git a/common/api/customer.js b/common/api/customer.js
index ea1f8d5..09c5de4 100644
--- a/common/api/customer.js
+++ b/common/api/customer.js
@@ -142,6 +142,28 @@ export const getFollowupDetail = (followId) => {
});
};
+/**
+ * 创建跟进记录
+ * @param {Object} data 跟进记录数据
+ * @param {string} data.customerId 客户ID
+ * @param {string} data.type 跟进方式
+ * @param {string} data.content 跟进内容
+ * @param {string} data.picture 图片URL(多个用逗号分隔)
+ * @param {string} data.attaches 附件URL(多个用逗号分隔)
+ * @param {string} data.followTime 跟进时间 (yyyy-MM-dd HH:mm:ss)
+ * @param {string} data.nextFollowTime 下次跟进时间 (yyyy-MM-dd HH:mm:ss)
+ * @param {string} data.customerStatus 客户状态
+ * @param {string} data.customerIntentLevel 客户意向强度
+ * @returns {Promise} 返回创建结果
+ */
+export const createFollowup = (data) => {
+ return uni.$uv.http.post(`bst/customerFollow`, data, {
+ custom: {
+ auth: true
+ }
+ });
+};
+
/**
* 获取客户项目列表
* @param {string} customerId 客户ID
diff --git a/components/followup-form/FollowupPickers.vue b/components/followup-form/FollowupPickers.vue
new file mode 100644
index 0000000..b68016a
--- /dev/null
+++ b/components/followup-form/FollowupPickers.vue
@@ -0,0 +1,260 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages.json b/pages.json
index 874b856..81e2ba2 100644
--- a/pages.json
+++ b/pages.json
@@ -90,6 +90,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/customer/follow/add/index",
+ "style": {
+ "navigationBarTitleText": "新建跟进记录",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/customer/follow/detail/index",
"style": {
diff --git a/pages/customer/detail/index.vue b/pages/customer/detail/index.vue
index 20b1937..317c827 100644
--- a/pages/customer/detail/index.vue
+++ b/pages/customer/detail/index.vue
@@ -299,8 +299,12 @@ const handleProjectMore = (project) => {
// 写新跟进
const handleNewFollowup = () => {
+ if (!customerId.value) {
+ uni.$uv.toast('客户信息不完整');
+ return;
+ }
uni.navigateTo({
- url: `/pages/customer-follow/index?customerId=${customerId.value}&customerName=${customerDetail.value.name}`
+ url: `/pages/customer/follow/add/index?customerId=${customerId.value}&customerName=${encodeURIComponent(customerDetail.value.name || '')}`
});
};
diff --git a/pages/customer/follow/add/index.vue b/pages/customer/follow/add/index.vue
new file mode 100644
index 0000000..f822a25
--- /dev/null
+++ b/pages/customer/follow/add/index.vue
@@ -0,0 +1,1451 @@
+
+
+
+
+
+ ✕
+ {{ pageTitle }}
+ 占位
+
+
+
+
+
+
+
+
+ 图片
+
+
+ +
+
+
+
+ 请上传大小不超过200MB格式为png/jpg/jpeg 的文件
+ 支持拖动上传和鼠标移入后 Ctrl+V 粘贴上传
+
+
+
+
+
+ ✕
+
+
+
+
+
+
+
+
+ *客户
+
+
+ ›
+
+
+
+
+
+ *客户状态
+
+
+ ›
+
+
+
+
+
+ *意向强度
+
+
+ ›
+
+
+
+
+
+ *跟进方式
+
+
+ ›
+
+
+
+
+
+ *跟进内容
+
+
+ {{ formData.content.length }}/1000
+
+
+
+
+
+
+ 附件列表
+
+
+ +
+
+
+
+ 请上传大小不超过200MB格式为png/jpg/jpeg/gif/bmp/webp/ico/doc/docx/xls/xlsx/pdf/ppt/pptx/mp3/wav/m4a/ogg/flac/aac/mp4/avi/mov/wmv/flv/mpeg/mpg/m4v/webm/mkv/exe/zip/rar/7z 的文件
+ 支持拖动上传和鼠标移入后 Ctrl+V 粘贴上传
+
+
+
+
+ {{ getFileIcon(file.name) }}
+
+ {{ file.name }}
+ {{ formatFileSize(file.size) }}
+
+ ✕
+
+
+
+
+
+
+
+
+ *跟进时间
+
+
+ ›
+
+
+
+
+
+ *下次跟进
+
+
+ ›
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择跟进时间
+
+
+ {{ year }}年
+
+
+ {{ month }}月
+
+
+ {{ day }}日
+
+
+ {{ hour }}时
+
+
+ {{ minute }}分
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+ 选择下次跟进时间
+
+
+ {{ year }}年
+
+
+ {{ month }}月
+
+
+ {{ day }}日
+
+
+ {{ hour }}时
+
+
+ {{ minute }}分
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+