Browse Source

其他服务类型建单页面

seimin 3 years ago
parent
commit
255497c625

+ 0 - 8
components/seiminModel/seiminModel.vue

@@ -247,14 +247,6 @@
247
               }
247
               }
248
             }
248
             }
249
           }
249
           }
250
-
251
-          .red {
252
-            color: $textColorRed;
253
-          }
254
-
255
-          .green {
256
-            color: $defaultColor;
257
-          }
258
         }
250
         }
259
 
251
 
260
         .seiminModel_footer {
252
         .seiminModel_footer {

+ 11 - 1
pages/index/index.vue

@@ -55,7 +55,7 @@
55
         </view>
55
         </view>
56
         <view class="quick_other_container">
56
         <view class="quick_other_container">
57
           <view class="quick_other_container_item" v-for="quickOther in quickOtherList" :key="quickOther.id">
57
           <view class="quick_other_container_item" v-for="quickOther in quickOtherList" :key="quickOther.id">
58
-            <view class="quick_other_container_item_text">
58
+            <view class="quick_other_container_item_text" @click="quickOrderOther(quickOther)">
59
               {{quickOther.taskName}}
59
               {{quickOther.taskName}}
60
             </view>
60
             </view>
61
           </view>
61
           </view>
@@ -263,6 +263,16 @@
263
           taskTypeId: this.specimenTaskTypeId
263
           taskTypeId: this.specimenTaskTypeId
264
         });
264
         });
265
       },
265
       },
266
+      //其他临床服务快捷建单
267
+      quickOrderOther(quickOther){
268
+        uni.navigateTo({
269
+          url: '/pages/quickCreateOrder/quickCreateOrder'
270
+        })
271
+        this.changeQucikCreateOrderType({
272
+          type: 'other',
273
+          taskTypeId: quickOther.id
274
+        });
275
+      },
266
       // 切换科室弹窗
276
       // 切换科室弹窗
267
       showDeptModel() {
277
       showDeptModel() {
268
         const {
278
         const {

+ 106 - 35
pages/quickCreateOrder/quickCreateOrder.vue

@@ -2,15 +2,33 @@
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="dataObj.msg"></view>
4
     <!-- 起点科室,终点科室 -->
4
     <!-- 起点科室,终点科室 -->
5
-    <block v-if="qucikCreateOrderType === 'other'">
5
+    <block v-if="qucikCreateOrderType === 'other' && (dataObj.start || dataObj.end)">
6
+      <!-- 返回值的departmentStrategy是201 则是默认发起科室 -->
7
+      <!-- 返回值的departmentStrategy是202 则是固定科室范围 -->
8
+      <!-- 返回值的departmentStrategy是203 则是固定科室 -->
9
+      <!-- 返回值的departmentStrategy是204 则是自主填写 -->
10
+      <!-- 返回值的departmentStrategy是205 则是固定科室类型 -->
11
+      <!-- 100013 (护士端一键建单展示策略)取起点科室,和msg值展示 -->
12
+      <!-- <block v-if="dataObj.status == 100013"> -->
6
       <view class="select_block">
13
       <view class="select_block">
7
-        <text class="select_label">起点科室</text>
8
-        <view class="select_placeholder">请选择起点科室<text class="pda pda-xiangyou"></text></view>
14
+        <text class="select_label"
15
+          :class="{disableColor:(dataObj.start.start.departmentStrategy == 201 ||dataObj.start.start.departmentStrategy == 203)}">起点科室</text>
16
+        <view class="select_placeholder"
17
+          v-if="dataObj.start.start.departmentStrategy == 201||dataObj.start.start.departmentStrategy == 203">
18
+          {{deptDisplay == 1?dataObj.start.start.list[0].dept:dataObj.start.start.list[0].deptalias}}
19
+        </view>
20
+        <view class="select_placeholder" v-else>请选择起点科室<text class="pda pda-xiangyou"></text></view>
9
       </view>
21
       </view>
10
       <view class="select_block">
22
       <view class="select_block">
11
-        <text class="select_label">终点科室</text>
12
-        <view class="select_placeholder">请选择终点科室<text class="pda pda-xiangyou"></text></view>
23
+        <text class="select_label"
24
+          :class="{disableColor:(dataObj.end.end.departmentStrategy == 201||dataObj.end.end.departmentStrategy == 203)}">终点科室</text>
25
+        <view class="select_placeholder"
26
+          v-if="(dataObj.end.end.departmentStrategy == 201||dataObj.end.end.departmentStrategy == 203)">
27
+          {{deptDisplay == 1?dataObj.end.end.list[0].dept:dataObj.end.end.list[0].deptalias}}
28
+        </view>
29
+        <view class="select_placeholder" v-else>请选择终点科室<text class="pda pda-xiangyou"></text></view>
13
       </view>
30
       </view>
31
+      <!-- </block> -->
14
     </block>
32
     </block>
15
     <!-- 备注 -->
33
     <!-- 备注 -->
16
     <view class="remarks" v-if="dataObj.remarksSwitch == 1">
34
     <view class="remarks" v-if="dataObj.remarksSwitch == 1">
@@ -30,7 +48,7 @@
30
         </view>
48
         </view>
31
       </view>
49
       </view>
32
     </view>
50
     </view>
33
-    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1">
51
+    <view class="quickAndHistory" v-if="dataObj.remarksSwitch == 1 && historyCustomRemarks.length">
34
       <view class="quickAndHistory_header">
52
       <view class="quickAndHistory_header">
35
         历史输入
53
         历史输入
36
       </view>
54
       </view>
@@ -91,7 +109,7 @@
91
       };
109
       };
92
     },
110
     },
93
     computed: {
111
     computed: {
94
-      ...mapState(['qucikCreateOrderType', 'qucikCreateOrderTypeId']),
112
+      ...mapState(['qucikCreateOrderType', 'qucikCreateOrderTypeId', 'deptDisplay']),
95
       ...mapState('user', ['loginInfoUserDeptId']),
113
       ...mapState('user', ['loginInfoUserDeptId']),
96
     },
114
     },
97
     methods: {
115
     methods: {
@@ -108,30 +126,47 @@
108
         uni.showLoading({
126
         uni.showLoading({
109
           title: '加载中'
127
           title: '加载中'
110
         });
128
         });
111
-        let postData = {
129
+        let postData1 = {};
130
+        let postData2 = {
112
           "taskTypeId": qucikCreateOrderTypeId,
131
           "taskTypeId": qucikCreateOrderTypeId,
113
           "deptId": this.loginInfoUserDeptId,
132
           "deptId": this.loginInfoUserDeptId,
114
         };
133
         };
115
         if (qucikCreateOrderType === 'specimen') {
134
         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
-          })
135
+          //标本快捷建单
136
+          postData1 = {
137
+            "taskTypeId": qucikCreateOrderTypeId,
138
+            "deptId": this.loginInfoUserDeptId,
139
+          };
140
+        } else if (qucikCreateOrderType === 'other') {
141
+          //其他临床服务快捷建单
142
+          postData1 = {
143
+            "taskTypeId": qucikCreateOrderTypeId,
144
+          };
124
         }
145
         }
146
+        Promise.all([
147
+          reqBuildTrip(postData1),
148
+          reqRecentRemarks(postData2)
149
+        ]).then(values => {
150
+          uni.hideLoading();
151
+          this.getBuildTrip(values[0]);
152
+          this.getRecentRemarks(values[1]);
153
+        })
125
       },
154
       },
126
-      // 获取其他数据
155
+      // 获取数据(除历史输入)
127
       getBuildTrip(res) {
156
       getBuildTrip(res) {
128
-        if (res.status == 200) {
157
+        if (res.status == 200 || res.status == 100012 || res.status == 100013 || res.status == 100014 || res.status ==
158
+          100015) {
129
           // 处理返回的数据
159
           // 处理返回的数据
130
           if (res.customRemarks) {
160
           if (res.customRemarks) {
131
             res.customRemarks = res.customRemarks.split('$');
161
             res.customRemarks = res.customRemarks.split('$');
132
           } else {
162
           } else {
133
             res.customRemarks = []
163
             res.customRemarks = []
134
           }
164
           }
165
+          // 处理msg
166
+          if (res.msg.includes('<b>')) {
167
+            res.msg = res.msg.replace(/<b>/g, '<text class="green">');
168
+            res.msg = res.msg.replace(/<\/b>/g, '</text>');
169
+          }
135
           this.dataObj = res;
170
           this.dataObj = res;
136
         }
171
         }
137
       },
172
       },
@@ -143,24 +178,60 @@
143
       },
178
       },
144
       // 提交数据,建单
179
       // 提交数据,建单
145
       submitData() {
180
       submitData() {
181
+        let postData = {};
146
         uni.showLoading({
182
         uni.showLoading({
147
           title: '加载中',
183
           title: '加载中',
148
           mask: true
184
           mask: true
149
         })
185
         })
150
-        let postData = {
151
-          urgent: 0,
152
-          workOrder: {
153
-            sourceId: SOURCEID['护士端'],
154
-            workOrderRemark: this.workOrderRemark,
155
-            taskType: {
156
-              id: this.qucikCreateOrderTypeId
186
+        if (this.qucikCreateOrderType === 'specimen') {
187
+          //标本建单
188
+          postData = {
189
+            urgent: 0,
190
+            workOrder: {
191
+              sourceId: SOURCEID['护士端'],
192
+              workOrderRemark: this.workOrderRemark,
193
+              taskType: {
194
+                id: this.qucikCreateOrderTypeId
195
+              },
196
+              createDept: this.loginInfoUserDeptId,
197
+              startDept: {
198
+                id: this.loginInfoUserDeptId
199
+              },
157
             },
200
             },
158
-            createDept: this.loginInfoUserDeptId,
159
-            startDept: {
160
-              id: this.loginInfoUserDeptId
201
+          };
202
+        } else if (this.qucikCreateOrderType === 'other') {
203
+          let startDept = {}; //起点科室
204
+          let endDepts = []; //终点科室
205
+          // 其他服务建单
206
+          // 起点科室---- start
207
+          if (this.dataObj.start.start.departmentStrategy == 201) {
208
+            startDept = {
209
+              id: this.dataObj.start.start.list[0].id
210
+            };
211
+          }
212
+          // 起点科室---- end
213
+          // 终点科室---- start
214
+          if (this.dataObj.start.start.departmentStrategy == 201) {
215
+            endDepts = [{
216
+              id: this.dataObj.end.end.list[0].id
217
+            }];
218
+          }
219
+          // 终点科室---- end
220
+          //请求参数
221
+          postData = {
222
+            workOrder: {
223
+              sourceId: SOURCEID['护士端'],
224
+              workOrderRemark: this.workOrderRemark,
225
+              taskType: {
226
+                id: this.qucikCreateOrderTypeId
227
+              },
228
+              createDept: this.loginInfoUserDeptId,
229
+              startDept,
230
+              endDepts,
161
             },
231
             },
162
-          },
163
-        };
232
+          };
233
+        }
234
+
164
         reqBuildOrder(postData).then(res => {
235
         reqBuildOrder(postData).then(res => {
165
           uni.hideLoading();
236
           uni.hideLoading();
166
           if (res.status == 200) {
237
           if (res.status == 200) {
@@ -189,6 +260,7 @@
189
       }
260
       }
190
     },
261
     },
191
     onLoad() {
262
     onLoad() {
263
+      console.log(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
192
       this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
264
       this.getData(this.qucikCreateOrderType, this.qucikCreateOrderTypeId);
193
     }
265
     }
194
   }
266
   }
@@ -205,11 +277,6 @@
205
       line-height: 40rpx;
277
       line-height: 40rpx;
206
       font-size: 28rpx;
278
       font-size: 28rpx;
207
       text-align: center;
279
       text-align: center;
208
-
209
-      b {
210
-        color: $defaultColor;
211
-        font-weight: normal;
212
-      }
213
     }
280
     }
214
 
281
 
215
     // 起点科室,终点科室
282
     // 起点科室,终点科室
@@ -223,6 +290,10 @@
223
 
290
 
224
       .select_label {
291
       .select_label {
225
         color: #000;
292
         color: #000;
293
+
294
+        &.disableColor {
295
+          color: #999;
296
+        }
226
       }
297
       }
227
 
298
 
228
       .select_placeholder {
299
       .select_placeholder {