diff --git a/.cursor/rules/Code-Standards.mdc b/.cursor/rules/Code-Standards.mdc
index 99af2df..fa8db67 100644
--- a/.cursor/rules/Code-Standards.mdc
+++ b/.cursor/rules/Code-Standards.mdc
@@ -6,4 +6,5 @@ alwaysApply: true
1. 写代码的时候要补充详细的中文注释(每个方法是干嘛的,为什么要这样写),如果是工作区,则所有项目都适用该规则
2. 注意不要生成太多的空行,上一部分代码和下一部分代码中间的空行不要大于2行
3. 有封装好的方法、组件需要复用,不要重复造轮子
-4. 小程序端的抽屉全部需要用page-container来防止用户意外退出页面
+4. 小程序端的抽屉全部需要用page-container来防止用户意外退出页面(记得使用v-if而不是v-show)
+5. 数据库的(created_at、updated_at、deleted_at)统一使用时间戳,不要使用字符串,并且我在查询器中一级格式化成字符串了,无需再次格式化
diff --git a/api/clinicSalesperson.js b/api/clinicSalesperson.js
index b6623d3..4ab0336 100644
--- a/api/clinicSalesperson.js
+++ b/api/clinicSalesperson.js
@@ -69,3 +69,8 @@ export function getClinicSalespersonTransferPrescriptionList(params) {
export function getClinicSalespersonTransferPrescriptionDetail(id) {
return clinicSalespersonRequest({ url: `${PREFIX}/transfer-prescription-detail`, method: 'GET', data: { id } });
}
+
+/** 我邀请的下级推广员列表 */
+export function getClinicSalespersonInvitedList(params) {
+ return clinicSalespersonRequest({ url: `${PREFIX}/invited-salesperson-list`, method: 'GET', data: params });
+}
diff --git a/api/salespersonManage.js b/api/salespersonManage.js
index f86d3a7..3603a92 100644
--- a/api/salespersonManage.js
+++ b/api/salespersonManage.js
@@ -107,6 +107,14 @@ export function createSalespersonManageApi(mode) {
return request({ url: `${prefix}/user-bind-list`, method: 'GET', data: params });
},
+ getSalespersonOptions(params) {
+ return request({ url: `${prefix}/salesperson-options`, method: 'GET', data: params });
+ },
+
+ getInvitedSalespersonList(params) {
+ return request({ url: `${prefix}/invited-salesperson-list`, method: 'GET', data: params });
+ },
+
toggleSeePrice(storeId) {
const configPrefix = isPlatform ? PLATFORM_CONFIG_PREFIX : CLINIC_CONFIG_PREFIX;
return configRequest({
diff --git a/pages.json b/pages.json
index 947d5a0..7dbf7f3 100644
--- a/pages.json
+++ b/pages.json
@@ -517,11 +517,25 @@
}, {
"root": "subPackages/sub_clinic_salesperson",
"pages": [
- { "path": "home/index", "style": { "navigationBarTitleText": "工作台", "navigationStyle": "custom" } },
+ {
+ "path": "home/index",
+ "style": {
+ "navigationBarTitleText": "工作台",
+ "navigationStyle": "custom",
+ "usingComponents": {
+ "transfer-patient-drawer": "/subPackages/sub_workbench/prescription_v2/components/modals/TransferPatientDrawer"
+ },
+ "componentPlaceholder": {
+ "transfer-patient-drawer": "view"
+ }
+ }
+ },
{ "path": "my/index", "style": { "navigationBarTitleText": "我的", "navigationStyle": "custom" } },
{ "path": "earnings/index", "style": { "navigationBarTitleText": "我的收益", "navigationStyle": "custom" } },
{ "path": "leads/index", "style": { "navigationBarTitleText": "获客记录", "navigationStyle": "custom" } },
{ "path": "commission/index", "style": { "navigationBarTitleText": "分成记录", "navigationStyle": "custom" } },
+ { "path": "invitees/index", "style": { "navigationBarTitleText": "我邀请的推广员", "navigationStyle": "custom", "enablePullDownRefresh": true } },
+ { "path": "invitees/detail", "style": { "navigationBarTitleText": "收益明细", "navigationStyle": "custom" } },
{ "path": "settlement/index", "style": { "navigationBarTitleText": "结算记录", "navigationStyle": "custom" } },
{ "path": "transfer-prescription/form", "style": { "navigationBarTitleText": "传方", "navigationStyle": "custom" } },
{ "path": "transfer-prescription/list", "style": { "navigationBarTitleText": "传方记录", "navigationStyle": "custom" } }
@@ -589,5 +603,11 @@
"navigationBarBackgroundColor": "#fff",
"navigationBarTextStyle": "black",
"backgroundColor": "#f7f8fa"
+ },
+ "preloadRule": {
+ "subPackages/sub_clinic_salesperson/home/index": {
+ "network": "all",
+ "packages": ["subPackages/sub_workbench"]
+ }
}
}
diff --git a/subPackages/sub_clinic_salesperson/commission/index.vue b/subPackages/sub_clinic_salesperson/commission/index.vue
index e801cab..381b381 100644
--- a/subPackages/sub_clinic_salesperson/commission/index.vue
+++ b/subPackages/sub_clinic_salesperson/commission/index.vue
@@ -5,6 +5,7 @@
{{ item.order_no }} {{ item.settlement_id > 0 ? '已结算' : '待结算' }}
+ {{ item.patient_name }} {{ item.patient_mobile }}
{{ item.drug_name }} ×{{ item.qty }}
@@ -42,6 +43,7 @@ export default {
.empty { text-align: center; color: #999; padding: 80rpx 0; }
.row { background: #fff; border-radius: 12rpx; padding: 24rpx; margin-bottom: 16rpx; display: flex; justify-content: space-between; }
.order { display: block; font-size: 26rpx; font-weight: 600; }
+.patient { display: block; font-size: 24rpx; color: #666; margin-top: 6rpx; }
.drug { font-size: 24rpx; color: #666; }
.right { text-align: right; }
.amount { display: block; font-size: 28rpx; color: #4db6a8; font-weight: 600; }
diff --git a/subPackages/sub_clinic_salesperson/components/TransferDetailDrawer.vue b/subPackages/sub_clinic_salesperson/components/TransferDetailDrawer.vue
new file mode 100644
index 0000000..ae51038
--- /dev/null
+++ b/subPackages/sub_clinic_salesperson/components/TransferDetailDrawer.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+ 加载中...
+
+
+ 状态
+ 方式{{ detail.transfer_mode_text }}
+ 收货人{{ detail.patient_name }} {{ detail.patient_mobile }}
+ 地址{{ detail.patient_address || '—' }}
+ 备注{{ detail.remark }}
+
+ 异常{{ detail.exception_message }}
+
+
+
+ 药方
+ {{ line }}
+
+
+ 处方图片
+
+
+
+
+
+ {{ detail.transfer_time_text }}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/sub_clinic_salesperson/components/TransferModeModal.vue b/subPackages/sub_clinic_salesperson/components/TransferModeModal.vue
new file mode 100644
index 0000000..21e4c48
--- /dev/null
+++ b/subPackages/sub_clinic_salesperson/components/TransferModeModal.vue
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+ 拍照一键传方
+ 拍摄处方照片,快速提交
+
+
+
+
+
+ 输入药方
+ 手动选择中药并填写信息
+
+
+ 取消
+
+
+
+
+
+
+
diff --git a/subPackages/sub_clinic_salesperson/home/index.vue b/subPackages/sub_clinic_salesperson/home/index.vue
index b8c3958..bb1decb 100644
--- a/subPackages/sub_clinic_salesperson/home/index.vue
+++ b/subPackages/sub_clinic_salesperson/home/index.vue
@@ -88,7 +88,7 @@
:key="item.key"
class="service-card"
hover-class="service-card-hover"
- @click="go(item.path)"
+ @click="onMenuClick(item)"
>
@@ -103,18 +103,28 @@
+
+
diff --git a/subPackages/sub_clinic_salesperson/invitees/detail.vue b/subPackages/sub_clinic_salesperson/invitees/detail.vue
new file mode 100644
index 0000000..7ecdd91
--- /dev/null
+++ b/subPackages/sub_clinic_salesperson/invitees/detail.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+ 邀请分成比例
+ {{ summary.inviter_split }}%
+
+
+ 累计带来收益
+ ¥{{ summary.invite_total_amount }}
+
+
+ 待结算 / 已结算
+ ¥{{ summary.invite_pending_amount }} / ¥{{ summary.invite_settled_amount }}
+
+
+
+ 暂无收益明细
+
+
+ {{ item.order_no }}
+ {{ item.settlement_id > 0 ? '已结算' : '待结算' }}
+
+ {{ item.patient_name }} {{ item.patient_mobile }}
+ {{ item.drug_name }} ×{{ item.qty }}
+
+ ¥{{ item.commission_amount }}
+ {{ item.created_at }}
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/sub_clinic_salesperson/invitees/index.vue b/subPackages/sub_clinic_salesperson/invitees/index.vue
new file mode 100644
index 0000000..7748f29
--- /dev/null
+++ b/subPackages/sub_clinic_salesperson/invitees/index.vue
@@ -0,0 +1,85 @@
+
+
+
+ 暂无下级推广员
+
+
+ {{ (item.nick_name || '?').charAt(0) }}
+
+ {{ item.nick_name || '推广员' }}
+ {{ item.phone }}
+ 邀请分成 {{ item.inviter_split }}%
+
+
+ ¥{{ item.invite_total_amount || '0.00' }}
+ 待结算 ¥{{ item.invite_pending_amount || '0.00' }}
+
+
+
+
+
+
+
+
+
diff --git a/subPackages/sub_clinic_salesperson/transfer-prescription/list.vue b/subPackages/sub_clinic_salesperson/transfer-prescription/list.vue
index b7e9e83..9f6ad83 100644
--- a/subPackages/sub_clinic_salesperson/transfer-prescription/list.vue
+++ b/subPackages/sub_clinic_salesperson/transfer-prescription/list.vue
@@ -1,44 +1,69 @@
- 暂无传方记录
-
+ 暂无传方记录
+
{{ item.patient_name }} {{ item.patient_mobile }}
-
+
- 诊断:{{ item.clinical_diagnose || '-' }}
- {{ item.transfer_time_text }}
+ {{ item.transfer_mode_text || '' }} · {{ item.transfer_time_text }}
+
+ 药方:{{ item.drug_text_lines.join(';') }}
+
+
+
+ 异常:{{ item.exception_message }}
+
新建传方
+
+
+
diff --git a/subPackages/sub_salesperson_manage/form.vue b/subPackages/sub_salesperson_manage/form.vue
index af89a87..f7c2059 100644
--- a/subPackages/sub_salesperson_manage/form.vue
+++ b/subPackages/sub_salesperson_manage/form.vue
@@ -39,6 +39,22 @@
+ 邀请关系(可选)
+
+ 邀请人推广员
+
+
+
+ 邀请分成(%)
+
+
+
保存
@@ -47,17 +63,19 @@