From 7101e6006b9416eb0960defd234b3683061be453 Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Mon, 17 Nov 2025 16:58:11 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/project.js | 26 +
pages.json | 7 +
pages/project/form/index.vue | 1071 ++++++++++++++++++++++++++++++++++
pages/project/list/index.vue | 40 +-
4 files changed, 1135 insertions(+), 9 deletions(-)
create mode 100644 pages/project/form/index.vue
diff --git a/api/project.js b/api/project.js
index 1af6abd..66cb8d4 100644
--- a/api/project.js
+++ b/api/project.js
@@ -100,3 +100,29 @@ export const getProjectDetail = (id) => {
});
};
+/**
+ * 创建项目
+ * @param {Object} data 项目数据
+ * @returns {Promise} 创建结果
+ */
+export const createProject = (data) => {
+ return uni.$uv.http.post('bst/project', data, {
+ custom: {
+ auth: true
+ }
+ });
+};
+
+/**
+ * 更新项目
+ * @param {Object} data 项目数据(需包含 id)
+ * @returns {Promise} 更新结果
+ */
+export const updateProject = (data) => {
+ return uni.$uv.http.put('bst/project', data, {
+ custom: {
+ auth: true
+ }
+ });
+};
+
diff --git a/pages.json b/pages.json
index a06ec67..b9edee3 100644
--- a/pages.json
+++ b/pages.json
@@ -138,6 +138,13 @@
"navigationStyle": "custom"
}
},
+ {
+ "path": "pages/project/form/index",
+ "style": {
+ "navigationBarTitleText": "项目编辑",
+ "navigationStyle": "custom"
+ }
+ },
{
"path": "pages/project/list/index",
"style": {
diff --git a/pages/project/form/index.vue b/pages/project/form/index.vue
new file mode 100644
index 0000000..86cb32f
--- /dev/null
+++ b/pages/project/form/index.vue
@@ -0,0 +1,1071 @@
+
+
+
+
+ 取消
+ {{ pageTitle }}
+
+ {{ mode === 'edit' ? '保存' : '创建' }}
+
+
+
+
+
+ 加载中...
+
+
+
+
+
+ 基本信息
+
+
+ 项目名称
+
+
+
+
+ 项目编号
+
+
+
+
+
+ 项目金额(元)
+
+
+
+ 到账时间
+
+ {{ formData.expireTime || '请选择日期' }}
+ ›
+
+
+
+
+
+ 客户
+
+ {{ formData.customerName || '请选择客户' }}
+ ›
+
+
+
+
+ 标签
+
+
+
+
+ 备注
+
+
+
+
+
+ 费用规划
+
+
+ {{ item.label }}
+
+
+ 金额(元)
+
+
+
+ 收款时间
+
+ {{ formData[item.dateKey] || '请选择日期' }}
+ ›
+
+
+
+
+
+
+
+
+ 附件
+
+
+ 支持 png/jpg/jpeg/doc/docx/xls/xlsx/ppt/pdf/zip/rar 等格式,单个不超过 200MB
+
+
+
+
+
+
+
+
+ {{ index + 1 }}
+
+ {{ member.userName || '未命名' }}
+
+
+
+
+
+
+ 删除
+
+
+
+ 请点击「选择成员」添加项目成员
+
+
+
+
+
+
+
+
+ {{ mode === 'edit' ? '保存修改' : '创建项目' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ user.userName }}
+ {{ user.deptName }}
+
+
+
+
+ 暂无匹配的成员
+
+
+
+ 取消
+ 确定
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/project/list/index.vue b/pages/project/list/index.vue
index 8a454d6..13a6e73 100644
--- a/pages/project/list/index.vue
+++ b/pages/project/list/index.vue
@@ -98,6 +98,9 @@
重置
+
+ 新增项目
+
@@ -198,7 +201,7 @@