浏览代码

标本一键建单及其他

seimin 3 年之前
父节点
当前提交
8e95cd2391

+ 20 - 2
components/seiminModel/seiminModel.vue

@@ -26,7 +26,15 @@
26
         </view>
26
         </view>
27
       </view>
27
       </view>
28
       <!-- 正常弹窗 -->
28
       <!-- 正常弹窗 -->
29
-      <view class="seiminModel_content" v-html="opts.content" v-else></view>
29
+      <view class="seiminModel_content" v-else>
30
+        <!-- 图标 -->
31
+        <view class="seiminModel_status">
32
+          <text class="pda pda-shibai red" v-if="opts.icon === 'error'"></text>
33
+          <text class="pda pda-duigou green" v-if="opts.icon === 'success'"></text>
34
+        </view>
35
+        <!-- 内容 -->
36
+        <view class="seiminModel_txt" v-html="opts.content"></view>
37
+      </view>
30
       <!-- 底部 -->
38
       <!-- 底部 -->
31
       <view class="seiminModel_footer" v-if="nurseDeptSwitchTip <= 0 || (nurseDeptSwitchTip > 0 && closeTime === 0)">
39
       <view class="seiminModel_footer" v-if="nurseDeptSwitchTip <= 0 || (nurseDeptSwitchTip > 0 && closeTime === 0)">
32
         <view class="seiminModel_footer__btn" v-for="(btn, i) in opts.btns" :style="{
40
         <view class="seiminModel_footer__btn" v-for="(btn, i) in opts.btns" :style="{
@@ -75,6 +83,7 @@
75
           skin: "default", //弹窗风格(default|toast|qrcode|)
83
           skin: "default", //弹窗风格(default|toast|qrcode|)
76
           isVisible: false, //是否显示弹窗
84
           isVisible: false, //是否显示弹窗
77
           title: "提示", //标题
85
           title: "提示", //标题
86
+          icon:'success',//图标(success|error|)
78
           content: "", //内容
87
           content: "", //内容
79
           btns: [{
88
           btns: [{
80
               name: "取消",
89
               name: "取消",
@@ -195,11 +204,20 @@
195
         flex-direction: column;
204
         flex-direction: column;
196
         align-content: center;
205
         align-content: center;
197
 
206
 
207
+        .seiminModel_status {
208
+          margin-bottom: 35rpx;
209
+
210
+          .pda {
211
+            font-size: 138rpx;
212
+          }
213
+        }
214
+
198
         .seiminModel_header {
215
         .seiminModel_header {
199
           height: 100rpx;
216
           height: 100rpx;
200
           position: relative;
217
           position: relative;
201
           @include flex(center, center);
218
           @include flex(center, center);
202
-          .seiminModel_countDown{
219
+
220
+          .seiminModel_countDown {
203
             position: absolute;
221
             position: absolute;
204
             right: 26rpx;
222
             right: 26rpx;
205
             font-size: 28rpx;
223
             font-size: 28rpx;

+ 9 - 2
pages/index/index.vue

@@ -15,7 +15,8 @@
15
         </view>
15
         </view>
16
       </view>
16
       </view>
17
       <!-- 通告栏 -->
17
       <!-- 通告栏 -->
18
-      <uni-notice-bar :speed="50" scrollable single showIcon :text="updateTipsForNurses" background-color="#fff" color="#666">
18
+      <uni-notice-bar :speed="20" scrollable single showIcon :text="updateTipsForNurses" background-color="#fff"
19
+        color="#666">
19
       </uni-notice-bar>
20
       </uni-notice-bar>
20
       <!-- 一键收标本 -->
21
       <!-- 一键收标本 -->
21
       <view class="collect_specimens">
22
       <view class="collect_specimens">
@@ -183,6 +184,9 @@
183
         if (res.status == 200) {
184
         if (res.status == 200) {
184
           this.quickOtherList = res.data.allTaskTypes.filter(v => v.associationType.value == ASSOCIATION_TYPES[
185
           this.quickOtherList = res.data.allTaskTypes.filter(v => v.associationType.value == ASSOCIATION_TYPES[
185
             '其他临床服务']);
186
             '其他临床服务']);
187
+          let specimenTaskType = res.data.allTaskTypes.find(v => v.associationType.value == ASSOCIATION_TYPES[
188
+            '临时标本业务']);
189
+          this.specimenTaskTypeId = specimenTaskType && specimenTaskType.id;
186
         }
190
         }
187
       },
191
       },
188
       // 护士端科室显示选择(名称还是别名)
192
       // 护士端科室显示选择(名称还是别名)
@@ -254,7 +258,10 @@
254
         uni.navigateTo({
258
         uni.navigateTo({
255
           url: '/pages/quickCreateOrder/quickCreateOrder'
259
           url: '/pages/quickCreateOrder/quickCreateOrder'
256
         })
260
         })
257
-        this.changeQucikCreateOrderType('specimen');
261
+        this.changeQucikCreateOrderType({
262
+          type: 'specimen',
263
+          taskTypeId: this.specimenTaskTypeId
264
+        });
258
       },
265
       },
259
       // 切换科室弹窗
266
       // 切换科室弹窗
260
       showDeptModel() {
267
       showDeptModel() {

+ 130 - 39
pages/quickCreateOrder/quickCreateOrder.vue

@@ -1,8 +1,6 @@
1
 <template>
1
 <template>
2
   <view class="quickCreateOrder">
2
   <view class="quickCreateOrder">
3
-    <view class="qco_msg">
4
-      支助人员将去<b>7东-泌尿外科I病区</b>执行<b>调药</b>,请选择起点科室;
5
-    </view>
3
+    <view class="qco_msg" v-html="dataObj.msg"></view>
6
     <!-- 起点科室,终点科室 -->
4
     <!-- 起点科室,终点科室 -->
7
     <block v-if="qucikCreateOrderType === 'other'">
5
     <block v-if="qucikCreateOrderType === 'other'">
8
       <view class="select_block">
6
       <view class="select_block">
@@ -15,57 +13,37 @@
15
       </view>
13
       </view>
16
     </block>
14
     </block>
17
     <!-- 备注 -->
15
     <!-- 备注 -->
18
-    <view class="remarks">
19
-      <textarea class="remarks_textarea" auto-height :maxlength="100" placeholder-style="color:#999"
20
-        placeholder="备注信息:请您填写微生物和数量" />
16
+    <view class="remarks" v-if="dataObj.remarksSwitch == 1">
17
+      <textarea :focus="remarksFocus" class="remarks_textarea" auto-height :maxlength="100"
18
+        placeholder-style="color:#999" :placeholder="dataObj.remarksPrompts|| '请填写工单备注,不超过100个字符'"
19
+        v-model="workOrderRemark" />
21
     </view>
20
     </view>
22
     <!-- 快捷输入,历史输入 -->
21
     <!-- 快捷输入,历史输入 -->
23
-    <view class="quickAndHistory">
22
+    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1 && dataObj.customRemarks.length">
24
       <view class="quickAndHistory_header">
23
       <view class="quickAndHistory_header">
25
         快捷输入
24
         快捷输入
26
       </view>
25
       </view>
27
       <view class="quickAndHistory_container">
26
       <view class="quickAndHistory_container">
28
-        <view class="quickAndHistory_item">
29
-          我是一只小青蛙
30
-        </view>
31
-        <view class="quickAndHistory_item">
32
-          我是一只小青蛙
33
-        </view>
34
-        <view class="quickAndHistory_item">
35
-          我是一只小青蛙
36
-        </view>
37
-        <view class="quickAndHistory_item">
38
-          我是一只小青蛙
39
-        </view>
40
-        <view class="quickAndHistory_item">
41
-          我是一只小青蛙
27
+        <view class="quickAndHistory_item" @click="addRemarks(customRemark)"
28
+          v-for="(customRemark,i) in dataObj.customRemarks" :key="i">
29
+          {{customRemark}}
42
         </view>
30
         </view>
43
       </view>
31
       </view>
44
     </view>
32
     </view>
45
-    <view class="quickAndHistory">
33
+    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1">
46
       <view class="quickAndHistory_header">
34
       <view class="quickAndHistory_header">
47
         历史输入
35
         历史输入
48
       </view>
36
       </view>
49
       <view class="quickAndHistory_container">
37
       <view class="quickAndHistory_container">
50
-        <view class="quickAndHistory_item">
51
-          我是一只小青蛙
52
-        </view>
53
-        <view class="quickAndHistory_item">
54
-          我是一只小青蛙
55
-        </view>
56
-        <view class="quickAndHistory_item">
57
-          我是一只小青蛙
58
-        </view>
59
-        <view class="quickAndHistory_item">
60
-          我是一只小青蛙
61
-        </view>
62
-        <view class="quickAndHistory_item">
63
-          我是一只小青蛙
38
+        <view class="quickAndHistory_item" @click="addRemarks(historyCustomRemark)"
39
+          v-for="(historyCustomRemark,i) in historyCustomRemarks" :key="i">
40
+          {{historyCustomRemark}}
64
         </view>
41
         </view>
65
       </view>
42
       </view>
66
     </view>
43
     </view>
67
     <!-- 底部 -->
44
     <!-- 底部 -->
68
     <seiminFooterBtn :btns="btns"></seiminFooterBtn>
45
     <seiminFooterBtn :btns="btns"></seiminFooterBtn>
46
+    <seiminModel ref="seiminModel"></seiminModel>
69
   </view>
47
   </view>
70
 </template>
48
 </template>
71
 
49
 
@@ -73,9 +51,26 @@
73
   import {
51
   import {
74
     mapState
52
     mapState
75
   } from 'vuex';
53
   } from 'vuex';
54
+  import {
55
+    reqBuildTrip,
56
+    reqRecentRemarks,
57
+    reqBuildOrder
58
+  } from '../../request/api.js';
59
+  import {
60
+    SOURCEID
61
+  } from '../../utils/enum.sourceid.js';
76
   export default {
62
   export default {
77
     data() {
63
     data() {
78
       return {
64
       return {
65
+        // 工单备注是否获取焦点
66
+        remarksFocus: true,
67
+        // 工单备注
68
+        workOrderRemark: '',
69
+        // 获取到的数据集合对象(历史输入除外)
70
+        dataObj: {},
71
+        // 历史输入
72
+        historyCustomRemarks: [],
73
+        //底部按钮
79
         btns: [{
74
         btns: [{
80
             name: '回到首页',
75
             name: '回到首页',
81
             type: 'default',
76
             type: 'default',
@@ -89,17 +84,112 @@
89
             name: '确认',
84
             name: '确认',
90
             type: 'primary',
85
             type: 'primary',
91
             click: () => {
86
             click: () => {
92
-              console.log('确认');
87
+              this.submitData();
93
             }
88
             }
94
           }
89
           }
95
         ]
90
         ]
96
       };
91
       };
97
     },
92
     },
98
     computed: {
93
     computed: {
99
-      ...mapState(['qucikCreateOrderType']),
94
+      ...mapState(['qucikCreateOrderType', 'qucikCreateOrderTypeId']),
95
+      ...mapState('user', ['loginInfoUserDeptId']),
96
+    },
97
+    methods: {
98
+      // 添加备注
99
+      addRemarks(customRemark) {
100
+        this.remarksFocus = false;
101
+        this.$nextTick(() => {
102
+          this.remarksFocus = true;
103
+        });
104
+        this.workOrderRemark += customRemark;
105
+      },
106
+      //获取所有数据
107
+      getData(qucikCreateOrderType, qucikCreateOrderTypeId) {
108
+        uni.showLoading({
109
+          title: '加载中'
110
+        });
111
+        let postData = {
112
+          "taskTypeId": qucikCreateOrderTypeId,
113
+          "deptId": this.loginInfoUserDeptId,
114
+        };
115
+        if (qucikCreateOrderType === 'specimen') {
116
+          Promise.all([
117
+            reqBuildTrip(postData),
118
+            reqRecentRemarks(postData)
119
+          ]).then(values => {
120
+            uni.hideLoading();
121
+            this.getBuildTrip(values[0]);
122
+            this.getRecentRemarks(values[1]);
123
+          })
124
+        }
125
+      },
126
+      // 获取其他数据
127
+      getBuildTrip(res) {
128
+        if (res.status == 200) {
129
+          // 处理返回的数据
130
+          if (res.customRemarks) {
131
+            res.customRemarks = res.customRemarks.split('$');
132
+          } else {
133
+            res.customRemarks = []
134
+          }
135
+          this.dataObj = res;
136
+        }
137
+      },
138
+      // 获取历史输入
139
+      getRecentRemarks(res) {
140
+        if (res.state == 200) {
141
+          this.historyCustomRemarks = res.data || [];
142
+        }
143
+      },
144
+      // 提交数据,建单
145
+      submitData() {
146
+        uni.showLoading({
147
+          title: '加载中',
148
+          mask: true
149
+        })
150
+        let postData = {
151
+          urgent: 0,
152
+          workOrder: {
153
+            sourceId: SOURCEID['护士端'],
154
+            workOrderRemark: this.workOrderRemark,
155
+            taskType: {
156
+              id: this.qucikCreateOrderTypeId
157
+            },
158
+            createDept: this.loginInfoUserDeptId,
159
+            startDept: {
160
+              id: this.loginInfoUserDeptId
161
+            },
162
+          },
163
+        };
164
+        reqBuildOrder(postData).then(res => {
165
+          uni.hideLoading();
166
+          if (res.status == 200) {
167
+            this.$refs.seiminModel.showChangeDept({
168
+              skin: "toast",
169
+              content: '创建成功',
170
+              btns: [{
171
+                name: "知道了",
172
+                textColor: "#49B856",
173
+                flex: 1,
174
+                click() {
175
+                  uni.navigateTo({
176
+                    url: '/pages/index/index'
177
+                  })
178
+                }
179
+              }]
180
+            });
181
+          } else {
182
+            this.$refs.seiminModel.showChangeDept({
183
+              skin: "toast",
184
+              icon: 'error',
185
+              content: res.msg || '操作失败'
186
+            });
187
+          }
188
+        })
189
+      }
100
     },
190
     },
101
     onLoad() {
191
     onLoad() {
102
-
192
+      this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
103
     }
193
     }
104
   }
194
   }
105
 </script>
195
 </script>
@@ -156,6 +246,7 @@
156
 
246
 
157
       .remarks_textarea {
247
       .remarks_textarea {
158
         width: 100%;
248
         width: 100%;
249
+        min-height: 100rpx;
159
       }
250
       }
160
     }
251
     }
161
 
252
 

+ 24 - 0
request/api.js

@@ -49,3 +49,27 @@ export const reqFetchDataList = (type, target, postData) =>
49
     data: postData,
49
     data: postData,
50
     method: 'POST'
50
     method: 'POST'
51
   });
51
   });
52
+
53
+// 获取一键建单所需的信息
54
+export const reqBuildTrip = (postData) =>
55
+  request({
56
+    url: '/nurse/workOrder/buildTrip',
57
+    data: postData,
58
+    method: 'POST'
59
+  });
60
+
61
+// 获取一键建单所需的历史输入信息
62
+export const reqRecentRemarks = (postData) =>
63
+  request({
64
+    url: '/nurse/workOrder/recentRemarks',
65
+    data: postData,
66
+    method: 'POST'
67
+  });
68
+  
69
+// 建单
70
+export const reqBuildOrder = (postData) =>
71
+  request({
72
+    url: '/api/startOrder',
73
+    data: postData,
74
+    method: 'POST'
75
+  });

+ 49 - 3
static/fonts/demo_index.html

@@ -55,6 +55,18 @@
55
           <ul class="icon_lists dib-box">
55
           <ul class="icon_lists dib-box">
56
           
56
           
57
             <li class="dib">
57
             <li class="dib">
58
+              <span class="icon pda">&#xe626;</span>
59
+                <div class="name">失败</div>
60
+                <div class="code-name">&amp;#xe626;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon pda">&#xe602;</span>
65
+                <div class="name">对勾</div>
66
+                <div class="code-name">&amp;#xe602;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
58
               <span class="icon pda">&#xe637;</span>
70
               <span class="icon pda">&#xe637;</span>
59
                 <div class="name">向右</div>
71
                 <div class="name">向右</div>
60
                 <div class="code-name">&amp;#xe637;</div>
72
                 <div class="code-name">&amp;#xe637;</div>
@@ -114,9 +126,9 @@
114
 <pre><code class="language-css"
126
 <pre><code class="language-css"
115
 >@font-face {
127
 >@font-face {
116
   font-family: 'pda';
128
   font-family: 'pda';
117
-  src: url('iconfont.woff2?t=1649728794969') format('woff2'),
118
-       url('iconfont.woff?t=1649728794969') format('woff'),
119
-       url('iconfont.ttf?t=1649728794969') format('truetype');
129
+  src: url('iconfont.woff2?t=1650009457376') format('woff2'),
130
+       url('iconfont.woff?t=1650009457376') format('woff'),
131
+       url('iconfont.ttf?t=1650009457376') format('truetype');
120
 }
132
 }
121
 </code></pre>
133
 </code></pre>
122
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
134
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -143,6 +155,24 @@
143
         <ul class="icon_lists dib-box">
155
         <ul class="icon_lists dib-box">
144
           
156
           
145
           <li class="dib">
157
           <li class="dib">
158
+            <span class="icon pda pda-shibai"></span>
159
+            <div class="name">
160
+              失败
161
+            </div>
162
+            <div class="code-name">.pda-shibai
163
+            </div>
164
+          </li>
165
+          
166
+          <li class="dib">
167
+            <span class="icon pda pda-duigou"></span>
168
+            <div class="name">
169
+              对勾
170
+            </div>
171
+            <div class="code-name">.pda-duigou
172
+            </div>
173
+          </li>
174
+          
175
+          <li class="dib">
146
             <span class="icon pda pda-xiangyou"></span>
176
             <span class="icon pda pda-xiangyou"></span>
147
             <div class="name">
177
             <div class="name">
148
               向右
178
               向右
@@ -234,6 +264,22 @@
234
           
264
           
235
             <li class="dib">
265
             <li class="dib">
236
                 <svg class="icon svg-icon" aria-hidden="true">
266
                 <svg class="icon svg-icon" aria-hidden="true">
267
+                  <use xlink:href="#pda-shibai"></use>
268
+                </svg>
269
+                <div class="name">失败</div>
270
+                <div class="code-name">#pda-shibai</div>
271
+            </li>
272
+          
273
+            <li class="dib">
274
+                <svg class="icon svg-icon" aria-hidden="true">
275
+                  <use xlink:href="#pda-duigou"></use>
276
+                </svg>
277
+                <div class="name">对勾</div>
278
+                <div class="code-name">#pda-duigou</div>
279
+            </li>
280
+          
281
+            <li class="dib">
282
+                <svg class="icon svg-icon" aria-hidden="true">
237
                   <use xlink:href="#pda-xiangyou"></use>
283
                   <use xlink:href="#pda-xiangyou"></use>
238
                 </svg>
284
                 </svg>
239
                 <div class="name">向右</div>
285
                 <div class="name">向右</div>

+ 11 - 3
static/fonts/iconfont.css

@@ -1,8 +1,8 @@
1
 @font-face {
1
 @font-face {
2
   font-family: "pda"; /* Project id 3307922 */
2
   font-family: "pda"; /* Project id 3307922 */
3
-  src: url('/static/fonts/iconfont.woff2?t=1649728794969') format('woff2'),
4
-       url('/static/fonts/iconfont.woff?t=1649728794969') format('woff'),
5
-       url('/static/fonts/iconfont.ttf?t=1649728794969') format('truetype');
3
+  src: url('/static/fonts/iconfont.woff2?t=1650009457376') format('woff2'),
4
+       url('/static/fonts/iconfont.woff?t=1650009457376') format('woff'),
5
+       url('/static/fonts/iconfont.ttf?t=1650009457376') format('truetype');
6
 }
6
 }
7
 
7
 
8
 .pda {
8
 .pda {
@@ -13,6 +13,14 @@
13
   -moz-osx-font-smoothing: grayscale;
13
   -moz-osx-font-smoothing: grayscale;
14
 }
14
 }
15
 
15
 
16
+.pda-shibai:before {
17
+  content: "\e626";
18
+}
19
+
20
+.pda-duigou:before {
21
+  content: "\e602";
22
+}
23
+
16
 .pda-xiangyou:before {
24
 .pda-xiangyou:before {
17
   content: "\e637";
25
   content: "\e637";
18
 }
26
 }

文件差异内容过多而无法显示
+ 1 - 1
static/fonts/iconfont.js


+ 14 - 0
static/fonts/iconfont.json

@@ -6,6 +6,20 @@
6
   "description": "转运PDA",
6
   "description": "转运PDA",
7
   "glyphs": [
7
   "glyphs": [
8
     {
8
     {
9
+      "icon_id": "100733",
10
+      "name": "失败",
11
+      "font_class": "shibai",
12
+      "unicode": "e626",
13
+      "unicode_decimal": 58918
14
+    },
15
+    {
16
+      "icon_id": "3668000",
17
+      "name": "对勾",
18
+      "font_class": "duigou",
19
+      "unicode": "e602",
20
+      "unicode_decimal": 58882
21
+    },
22
+    {
9
       "icon_id": "479506",
23
       "icon_id": "479506",
10
       "name": "向右",
24
       "name": "向右",
11
       "font_class": "xiangyou",
25
       "font_class": "xiangyou",

二进制
static/fonts/iconfont.ttf


二进制
static/fonts/iconfont.woff


二进制
static/fonts/iconfont.woff2


+ 4 - 2
store/index.js

@@ -28,6 +28,7 @@ export default new Vuex.Store({
28
   state: {
28
   state: {
29
     isShowSeiminModel: false, //是否显示切换科室弹窗
29
     isShowSeiminModel: false, //是否显示切换科室弹窗
30
     qucikCreateOrderType: '', //快捷建单类型
30
     qucikCreateOrderType: '', //快捷建单类型
31
+    qucikCreateOrderTypeId: '', //快捷建单类型id
31
     deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
32
     deptDisplay: 1, //护士端科室显示选择(名称还是别名)1是名称,2是别名
32
     updateTipsForNurses: '', //护士端更新提示
33
     updateTipsForNurses: '', //护士端更新提示
33
     specimenButton: '', //标本按钮文字
34
     specimenButton: '', //标本按钮文字
@@ -43,8 +44,9 @@ export default new Vuex.Store({
43
       state.isShowSeiminModel = args;
44
       state.isShowSeiminModel = args;
44
     },
45
     },
45
     //快捷建单类型
46
     //快捷建单类型
46
-    changeQucikCreateOrderType(state, args) {
47
-      state.qucikCreateOrderType = args;
47
+    changeQucikCreateOrderType(state, args = {}) {
48
+      state.qucikCreateOrderType = args.type;
49
+      state.qucikCreateOrderTypeId = args.taskTypeId;
48
     },
50
     },
49
     //护士端科室显示选择(名称还是别名)1是名称,2是别名
51
     //护士端科室显示选择(名称还是别名)1是名称,2是别名
50
     changeDeptDisplay(state, args) {
52
     changeDeptDisplay(state, args) {

+ 21 - 0
utils/enum.sourceid.js

@@ -0,0 +1,21 @@
1
+import {
2
+  createEnum
3
+} from './index.js';
4
+let data = [{
5
+    name: '服务台',
6
+    value: '1'
7
+  },
8
+  {
9
+    name: '护士端',
10
+    value: '2'
11
+  },
12
+  {
13
+    name: '系统自动建单',
14
+    value: '3'
15
+  },
16
+  {
17
+    name: '微信端',
18
+    value: '4'
19
+  },
20
+]
21
+export const SOURCEID = createEnum(data); //建单来源