qymljy 2 týždňov pred
rodič
commit
af11cefbae

+ 14 - 0
project.private.config.json

@@ -10,6 +10,20 @@
     "condition": {
         "miniprogram": {
             "list": [
+                {
+                    "name": "prsx/hospital/detail",
+                    "pathName": "prsx/hospital/detail",
+                    "query": "id=6737",
+                    "launchMode": "default",
+                    "scene": null
+                },
+                {
+                    "name": "prsx/hospital/detail",
+                    "pathName": "prsx/hospital/detail",
+                    "query": "id=6737",
+                    "launchMode": "default",
+                    "scene": null
+                },
                 {
                     "name": "prsx/tryOut/detail",
                     "pathName": "prsx/tryOut/detail",

+ 119 - 127
prsx/hospital/Surgery/index.js

@@ -1,137 +1,129 @@
 const _Http = getApp().globalData.http;
 
 Component({
-    properties: {
-        disabled: {
-            type: Boolean,
-            value: true
-        }
+  properties: {
+    disabled: {
+      type: Boolean,
+      value: true
+    }
+  },
+  options: {
+    addGlobalClass: true
+  },
+  data: {
+    sa_customersid: 0,
+    content: {
+      nocache: true,
+      pageNumber: 1,
+      pageSize: 10,
+      pageTotal: 1,
+      total: null,
+      where: {
+        condition: ""
+      }
     },
-    options: {
-        addGlobalClass: true
+    list: [],
+    showSearch: false,
+    focus: false,
+    condition: ""
+  },
+  lifetimes: {
+    attached: function () {
+      getApp().globalData.Language.getLanguagePackage(this)
+    }
+  },
+  methods: {
+    getList(id, init = false) {
+      let content = {
+        ...this.data.content,
+        sa_customersid: id || this.data.sa_customersid
+      };
+      if (init) {
+        content.pageNumber = 1
+        content.pageTotal = 1
+      }
+      _Http.basic({
+        "id": 2025111315443902,
+        content
+      }).then(res => {
+        console.log("预估手术量", res)
+        if (res.code != '1') return wx.showToast({
+          title: res.data,
+          icon: "none"
+        });
+
+        this.setData({
+          "content.pageNumber": res.pageNumber + 1,
+          "content.pageTotal": res.pageTotal,
+          "content.total": res.total,
+          list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+          sa_customersid: content.sa_customersid
+        })
+      })
     },
-    data: {
-        sa_customersid: 0,
-        content: {
-            nocache: true,
-            pageNumber: 1,
-            pageSize: 10,
-            pageTotal: 1,
-            total: null,
-            where: {
-                condition: ""
-            }
-        },
-        list: [],
-        showSearch: false,
-        focus: false,
-        condition: ""
+
+    toSearch() {
+      if (this.data.showSearch && this.data.content.where.condition) {
+        this.data.content.where.condition = '';
+        this.getList("", true);
+      } else if (this.data.condition) {
+        this.data.content.where.condition = this.data.condition;
+        this.setData({
+          condition: this.data.condition
+        })
+        this.getList("", true);
+      }
+      this.setData({
+        showSearch: !this.data.showSearch
+      })
+      setTimeout(() => {
+        this.setData({
+          focus: this.data.showSearch
+        })
+      }, 300)
     },
-    lifetimes: {
-        attached: function () {
-            getApp().globalData.Language.getLanguagePackage(this)
-        }
+    onChange({
+      detail
+    }) {
+      this.data.condition = detail;
+    },
+    onSearch({
+      detail
+    }) {
+      this.data.content.where.condition = detail;
+      this.getList("", true)
     },
-    methods: {
-        getList(id, init = false) {
-            let content = {
-                ...this.data.content,
-                sa_customersid: id || this.data.sa_customersid
-            };
-            if (init) {
-                content.pageNumber = 1
-                content.pageTotal = 1
-            }
-            _Http.basic({
-                "id": 2025102310134602,
-                content
-            }).then(res => {
-                console.log("医生", res)
-                if (res.code != '1') return wx.showToast({
-                    title: res.data,
-                    icon: "none"
-                });
-                res.data = res.data.map(v => {
-                    // 是否关键
-                    v.isKeyDoctor = v.tag_sys.includes("关键人");
-                    return v
-                })
-                this.setData({
-                    "content.pageNumber": res.pageNumber + 1,
-                    "content.pageTotal": res.pageTotal,
-                    "content.total": res.total,
-                    list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
-                    sa_customersid: content.sa_customersid
-                })
-            })
-        },
-        insetr() {
-            const page = getCurrentPages().find(v => v.__route__ == 'prsx/hospital/detail'),
-                detail = page.data.detail;
-            wx.navigateTo({
-                url: `/prsx/doctors/insert?sa_customersid=${detail.sa_customersid}&name=${detail.name}`
-            })
-        },
-        toSearch() {
-            if (this.data.showSearch && this.data.content.where.condition) {
-                this.data.content.where.condition = '';
-                this.getList("", true);
-            } else if (this.data.condition) {
-                this.data.content.where.condition = this.data.condition;
-                this.setData({
-                    condition: this.data.condition
-                })
-                this.getList("", true);
-            }
-            this.setData({
-                showSearch: !this.data.showSearch
-            })
-            setTimeout(() => {
-                this.setData({
-                    focus: this.data.showSearch
-                })
-            }, 300)
-        },
-        onChange({
-            detail
-        }) {
-            this.data.condition = detail;
-        },
-        onSearch({
-            detail
-        }) {
-            this.data.content.where.condition = detail;
-            this.getList("", true)
-        },
-        setKeyDoctor(e) {
-            const { item } = e.currentTarget.dataset;
-            let datatag = item.tag_sys;
-            if (item.isKeyDoctor) {
-                datatag = datatag.filter(v => v != "关键人");
-            } else {
-                datatag.push("关键人");
-            }
-            _Http.basic({
-                "id": 2025110113493702,
-                "content": {
-                    "ownertable": "sa_doctor",
-                    "ownerid": item.sa_doctorid,
-                    datatag
-                }
-            }).then(res => {
-                console.log("设置关键人", res)
-                wx.showToast({
-                    title: res.code == 1 ? '设置成功' : res.data,
-                    icon: "none"
-                });
-                if (res.code != '1') return
-                const item1 = this.data.list.find(v => v.sa_doctorid == item.sa_doctorid)
-                item1.tag_sys = datatag;
-                item1.isKeyDoctor = !item1.isKeyDoctor;
-                this.setData({
-                    list: this.data.list
-                })
-            })
+    setKeyDoctor(e) {
+      const {
+        item
+      } = e.currentTarget.dataset;
+      let datatag = item.tag_sys;
+      if (item.isKeyDoctor) {
+        datatag = datatag.filter(v => v != "关键人");
+      } else {
+        datatag.push("关键人");
+      }
+      _Http.basic({
+        "id": 2025110113493702,
+        "content": {
+          "ownertable": "sa_doctor",
+          "ownerid": item.sa_doctorid,
+          datatag
         }
+      }).then(res => {
+        console.log("设置关键人", res)
+        wx.showToast({
+          title: res.code == 1 ? '设置成功' : res.data,
+          icon: "none"
+        });
+        if (res.code != '1') return
+        const item1 = this.data.list.find(v => v.sa_doctorid == item.sa_doctorid)
+        item1.tag_sys = datatag;
+        item1.isKeyDoctor = !item1.isKeyDoctor;
+        this.setData({
+          list: this.data.list
+        })
+      })
     }
+  }
 })

+ 45 - 70
prsx/hospital/Surgery/index.wxml

@@ -1,78 +1,53 @@
 <view class="head">
-	<view class="count">
-		医生
-	</view>
-	<view class="expand">
-		<van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}"
-			shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词"
-			background='#F4F5F7' />
-		<navigator url="#" class="but" bindtap="toSearch">
-			<van-icon name="search" />
-		</navigator>
-		<navigator wx:if="{{disabled}}" url="#" class="but" bindtap="insetr">
-			<van-icon name="plus" />
-		</navigator>
-	</view>
+  <view class="count">
+    预估手术量
+  </view>
+  <view class="expand">
+    <van-search wx:if="{{showSearch}}" custom-class='custom-class' focus='{{focus}}' value="{{ condition }}" shape="round" bind:change='onChange' bind:search='onSearch' bind:clear='onSearch' placeholder="搜索关键词" background='#F4F5F7' />
+    <navigator url="#" class="but" bindtap="toSearch">
+      <van-icon name="search" />
+    </navigator>
+  </view>
 </view>
-<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 class="iconfont icon-shezhijieduan" catchtap="setKeyDoctor" data-item="{{item}}">
-			{{ !item.isKeyDoctor ? '设为关键' : '取消关键'}}
-		</view>
-	</view>
+<navigator class="project-item" wx:for="{{list}}">
+  <view class="main">
+    <view class="label">
+      {{item.year}}
+    </view>
+    <view class="replenish">
+      <text style="color: #666;">预估手术总量:</text>
+      <text style="color: #3874F6;">{{item.sumqty || 0}}</text>
+    </view>
+    <view class="replenish">
+      <text style="color: #666;">备注:</text>
+      <text>{{item.remarks || '--'}}</text>
+    </view>
+
+    <view class="replenish">
+      <text>{{item.types || '--'}}</text>
+    </view>
+
+    <view class="iconfont icon-shezhijieduan" catchtap="setKeyDoctor" data-item="{{item}}">
+      {{ !item.isKeyDoctor ? '设为关键' : '取消关键'}}
+    </view>
+  </view>
 </navigator>
 <My_empty wx:if="{{list.length==0}}" />
 
 
 <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);';
-			}
-		}
-	}
+  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>

+ 2 - 1
prsx/hospital/detail.json

@@ -7,7 +7,8 @@
         "Doctors": "/prsx/hospital/Doctors/index",
         "Dealer": "/prsx/hospital/Dealer/index",
         "Department": "/prsx/hospital/Department/index",
-        "Contract": "./Contract/index"
+        "Contract": "./Contract/index",
+        "Surgery":"/prsx/hospital/Surgery/index"
     },
     "navigationBarTitleText": "医院详情"
 }

+ 1 - 0
prsx/hospital/detail.wxml

@@ -21,6 +21,7 @@
     <Address slot='地址管理' id='Address' disabled="{{(per.query(appAuth.options,'address')||isAdmin||isLeader)&& detail.status != '已终止'}}" />
     <Dealer slot='签约经销商' id='Dealer' />
     <Doctors slot='医生' id='Doctors' disabled="{{isLeader}}" />
+    <!-- <Surgery slot='预估手术量' id='Surgery' disabled="{{isLeader}}" /> -->
     <Contract slot='合同' id='Contract' />
     <Product slot='推荐产品' id='Product' disabled="{{isLeader}}" />
     <Department slot='科室' id='Department' disabled="{{isLeader}}" />