Explorar o código

标本数字交接

seimin hai 1 ano
pai
achega
32e77ffed8

+ 42 - 5
components/bigScreen/bigScreen.vue

@@ -17,6 +17,7 @@
17 17
   export default {
18 18
     data() {
19 19
       return {
20
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
20 21
         // 填写交接人工号弹窗model
21 22
         hosModels: {
22 23
           disjunctor: false,
@@ -87,11 +88,50 @@
87 88
           disjunctor: true,
88 89
         };
89 90
       },
91
+      // 标本配送-待送达-运输过程-标本数字交接,则,科室签到不需要填写交接人
92
+      validateHandoverSpecimen(){
93
+        return post("/simple/data/fetchDataList/taskType", {
94
+          "idx": 0,
95
+          "sum": 1,
96
+          "taskType": {
97
+              "hosId": {
98
+                  "id": this.hosId
99
+              },
100
+              "associationType": {
101
+                  "key": "association_types",
102
+                  "value": "specimen"
103
+              }
104
+          }
105
+        });
106
+      },
90 107
       //科室签到
91 108
       //trueBigScanner----判断是否大扫描
92 109
       //bigScanner----判断是否需要交接人
93 110
       //accountObj----弹窗填写的交接人信息
94
-      orderDeptHandler(bigScanner, accountObj) {
111
+      async orderDeptHandler(bigScanner, accountObj) {
112
+        console.log(this.infoDATA);
113
+        uni.showLoading({
114
+          title: "加载中",
115
+          mask: true,
116
+        });
117
+        if(this.tabType === 'specimen' && this.infoDATA.specimen && this.infoDATA.specimen[0].gdState.value == 5){
118
+          let result = await this.validateHandoverSpecimen();
119
+          if (result.status == 200) {
120
+            if(result.list.length){
121
+              // 标本-运送过程-终点科室-标本数字交接
122
+              if(result.list[0].carryingCourses[1].checkoutMethod.value == 3){
123
+                bigScanner = false;
124
+              }
125
+            }else{
126
+              uni.showToast({
127
+                icon: "none",
128
+                title: "请配置标本配送任务类型!",
129
+              });
130
+              uni.hideLoading();
131
+              return;
132
+            }
133
+          }
134
+        }
95 135
         let type = "orderSign/" + this.code;
96 136
         let list = {
97 137
           ids: this.userId.ids,
@@ -101,10 +141,7 @@
101 141
         if (accountObj) {
102 142
           list.handover = [accountObj.accountId];
103 143
         }
104
-        uni.showLoading({
105
-          title: "加载中",
106
-          mask: true,
107
-        });
144
+        
108 145
         post("/workerOrder/" + type, list).then((res) => {
109 146
           console.log(this.tabType)
110 147
           uni.hideLoading();

+ 10 - 1
pages.json

@@ -513,7 +513,16 @@
513 513
       }
514 514
 
515 515
     }
516
-  ],
516
+      ,{
517
+            "path" : "pages/specimenOrderComplete/specimenOrderComplete",
518
+            "style" :                                                                                    
519
+            {
520
+                "navigationBarTitleText": "",
521
+                "enablePullDownRefresh": false
522
+            }
523
+            
524
+        }
525
+    ],
517 526
   "globalStyle": {
518 527
     "navigationBarTextStyle": "black",
519 528
     "navigationBarBackgroundColor": "#F8F8F8",

+ 1 - 1
pages/receiptpage/receiptpage.vue

@@ -266,7 +266,7 @@
266 266
                 item.taskType.associationType.value != 'inspect' &&
267 267
                 item.taskType.associationType.value != 'other' &&
268 268
                 item.taskType.associationType.value != 'ordinary' &&
269
-                (item.taskType.associationType.value == 'specimen' && item.taskType.carryingCourses[1].checkoutMethod.value != 3 && item.gdState.value != 5)
269
+                !(item.taskType.associationType.value == 'specimen' && item.taskType.carryingCourses[1].checkoutMethod.value == 3 && item.gdState.value == 5)
270 270
               " hover-class="seimin-btn-hover">
271 271
               <smallScreen :sData="item" :sType="2">扫码</smallScreen>
272 272
             </view>

+ 7 - 3
pages/specimenDetail/specimenDetail.vue

@@ -31,6 +31,7 @@
31 31
   export default {
32 32
     data() {
33 33
       return {
34
+        queryObj: {},
34 35
         id: 0,
35 36
         index: 0,
36 37
         arrayKey: 0,
@@ -65,8 +66,9 @@
65 66
       // 获取检验项目
66 67
       getSpecimenDesc(){
67 68
         post(`/api/specimenDesc/specimenCount`, {
68
-          "hosId": uni.getStorageSync('userData').user.currentHospital.id,
69
-          "gdId": this.workOrderId,
69
+            "hosId": uni.getStorageSync('userData').user.currentHospital.id,
70
+            "gdId": this.workOrderId || undefined,
71
+            "speIds": this.queryObj.speIds || undefined,
70 72
           }).then((res) => {
71 73
           res.data = res.data || [];
72 74
           let array = [{ id: 0, name: '全部', total: '', nameNum: ''}];
@@ -85,7 +87,8 @@
85 87
           "idx": isAccumulate ? ++this.idx : 0,
86 88
           "sum": 20,
87 89
           "specimen": {
88
-            "gdid": this.workOrderId,
90
+            "gdid": this.workOrderId || undefined,
91
+            "speIds": this.queryObj.speIds || undefined,
89 92
             "hosId": uni.getStorageSync('userData').user.currentHospital.id,
90 93
             "specimenDesc": this.array[this.index].id ? this.array[this.index].name : undefined,
91 94
             "orderBy": 'patientNoDesc',
@@ -121,6 +124,7 @@
121 124
     },
122 125
     onLoad(options) {
123 126
       console.log(options, "标本详情");
127
+      this.queryObj = options;
124 128
       this.workOrderId = options.workOrderId;
125 129
       this.associationTypeValue = options.associationTypeValue;
126 130
       this.getList();

+ 139 - 79
pages/specimenHandoverNew/specimenHandoverNew.vue

@@ -37,10 +37,13 @@
37 37
           </view>
38 38
         </view>
39 39
         <scroll-view scroll-y="true" class="Scanning_cont_list_scroll">
40
-          <view class="Scanning_cont_list_item" @click="clickRow(item)" v-for="(item, j) in dataList" :key="item.id">
41
-            <view class="name">
40
+          <view class="Scanning_cont_list_item" @click="clickRow(item)" v-for="(item, j) in dataList" :key="j">
41
+            <view class="name" v-if="type === 'patient'">
42 42
               {{item.patientname}}
43 43
             </view>
44
+            <view class="name" v-if="type === 'checkType'">
45
+              {{item.stype}}
46
+            </view>
44 47
             <view class="value">
45 48
               <view>
46 49
                 {{item.count}}
@@ -53,14 +56,15 @@
53 56
 
54 57
     <view class="foot_btn">
55 58
       <view class="btn" @click="goBack()"> 取消 </view>
56
-      <view class="btn" @click="onClick()"> 汇总交接 </view>
59
+      <view class="btn" @click="onClick()" v-if="dataList.length"> 确认交接 </view>
57 60
     </view>
58
-    <!-- 填写数字弹窗 -->
59
-    <selectNum v-if="numModels.disjunctor" :disjunctor="numModels.disjunctor" @ok="numOk" @cancel="numCancel" :content="numModels.content" :dataName="numModels.dataName">
60
-    </selectNum>
61
+    <!-- 填写交接人工号弹窗 -->
62
+    <selectAccount @click.stop.native v-if="hosModels.disjunctor" :disjunctor="hosModels.disjunctor" @ok="hosOk"
63
+      @cancel="hosCancel" :content="hosModels.content">
64
+    </selectAccount>
61 65
     <!-- 弹窗 -->
62
-    <showModel :title="models1.title" :icon="models1.icon" :disjunctor="models1.disjunctor" :content="models1.content"
63
-      @ok="ok1" @cancel="cancel1" :operate="models1.operate"></showModel>
66
+    <showModel :title="models.title" :icon="models.icon" :disjunctor="models.disjunctor" :content="models.content"
67
+      @ok="ok" @cancel="cancel" :operate="models.operate"></showModel>
64 68
   </view>
65 69
 </template>
66 70
 <script>
@@ -76,10 +80,6 @@
76 80
         hosId: uni.getStorageSync('userData').user.currentHospital.id,
77 81
         type: 'patient',//patient|checkType
78 82
         queryObj: {}, //路由传递过来的数据
79
-        // 填写数字弹窗model
80
-        numModels: {
81
-          disjunctor: false,
82
-        },
83 83
         typeList: {
84 84
           "patient": {
85 85
             id: -1,
@@ -95,72 +95,69 @@
95 95
           }
96 96
         },
97 97
         dataList: [],
98
-        coopData: {},
98
+        // 填写交接人工号弹窗model
99
+        hosModels: {
100
+          disjunctor: false,
101
+        },
99 102
         // 弹窗model
100
-        models1: {
103
+        models: {
101 104
           disjunctor: false,
102 105
         },
103 106
       };
104 107
     },
105 108
     methods: {
106
-      goBack(){
107
-        uni.navigateBack();
108
-      },
109
-      clickTab(key){
110
-        this.type = key;
111
-        this.initData();
112
-      },
113
-      //确定
114
-      ok1() {
115
-        this.models1.disjunctor = false;
116
-        let bussList = this.dataList.map(v => v.children).flat().map(v => v.clothesWashingDTO).map(v => ({...v, exception: 0}));
109
+      ok(){
110
+        this.models.disjunctor = false;
117 111
         uni.showLoading({
118 112
           title: "加载中",
119 113
           mask: true,
120 114
         });
121
-        post("/transflow/createOrTakeOrder", {
122
-          type: 'clothingGet',
123
-          id: 0,
124
-          startDeptId: this.queryObj.startDeptId,
125
-          hosId: this.hosId,
126
-          bussList,
127
-          orderId: this.queryObj.orderId,
128
-        }).then((res) => {
129
-          uni.hideLoading();
130
-          if (res.state == 200) {
131
-            uni.showModal({
132
-              title: "提示",
133
-              content: "交接成功",
134
-              showCancel: false,
135
-              success: (result) => {
136
-                if (result.confirm) {
137
-                  console.log("用户点击确定");
138
-                  uni.navigateTo({
139
-                    url: `/pages/receiptpage/receiptpage`,
140
-                  });
141
-                }
115
+        post("/simple/data/fetchDataList/taskType", {
116
+          "idx": 0,
117
+          "sum": 1,
118
+          "taskType": {
119
+              "hosId": {
120
+                  "id": this.hosId
142 121
               },
143
-            });
144
-          }else{
122
+              "associationType": {
123
+                  "key": "association_types",
124
+                  "value": "specimen"
125
+              }
126
+          }
127
+        }).then((result) => {
128
+          uni.hideLoading();
129
+          if (result.status == 200) {
130
+            if(result.list.length){
131
+              // 标本-运送过程-终点科室-是否填写交接人
132
+              if(result.list[0].carryingCourses[1].handoverSwitch){
133
+                this.showSelectAccount();
134
+              }else{
135
+                this.orderDeptHandler();
136
+              }
137
+            }else{
138
+              uni.showToast({
139
+                icon: "none",
140
+                title: "请配置标本配送任务类型!",
141
+              });
142
+            }
143
+          } else {
145 144
             uni.showToast({
146 145
               icon: "none",
147
-              title: res.msg || "接口获取数据失败!",
146
+              title: result.msg || "接口获取数据失败!",
148 147
             });
149 148
           }
150 149
         });
151 150
       },
152
-      //取消
153
-      cancel1() {
154
-        this.models1.disjunctor = false;
151
+      // 取消
152
+      cancel() {
153
+        this.models.disjunctor = false;
155 154
       },
156
-      // 被服回收弹窗
157
-      showModel1() {
158
-        let bussList = this.dataList.map(v => v.children).flat();
159
-        let num = bussList.reduce((prev, current) => prev + current.clothesWashingDTO.recyclingNum, 0);
160
-        this.models1 = {
155
+      //核对完成
156
+      allStart() {
157
+        this.models = {
161 158
           disjunctor: true,
162 159
           title: "提示",
163
-          content: `<strong class="red">${this.queryObj.startDeptName}</strong>已与<strong class="red">${this.queryObj.name}</strong>交接<strong class="red">${num}件</strong>被服,交接人为<strong class="red">${this.queryObj.name}</strong>,您确认交接吗?`,
160
+          content: "是否确定交接?",
164 161
           icon: "warn",
165 162
           operate: {
166 163
             ok: "确定",
@@ -168,32 +165,95 @@
168 165
           },
169 166
         };
170 167
       },
171
-      // 填写数量-确认
172
-      numOk(data) {
168
+      // 填写交接人工号-确认
169
+      hosOk(data) {
173 170
         console.log(data);
174
-        this.numModels.disjunctor = false;
175
-        this.updateNum(data);
176
-      },
177
-      // 填写数量-取消
178
-      numCancel() {
179
-        this.numModels.disjunctor = false;
171
+        const {
172
+          accountName,
173
+          account,
174
+          accountId
175
+        } = data;
176
+        if (!accountName && !account) {
177
+          //没有填写交接人
178
+          uni.showModal({
179
+            title: "提示",
180
+            content: "请填写交接人工号!",
181
+            showCancel: false,
182
+            success: function(res) {
183
+              if (res.confirm) {
184
+                console.log("用户点击确定");
185
+              } else if (res.cancel) {
186
+                console.log("用户点击取消");
187
+              }
188
+            },
189
+          });
190
+          return;
191
+        } else if ((!accountName && account) || (accountName && !account)) {
192
+          //没有填写交接人
193
+          uni.showModal({
194
+            title: "提示",
195
+            content: "请填写正确的交接人工号!",
196
+            showCancel: false,
197
+            success: function(res) {
198
+              if (res.confirm) {
199
+                console.log("用户点击确定");
200
+              } else if (res.cancel) {
201
+                console.log("用户点击取消");
202
+              }
203
+            },
204
+          });
205
+          return;
206
+        }
207
+        this.hosModels.disjunctor = false;
208
+        this.orderDeptHandler(data);
180 209
       },
181
-      onClick(){
182
-        this.showModel1();
210
+      // 填写交接人工号-取消
211
+      hosCancel() {
212
+        this.hosModels.disjunctor = false;
183 213
       },
184
-      clickRow(data){
185
-        this.coopData = data;
186
-        this.numModels = {
214
+      // 填写交接人工号弹窗
215
+      showSelectAccount() {
216
+        this.hosModels = {
217
+          content: '确定交接完成,请输入交接人员工号',
187 218
           disjunctor: true,
188
-          content: `请输入被服数量`,
189
-          dataName: data.name,
190 219
         };
191 220
       },
192
-      updateNum(data){
193
-        this.dataList.children.forEach(v => {
194
-          if(v.id == this.coopData.id){
195
-            v.clothesWashingDTO && (v.clothesWashingDTO.recyclingNum = data.num);
221
+      orderDeptHandler(accountObj){
222
+        uni.showLoading({
223
+          title: "加载中",
224
+          mask: true,
225
+        });
226
+        post("/workerOrder/ordersSpeSign", {
227
+          deptId: this.queryObj.deptId,
228
+          orderIds: JSON.parse(this.queryObj.ids).toString(),
229
+          handover: accountObj ? accountObj.accountId : undefined
230
+        }).then((result) => {
231
+          uni.hideLoading();
232
+          if (result.state == 200) {
233
+            uni.navigateTo({
234
+              url: `/pages/specimenOrderComplete/specimenOrderComplete?deptName=${this.queryObj.dept}&ids=${this.queryObj.ids}`
235
+            })
236
+          } else {
237
+            uni.showToast({
238
+              icon: "none",
239
+              title: result.msg || "接口获取数据失败!",
240
+            });
196 241
           }
242
+        });
243
+      },
244
+      goBack(){
245
+        uni.navigateBack();
246
+      },
247
+      clickTab(key){
248
+        this.type = key;
249
+        this.initData();
250
+      },
251
+      onClick(){
252
+        this.allStart();
253
+      },
254
+      clickRow(data){
255
+        uni.navigateTo({
256
+          url: `/pages/specimenDetail/specimenDetail?speIds=${data.ids || ''}`
197 257
         })
198 258
       },
199 259
       getInfo(type){
@@ -208,8 +268,8 @@
208 268
         }).then((result) => {
209 269
           uni.hideLoading();
210 270
           if (result.state == 200) {
211
-            this.typeList[type].count = result.count;
212
-            this.typeList[type].titleCount = result.title;
271
+            this.typeList[type].count = result.count || 0;
272
+            this.typeList[type].titleCount = result.title || 0;
213 273
             if(this.type === type){
214 274
               this.dataList = result.data || [];
215 275
             }

+ 216 - 0
pages/specimenOrderComplete/specimenOrderComplete.vue

@@ -0,0 +1,216 @@
1
+<template>
2
+  <view class="Scanning_Result">
3
+    <view class="Scanning_top">
4
+      <view class="Scanning_top_icon">
5
+        <text class="cubeic-ok icon_transport transport-duigou"></text>
6
+      </view>
7
+      <view class="Scanning_top_text">
8
+        <view class="text1"> 交接成功 </view>
9
+      </view>
10
+    </view>
11
+
12
+    <view class="Scanning_cont">
13
+      <view>您已到达{{queryObj.deptName}},请核对以下数量</view>
14
+      <view class="table_head">
15
+        <view>科室</view>
16
+        <view>是否配送完成</view>
17
+      </view>
18
+      <view class="table_bodys">
19
+        <view class="table_body" v-for="(item, index) in dataList" :key="index">
20
+          <view>{{item.dept}}</view>
21
+          <view :class="{red: item.all != item.complete}">{{item.all == item.complete ? '是' : '否'}}</view>
22
+        </view>
23
+      </view>
24
+    </view>
25
+
26
+    <view class="foot_btn_spe">
27
+      <view class="btn3" @click="goIndex()">知道了</view>
28
+    </view>
29
+  </view>
30
+</template>
31
+<script>
32
+  import {
33
+    get,
34
+    post,
35
+    SM,
36
+    webHandle
37
+  } from "@/http/http.js";
38
+  export default {
39
+    data() {
40
+      return {
41
+        orderIds: '',
42
+        bloodIds: '',
43
+        hosId: uni.getStorageSync('userData').user.currentHospital.id,
44
+        dataList: [],
45
+        queryObj: {}, //路由传递过来的数据
46
+      };
47
+    },
48
+    methods: {
49
+      
50
+      // 知道了
51
+      goIndex() {
52
+        uni.navigateTo({
53
+          url: `/pages/receiptpage/receiptpage`
54
+        })
55
+      },
56
+      //获取页面信息
57
+      getInfo(){
58
+        uni.showLoading({
59
+          title: "加载中",
60
+          mask: true,
61
+        });
62
+        post('/workerOrder/ordersSpeSignDeptInfo', {
63
+          "orderIds": JSON.parse(this.queryObj.ids).toString(),
64
+        }).then(res => {
65
+          uni.hideLoading();
66
+          if(res.state == 200){
67
+            this.dataList = res.data || [];
68
+          }else{
69
+            uni.showToast({
70
+              icon: "none",
71
+              title: res.msg || "接口获取数据失败!",
72
+            });
73
+          }
74
+        })
75
+      },
76
+
77
+    },
78
+    onLoad(options) {
79
+      console.log(options, "result");
80
+      this.queryObj = options;
81
+      this.getInfo();
82
+      // #ifdef APP-PLUS
83
+      webHandle("no", "app");
84
+      // #endif
85
+      // #ifdef H5
86
+      webHandle("no", "wx");
87
+      // #endif
88
+    },
89
+    // 监听自定义事件并进行页面刷新操作
90
+    onShow() {
91
+      uni.$on('refresh', (data) => {
92
+        if (data.refresh) {
93
+            // 刷新操作
94
+          this.getInfo();
95
+        }
96
+      });
97
+    },
98
+    onUnload() {
99
+      uni.$off('refresh'); // 需要手动解绑自定义事件
100
+    }
101
+  };
102
+</script>
103
+<style lang="less" scoped>
104
+  .Scanning_Result {
105
+    padding: 0 20rpx;
106
+    display: flex;
107
+    flex-direction: column;
108
+    height: 100vh;
109
+
110
+    .Scanning_top {
111
+      .Scanning_top_icon {
112
+        width: 140rpx;
113
+        height: 140rpx;
114
+        margin: 50rpx auto 40rpx;
115
+        border-radius: 50%;
116
+
117
+        .speNum{
118
+          text-align: center;
119
+          font-size: 140rpx;
120
+        }
121
+
122
+        .cubeic-ok {
123
+          font-size: 140rpx;
124
+          color: #35b34a;
125
+        }
126
+
127
+        .cubeic-close {
128
+          font-size: 140rpx;
129
+          color: #ff3b53;
130
+        }
131
+      }
132
+
133
+      .Scanning_top_text {
134
+        .text1 {
135
+          font-size: 48rpx;
136
+          text-align: center;
137
+        }
138
+
139
+        .success_tips {
140
+          color: red;
141
+          font-size: 30rpx;
142
+        }
143
+      }
144
+    }
145
+
146
+    .Scanning_cont {
147
+      flex: 1;
148
+      text-align: center;
149
+      display: flex;
150
+      flex-direction: column;
151
+
152
+      .table_bodys{
153
+        overflow-y: auto;
154
+        flex: 1;
155
+      }
156
+
157
+      .table_head{
158
+        display: flex;
159
+        margin-top: 50rpx;
160
+        .ml16{
161
+          margin-left: 16rpx;
162
+        }
163
+
164
+        view {
165
+          height: 110rpx;
166
+          line-height: 1;
167
+          flex: 1;
168
+          font-weight: bold;
169
+          color: #000;
170
+          font-size: 38rpx;
171
+          display: flex;
172
+          justify-content: center;
173
+          align-items: center;
174
+        }
175
+      }
176
+
177
+      .table_body{
178
+        background: #F3FAF7;
179
+        border-radius: 8px;
180
+        border: 1px solid #E9E9E9;
181
+        display: flex;
182
+        margin-bottom: 20rpx;
183
+        padding: 30rpx 20rpx;
184
+        view {
185
+          line-height: 1;
186
+          flex: 1;
187
+          color: #555;
188
+          font-size: 38rpx;
189
+          display: flex;
190
+          justify-content: center;
191
+          align-items: center;
192
+          word-break: break-all;
193
+        }
194
+      }
195
+    }
196
+
197
+    .foot_btn_spe {
198
+      line-height: 64rpx;
199
+      height: 64rpx;
200
+      margin-bottom: 40rpx;
201
+      text-align: center;
202
+      display: flex;
203
+      justify-content: space-between;
204
+
205
+      view {
206
+        height: 64rpx;
207
+        flex: 1;
208
+        margin: 0 1%;
209
+        background-image: linear-gradient(to right, #72c172, #3bb197);
210
+        color: #fff;
211
+        border-radius: 8rpx;
212
+        font-size: 26rpx;
213
+      }
214
+    }
215
+  }
216
+</style>