Quellcode durchsuchen

患者一键建单-暂存

seimin vor 3 Jahren
Ursprung
Commit
bae1dc9b09

+ 1 - 3
pages/patientDetail/patientDetail.vue

@@ -187,9 +187,7 @@
187
           name: "一键建单",
187
           name: "一键建单",
188
           type: "default",
188
           type: "default",
189
           click: () => {
189
           click: () => {
190
-            uni.navigateTo({
191
-              url: "/pages/patientList/patientList",
192
-            });
190
+            // wocao
193
           },
191
           },
194
         }],
192
         }],
195
       };
193
       };

+ 113 - 1
pages/patientList/patientList.vue

@@ -31,13 +31,17 @@
31
           </view>
31
           </view>
32
           <view class="orderList_listItem_item_btns">
32
           <view class="orderList_listItem_item_btns">
33
             <button type="primary" class="btn" @click.stop="toDetail(patient.patientCode)">患者详情</button>
33
             <button type="primary" class="btn" @click.stop="toDetail(patient.patientCode)">患者详情</button>
34
-            <button type="primary" class="btn" @click.stop="openRecallModal(patient.id)">一键建单</button>
34
+            <button type="primary" class="btn" @click.stop="buildOrder(patient)">一键建单</button>
35
           </view>
35
           </view>
36
         </view>
36
         </view>
37
       </view>
37
       </view>
38
     </view>
38
     </view>
39
     <seiminFooterNav></seiminFooterNav>
39
     <seiminFooterNav></seiminFooterNav>
40
     <seiminModel ref="seiminModel"></seiminModel>
40
     <seiminModel ref="seiminModel"></seiminModel>
41
+    <seiminPicker ref="sPicker" :title="pickerTitle" titleColor="#808080" titleFontSize="28rpx" confirmColor="#333"
42
+      confirmFontSize="38rpx" confirmFontWeight="500" itemFontSize="28rpx" @onClose="closePicker"
43
+      @onConfirm="confirmPicker" :pickerList="taskTypeList">
44
+    </seiminPicker>
41
   </view>
45
   </view>
42
 </template>
46
 </template>
43
 
47
 
@@ -47,13 +51,20 @@
47
   } from 'lodash/function';
51
   } from 'lodash/function';
48
   import {
52
   import {
49
     reqFetchDataList,
53
     reqFetchDataList,
54
+    reqDeptTSPTaskType,
55
+    reqBuildTrip,
50
   } from "../../request/api.js";
56
   } from "../../request/api.js";
51
   import {
57
   import {
52
     mapState,
58
     mapState,
59
+    mapMutations,
53
   } from "vuex";
60
   } from "vuex";
54
   export default {
61
   export default {
55
     data() {
62
     data() {
56
       return {
63
       return {
64
+        checkedShowMsg: {}, //当前选中的任务类型的buildtrip信息
65
+        selectedPatient: {}, //当前选中的患者
66
+        taskTypeList: [], //任务类型列表
67
+        pickerTitle: "", //一键建单picker的title
57
         debounceInp: null,
68
         debounceInp: null,
58
         keyword: "",
69
         keyword: "",
59
         patientList: [],
70
         patientList: [],
@@ -66,6 +77,107 @@
66
       ...mapState('other', ["deptDisplay"]),
77
       ...mapState('other', ["deptDisplay"]),
67
     },
78
     },
68
     methods: {
79
     methods: {
80
+      ...mapMutations('other', ['changeQucikCreateOrderType']),
81
+      //关闭
82
+      closePicker() {
83
+        this.$refs.sPicker._close();
84
+      },
85
+      //打开
86
+      openPicker() {
87
+        this.$refs.sPicker._open();
88
+      },
89
+      //确定:接收子组件传来的参数
90
+      confirmPicker(checkedObj) {
91
+        console.log(checkedObj);
92
+        // 2,获取buildTrip信息
93
+        let postData = {
94
+          "taskTypeId": checkedObj.value,
95
+          "patientCode": this.selectedPatient.patientCode
96
+        };
97
+        uni.showLoading({
98
+          mask: true,
99
+          title: '加载中'
100
+        })
101
+        reqBuildTrip(postData).then(res => {
102
+          uni.hideLoading();
103
+          if (res.status == 200) {
104
+            this.checkedShowMsg = res.data;
105
+            this.changeQucikCreateOrderType({
106
+              type: "patient",
107
+              taskTypeId: checkedObj.value,
108
+              patientBuildTrip: res,
109
+            });
110
+          } else if (res.status == 100015) {
111
+            this.checkedShowMsg = res.data;
112
+            //需要选择起点科室和目标科室
113
+            uni.navigateTo({
114
+              url: "/pages/quickCreateOrder/quickCreateOrder",
115
+            });
116
+            this.changeQucikCreateOrderType({
117
+              type: "patient",
118
+              taskTypeId: checkedObj.value,
119
+              patientBuildTrip: res,
120
+            });
121
+          } else if (res.status == 100013) {
122
+            this.checkedShowMsg = res.data;
123
+            //需要选择起点科室
124
+            uni.navigateTo({
125
+              url: "/pages/quickCreateOrder/quickCreateOrder",
126
+            });
127
+            this.changeQucikCreateOrderType({
128
+              type: "patient",
129
+              taskTypeId: checkedObj.value,
130
+              patientBuildTrip: res,
131
+            });
132
+          } else if (res.status == 100014) {
133
+            this.checkedShowMsg = res.data;
134
+            //需要选择目标科室
135
+            uni.navigateTo({
136
+              url: "/pages/quickCreateOrder/quickCreateOrder",
137
+            });
138
+            this.changeQucikCreateOrderType({
139
+              type: "patient",
140
+              taskTypeId: checkedObj.value,
141
+              patientBuildTrip: res,
142
+            });
143
+          } else {
144
+            this.$refs.seiminModel.show({
145
+              skin: "toast",
146
+              icon: "error",
147
+              content: res.msg || "获取数据失败",
148
+            });
149
+            throw new Error(res.msg || "获取数据失败");
150
+          }
151
+        })
152
+      },
153
+      // 一键建单
154
+      buildOrder(patient) {
155
+        this.selectedPatient = patient;
156
+        // 1,请求任务类型列表
157
+        uni.showLoading({
158
+          mask: true,
159
+          title: '加载中'
160
+        })
161
+        reqDeptTSPTaskType().then(res => {
162
+          uni.hideLoading();
163
+          if (res.status == 200) {
164
+            res.data = res.data || [];
165
+            this.taskTypeList = res.data.map((v) => ({
166
+              value: v.id,
167
+              label: v.taskName,
168
+            }));
169
+            this.pickerTitle = `您选择了<b class="green">${patient.patientName}</b>患者,请选择下方具体服务项`;
170
+            this.openPicker();
171
+          } else {
172
+            this.$refs.seiminModel.show({
173
+              skin: "toast",
174
+              icon: "error",
175
+              content: res.msg || "获取数据失败",
176
+            });
177
+            throw new Error(res.msg || "获取数据失败");
178
+          }
179
+        })
180
+      },
69
       // 跳转患者详情
181
       // 跳转患者详情
70
       toDetail(patientCode) {
182
       toDetail(patientCode) {
71
         uni.navigateTo({
183
         uni.navigateTo({

+ 14 - 4
pages/quickCreateOrder/quickCreateOrder.vue

@@ -1,8 +1,10 @@
1
 <template>
1
 <template>
2
   <view class="quickCreateOrder">
2
   <view class="quickCreateOrder">
3
-    <view class="qco_msg" v-html="dataObj.msg"></view>
3
+    <view class="qco_msg" v-html="patientMsg" v-if="qucikCreateOrderType === 'patient'"></view>
4
+    <view class="qco_msg" v-html="dataObj.msg" v-else></view>
4
     <!-- 起点科室,终点科室 -->
5
     <!-- 起点科室,终点科室 -->
5
-    <block v-if="qucikCreateOrderType === 'other' && (dataObj.start || dataObj.end)">
6
+    <block
7
+      v-if="(qucikCreateOrderType === 'other' || qucikCreateOrderType === 'patient') && (dataObj.start || dataObj.end)">
6
       <!-- 返回值的departmentStrategy是201 则是默认发起科室 -->
8
       <!-- 返回值的departmentStrategy是201 则是默认发起科室 -->
7
       <!-- 返回值的departmentStrategy是202 则是固定科室范围 -->
9
       <!-- 返回值的departmentStrategy是202 则是固定科室范围 -->
8
       <!-- 返回值的departmentStrategy是203 则是固定科室 -->
10
       <!-- 返回值的departmentStrategy是203 则是固定科室 -->
@@ -92,6 +94,8 @@
92
   export default {
94
   export default {
93
     data() {
95
     data() {
94
       return {
96
       return {
97
+        //患者建单信息展示
98
+        patientMsg: '您选择类型为<b class="green">转科</b>,需要填写科室,选择完成后点击下一步',
95
         // 传递过来的参数
99
         // 传递过来的参数
96
         queryParams: {},
100
         queryParams: {},
97
         // 选择的起点科室
101
         // 选择的起点科室
@@ -139,7 +143,8 @@
139
         "qucikCreateOrderTypeId",
143
         "qucikCreateOrderTypeId",
140
         "deptDisplay",
144
         "deptDisplay",
141
         'searchDeptParams',
145
         'searchDeptParams',
142
-        'searchDeptResultList'
146
+        'searchDeptResultList',
147
+        'patientBuildTrip'
143
       ]),
148
       ]),
144
     },
149
     },
145
     methods: {
150
     methods: {
@@ -154,6 +159,11 @@
154
       },
159
       },
155
       //获取所有数据
160
       //获取所有数据
156
       getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
161
       getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
162
+        if (qucikCreateOrderType === 'patient') {
163
+          //患者建单,则无需请求
164
+          this.getBuildTrip(this.patientBuildTrip);
165
+          return;
166
+        }
157
         uni.showLoading({
167
         uni.showLoading({
158
           title: "加载中",
168
           title: "加载中",
159
         });
169
         });
@@ -423,7 +433,7 @@
423
 
433
 
424
     .qco_msg {
434
     .qco_msg {
425
       min-height: 144rpx;
435
       min-height: 144rpx;
426
-      padding: 32rpx 160rpx;
436
+      padding: 32rpx;
427
       color: #999;
437
       color: #999;
428
       line-height: 40rpx;
438
       line-height: 40rpx;
429
       font-size: 28rpx;
439
       font-size: 28rpx;

+ 9 - 1
request/api.js

@@ -139,7 +139,15 @@ export const reqFetchWorkOrderLog = (id) =>
139
 // 患者详情,患者标本,患者检查
139
 // 患者详情,患者标本,患者检查
140
 export const reqGetPatientInspectInfo = (postData) =>
140
 export const reqGetPatientInspectInfo = (postData) =>
141
   request({
141
   request({
142
-    url: `/nurse/workOrder/getPatientInspectInfo`,
142
+    url: `/nurse/workOrder/getPatientInspectInfoByTime`,
143
+    data: postData,
144
+    method: 'POST'
145
+  });
146
+  
147
+// 患者一键建单请求任务类型
148
+export const reqDeptTSPTaskType = (postData) =>
149
+  request({
150
+    url: `/configuration/deptTSPTaskType`,
143
     data: postData,
151
     data: postData,
144
     method: 'POST'
152
     method: 'POST'
145
   });
153
   });

+ 3 - 0
store/modules/other.js

@@ -4,6 +4,8 @@ const stateReset = {
4
   isShowSeiminModel: false, //是否显示切换科室弹窗
4
   isShowSeiminModel: false, //是否显示切换科室弹窗
5
   qucikCreateOrderType: "", //快捷建单类型
5
   qucikCreateOrderType: "", //快捷建单类型
6
   qucikCreateOrderTypeId: "", //快捷建单类型id
6
   qucikCreateOrderTypeId: "", //快捷建单类型id
7
+  patientBuildTrip: {}, //患者建单的buildTrip
8
+  patientBuildData: {}, //患者建单的请求参数数据
7
   deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
9
   deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
8
   updateTipsForNurses: "", //护士端更新提示
10
   updateTipsForNurses: "", //护士端更新提示
9
   specimenButton: "", //标本按钮文字
11
   specimenButton: "", //标本按钮文字
@@ -34,6 +36,7 @@ const mutations = {
34
   changeQucikCreateOrderType(state, args) {
36
   changeQucikCreateOrderType(state, args) {
35
     state.qucikCreateOrderType = args.type;
37
     state.qucikCreateOrderType = args.type;
36
     state.qucikCreateOrderTypeId = args.taskTypeId;
38
     state.qucikCreateOrderTypeId = args.taskTypeId;
39
+    state.patientBuildTrip = args.patientBuildTrip;
37
   },
40
   },
38
   //护士端科室显示选择(名称还是别名)1是名称,2是别名
41
   //护士端科室显示选择(名称还是别名)1是名称,2是别名
39
   changeDeptDisplay(state, args) {
42
   changeDeptDisplay(state, args) {