|
@@ -0,0 +1,345 @@
|
|
1
|
+<template>
|
|
2
|
+ <view class="changeHospital" v-show="disjunctor">
|
|
3
|
+ <view class="changeHospital__wrap">
|
|
4
|
+ <view class="changeHospital__header" v-if="title">
|
|
5
|
+ {{ title }}
|
|
6
|
+ </view>
|
|
7
|
+ <view class="changeHospital__article">
|
|
8
|
+ <view class="uni-list-cell">
|
|
9
|
+ <view class="uni-list-cell-left">
|
|
10
|
+ {{name}}:
|
|
11
|
+ </view>
|
|
12
|
+ <view class="uni-list-cell-db">
|
|
13
|
+ <input class="uni-input" auto-focus="true" :placeholder="'请填写'+name" v-model="account"
|
|
14
|
+ @input="bindPickerChange($event)" />
|
|
15
|
+ </view>
|
|
16
|
+ </view>
|
|
17
|
+ <view class="uni-list-cell">
|
|
18
|
+ <view class="uni-list-cell-left">
|
|
19
|
+ 发药单号:
|
|
20
|
+ </view>
|
|
21
|
+ <view class="uni-list-cell-db-text">
|
|
22
|
+ <text v-show="!loading">{{drugsBag.packid||'无'}}</text>
|
|
23
|
+ <view class="sk-circle" v-show="loading">
|
|
24
|
+ <view class="sk-circle-dot"></view>
|
|
25
|
+ <view class="sk-circle-dot"></view>
|
|
26
|
+ <view class="sk-circle-dot"></view>
|
|
27
|
+ <view class="sk-circle-dot"></view>
|
|
28
|
+ <view class="sk-circle-dot"></view>
|
|
29
|
+ <view class="sk-circle-dot"></view>
|
|
30
|
+ <view class="sk-circle-dot"></view>
|
|
31
|
+ <view class="sk-circle-dot"></view>
|
|
32
|
+ <view class="sk-circle-dot"></view>
|
|
33
|
+ <view class="sk-circle-dot"></view>
|
|
34
|
+ <view class="sk-circle-dot"></view>
|
|
35
|
+ <view class="sk-circle-dot"></view>
|
|
36
|
+ </view>
|
|
37
|
+ </view>
|
|
38
|
+ </view>
|
|
39
|
+ <view class="uni-list-cell">
|
|
40
|
+ <view class="uni-list-cell-left">
|
|
41
|
+ 申请科室:
|
|
42
|
+ </view>
|
|
43
|
+ <view class="uni-list-cell-db-text">
|
|
44
|
+ <text v-show="!loading">{{ drugsBag.launch ? drugsBag.launch.dept : "无" }}</text>
|
|
45
|
+ <view class="sk-circle" v-show="loading">
|
|
46
|
+ <view class="sk-circle-dot"></view>
|
|
47
|
+ <view class="sk-circle-dot"></view>
|
|
48
|
+ <view class="sk-circle-dot"></view>
|
|
49
|
+ <view class="sk-circle-dot"></view>
|
|
50
|
+ <view class="sk-circle-dot"></view>
|
|
51
|
+ <view class="sk-circle-dot"></view>
|
|
52
|
+ <view class="sk-circle-dot"></view>
|
|
53
|
+ <view class="sk-circle-dot"></view>
|
|
54
|
+ <view class="sk-circle-dot"></view>
|
|
55
|
+ <view class="sk-circle-dot"></view>
|
|
56
|
+ <view class="sk-circle-dot"></view>
|
|
57
|
+ <view class="sk-circle-dot"></view>
|
|
58
|
+ </view>
|
|
59
|
+ </view>
|
|
60
|
+ </view>
|
|
61
|
+ </view>
|
|
62
|
+ <view class="changeHospital__footer">
|
|
63
|
+ <view v-if="operate.ok" class="changeHospital__ok" @click="ok" hover-class="seimin-btn-hover">
|
|
64
|
+ {{ operate.ok || "" }}
|
|
65
|
+ </view>
|
|
66
|
+ <view v-if="operate.cancel" class="changeHospital__cancel" @click="cancel" hover-class="seimin-btn-hover">
|
|
67
|
+ {{ operate.cancel || "" }}
|
|
68
|
+ </view>
|
|
69
|
+ </view>
|
|
70
|
+ </view>
|
|
71
|
+ </view>
|
|
72
|
+</template>
|
|
73
|
+
|
|
74
|
+<script>
|
|
75
|
+ import {
|
|
76
|
+ post
|
|
77
|
+ } from "../../http/http.js";
|
|
78
|
+ export default {
|
|
79
|
+ data() {
|
|
80
|
+ return {
|
|
81
|
+ cValue: '', //当前输入的标本编码
|
|
82
|
+ loading: false,
|
|
83
|
+ userData: null,
|
|
84
|
+ hosId: null,
|
|
85
|
+ timer: null,
|
|
86
|
+ drugsBag: {}, //发药单对象
|
|
87
|
+ account: '',
|
|
88
|
+ };
|
|
89
|
+ },
|
|
90
|
+ watch: {
|
|
91
|
+ disjunctor(newValue) {
|
|
92
|
+ if (newValue && this.operate.know == "知道了") {
|
|
93
|
+ this.time = 5;
|
|
94
|
+ this.timer = setInterval(() => {
|
|
95
|
+ this.time--;
|
|
96
|
+ if (this.time <= 0) {
|
|
97
|
+ clearInterval(this.timer);
|
|
98
|
+ this.know();
|
|
99
|
+ }
|
|
100
|
+ }, 1000);
|
|
101
|
+ }
|
|
102
|
+ },
|
|
103
|
+ },
|
|
104
|
+ props: {
|
|
105
|
+ // 显示隐藏
|
|
106
|
+ disjunctor: {
|
|
107
|
+ type: Boolean,
|
|
108
|
+ default: false,
|
|
109
|
+ },
|
|
110
|
+ // 标题
|
|
111
|
+ title: {
|
|
112
|
+ type: String,
|
|
113
|
+ default: "提示",
|
|
114
|
+ },
|
|
115
|
+ // 操作按钮文字
|
|
116
|
+ operate: {
|
|
117
|
+ type: Object,
|
|
118
|
+ default: () => {
|
|
119
|
+ return {
|
|
120
|
+ ok: "确认",
|
|
121
|
+ cancel: "取消",
|
|
122
|
+ };
|
|
123
|
+ },
|
|
124
|
+ },
|
|
125
|
+ name: {
|
|
126
|
+ type: String,
|
|
127
|
+ default: '发药单号'
|
|
128
|
+ }
|
|
129
|
+ },
|
|
130
|
+ methods: {
|
|
131
|
+ //修改picker的值
|
|
132
|
+ bindPickerChange(e) {
|
|
133
|
+ this.drugsBag = {};
|
|
134
|
+ this.loading = true;
|
|
135
|
+ this.cValue = e.target.value;
|
|
136
|
+ clearTimeout(this.timer);
|
|
137
|
+ if (this.cValue.length <= 4) {
|
|
138
|
+ this.drugsBag = {};
|
|
139
|
+ this.loading = false;
|
|
140
|
+ return;
|
|
141
|
+ }
|
|
142
|
+ this.timer = setTimeout(() => {
|
|
143
|
+ let nAccount = e.target.value;
|
|
144
|
+ post("/drugsBag/fetchDataList/drugsBag", {
|
|
145
|
+ "idx": 0,
|
|
146
|
+ "sum": 1,
|
|
147
|
+ "drugsBag": {
|
|
148
|
+ "hosId": this.hosId,
|
|
149
|
+ "packid": e.target.value,
|
|
150
|
+ }
|
|
151
|
+ }).then(result => {
|
|
152
|
+ if (result.status == 200) {
|
|
153
|
+ if (this.cValue === nAccount) {
|
|
154
|
+ if (result.list && result.list.length) {
|
|
155
|
+ //有值
|
|
156
|
+ this.drugsBag = result.list[0];
|
|
157
|
+ } else {
|
|
158
|
+ // 没值
|
|
159
|
+ this.drugsBag = {};
|
|
160
|
+ }
|
|
161
|
+ this.loading = false;
|
|
162
|
+ }
|
|
163
|
+ } else {
|
|
164
|
+ this.loading = false;
|
|
165
|
+ }
|
|
166
|
+ })
|
|
167
|
+ }, 500)
|
|
168
|
+ },
|
|
169
|
+ // 确定
|
|
170
|
+ ok() {
|
|
171
|
+ this.$emit("ok", this.drugsBag);
|
|
172
|
+ },
|
|
173
|
+ // 取消
|
|
174
|
+ cancel() {
|
|
175
|
+ this.$emit("cancel");
|
|
176
|
+ },
|
|
177
|
+ },
|
|
178
|
+ created() {
|
|
179
|
+ this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
|
|
180
|
+ }
|
|
181
|
+ };
|
|
182
|
+</script>
|
|
183
|
+
|
|
184
|
+<style lang="less" scoped>
|
|
185
|
+ .changeHospital {
|
|
186
|
+ position: fixed;
|
|
187
|
+ left: 0;
|
|
188
|
+ right: 0;
|
|
189
|
+ top: 0;
|
|
190
|
+ bottom: 0;
|
|
191
|
+ background-color: rgba(0, 0, 0, 0.2);
|
|
192
|
+ z-index: 999;
|
|
193
|
+
|
|
194
|
+ .uni-list-cell {
|
|
195
|
+ width: 90%;
|
|
196
|
+ display: flex;
|
|
197
|
+ flex-direction: row;
|
|
198
|
+ justify-content: space-evenly;
|
|
199
|
+ align-items: center;
|
|
200
|
+ text-align: center;
|
|
201
|
+ margin-top: 32rpx;
|
|
202
|
+
|
|
203
|
+ .uni-list-cell-left {
|
|
204
|
+ flex: 3;
|
|
205
|
+ font-size: 32rpx;
|
|
206
|
+ color: #666;
|
|
207
|
+ }
|
|
208
|
+
|
|
209
|
+ .uni-list-cell-db {
|
|
210
|
+ border: 1px solid #e5e9ed;
|
|
211
|
+ background-color: #fff;
|
|
212
|
+ padding: 16rpx 0;
|
|
213
|
+ flex: 5;
|
|
214
|
+ }
|
|
215
|
+
|
|
216
|
+ .uni-list-cell-db-text {
|
|
217
|
+ flex: 5;
|
|
218
|
+ text-align: left;
|
|
219
|
+ }
|
|
220
|
+ }
|
|
221
|
+
|
|
222
|
+ .changeHospital__wrap {
|
|
223
|
+ width: 90vw;
|
|
224
|
+ position: absolute;
|
|
225
|
+ left: 50%;
|
|
226
|
+ top: 50%;
|
|
227
|
+ transform: translate(-50%, -50%);
|
|
228
|
+ background-color: #fff;
|
|
229
|
+ border-radius: 12rpx;
|
|
230
|
+ color: #666;
|
|
231
|
+
|
|
232
|
+ .changeHospital__header {
|
|
233
|
+ font-size: 36rpx;
|
|
234
|
+ color: #000;
|
|
235
|
+ height: 84rpx;
|
|
236
|
+ display: flex;
|
|
237
|
+ justify-content: center;
|
|
238
|
+ align-items: center;
|
|
239
|
+ }
|
|
240
|
+
|
|
241
|
+ .changeHospital__article {
|
|
242
|
+ width: 90%;
|
|
243
|
+ margin: 0 auto 25rpx;
|
|
244
|
+ padding: 48rpx 0;
|
|
245
|
+ background-color: rgb(249, 250, 251);
|
|
246
|
+ border: 2rpx solid rgb(229, 233, 237);
|
|
247
|
+ border-radius: 12rpx;
|
|
248
|
+ box-sizing: border-box;
|
|
249
|
+ display: flex;
|
|
250
|
+ flex-direction: column;
|
|
251
|
+ justify-content: center;
|
|
252
|
+ align-items: center;
|
|
253
|
+
|
|
254
|
+ &.p0 {
|
|
255
|
+ padding: 0;
|
|
256
|
+ }
|
|
257
|
+
|
|
258
|
+ .changeHospital__icon {
|
|
259
|
+ font-size: 138rpx;
|
|
260
|
+ margin-bottom: 32rpx;
|
|
261
|
+
|
|
262
|
+ &.changeHospital__icon--success {
|
|
263
|
+ color: rgb(52, 179, 73);
|
|
264
|
+ }
|
|
265
|
+
|
|
266
|
+ &.changeHospital__icon--warn {
|
|
267
|
+ color: rgb(245, 165, 35);
|
|
268
|
+ }
|
|
269
|
+
|
|
270
|
+ &.changeHospital__icon--error {
|
|
271
|
+ color: rgb(255, 58, 82);
|
|
272
|
+ }
|
|
273
|
+ }
|
|
274
|
+
|
|
275
|
+ .changeHospital__content {
|
|
276
|
+ font-size: 36rpx;
|
|
277
|
+ }
|
|
278
|
+
|
|
279
|
+ .changeHospital__info {
|
|
280
|
+ font-size: 32rpx;
|
|
281
|
+ color: rgb(102, 102, 102);
|
|
282
|
+ }
|
|
283
|
+
|
|
284
|
+ .specialCloseFlag {
|
|
285
|
+ width: 90%;
|
|
286
|
+ height: 100%;
|
|
287
|
+ padding: 16rpx;
|
|
288
|
+ }
|
|
289
|
+
|
|
290
|
+ .radio-wrap {
|
|
291
|
+ .radio-item {
|
|
292
|
+ margin-top: 16rpx;
|
|
293
|
+
|
|
294
|
+ /deep/ .uni-radio-input-checked {
|
|
295
|
+ background-color: #49b856 !important;
|
|
296
|
+ border-color: #49b856 !important;
|
|
297
|
+ }
|
|
298
|
+ }
|
|
299
|
+ }
|
|
300
|
+ }
|
|
301
|
+
|
|
302
|
+ .changeHospital__footer {
|
|
303
|
+ box-sizing: border-box;
|
|
304
|
+ height: 100rpx;
|
|
305
|
+ border-top: 2rpx solid rgb(229, 233, 237);
|
|
306
|
+ display: flex;
|
|
307
|
+ align-items: center;
|
|
308
|
+
|
|
309
|
+ view {
|
|
310
|
+ height: 100%;
|
|
311
|
+ display: flex;
|
|
312
|
+ align-items: center;
|
|
313
|
+ justify-content: center;
|
|
314
|
+ font-size: 36rpx;
|
|
315
|
+ color: rgb(102, 102, 102);
|
|
316
|
+ position: relative;
|
|
317
|
+
|
|
318
|
+ &:nth-of-type(2)::before {
|
|
319
|
+ content: "";
|
|
320
|
+ position: absolute;
|
|
321
|
+ left: 0;
|
|
322
|
+ bottom: 0;
|
|
323
|
+ width: 2rpx;
|
|
324
|
+ height: 87rpx;
|
|
325
|
+ background-color: rgb(229, 233, 237);
|
|
326
|
+ }
|
|
327
|
+ }
|
|
328
|
+
|
|
329
|
+ .changeHospital__ok {
|
|
330
|
+ flex: 1;
|
|
331
|
+ color: rgb(73, 184, 86);
|
|
332
|
+ }
|
|
333
|
+
|
|
334
|
+ .changeHospital__cancel {
|
|
335
|
+ flex: 1;
|
|
336
|
+ }
|
|
337
|
+
|
|
338
|
+ .changeHospital__know {
|
|
339
|
+ flex: 1;
|
|
340
|
+ color: rgb(73, 184, 86);
|
|
341
|
+ }
|
|
342
|
+ }
|
|
343
|
+ }
|
|
344
|
+ }
|
|
345
|
+</style>
|