seimin 1 month ago
parent
commit
fa9775e9da

+ 19 - 5
components/mehaotian-search-revision/mehaotian-search-revision.vue

@@ -5,13 +5,17 @@
5 5
       <view class="content-box" :class="{'center':mode === 2}">
6 6
         <text class="icon icon-serach"></text>
7 7
         <!-- HM修改 增加placeholder input confirm-type confirm-->
8
-        <input :placeholder="placeholder" @input="inputChange" confirm-type="search" @confirm="triggerConfirm" class="input"
9
-          :class="{'center':!active && mode === 2}" :focus="isFocus" v-model="inputVal" @focus="focus" @blur="blur" />
8
+        <input :placeholder="placeholder" @input="inputChange" confirm-type="search" @confirm="triggerConfirm" class="input" :focus="isFocus" v-model="inputVal" @focus="focus" @blur="blur" />
10 9
         <!-- HM修改 @click换成@click.stop阻止冒泡 -->
11 10
         <text v-if="isDelShow" class="icon icon-del" @click.stop="clear"></text>
12 11
       </view>
13
-      <view v-show="(active&&show&&button === 'inside')||(isDelShow && button === 'inside')" class="serachBtn" @click="search">
14
-        搜索
12
+      <view v-show="button === 'inside'" class="serachBtn" @click="search">
13
+        <template v-if="searchButtonType == 'text'">
14
+          {{searchButtonName}}
15
+        </template>
16
+        <template v-else-if="searchButtonType == 'icon'">
17
+          <text class="newicon" :class="searchButtonName"></text>
18
+        </template>
15 19
       </view>
16 20
     </view>
17 21
     <view v-if="button === 'outside'" class="button" :class="{'active':show||active}" @click="search">
@@ -23,6 +27,14 @@
23 27
 <script>
24 28
   export default {
25 29
     props: {
30
+      searchButtonType: {
31
+        value: String,
32
+        default: 'text'
33
+      },
34
+      searchButtonName: {
35
+        value: String,
36
+        default: '搜索'
37
+      },
26 38
       mode: {
27 39
         value: Number,
28 40
         default: 1
@@ -112,7 +124,9 @@
112 124
           }
113 125
         }
114 126
         console.log(this.inputVal);
115
-        // this.$emit('search', this.inputVal ? this.inputVal : this.placeholder);
127
+        if(this.searchButtonType == 'icon'){
128
+          this.$emit('search', this.inputVal || '');
129
+        }
116 130
       }
117 131
     },
118 132
     watch: {

+ 7 - 0
package-lock.json

@@ -14,6 +14,7 @@
14 14
         "crypto-js": "^4.1.1",
15 15
         "dayjs": "^1.11.10",
16 16
         "js-base64": "^2.6.4",
17
+        "lodash-es": "^4.17.21",
17 18
         "spinkit": "^2.0.1",
18 19
         "weixin-jsapi": "^1.1.0"
19 20
       },
@@ -255,6 +256,12 @@
255 256
       "resolved": "https://registry.npmmirror.com/js-base64/-/js-base64-2.6.4.tgz",
256 257
       "integrity": "sha512-pZe//GGmwJndub7ZghVHz7vjb2LgC1m8B07Au3eYqeqv9emhESByMXxaEgkUkEqJe87oBbSniGYoQNIBklc7IQ=="
257 258
     },
259
+    "node_modules/lodash-es": {
260
+      "version": "4.17.21",
261
+      "resolved": "https://registry.npmmirror.com/lodash-es/-/lodash-es-4.17.21.tgz",
262
+      "integrity": "sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==",
263
+      "license": "MIT"
264
+    },
258 265
     "node_modules/minimatch": {
259 266
       "version": "3.1.2",
260 267
       "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",

+ 1 - 0
package.json

@@ -19,6 +19,7 @@
19 19
     "crypto-js": "^4.1.1",
20 20
     "dayjs": "^1.11.10",
21 21
     "js-base64": "^2.6.4",
22
+    "lodash-es": "^4.17.21",
22 23
     "spinkit": "^2.0.1",
23 24
     "weixin-jsapi": "^1.1.0"
24 25
   },

+ 16 - 0
pages.json

@@ -720,6 +720,22 @@
720 720
           "titleNView": false
721 721
         }
722 722
       }
723
+    },
724
+    {
725
+      "path": "pages/transferWorkOrder/transferWorkOrderUser", //工单转派-选人员
726
+      "style": {
727
+        "h5": {
728
+          "titleNView": false
729
+        }
730
+      }
731
+    },
732
+    {
733
+      "path": "pages/transferWorkOrder/transferWorkOrderPatient", //工单转派-选患者
734
+      "style": {
735
+        "h5": {
736
+          "titleNView": false
737
+        }
738
+      }
723 739
     }
724 740
   ],
725 741
   "globalStyle": {

+ 1 - 1
pages/receipt_infopage/receipt_infopage.vue

@@ -556,7 +556,7 @@
556 556
         });
557 557
         post("/patient/patientHandover", {
558 558
           id: this.patientHandoverCode.id,
559
-          patientCode: this.patientHandoverData.patient.patientCode,
559
+          patientCodes: this.patientHandoverData.patient.patientCode,
560 560
         }).then((result) => {
561 561
           this.models2.disjunctor = false;
562 562
           if (result.state == 200) {

+ 17 - 1
pages/receiptpage/receiptpage.vue

@@ -124,6 +124,10 @@
124 124
                   携带设备 :
125 125
                   <text>{{ item.goods || "暂无" }}</text>
126 126
                 </view>
127
+                <view v-if="item.inspectScore">
128
+                  陪检方式 :
129
+                  <text>{{ item.inspectScore ? item.inspectScore.inspectMode : "暂无" }}</text>
130
+                </view>
127 131
                 <view style="word-break: break-all;" v-if="item.workOrderRemark">
128 132
                   注意事项 :
129 133
                   <text>{{ item.workOrderRemark || "" }}</text>
@@ -168,6 +172,10 @@
168 172
                   携带设备 :
169 173
                   <text>{{ item.goods || "暂无" }}</text>
170 174
                 </view>
175
+                <view v-if="item.inspectScore">
176
+                  陪检方式 :
177
+                  <text>{{ item.inspectScore ? item.inspectScore.inspectMode : "暂无" }}</text>
178
+                </view>
171 179
                 <view style="word-break: break-all;" v-if="item.workOrderRemark">
172 180
                   注意事项 :
173 181
                   <text>{{ item.workOrderRemark || "暂无" }}</text>
@@ -1208,7 +1216,7 @@
1208 1216
 			    title: "加载中",
1209 1217
 			    mask: true,
1210 1218
 			  });
1211
-			
1219
+
1212 1220
 			  post(`/transflow/scanInfo`, {type: responeseData.drugsBagType.value, id: responeseData.id, orderStateValue: gdValue}).then(res => {
1213 1221
 			    uni.hideLoading();
1214 1222
 			    if(res.state == 200){
@@ -1729,6 +1737,10 @@
1729 1737
             this.content.push({
1730 1738
               text: "被服回收",
1731 1739
             });
1740
+          } else if (item.link === "transferWorkOrder") {
1741
+            this.content.push({
1742
+              text: "患者交接",
1743
+            });
1732 1744
           }
1733 1745
         });
1734 1746
       },
@@ -2191,6 +2203,10 @@
2191 2203
           uni.navigateTo({
2192 2204
             url: "/pages/medicalWaste/medicalWasteSelect/medicalWasteSelect",
2193 2205
           });
2206
+        } else if (e.item.text === "患者交接") {
2207
+          uni.navigateTo({
2208
+            url: "/pages/transferWorkOrder/transferWorkOrderUser",
2209
+          });
2194 2210
         }
2195 2211
       },
2196 2212
       //确定

+ 204 - 0
pages/transferWorkOrder/transferWorkOrderPatient.vue

@@ -0,0 +1,204 @@
1
+<template>
2
+  <view class="transferWorkOrder">
3
+    <mSearch class="search" :mode="2" button="inside" placeholder="请搜索患者名称、住院号" v-model="keyword"></mSearch>
4
+    <scroll-view scroll-y class="list">
5
+      <view class="item tac"><text class="green">接收人:</text>{{userDTO.name}}({{userDTO.account}})</view>
6
+      <view class="item" v-for="item in listComputed" :key="item.id" @click="selectItem(item)">
7
+        <view>{{item.patientName}}({{item.residenceNo}})</view>
8
+        <view><checkbox color="#49B856" value="item.id" :checked="item.checked" /></view>
9
+      </view>
10
+    </scroll-view >
11
+    <view class="footer">
12
+      <view class="btn gray" hover-class="seimin-btn-hover" @click="goBack()">切换人员</view>
13
+      <view class="btn" hover-class="seimin-btn-hover" @click="submit()">提交</view>
14
+    </view>
15
+    
16
+    <!-- 弹窗 -->
17
+    <!-- 弹窗 -->
18
+    <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content" :operate="models1.operate" @ok="ok1" @cancel="cancel1"></showModel>
19
+  </view>
20
+</template>
21
+
22
+<script>
23
+  import { get, post, SM, webHandle } from "../../http/http.js";
24
+  import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
25
+  export default {
26
+    onLoad(options) {
27
+      console.log('options', options);
28
+      this.options = options || {};
29
+      this.userDTO = { id: +this.options.userId, name: this.options.userName, account: this.options.userAccount };
30
+      this.getList();
31
+    },
32
+    components: {
33
+      //引用mSearch组件,如不需要删除即可
34
+      mSearch,
35
+    },
36
+    data() {
37
+      return {
38
+        keyword: '',
39
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
40
+        list: [],
41
+        options: {},
42
+        userDTO: {},
43
+        // 弹窗model1
44
+        models1: {
45
+          disjunctor: false,
46
+        },
47
+      };
48
+    },
49
+    computed: {
50
+      listComputed() {
51
+        if(this.keyword){
52
+          return this.list.filter( v => v.patientName.includes(this.keyword) || v.residenceNo.includes(this.keyword))
53
+        }else{
54
+          return this.list;
55
+        }
56
+      }
57
+    },
58
+    methods:{
59
+      submit(){
60
+        let patientList = this.listComputed.filter(v => v.checked);
61
+        if(!patientList.length){
62
+          uni.showToast({
63
+            icon: "none",
64
+            title: "请选择患者!",
65
+          });
66
+          return;
67
+        }
68
+        this.models1 = {
69
+          disjunctor: true,
70
+          content: `您确认将<b style='color:red'>${patientList.map(v => v.patientName).join('、')}</b>相关陪检任务转交给<b style='color:red'>${this.userDTO.name}</b>吗`,
71
+          icon: "warn",
72
+          operate: {
73
+            ok: "确定",
74
+            cancel: "取消",
75
+          },
76
+        };
77
+      },
78
+      // 确定
79
+      ok1() {
80
+        this.models1.disjunctor = false;
81
+        uni.showLoading({
82
+          title: "加载中",
83
+          mask: true,
84
+        });
85
+        post("/patient/patientHandover", {
86
+          id: this.userDTO.id,
87
+          patientCodes: this.listComputed.filter(v => v.checked).map(v => v.patientCode).toString(),
88
+        }).then((result) => {
89
+          uni.hideLoading();
90
+          if (result.state == 200) {
91
+            uni.showToast({
92
+              icon: "none",
93
+              mask: true,
94
+              title: "交接成功!",
95
+            });
96
+            setTimeout(() => {
97
+              uni.navigateTo({
98
+                url: `/pages/receiptpage/receiptpage`,
99
+              });
100
+            },300)
101
+          } else {
102
+            uni.showToast({
103
+              icon: "none",
104
+              title: result.msg || "接口获取数据失败!",
105
+            });
106
+          }
107
+        });
108
+      },
109
+      // 取消
110
+      cancel1() {
111
+        this.models1.disjunctor = false;
112
+      },
113
+      goBack() {
114
+        uni.navigateBack();
115
+      },
116
+      selectItem(patient){
117
+        this.list.forEach(v => {
118
+          if(v.id === patient.id){
119
+            v.checked ? this.$set(v, 'checked', false) : this.$set(v, 'checked', true)
120
+          }
121
+        })
122
+      },
123
+      getList(keyword){
124
+        uni.showLoading({
125
+          title: "加载中",
126
+        });
127
+        post("/nurse/patientInspect/getUserOrderPatient", {}).then((result) => {
128
+          uni.hideLoading();
129
+          if (result.status == 200) {
130
+            this.list = result.list || [];
131
+          } else {
132
+            uni.showToast({
133
+              icon: "none",
134
+              title: result.msg || "接口获取数据失败!",
135
+            });
136
+          }
137
+        });
138
+      },
139
+    }
140
+  }
141
+</script>
142
+
143
+<style lang="less" scoped>
144
+.transferWorkOrder{
145
+  width: 100%;
146
+  height: 100vh;
147
+  display: flex;
148
+  flex-direction: column;
149
+  /deep/ uni-checkbox:not([disabled]) .uni-checkbox-input:hover{
150
+    border-color: #49B856!important;
151
+  }
152
+  .green{
153
+    color: #49B856;
154
+    font-size: 24rpx;
155
+  }
156
+  .search{
157
+    padding: 10rpx 24rpx;
158
+  }
159
+  .list{
160
+    flex: 1;
161
+    min-height: 0;
162
+    background-color: #fff;
163
+    .item{
164
+      height: 100rpx;
165
+      line-height: 100rpx;
166
+      font-size: 26rpx;
167
+      border-bottom: 1rpx solid #D5D5D5;
168
+      padding: 0 32rpx;
169
+      display: flex;
170
+      align-items: center;
171
+      justify-content: space-between;
172
+      &.tac{
173
+        justify-content: center;
174
+      }
175
+    }
176
+  }
177
+  .footer{
178
+    margin-top: 24rpx;
179
+    margin-bottom: 24rpx;
180
+    line-height: 80rpx;
181
+    height: 80rpx;
182
+    background: #fff;
183
+    display: flex;
184
+    align-items: center;
185
+    .btn {
186
+      height: 80rpx;
187
+      flex: 1;
188
+      margin: 0 24rpx 0 0;
189
+      background-color: #49B856;
190
+      color: #fff;
191
+      border-radius: 8rpx;
192
+      font-size: 34rpx;
193
+      text-align: center;
194
+      &:first-of-type{
195
+        margin-left: 24rpx;
196
+      }
197
+      &.gray{
198
+        background-color: #8F939C;
199
+      }
200
+    }
201
+  }
202
+}
203
+
204
+</style>

+ 196 - 0
pages/transferWorkOrder/transferWorkOrderUser.vue

@@ -0,0 +1,196 @@
1
+<template>
2
+  <view class="transferWorkOrder">
3
+    <mSearch class="search" :mode="2" button="inside" placeholder="请搜索人员名称、工号" @input="changeInp" @search="doSearch()" v-model="keyword" searchButtonType="icon" searchButtonName="newicon-saoma"></mSearch>
4
+    <scroll-view scroll-y class="list">
5
+      <view class="item" v-for="item in list" :key="item.id" @click="selectItem(item)">{{item.name}}({{item.account}})</view>
6
+    </scroll-view >
7
+      <view class="footer">
8
+        <view class="btn" hover-class="seimin-btn-hover" @click="goBack()">返回</view>
9
+      </view>
10
+  </view>
11
+</template>
12
+
13
+<script>
14
+  import { get, post, SM, webHandle } from "../../http/http.js";
15
+  import debounce from 'lodash-es/debounce'
16
+  import mSearch from "@/components/mehaotian-search-revision/mehaotian-search-revision.vue";
17
+  export default {
18
+    onLoad(options) {
19
+      console.log('options', options);
20
+      this.getList();
21
+    },
22
+    onShow() {
23
+      this.SMFlag = true;
24
+    },
25
+    components: {
26
+      //引用mSearch组件,如不需要删除即可
27
+      mSearch,
28
+    },
29
+    data() {
30
+      return {
31
+        keyword: '',
32
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
33
+        list: [],
34
+        SMFlag: true,
35
+      };
36
+    },
37
+    methods:{
38
+      goBack() {
39
+        uni.navigateBack();
40
+      },
41
+      //防抖搜索
42
+      changeInp(event) {
43
+        this.inputChange(event);
44
+      },
45
+      //监听输入
46
+      inputChange(event) {
47
+        let keyword = event.detail ? event.detail.value : event;
48
+        this.handleSearch(keyword);
49
+      },
50
+      doSearch(){
51
+        // 扫码
52
+        if (!this.SMFlag) {
53
+          return;
54
+        }
55
+        this.SMFlag = false;
56
+        SM().then((content) => {
57
+          this.scanQrcode(content);
58
+        }).catch(err => {
59
+          this.SMFlag = true;
60
+        });
61
+      },
62
+      //扫码
63
+      scanQrcode(content){
64
+        let userHandoverCode = '';
65
+        uni.showLoading({
66
+          title: "加载中",
67
+          mask: true,
68
+        });
69
+        //检验二维码的有效性(扫码前必须验证)
70
+        post("/dept/scanning", {
71
+            content,
72
+          })
73
+          .then((result) => {
74
+            try{
75
+              userHandoverCode = JSON.parse(result.code);
76
+            }catch(e){
77
+              userHandoverCode = '';
78
+            }
79
+        
80
+            this.SMFlag = true;
81
+            uni.hideLoading();
82
+            // 200检测通过,201没有有效期也通过。
83
+            if (result.state == 200 || result.state == 201) {
84
+              if(Object.prototype.toString.call(userHandoverCode) === '[object Object]' && userHandoverCode.name){
85
+                uni.redirectTo({
86
+                  url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${userHandoverCode.id}&userName=${userHandoverCode.name}&userAccount=${userHandoverCode.account}`,
87
+                });
88
+              }else{
89
+                uni.showToast({
90
+                  icon: "none",
91
+                  title: "请扫描正确的二维码!",
92
+                });
93
+              }
94
+            } else {
95
+              uni.hideLoading();
96
+              uni.showToast({
97
+                icon: "none",
98
+                title: result.info || "接口获取数据失败!",
99
+              });
100
+            }
101
+          })
102
+      },
103
+      selectItem(user){
104
+        // let userList = uni.getStorageSync('transferWorkOrderUserList') || [];
105
+        // // 移除
106
+        // userList = userList.filter(v => v.id != user.id);
107
+        // // 添加
108
+        // userList = [user, ...userList];
109
+        // userList = userList.map(v => ({...v, timeStamp: +new Date()}))
110
+        // uni.setStorageSync('transferWorkOrderUserList', userList);
111
+        
112
+        uni.redirectTo({
113
+          url: `/pages/transferWorkOrder/transferWorkOrderPatient?userId=${user.id}&userName=${user.name}&userAccount=${user.account}`,
114
+        });
115
+      },
116
+      handleSearch: debounce(function(keyword) {
117
+        this.getList(keyword);
118
+      }, 500),
119
+      getList(keyword){
120
+        // if(!keyword){
121
+        //   let userList = uni.getStorageSync('transferWorkOrderUserList') || [];
122
+        //   userList = userList.filter(v => +new Date() - v.timeStamp < 4 * 60 * 60 * 1000);//4小时内选择过的用户
123
+        //   uni.setStorageSync('transferWorkOrderUserList', userList);
124
+        //   this.list = userList;
125
+        //   return;
126
+        // }
127
+        uni.showLoading({
128
+          title: "加载中",
129
+        });
130
+        post("/simple/data/fetchDataList/user", {
131
+          idx: 0,
132
+          sum: 25,
133
+          user: {
134
+            hosId: this.hosId,
135
+            name: keyword || undefined,
136
+            online: true,
137
+          }
138
+        }).then((result) => {
139
+          uni.hideLoading();
140
+          if (result.status == 200) {
141
+            this.list = result.list || [];
142
+          } else {
143
+            uni.showToast({
144
+              icon: "none",
145
+              title: result.msg || "接口获取数据失败!",
146
+            });
147
+          }
148
+        });
149
+      },
150
+    }
151
+  }
152
+</script>
153
+
154
+<style lang="less" scoped>
155
+.transferWorkOrder{
156
+  width: 100%;
157
+  height: 100vh;
158
+  display: flex;
159
+  flex-direction: column;
160
+  .search{
161
+    padding: 10rpx 24rpx;
162
+  }
163
+  .list{
164
+    flex: 1;
165
+    min-height: 0;
166
+    background-color: #fff;
167
+    .item{
168
+      height: 100rpx;
169
+      line-height: 100rpx;
170
+      text-align: center;
171
+      font-size: 26rpx;
172
+      border-bottom: 1rpx solid #D5D5D5;
173
+    }
174
+  }
175
+  .footer{
176
+    margin-top: 24rpx;
177
+    margin-bottom: 24rpx;
178
+    line-height: 80rpx;
179
+    height: 80rpx;
180
+    background: #fff;
181
+    display: flex;
182
+    align-items: center;
183
+    .btn {
184
+      height: 80rpx;
185
+      flex: 1;
186
+      margin: 0 24rpx;
187
+      background-color: #49B856;
188
+      color: #fff;
189
+      border-radius: 8rpx;
190
+      font-size: 34rpx;
191
+      text-align: center;
192
+    }
193
+  }
194
+}
195
+
196
+</style>