Bladeren bron

医生管理

xiaohaizhao 6 maanden geleden
bovenliggende
commit
97532b046c

+ 5 - 1
app.json

@@ -193,7 +193,11 @@
                 "department/detail",
                 "trace/add/index",
                 "trace/list/delete",
-                "trace/detail/index"
+                "trace/detail/index",
+                "doctors/index",
+                "doctors/detail",
+                "doctors/insert",
+                "select/department/index"
             ]
         },
         {

+ 25 - 8
components/Yl_Filtrate1/index.js

@@ -128,19 +128,36 @@ Component({
             if (arrIndex == -1) {
                 list[index].index.push(i)
                 list[index].value.push(list[index].selectKey ? item[list[index].selectKey] : item)
-                if (item.mutextags.length) {
-                    try {
-                        list[index].ops[item.tag] = item.mutextags;
-                    } catch (error) {
-                        list[index].ops = {};
-                        list[index].ops[item.tag] = item.mutextags;
+                try {
+                    if (item.mutextags.length) {
+                        try {
+                            list[index].ops[item.tag] = item.mutextags;
+                        } catch (error) {
+                            list[index].ops = {};
+                            list[index].ops[item.tag] = item.mutextags;
+                        }
+                    }
+                } catch (error) {
+                    if (item.mutextag.length) {
+                        try {
+                            list[index].ops[item.tag] = item.mutextag;
+                        } catch (error) {
+                            list[index].ops = {};
+                            list[index].ops[item.tag] = item.mutextag;
+                        }
                     }
                 }
             } else {
                 list[index].index.splice(arrIndex, 1)
                 list[index].value.splice(arrIndex, 1)
-                if (item.mutextags.length) {
-                    delete list[index].ops[item.tag]
+                try {
+                    if (item.mutextags.length) {
+                        delete list[index].ops[item.tag]
+                    }
+                } catch (error) {
+                    if (item.mutextag.length) {
+                        delete list[index].ops[item.tag]
+                    }
                 }
             };
             list[index].disableds = [];

+ 9 - 2
project.private.config.json

@@ -11,12 +11,19 @@
         "miniprogram": {
             "list": [
                 {
-                    "name": "prsx/hospital/insert",
-                    "pathName": "prsx/hospital/insert",
+                    "name": "医生管理",
+                    "pathName": "prsx/doctors/index",
                     "query": "",
                     "scene": null,
                     "launchMode": "default"
                 },
+                {
+                    "name": "prsx/hospital/insert",
+                    "pathName": "prsx/hospital/insert",
+                    "query": "",
+                    "launchMode": "default",
+                    "scene": null
+                },
                 {
                     "name": "prsx/hospital/detail",
                     "pathName": "prsx/hospital/detail",

+ 7 - 2
prsx/department/detail.js

@@ -237,7 +237,7 @@ Page({
     /* 底部功能 */
     async setTabbar() {
         let detail = this.data.detail,
-            isAdmin = this.data.appAuth.admin ? true : false,
+            isAdmin = this.data.appAuth.options.includes("admin") ? true : false,
             isLeader = detail.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid),
             editdataleader = isLeader ? 1 : 0,
             tabbarList = [],
@@ -315,11 +315,16 @@ Page({
         }).then(res => {
             console.log("更新科室列表", res);
             if (res.code == '1') {
+                res.data = res.data.map(v => {
+                    v.totalstage = v.stages.length
+                    v.stage = v.stages.findIndex(s => s.stagename == v.stagename) + 1
+                    v.progress = v.stage / v.totalstage * 100;
+                    return v
+                })
                 page.setData({
                     list: res.data,
                     "content.total": res.total
                 })
-                _Http.getTabs(page, 'sa_hospitaldep', res.data, _Http)
             }
         })
     }

+ 1 - 1
prsx/department/index.js

@@ -101,7 +101,7 @@ Page({
                     }
                 }, 1500);
                 this.setData({
-                    content: _Http.paging(content, res, this, 'sa_hospitaldep', res.data, _Http),
+                    content: _Http.paging(content, res),
                     list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
                 })
             })

+ 271 - 293
prsx/department/index.scss

@@ -7,152 +7,128 @@
 	margin: 0 auto 20rpx;
 
 	.chart {
-			margin: 0 30rpx;
+		margin: 0 30rpx;
+		width: 100rpx;
+		flex-shrink: 0;
+
+		.circle {
 			width: 100rpx;
-			flex-shrink: 0;
-
-			.circle {
-					width: 100rpx;
-					height: 100rpx;
-					position: relative;
-					border-radius: 50%;
-					box-shadow: inset 0 0 0 8rpx var(--assist);
-
-					.ab {
-							position: absolute;
-							left: 0;
-							right: 0;
-							top: 0;
-							bottom: 0;
-							margin: auto;
-					}
-
-					&_left {
-							border: 8rpx solid #ccc;
-							border-radius: 50%;
-							clip: rect(0, 50rpx, 100rpx, 0);
-					}
-
-					&_right {
-							border: 8rpx solid #ccc;
-							border-radius: 50%;
-							clip: rect(0, 100rpx, 100rpx, 50rpx);
-					}
-
-					&_text {
-							height: 100%;
-							display: flex;
-							flex-direction: column;
-							justify-content: center;
-							align-items: center;
-							font-size: 16rpx;
-							font-family: PingFang SC-Regular, PingFang SC;
-							color: #666666;
-
-							.value {
-									margin-top: -6rpx;
-							}
-
-							.name {
-									margin-top: 6rpx;
-							}
-					}
+			height: 100rpx;
+			position: relative;
+			border-radius: 50%;
+			box-shadow: inset 0 0 0 8rpx var(--assist);
+
+			.ab {
+				position: absolute;
+				left: 0;
+				right: 0;
+				top: 0;
+				bottom: 0;
+				margin: auto;
 			}
-	}
 
-	.main {
-			position: relative;
-			box-sizing: border-box;
-			padding: 20rpx 0;
-			overflow: hidden;
+			&_left {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 50rpx, 100rpx, 0);
+			}
 
-			.label {
-					display: flex;
-					height: 42rpx;
-
-					.title {
-							flex: 1;
-							width: 0;
-							font-size: 30rpx;
-							font-family: PingFang SC-Regular, PingFang SC;
-							color: #333333;
-							margin-right: 20rpx;
-					}
-
-					.state {
-							flex-shrink: 0;
-							width: 132rpx;
-							height: 40rpx;
-							line-height: 40rpx;
-							border-radius: 20rpx 0px 0px 20rpx;
-							font-size: 24rpx;
-							font-family: PingFang SC-Regular, PingFang SC;
-							color: #FFFFFF;
-							text-align: center;
-					}
+			&_right {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 100rpx, 100rpx, 50rpx);
+			}
+
+			&_text {
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				font-size: 16rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #666666;
+
+				.value {
+					margin-top: -6rpx;
+				}
+
+				.name {
+					margin-top: 6rpx;
+				}
+			}
+		}
+	}
 
+	.main {
+		position: relative;
+		box-sizing: border-box;
+		padding: 20rpx 0;
+		overflow: hidden;
+
+		.label {
+			display: flex;
+			height: 42rpx;
+
+			.title {
+				flex: 1;
+				width: 0;
+				font-size: 30rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #333333;
+				margin-right: 20rpx;
 			}
 
-			.tag-box {
-					display: flex;
-					align-items: center;
-					width: 100%;
-
-					.datatag,
-					.systemtag {
-							flex-shrink: 0;
-							margin-top: 6rpx;
-							background: #3874f6;
-							color: #ffffff;
-							margin-right: 10rpx;
-							display: flex;
-							align-items: center;
-							height: 40rpx;
-							font-size: 20rpx;
-							padding: 0 10rpx;
-							border-radius: 20rpx;
-							font-family: PingFang SC-Regular, PingFang SC;
-					}
-
-					.datatag {
-							background: #FA8C16;
-					}
+			.state {
+				flex-shrink: 0;
+				width: 132rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx 0px 0px 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				text-align: center;
 			}
 
-			.replenish {
-					display: flex;
-					min-height: 34rpx;
-					font-size: 24rpx;
-					font-family: PingFang SC-Regular, PingFang SC;
-					color: #333333;
-					margin-top: 8rpx;
-					word-break: break-all;
-					white-space: pre-wrap;
+		}
+
+		.tag-box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+
+			.datatag,
+			.systemtag {
+				flex-shrink: 0;
+				margin-top: 6rpx;
+				background: #3874f6;
+				color: #ffffff;
+				margin-right: 10rpx;
+				display: flex;
+				align-items: center;
+				height: 40rpx;
+				font-size: 20rpx;
+				padding: 0 10rpx;
+				border-radius: 20rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
 			}
 
-			.leader {
-					position: absolute;
-					width: 60rpx;
-					height: 60rpx;
-					border-radius: 50%;
-					right: 30rpx;
-					bottom: 10rpx;
-					overflow: hidden;
-
-					image {
-							width: 100%;
-							height: 100%;
-					}
-
-					>view {
-							font-size: 28rpx;
-							font-family: PingFang SC-Regular, PingFang SC;
-							color: #FFFFFF;
-							background-color: #3874F6;
-							line-height: 60rpx;
-							text-align: center;
-					}
+			.datatag {
+				background: #FA8C16;
 			}
+		}
+
+		.replenish {
+			display: flex;
+			min-height: 34rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			margin-top: 8rpx;
+			word-break: break-all;
+			white-space: pre-wrap;
+		}
 	}
 }
 
@@ -160,166 +136,168 @@
 	overflow: hidden;
 	white-space: nowrap;
 	text-overflow: ellipsis;
-}.project-item {
-    display: flex;
-    align-items: center;
-    background-color: #fff;
-    width: 690rpx;
-    border-radius: 8rpx;
-    margin: 0 auto 20rpx;
-
-    .chart {
-        margin: 0 30rpx;
-        width: 100rpx;
-        flex-shrink: 0;
-
-        .circle {
-            width: 100rpx;
-            height: 100rpx;
-            position: relative;
-            border-radius: 50%;
-            box-shadow: inset 0 0 0 8rpx var(--assist);
-
-            .ab {
-                position: absolute;
-                left: 0;
-                right: 0;
-                top: 0;
-                bottom: 0;
-                margin: auto;
-            }
-
-            &_left {
-                border: 8rpx solid #ccc;
-                border-radius: 50%;
-                clip: rect(0, 50rpx, 100rpx, 0);
-            }
-
-            &_right {
-                border: 8rpx solid #ccc;
-                border-radius: 50%;
-                clip: rect(0, 100rpx, 100rpx, 50rpx);
-            }
-
-            &_text {
-                height: 100%;
-                display: flex;
-                flex-direction: column;
-                justify-content: center;
-                align-items: center;
-                font-size: 16rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-                color: #666666;
-
-                .value {
-                    margin-top: -6rpx;
-                }
-
-                .name {
-                    margin-top: 6rpx;
-                }
-            }
-        }
-    }
-
-    .main {
-        position: relative;
-        box-sizing: border-box;
-        padding: 20rpx 0;
-        overflow: hidden;
-
-        .label {
-            display: flex;
-            height: 42rpx;
-
-            .title {
-                flex: 1;
-                width: 0;
-                font-size: 30rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-                color: #333333;
-                margin-right: 20rpx;
-            }
-
-            .state {
-                flex-shrink: 0;
-                width: 132rpx;
-                height: 40rpx;
-                line-height: 40rpx;
-                border-radius: 20rpx 0px 0px 20rpx;
-                font-size: 24rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-                color: #FFFFFF;
-                text-align: center;
-            }
-
-        }
-
-        .tag-box {
-            display: flex;
-            align-items: center;
-            width: 100%;
-
-            .datatag,
-            .systemtag {
-                flex-shrink: 0;
-                margin-top: 6rpx;
-                background: #3874f6;
-                color: #ffffff;
-                margin-right: 10rpx;
-                display: flex;
-                align-items: center;
-                height: 40rpx;
-                font-size: 20rpx;
-                padding: 0 10rpx;
-                border-radius: 20rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-            }
-
-            .datatag {
-                background: #FA8C16;
-            }
-        }
-
-        .replenish {
-            display: flex;
-            min-height: 34rpx;
-            font-size: 24rpx;
-            font-family: PingFang SC-Regular, PingFang SC;
-            color: #333333;
-            margin-top: 8rpx;
-            word-break: break-all;
-            white-space: pre-wrap;
-        }
-
-        .leader {
-            position: absolute;
-            width: 60rpx;
-            height: 60rpx;
-            border-radius: 50%;
-            right: 30rpx;
-            bottom: 10rpx;
-            overflow: hidden;
-
-            image {
-                width: 100%;
-                height: 100%;
-            }
-
-            >view {
-                font-size: 28rpx;
-                font-family: PingFang SC-Regular, PingFang SC;
-                color: #FFFFFF;
-                background-color: #3874F6;
-                line-height: 60rpx;
-                text-align: center;
-            }
-        }
-    }
+}
+
+.project-item {
+	display: flex;
+	align-items: center;
+	background-color: #fff;
+	width: 690rpx;
+	border-radius: 8rpx;
+	margin: 0 auto 20rpx;
+
+	.chart {
+		margin: 0 30rpx;
+		width: 100rpx;
+		flex-shrink: 0;
+
+		.circle {
+			width: 100rpx;
+			height: 100rpx;
+			position: relative;
+			border-radius: 50%;
+			box-shadow: inset 0 0 0 8rpx var(--assist);
+
+			.ab {
+				position: absolute;
+				left: 0;
+				right: 0;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+			}
+
+			&_left {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 50rpx, 100rpx, 0);
+			}
+
+			&_right {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 100rpx, 100rpx, 50rpx);
+			}
+
+			&_text {
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				font-size: 16rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #666666;
+
+				.value {
+					margin-top: -6rpx;
+				}
+
+				.name {
+					margin-top: 6rpx;
+				}
+			}
+		}
+	}
+
+	.main {
+		position: relative;
+		box-sizing: border-box;
+		padding: 20rpx 0;
+		overflow: hidden;
+
+		.label {
+			display: flex;
+			height: 42rpx;
+
+			.title {
+				flex: 1;
+				width: 0;
+				font-size: 30rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #333333;
+				margin-right: 20rpx;
+			}
+
+			.state {
+				flex-shrink: 0;
+				width: 132rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx 0px 0px 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				text-align: center;
+			}
+
+		}
+
+		.tag-box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+
+			.datatag,
+			.systemtag {
+				flex-shrink: 0;
+				margin-top: 6rpx;
+				background: #3874f6;
+				color: #ffffff;
+				margin-right: 10rpx;
+				display: flex;
+				align-items: center;
+				height: 40rpx;
+				font-size: 20rpx;
+				padding: 0 10rpx;
+				border-radius: 20rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+			}
+
+			.datatag {
+				background: #FA8C16;
+			}
+		}
+
+		.replenish {
+			display: flex;
+			min-height: 34rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			margin-top: 8rpx;
+			word-break: break-all;
+			white-space: pre-wrap;
+		}
+
+		.leader {
+			position: absolute;
+			width: 60rpx;
+			height: 60rpx;
+			border-radius: 50%;
+			right: 30rpx;
+			bottom: 10rpx;
+			overflow: hidden;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+
+			>view {
+				font-size: 28rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				background-color: #3874F6;
+				line-height: 60rpx;
+				text-align: center;
+			}
+		}
+	}
 }
 
 .line-1 {
-    overflow: hidden;
-    white-space: nowrap;
-    text-overflow: ellipsis;
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
 }

+ 3 - 3
prsx/department/index.wxml

@@ -7,7 +7,7 @@
 				<view class="circle_left ab" style="{{render.leftRate(item.progress)}}" />
 				<view class="circle_right ab" style="{{render.rightRate(item.progress)}}" />
 				<view class="circle_text">
-					<!-- <text class="value">{{item.stage+'/'+item.totalstage}}</text> -->
+					<text class="value">{{item.stage+'/'+item.totalstage}}</text>
 					<text class="name">{{item.stagename}}</text>
 				</view>
 			</view>
@@ -17,8 +17,8 @@
 				<view class="title line-1">{{item.hospitaldepname}}</view>
 			</view>
 			<view class="tag-box">
-				<view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{item}}</view>
-				<view class="datatag" wx:for="{{item.tags.datatag}}" wx:key="item">{{item}}</view>
+				<view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{item}}</view>
+				<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{item}}</view>
 			</view>
 			<view class="replenish">
 				<text style="color: #666;">科室类别:</text>

+ 335 - 0
prsx/doctors/detail.js

@@ -0,0 +1,335 @@
+const _Http = getApp().globalData.http,
+    currency = require("../../utils/currency"),
+    CNY = value => currency(value, {
+        symbol: "¥",
+        precision: 2
+    }).format();
+Page({
+    data: {
+        loading: true,
+        isLeader: false, //是否为负责人
+        tabsActive: 0, //tabs 选中项
+        sa_doctorid: 0,
+        sColors: getApp().globalData.sColors,
+    },
+    onLoad(options) {
+        const appAuth = wx.getStorageSync('auth').wdoctors;
+
+        let tabsList = [{
+            label: "详细信息",
+            icon: "icon-tabxiangxixinxi1"
+        }, {
+            label: "附件",
+            icon: "icon-tabfujian1",
+            model: "#Files"
+        }, {
+            label: "操作",
+            icon: "icon-tabcaozuojilu1",
+            model: "#Record"
+        }];
+        if (appAuth.isdatafollowup) {
+            tabsList.unshift({
+                label: "跟进动态",
+                icon: "icon-tabgenjinjilu",
+                model: "#Trace"
+            })
+        }
+        console.log("appAuth", appAuth)
+        this.setData({
+            sa_doctorid: options.id,
+            tabsList,
+            appAuth
+        })
+        this.getDetail();
+        getApp().globalData.Language.getLanguagePackage(this);
+    },
+
+    /* 获取详情 */
+    getDetail() {
+        /* 基本信息 */
+        _Http.basic({
+            "id": 2025102116474702,
+            "content": {
+                sa_doctorid: this.data.sa_doctorid
+            },
+        }).then(res => {
+            console.log("详情", res)
+            if (res.code != '1') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            this.setPreview(res);
+            this.setData({
+                loading: false,
+                detail: res.data,
+            })
+            //获取标签
+            if (this.data.appAuth.isdatatag) this.getTags();
+            if (this.data.appAuth.isdatateam) this.getGroup()
+            this.setTabbar();
+            this.partialRenewal();
+        });
+    },
+
+    setPreview(res) {
+        /* 摘要信息 */
+        let briefs = [{
+            label: "联系方式",
+            value: res.data.phonenumber
+        }, {
+            label: "职称",
+            value: res.data.professional
+        }, {
+            label: "所属科室",
+            value: res.data.hospitaldepname
+        }, {
+            label: "是否科室负责人",
+            value: res.data.isleader == 0 ? '否' : '是'
+        }, {
+            label: "负责人",
+            value: res.data.leader.length ? res.data.leader[0].name : ''
+        }, {
+            label: "所属医院",
+            value: res.data.enterprisename
+        }, {
+            label: "备注",
+            value: res.data.remarks
+        }];
+
+        /* 基本信息 */
+        let list1 = [{
+            label: "联系方式",
+            value: res.data.phonenumber
+        }, {
+            label: "职称",
+            value: res.data.professional
+        }, {
+            label: "所属科室",
+            value: res.data.hospitaldepname
+        }, {
+            label: "是否科室负责人",
+            value: res.data.isleader == 0 ? '否' : '是'
+        }, {
+            label: "负责人",
+            value: res.data.leader.length ? res.data.leader[0].name : ''
+        }, {
+            label: "所属医院",
+            value: res.data.enterprisename
+        }, {
+            label: "备注",
+            value: res.data.remarks
+        }];
+        /* 系统信息 */
+        let list2 = [{
+            label: "创建人",
+            value: res.data.createby
+        }, {
+            label: "创建时间",
+            value: res.data.createdate
+        }, {
+            label: "最近编辑人",
+            value: res.data.changeby
+        }, {
+            label: "最近编辑时间",
+            value: res.data.changedate
+        }, {
+            label: "删除原因",
+            value: res.data.deletereason
+        }, {
+            label: "转手次数",
+            value: res.data.leader[0] ? res.data.leader[0].leadernum : 0
+        }];
+        this.setData({
+            briefs,
+            list1,
+            list2
+        });
+    },
+    //详情按钮回调
+    tabbarOnClick({
+        detail
+    }) {
+        let data = JSON.parse(JSON.stringify(this.data.detail)),
+            that = this;
+        switch (detail.label) {
+            case "编辑":
+                data.sa_customersid = data.enterprisename ? [data.enterprisename, [data.sa_customersid]] : "";
+                wx.navigateTo({
+                    url: `/prsx/doctors/insert?data=${JSON.stringify(data)}`,
+                })
+                break;
+            case "删除":
+                wx.showModal({
+                    content: `是否确定删除'${data.hospitaldepname}'?`,
+                    complete: (res) => {
+                        if (res.confirm) _Http.basic({
+                            "content": {
+                                "sa_doctorid": data.sa_doctorid
+                            },
+                            "id": 2025102116480402
+                        }).then(res => {
+                            console.log("删除医生", res)
+                            wx.showToast({
+                                title: res.code != '1' ? res.msg : '删除成功',
+                                icon: "none",
+                                mask: res.code == '1'
+                            })
+                            if (res.code != '1') return;
+                            setTimeout(() => {
+                                wx.navigateBack()
+                            }, 300)
+                        })
+                    }
+                })
+                break;
+            case "更换负责人":
+                wx.navigateTo({
+                    url: `/pages/group/select?data=${JSON.stringify({
+                         ownertable:"sa_doctor",
+                         ownerid:this.data.sa_doctorid,
+                    })}&radio=true&principal=true`,
+                })
+                break;
+            default:
+                console.log(detail)
+                break;
+        }
+    },
+    /* 更换负责人 */
+    handelSubmit(arr) {
+        const that = this;
+        wx.showModal({
+            title: getApp().globalData.Language.getMapText('提示'),
+            content: getApp().globalData.Language.getMapText('是否确认更换负责人'),
+            complete: ({
+                confirm
+            }) => {
+                if (confirm) wx.showModal({
+                    title: getApp().globalData.Language.getMapText('提示'),
+                    content: getApp().globalData.Language.getMapText('是否参与该数据的后续工作'),
+                    cancelText: getApp().globalData.Language.getMapText('不参与'),
+                    confirmText: getApp().globalData.Language.getMapText('参与'),
+                    complete: (s) => {
+                        _Http.basic({
+                            "id": 20220930103701,
+                            "content": {
+                                ownertable: "sa_doctor",
+                                ownerid: that.data.sa_doctorid,
+                                userid: arr[0],
+                                isaddoldleader: s.confirm ? 1 : 0
+                            }
+                        }).then(res => {
+                            console.log("更换负责人", res)
+                            if (res.code != '1') return wx.showToast({
+                                title: res.data,
+                                icon: "none"
+                            });
+                            wx.showToast({
+                                title: getApp().globalData.Language.getMapText('更换成功'),
+                                icon: "none",
+                                mask: true
+                            });
+                            getCurrentPages().forEach(v => {
+                                if (['packageA/setclient/index'].includes(v.__route__)) v.getList(true)
+                            })
+                            setTimeout(() => {
+                                wx.navigateBack({
+                                    delta: 2
+                                });
+                            }, 300)
+                        })
+                    }
+                })
+            }
+        })
+    },
+    /* 底部功能 */
+    async setTabbar() {
+        let detail = this.data.detail,
+            isAdmin = this.data.appAuth.options.includes("admin") ? true : false,
+            isLeader = detail.leader.some(some => some.userid == wx.getStorageSync('userMsg').userid),
+            editdataleader = isLeader ? 1 : 0,
+            tabbarList = [],
+            appAuth = this.data.appAuth;
+            console.log("isAdmin",isAdmin)
+        if (isLeader || isAdmin) {
+            tabbarList.push({
+                icon: "color-bianji",
+                label: "编辑"
+            })
+            tabbarList.push({
+                icon: "icon-shanchu",
+                label: "删除"
+            })
+        }
+
+        if (appAuth.isdatafollowup) {
+            tabbarList.push({
+                icon: "color-genjin",
+                label: "跟进"
+            });
+        }
+        this.setData({
+            tabbarList,
+            isLeader
+        })
+    },
+    //tabs 切换
+    tabsChange({
+        detail
+    }) {
+        this.setData({
+            tabsActive: detail
+        });
+        this.partialRenewal();
+    },
+    //局部数据更新 tabs
+    partialRenewal(init = false) {
+        let model = this.data.tabsList[this.data.tabsActive].model;
+        if (model) {
+            let Component = this.selectComponent(model),
+                {
+                    total,
+                    pageNumber,
+                    pageTotal
+                } = Component.data.content,
+                id = model == "#Clue" ? this.data.detail.sa_doctorid : this.data.detail.sys_enterpriseid;
+            if (model == "#Files") init = true;
+            if (total == null || init) {
+                Component.getList(id, init);
+            } else if (pageNumber <= pageTotal) {
+                Component.getList(id, false);
+            }
+        }
+    },
+    //更新标签
+    getTags() {
+        this.selectComponent("#Tags").getTags()
+    },
+    //更新团队成员
+    getGroup() {
+        this.selectComponent("#Group").getList().then(this.setTabbarList)
+    },
+    onReachBottom() {
+        this.partialRenewal();
+    },
+    onUnload() {
+        const page = getCurrentPages().find(v => v.__route__ == 'prsx/doctors/index');
+        if (!page) return;
+        let content = JSON.parse(JSON.stringify(page.data.content));
+        content.pageSize = (content.pageNumber - 1) * content.pageSize;
+        content.pageNumber = 1;
+        _Http.basic({
+            id: '2025102208523002',
+            content
+        }).then(res => {
+            console.log("更新医生列表", res);
+            if (res.code == '1') {
+                page.setData({
+                    list: res.data,
+                    "content.total": res.total
+                })
+            }
+        })
+    }
+})

+ 6 - 0
prsx/doctors/detail.json

@@ -0,0 +1,6 @@
+{
+    "usingComponents": {
+        "Trace": "/prsx/trace/index"
+    },
+    "navigationBarTitleText": "医生详情"
+}

+ 66 - 0
prsx/doctors/detail.scss

@@ -0,0 +1,66 @@
+.setclient-list-item {
+	width: 100vw;
+	background-color: #fff;
+	box-sizing: border-box;
+
+	.con {
+		padding-left: 30rpx;
+		display: flex;
+		width: 100%;
+		box-sizing: border-box;
+		padding-top: 20rpx;
+
+		.mian {
+			flex: 1;
+			width: 0;
+			padding-right: 20rpx;
+			box-sizing: border-box;
+
+			.label {
+				font-size: 28rpx;
+				font-family: PingFang SC-Bold, PingFang SC;
+				font-weight: bold;
+				color: #333333;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+
+			.tag-box {
+				margin-top: 10rpx;
+
+				.tag {
+					height: 40rpx;
+					font-size: 20rpx;
+					font-family: PingFang SC-Regular, PingFang SC;
+					padding: 0 12rpx;
+					margin-right: 8rpx;
+				}
+			}
+		}
+
+		.icon {
+			display: flex;
+			height: 136rpx;
+			align-items: center;
+			margin-top: -20rpx;
+			color: #CFCFCF;
+			width: 28rpx;
+			margin-right: 30rpx;
+			flex-shrink: 0;
+		}
+
+		.extend {
+			display: flex;
+			height: 116rpx;
+			width: 48rpx;
+			margin-right: 30rpx;
+			flex-shrink: 0;
+		}
+	}
+}
+
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}

+ 27 - 0
prsx/doctors/detail.wxml

@@ -0,0 +1,27 @@
+<view class="setclient-list-item" url="#">
+    <view class="con">
+        <view class="mian">
+            <view class="label line-1">{{detail.doctorname}}</view>
+            <view class="tag-box" wx:if="{{appAuth.isdatatag}}">
+                <Yl-tags id="Tags" add ownertable='sa_doctor' bind:onGetList='onGetList' ownerid='{{sa_doctorid}}' />
+            </view>
+        </view>
+    </view>
+</view>
+
+<view style="margin-top: -16rpx;">
+    <Yl_Detail list="{{briefs}}">
+        <Yl-group id='Group' slot='bottom' ownertable='sa_doctor' ownerid='{{sa_doctorid}}' />
+    </Yl_Detail>
+</view>
+<view style="height: 20rpx;" />
+<!-- 功能 -->
+<Yl_FunTabs list='{{tabsList}}' active='{{tabsActive}}' bind:onChenge="tabsChange">
+    <Preview slot='详细信息' list1='{{list1}}' list2='{{list2}}' />
+    <Trace resource='医生管理' slot='跟进动态' id='Trace' ownertable='sa_doctor' ownerid='{{sa_doctorid}}' disabled="{{detail.status != '已终止'}}" ownerid1='{{detail.sys_enterpriseid}}' />
+    <Record slot="操作" id="Record" ownertable='sa_doctor' ownerid='{{sa_doctorid}}' />
+    <Files slot="附件" id="Files" ownertable='sa_doctor' ownerid='{{sa_doctorid}}' disabled="{{detail.status != '已终止'}}" />
+</Yl_FunTabs>
+<!-- 底部 -->
+<Yl_Tabbar wx:if="{{tabbarList.length}}" list='{{tabbarList}}' bind:callback="tabbarOnClick" />
+<wxs src='../../utils/wxmlQueryPer.wxs' module="per" />

+ 178 - 0
prsx/doctors/index.js

@@ -0,0 +1,178 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        navList: [{
+            label: "我负责的",
+            icon: "icon-webxialaxuanxiangjiantou",
+            color: "",
+            width: "",
+            id: "1"
+        }, {
+            label: "排序",
+            icon: "icon-jiangxu1",
+            color: "",
+            width: "",
+            id: "sort"
+        }, {
+            label: "筛选",
+            icon: "icon-shaixuan",
+            color: "",
+            width: "",
+            id: "2"
+        }],
+        content: {
+            "type": 99,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": "",
+                "startdate": "",
+                "enddate": "",
+                "type": "",
+                "stagename": ""
+            }
+        }
+    },
+    async onLoad() {
+        getApp().globalData.Language.getLanguagePackage(this);
+        let templetList = wx.getStorageSync('templetList')
+        if (![0, 21].includes(wx.getStorageSync('userMsg').usertype)) templetList = templetList.filter(v => v.templetid != '99')
+        this.setData({
+            insert: wx.getStorageSync('auth').wdoctors.options.some(v => v == 'insert'), //查询新增权限
+            classActions: templetList.map((v, i) => {
+                return {
+                    name: v.templetname,
+                    index: v.templetid,
+                    color: i == 0 ? '#3874F6' : '',
+                    i: i,
+                }
+            }),
+            'navList[0].label': templetList[0].templetname,
+            "content.type": templetList[0].templetid,
+        });
+        this.getList(true)
+
+        _Http.basic({
+            "id": 20220929085401,
+            "content": {
+                "ownertable": "sa_doctor",
+                "ownerid": ""
+            }
+        }).then(res => {
+            if (res.code == 1) {
+                let filtratelist = [{
+                    label: "标签",
+                    index: null,
+                    type: "checkbox",
+                    showName: "tag", //显示字段
+                    valueKey: "tag", //返回Key
+                    selectKey: "tag", //传参 代表选着字段 不传参返回整个选择对象
+                    value: "", //选中值
+                    list: res.data.option
+                }]
+                this.setData({
+                    filtratelist
+                })
+            }
+        })
+    },
+    getList(init = false) {
+        _Http.init(this.data.content, init).then(content => {
+            _Http.basic({
+                "id": 2025102208523002,
+                content
+            }).then(res => {
+                console.log("医生列表", res)
+                this.selectComponent('#ListBox').RefreshToComplete();
+                if (res.code != '1') return wx.showToast({
+                    title: res.msg,
+                    icon: "none"
+                })
+                setTimeout(() => {
+                    if (res.pageNumber == 1 && res.data.length && !this.data.filtratelist.some(v => v.label == '开发阶段')) {
+                        this.data.filtratelist.push({
+                            label: "开发阶段",
+                            index: null,
+                            showName: "stagename", //显示字段
+                            valueKey: "stagename", //返回Key
+                            selectKey: "stagename", //传参 代表选着字段 不传参返回整个选择对象
+                            value: "", //选中值
+                            list: res.data[0].stages
+                        })
+                        this.setData({
+                            filtratelist: this.data.filtratelist
+                        })
+                    }
+                }, 1500);
+                this.setData({
+                    content: _Http.paging(content, res),
+                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+                })
+            })
+        })
+    },
+    toAdd() {
+        wx.navigateTo({
+            url: '/prsx/doctors/insert'
+        })
+    },
+    /* 处理筛选 */
+    handleFilter({
+        detail
+    }) {
+        detail.condition = this.data.content.where.condition;
+        this.data.content.where = detail;
+        this.getList(true);
+    },
+    /* 顶部条件导航回调 */
+    navClick({
+        detail
+    }) {
+        switch (detail.id) {
+            case '1':
+                this.setData({
+                    classShow: true
+                })
+                break;
+            case '2':
+                this.setData({
+                    'filterShow': true
+                })
+                break;
+            case '3':
+                this.setData({
+                    'content.sort[0].reversed': this.data.content.sort[0].reversed == 0 ? 1 : 0
+                });
+                this.getList(true)
+                break;
+        }
+    },
+    /* 处理搜索 */
+    onSearch({
+        detail
+    }) {
+        this.data.content.where.condition = detail;
+        this.getList(true);
+    },
+    classClose() {
+        this.setData({
+            classShow: false
+        })
+    },
+    classSelect({
+        detail
+    }) {
+        if (this.data.content.type == detail.index) return this.classClose();
+        this.setData({
+            "content.type": detail.index,
+            'navList[0].label': detail.name,
+            classActions: this.data.classActions.map(v => {
+                v.color = detail.i == v.i ? '#3874F6' : ''
+                return v
+            })
+        })
+        this.classClose();
+        this.getList(true)
+    }
+})

+ 4 - 0
prsx/doctors/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "医生管理"
+}

+ 227 - 0
prsx/doctors/index.scss

@@ -0,0 +1,227 @@
+.project-item {
+	display: flex;
+	align-items: center;
+	background-color: #fff;
+	width: 690rpx;
+	border-radius: 8rpx;
+	margin: 0 auto 20rpx;
+	padding: 20rpx 30rpx;
+	box-sizing: border-box;
+
+	.main {
+		position: relative;
+		overflow: hidden;
+
+		.label {
+			font-size: 30rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+		}
+
+		.tag-box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+
+			.datatag,
+			.systemtag {
+				flex-shrink: 0;
+				margin-top: 6rpx;
+				background: #3874f6;
+				color: #ffffff;
+				margin-right: 10rpx;
+				display: flex;
+				align-items: center;
+				height: 40rpx;
+				font-size: 20rpx;
+				padding: 0 10rpx;
+				border-radius: 20rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+			}
+
+			.datatag {
+				background: #FA8C16;
+			}
+		}
+
+		.replenish {
+			display: flex;
+			min-height: 34rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			margin-top: 8rpx;
+			word-break: break-all;
+			white-space: pre-wrap;
+		}
+	}
+}
+
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}
+
+.project-item {
+	display: flex;
+	align-items: center;
+	background-color: #fff;
+	width: 690rpx;
+	border-radius: 8rpx;
+	margin: 0 auto 20rpx;
+
+	.chart {
+		margin: 0 30rpx;
+		width: 100rpx;
+		flex-shrink: 0;
+
+		.circle {
+			width: 100rpx;
+			height: 100rpx;
+			position: relative;
+			border-radius: 50%;
+			box-shadow: inset 0 0 0 8rpx var(--assist);
+
+			.ab {
+				position: absolute;
+				left: 0;
+				right: 0;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+			}
+
+			&_left {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 50rpx, 100rpx, 0);
+			}
+
+			&_right {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 100rpx, 100rpx, 50rpx);
+			}
+
+			&_text {
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				font-size: 16rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #666666;
+
+				.value {
+					margin-top: -6rpx;
+				}
+
+				.name {
+					margin-top: 6rpx;
+				}
+			}
+		}
+	}
+
+	.main {
+		position: relative;
+		box-sizing: border-box;
+		overflow: hidden;
+
+		.label {
+			display: flex;
+			height: 42rpx;
+
+			.title {
+				flex: 1;
+				width: 0;
+				font-size: 30rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #333333;
+				margin-right: 20rpx;
+			}
+
+			.state {
+				flex-shrink: 0;
+				width: 132rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx 0px 0px 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				text-align: center;
+			}
+
+		}
+
+		.tag-box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+
+			.datatag,
+			.systemtag {
+				flex-shrink: 0;
+				margin-top: 6rpx;
+				background: #3874f6;
+				color: #ffffff;
+				margin-right: 10rpx;
+				display: flex;
+				align-items: center;
+				height: 40rpx;
+				font-size: 20rpx;
+				padding: 0 10rpx;
+				border-radius: 20rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+			}
+
+			.datatag {
+				background: #FA8C16;
+			}
+		}
+
+		.replenish {
+			display: flex;
+			min-height: 34rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			margin-top: 8rpx;
+			word-break: break-all;
+			white-space: pre-wrap;
+		}
+
+		.leader {
+			position: absolute;
+			width: 60rpx;
+			height: 60rpx;
+			border-radius: 50%;
+			right: 30rpx;
+			bottom: 10rpx;
+			overflow: hidden;
+
+			image {
+				width: 100%;
+				height: 100%;
+			}
+
+			>view {
+				font-size: 28rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				background-color: #3874F6;
+				line-height: 60rpx;
+				text-align: center;
+			}
+		}
+	}
+}
+
+.line-1 {
+	overflow: hidden;
+	white-space: nowrap;
+	text-overflow: ellipsis;
+}

+ 50 - 0
prsx/doctors/index.wxml

@@ -0,0 +1,50 @@
+<Yl_nav search list='{{navList}}' sort='{{content.sort}}' bind:onClick='navClick' bind:onSearch='onSearch' />
+<view class="global-total">总共{{content.total}}个</view>
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator url="/prsx/doctors/detail?id={{item.sa_doctorid}}" class="project-item" wx:for="{{list}}" wx:key="sa_doctorid">
+		<view class="main">
+			<view class="label">
+				{{item.doctorname}}
+			</view>
+			<view class="tag-box">
+				<view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{item}}</view>
+				<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{item}}</view>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">联系方式:</text>
+				<text>{{item.phonenumber}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">职称:</text>
+				<text>{{item.professional}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">所属科室:</text>
+				<text>{{item.hospitaldepname || '--'}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">是否科室负责人:</text>
+				<text>{{item.isleader==0?'否':'是'}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">所属医院:</text>
+				<text>{{item.enterprisename || '--'}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">负责人:</text>
+				<text>{{item.leader[0].name}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">备注:</text>
+				<text>{{item.remarks || '--'}}</text>
+			</view>
+		</view>
+	</navigator>
+	<My_empty wx:if="{{list.length==0}}" />
+</Yl_ListBox>
+<!-- 显示类型 -->
+<van-action-sheet show="{{ classShow }}" actions="{{ classActions }}" cancel-text="取消" bind:click-overlay='classClose' bind:cancel="classClose" bind:select="classSelect" />
+<!-- 筛选条件 -->
+<Yl_Filtrate1 show='{{filterShow}}' list="{{filtratelist}}" dateRange bindhandle="handleFilter" dateRangeName='创建日期' />
+<!-- 浮动按钮 -->
+<Yl_FloatingButton wx:if="{{insert}}" bindtap="toAdd" />

+ 175 - 0
prsx/doctors/insert.js

@@ -0,0 +1,175 @@
+let _Http = getApp().globalData.http,
+    count = null;
+
+Page({
+    data: {
+        loading: false,
+        showAll: false,
+        repetitionShow: false,
+        repetitionList: [],
+        content: {
+            sa_doctorid: 0
+        },
+        disabled: true,
+    },
+    onLoad(options) {
+        let form = [{
+            label: "是否科室负责人",
+            error: false,
+            errMsg: "",
+            hint: "",
+            type: "radio",
+            value: "0",
+            radioList: [{
+                id: '1',
+                name: '是'
+            }, {
+                id: '0',
+                name: '否'
+            }],
+            valueName: "isleader", //绑定的字段名称
+            required: true, //必填
+            direction: "horizontal",
+            interrupt: true
+        }, {
+            label: "医生名称",
+            error: false,
+            errMsg: "",
+            type: "textarea",
+            value: "",
+            placeholder: "医生名称",
+            valueName: "doctorname",
+            checking: "base",
+            required: true
+        }, {
+            label: "联系方式",
+            error: false,
+            errMsg: "",
+            type: "number",
+            value: "",
+            placeholder: "联系方式",
+            valueName: "phonenumber",
+            required: true,
+            checking: "phone"
+        }, {
+            label: "职称",
+            error: false,
+            errMsg: "",
+            type: "option",
+            optionNmae: "careertitle",
+            optionType: "radio", //复选   radio 单选
+            value: "",
+            placeholder: "职称",
+            valueName: "professional",
+            checking: "base",
+            required: true
+        }, {
+            label: "所属科室",
+            error: false,
+            errMsg: "",
+            type: "route",
+            url: "/prsx/select/department/index",
+            value: "",
+            placeholder: "所属科室",
+            valueName: "sa_hospitaldepid",
+            checking: "base",
+            required: true,
+            params: {
+                "content": {
+                    "pageNumber": 1,
+                    "pageSize": 20,
+                    "where": {
+                        "condition": ""
+                    }
+                },
+                "id": 2025102208540702,
+            },
+            query: "&radio=true",
+            required: true
+        }, {
+            label: "备注",
+            error: false,
+            errMsg: "",
+            type: "textarea",
+            value: "",
+            placeholder: "备注",
+            valueName: "remarks",
+            checking: "base",
+            required: false
+        }]
+        if (options.data) {
+            let data = JSON.parse(options.data);
+            data.isleader = data.isleader + '';
+            data.sa_hospitaldepid = [data.hospitaldepname, [data.sa_hospitaldepid]]
+            form = form.map(v => {
+                v.value = data[v.valueName] || "";
+                return v
+            })
+            this.setData({
+                disabled: false,
+                content: {
+                    sa_doctorid: data.sa_doctorid,
+                },
+                form
+            })
+        }
+        this.setData({
+            form
+        })
+        getApp().globalData.Language.getLanguagePackage(this, options.data ? '编辑医生' : '新建医生');
+
+    },
+    /* 表单必填项是否完成 */
+    onConfirm({
+        detail
+    }) {
+        this.setData({
+            disabled: detail
+        })
+    },
+    // 是否显示全部
+    onChange({
+        detail
+    }) {
+        this.setData({
+            showAll: detail
+        })
+    },
+    async submit() {
+        this.setData({
+            loading: true
+        })
+        let data = this.selectComponent("#Form").submit(),
+            content = this.data.content
+        data.sa_hospitaldepid = data.sa_hospitaldepid.length ? data.sa_hospitaldepid[1][0] : 0
+        _Http.basic({
+            "id": 2025102116461002,
+            "content": {
+                ...content,
+                ...data,
+            }
+        }).then(res => {
+            this.setData({
+                loading: false
+            })
+            wx.showToast({
+                title: res.code != '1' ? res.msg : '保存成功',
+                icon: "none",
+                mask: res.code == '1'
+            })
+            if (res.code != '1') return;
+            getCurrentPages().forEach(v => {
+                if (v.route == 'prsx/doctors/detail') v.getDetail()
+            })
+            setTimeout(() => {
+                if (content.sa_doctorid == 0) {
+                    wx.redirectTo({
+                        url: '/prsx/doctors/detail?id=' + res.data.sa_doctorid,
+                    })
+                } else {
+                    wx.navigateBack()
+                }
+            }, 300)
+        })
+    },
+})

+ 3 - 0
prsx/doctors/insert.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 32 - 0
prsx/doctors/insert.scss

@@ -0,0 +1,32 @@
+.new-footer {
+	display: flex;
+	align-items: center;
+	justify-content: flex-end;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	z-index: 999;
+
+	.new-submit {
+		width: 156rpx;
+		height: 90rpx;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+		margin-right: 30rpx;
+	}
+
+	.blue {
+		background: #3874F6;
+	}
+
+	.orange {
+		background: #F29C37;
+	}
+
+}

+ 8 - 0
prsx/doctors/insert.wxml

@@ -0,0 +1,8 @@
+<Yl_Headline title='基本信息' type='switch' switchLabel='仅显示必填信息' switch='{{showAll}}' bind:callBack='onChange' />
+<Yl_field id='Form' form='{{form}}' showAll='{{!showAll}}' bind:onConfirm='onConfirm' bind:interrupt='interrupt' />
+<view style="height: 160rpx;" />
+<view class="new-footer" style="padding-bottom:12rpx;">
+	<van-button custom-class="new-submit {{content.sa_doctorid ? 'orange' : 'blue' }}" disabled='{{disabled ||loading}}' loading='{{loading}}' bindclick='submit'>
+		{{content.sa_doctorid ? '保存' : '确定'}}
+	</van-button>
+</view>

+ 0 - 1
prsx/hospital/detail.js

@@ -433,7 +433,6 @@ Page({
                     list: res.data,
                     "content.total": res.total
                 })
-                _Http.getTabs(page, 'sa_customers', res.data, _Http)
             }
         })
     }

+ 1 - 1
prsx/hospital/index.js

@@ -149,7 +149,7 @@ Page({
                     }
                 }, 1500);
                 this.setData({
-                    content: _Http.paging(content, res, this, 'sa_customers', res.data, _Http),
+                    content: _Http.paging(content, res),
                     list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
                 })
             })

+ 0 - 24
prsx/hospital/index.scss

@@ -269,30 +269,6 @@
 			word-break: break-all;
 			white-space: pre-wrap;
 		}
-
-		.leader {
-			position: absolute;
-			width: 60rpx;
-			height: 60rpx;
-			border-radius: 50%;
-			right: 30rpx;
-			bottom: 10rpx;
-			overflow: hidden;
-
-			image {
-				width: 100%;
-				height: 100%;
-			}
-
-			>view {
-				font-size: 28rpx;
-				font-family: PingFang SC-Regular, PingFang SC;
-				color: #FFFFFF;
-				background-color: #3874F6;
-				line-height: 60rpx;
-				text-align: center;
-			}
-		}
 	}
 }
 

+ 2 - 2
prsx/hospital/index.wxml

@@ -20,8 +20,8 @@
 				<view class="state" style="background-color: {{sColors[item.tradingstatus]}}">{{item.tradingstatus}}</view>
 			</view>
 			<view class="tag-box">
-				<view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
-				<view class="datatag" wx:for="{{item.tags.datatag}}" wx:key="item">{{language[item]||item}}</view>
+				<view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{language[item]||item}}</view>
+				<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{language[item]||item}}</view>
 			</view>
 			<view class="replenish">
 				<text style="color: #666;">医院编号:</text>

+ 113 - 0
prsx/select/department/index.js

@@ -0,0 +1,113 @@
+const _Http = getApp().globalData.http;
+
+Page({
+    data: {
+        params: {}, //请求体
+        result: [], //返回结果
+        radio: false, //是否为单选
+        idname: "sa_hospitaldepid", //idkey
+        showName: "hospitaldepname", //表单用 显示名称
+    },
+    onLoad(options) {
+        if (options.params) {
+            let params = JSON.parse(options.params);
+            if (!params.content.pageNumber || !params.content.pageTotal) {
+                params.content.pageNumber = 1;
+                params.content.pageTotal = 1;
+            }
+            this.setData({
+                params
+            });
+        }
+        this.setData({
+            radio: options.radio ? true : false,
+            idname: options.idname || this.data.idname,
+            showName: options.showName || this.data.showName
+        });
+        this.getList()
+    },
+    getList(init = false) {
+        //init 用于初始化分页
+        if (init.detail != undefined) init = init.detail;
+        let params = this.data.params;
+        if (init) params.content.pageNumber = 1;
+        if (params.content.pageNumber > params.content.pageTotal) return;
+        //init 用于初始化分页
+        _Http.basic(params).then(res => {
+            console.log("选择科室列表", res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            if (res.code != '1') return wx.showToast({
+                title: res.data,
+                icon: "none"
+            })
+            res.data = res.data.map(v => {
+                v.totalstage = v.stages.length
+                v.stage = v.stages.findIndex(s => s.stagename == v.stagename) + 1
+                v.progress = v.stage / v.totalstage * 100;
+                return v
+            })
+            this.setData({
+                'params.content.pageNumber': res.pageNumber + 1,
+                'params.content.pageTotal': res.pageTotal,
+                'params.content.total': res.total,
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+            })
+        })
+    },
+    /* 选中 */
+    changeResult(e) {
+        let {
+            id
+        } = e.currentTarget.dataset, result = this.data.result;
+        if (this.data.radio) {
+            result = [id];
+        } else {
+            result.some(v => v == id) ? result = result.filter(v => v != id) : result.push(id)
+        }
+        this.setData({
+            result
+        });
+        if (this.data.radio) this.submit();
+    },
+    /* 提交 */
+    submit() {
+        let result = this.data.result,
+            obj = this.data.radio ? {
+                id: result,
+                item: this.data.list.find(value => value[this.data.idname] == result),
+                value: [this.data.list.find(value => value[this.data.idname] == result)[this.data.showName], result]
+            } : {
+                result,
+                list: result.map(v => this.data.list.find(value => value[this.data.idname] == v)),
+                value: [result.map(v => {
+                    let data = this.data.list.find(value => value[this.data.idname] == v);
+                    return data ? data[this.data.showName] : ""
+                }), result]
+            }
+        getApp().globalData.handleSelect && getApp().globalData.handleSelect(obj)
+    },
+    /* 开始搜索 */
+    startSearch({
+        detail
+    }) {
+        let condition = this.data.content ? this.data.content.where.condition : this.data.params.content.where.condition;
+        if (detail == condition) return;
+        this.setData({
+            'content.where.condition': detail,
+            'params.content.where.condition': detail
+        });
+        this.getList(true);
+    },
+    /* 取消搜索 */
+    onClear() {
+        this.setData({
+            'content.where.condition': "",
+            'params.content.where.condition': ""
+        });
+        this.getList(true);
+    },
+    onUnload() {
+        //回收数据
+        getApp().globalData.handleSelect = null;
+    },
+})

+ 4 - 0
prsx/select/department/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "选择科室"
+}

+ 171 - 0
prsx/select/department/index.scss

@@ -0,0 +1,171 @@
+.project-item {
+	display: flex;
+	align-items: center;
+	background-color: #fff;
+	width: 690rpx;
+	border-radius: 8rpx;
+	margin: 0 auto 20rpx;
+
+	.chart {
+		margin: 0 30rpx;
+		width: 100rpx;
+		flex-shrink: 0;
+
+		.circle {
+			width: 100rpx;
+			height: 100rpx;
+			position: relative;
+			border-radius: 50%;
+			box-shadow: inset 0 0 0 8rpx var(--assist);
+
+			.ab {
+				position: absolute;
+				left: 0;
+				right: 0;
+				top: 0;
+				bottom: 0;
+				margin: auto;
+			}
+
+			&_left {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 50rpx, 100rpx, 0);
+			}
+
+			&_right {
+				border: 8rpx solid #ccc;
+				border-radius: 50%;
+				clip: rect(0, 100rpx, 100rpx, 50rpx);
+			}
+
+			&_text {
+				height: 100%;
+				display: flex;
+				flex-direction: column;
+				justify-content: center;
+				align-items: center;
+				font-size: 16rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #666666;
+
+				.value {
+					margin-top: -6rpx;
+				}
+
+				.name {
+					margin-top: 6rpx;
+				}
+			}
+		}
+	}
+
+	.main {
+		position: relative;
+		box-sizing: border-box;
+		padding: 20rpx 0;
+		overflow: hidden;
+		width: 100%;
+
+		.label {
+			display: flex;
+			height: 42rpx;
+
+			.title {
+				flex: 1;
+				width: 0;
+				font-size: 30rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #333333;
+				margin-right: 20rpx;
+			}
+
+			.state {
+				flex-shrink: 0;
+				width: 132rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				border-radius: 20rpx 0px 0px 20rpx;
+				font-size: 24rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+				color: #FFFFFF;
+				text-align: center;
+			}
+		}
+
+		.tag-box {
+			display: flex;
+			align-items: center;
+			width: 100%;
+
+			.datatag,
+			.systemtag {
+				flex-shrink: 0;
+				margin-top: 6rpx;
+				background: #3874f6;
+				color: #ffffff;
+				margin-right: 10rpx;
+				display: flex;
+				align-items: center;
+				height: 40rpx;
+				font-size: 20rpx;
+				padding: 0 10rpx;
+				border-radius: 20rpx;
+				font-family: PingFang SC-Regular, PingFang SC;
+			}
+
+			.datatag {
+				background: #FA8C16;
+			}
+		}
+
+		.replenish {
+			display: flex;
+			min-height: 34rpx;
+			font-size: 24rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			margin-top: 8rpx;
+			word-break: break-all;
+			white-space: pre-wrap;
+		}
+	}
+}
+
+.footer {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	padding: 0 30rpx;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	box-sizing: border-box;
+
+	.count {
+		font-size: 28rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		color: #333333;
+	}
+
+	.but {
+		width: 156rpx;
+		height: 90rpx;
+		background: #3874F6;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #FFFFFF;
+	}
+}
+
+.iconfont {
+	font-size: 28rpx;
+	font-family: PingFang SC-Regular, PingFang SC;
+	color: #666666;
+	padding: 0 10rpx;
+}

+ 85 - 0
prsx/select/department/index.wxml

@@ -0,0 +1,85 @@
+<van-search value="{{ params.content.where.condition }}" shape='round' placeholder="{{language['关键字']||'请输入搜索关键词'}}" use-action-slot bind:clear='onClear' bind:search="startSearch">
+</van-search>
+<view class="global-total">总共{{params.content.total}}个</view>
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<navigator url="#" class="project-item" wx:for="{{list}}" wx:key="sa_hospitaldepid" data-id="{{item.sa_hospitaldepid}}" bind:tap="changeResult">
+		<view class="chart">
+			<view class="circle">
+				<view class="circle_left ab" style="{{render.leftRate(item.progress)}}" />
+				<view class="circle_right ab" style="{{render.rightRate(item.progress)}}" />
+				<view class="circle_text">
+					<text class="value">{{item.stage+'/'+item.totalstage}}</text>
+					<text class="name">{{item.stagename}}</text>
+				</view>
+			</view>
+		</view>
+		<view class="main">
+			<view class="label">
+				<view class="title line-1">{{item.hospitaldepname}}</view>
+			</view>
+			<view class="tag-box">
+				<view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{item}}</view>
+				<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{item}}</view>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">科室类别:</text>
+				<text>{{item.type}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">所属医院:</text>
+				<text>{{item.enterprisename || ' --'}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">科室负责人:</text>
+				<text>{{item.doctors || '--'}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">负责人:</text>
+				<text>{{item.leader[0].name}}</text>
+			</view>
+			<view class="replenish">
+				<text style="color: #666;">备注:</text>
+				<text>{{item.remarks || '--'}}</text>
+			</view>
+		</view>
+	</navigator>
+	<view wx:if="{{!radio}}" style="height: 70rpx;" />
+	<My_empty wx:if="{{!list.length}}" />
+</Yl_ListBox>
+<block wx:if="{{!radio}}">
+	<view class="footer">
+		<view class="count">
+			{{language['已选']||'已选'}}:{{result.length}}
+		</view>
+		<van-button custom-class='but' disabled='{{result.length==0}}' bind:click="submit">{{language['确定']||'确定'}}</van-button>
+	</view>
+	<wxs module="handle">
+		module.exports = {
+			isCheck: function (id, list) {
+				return list.some(function (v) {
+					return v == id
+				});
+			},
+		}
+	</wxs>
+</block>
+
+<wxs src="../../../utils/nominalpressure.wxs" module="join"></wxs>
+
+
+<wxs module="render">
+	module.exports = {
+		rightRate: function (rate) {
+			if (rate - 0 < 50) {
+				return 'transform: rotate(' + 3.6 * (rate - 0) + 'deg);';
+			} else {
+				return 'transform: rotate(0);border-color: var(--assist);';
+			}
+		},
+		leftRate: function (rate) {
+			if (rate - 0 >= 50) {
+				return 'transform: rotate(' + 3.6 * (rate - 50) + 'deg);';
+			}
+		}
+	}
+</wxs>

+ 3 - 3
prsx/select/hospital/index.wxml

@@ -8,7 +8,7 @@
                 <view class="circle_left ab" style="{{render.leftRate(item.progress)}}" />
                 <view class="circle_right ab" style="{{render.rightRate(item.progress)}}" />
                 <view class="circle_text">
-                    <!-- <text class="value">{{item.stage+'/'+item.totalstage}}</text> -->
+                    <text class="value">{{item.stage+'/'+item.totalstage}}</text>
                     <text class="name">{{item.stagename}}</text>
                 </view>
             </view>
@@ -19,8 +19,8 @@
                 <view class="state" style="background-color: {{sColors[item.tradingstatus]}}">{{item.tradingstatus}}</view>
             </view>
             <view class="tag-box">
-                <view class="systemtag" wx:for="{{item.tags.systemtag}}" wx:key="item">{{language[item]||item}}</view>
-                <view class="datatag" wx:for="{{item.tags.datatag}}" wx:key="item">{{language[item]||item}}</view>
+                <view class="systemtag" wx:for="{{item.tag_sys}}" wx:key="item">{{language[item]||item}}</view>
+				<view class="datatag" wx:for="{{item.tag}}" wx:key="item">{{language[item]||item}}</view>
             </view>
             <view class="replenish">
                 <text style="color: #666;">医院编号:</text>

+ 5 - 0
utils/work/apps.js

@@ -65,6 +65,11 @@ function getcrm() {
 		path: "/prsx/department/index",
 		icon: "work-kehu",
 		objectname: "sa_hospitaldep"
+	}, {
+		name: "医生管理",
+		path: "/prsx/doctors/index",
+		icon: "work-kehu",
+		objectname: "sa_doctor"
 	}, {
 		name: "合同管理",
 		path: "/packageA/contract/index",