Browse Source

列表转化日期BUG__快捷建单根据检验方式来

seimin 3 years ago
parent
commit
674f52b3a5
2 changed files with 290 additions and 275 deletions
  1. 2 2
      pages/receiptpage/receiptpage.vue
  2. 288 273
      pages/shortcutbuildOrders/shortcutbuildOrders.vue

+ 2 - 2
pages/receiptpage/receiptpage.vue

@@ -310,10 +310,10 @@
310 310
             0
311 311
           );
312 312
           const month = (nDate.getMonth() + 1).toString().padStart(2, 0);
313
-          const day = nDate.getDay().toString().padStart(2, 0);
313
+          const date = nDate.getDate().toString().padStart(2, 0);
314 314
           const hour = nDate.getHours().toString().padStart(2, 0);
315 315
           const minute = nDate.getMinutes().toString().padStart(2, 0);
316
-          return `${month}-${day} ${hour}:${minute}`;
316
+          return `${month}-${date} ${hour}:${minute}`;
317 317
         } else {
318 318
           return "-";
319 319
         }

+ 288 - 273
pages/shortcutbuildOrders/shortcutbuildOrders.vue

@@ -16,14 +16,18 @@
16 16
         <view class="page_item_cont">
17 17
           <view class="page_item_cont_T">
18 18
             <view class="page_item_cont_title">
19
-              <view> <view class="starting">起</view> 起点科室 </view>
19
+              <view>
20
+                <view class="starting">起</view> 起点科室
21
+              </view>
20 22
               <view class="text_big">{{ msg.startDeptShow }}</view>
21 23
             </view>
22 24
           </view>
23 25
           <view class="line"></view>
24 26
           <view class="page_item_cont_B">
25 27
             <view class="page_item_cont_title">
26
-              <view> <view class="End">终</view> 终点科室 </view>
28
+              <view>
29
+                <view class="End">终</view> 终点科室
30
+              </view>
27 31
               <view class="text_big">
28 32
                 <view v-for="(item, i) in targetDeptShow" :key="i">{{
29 33
                   item
@@ -44,279 +48,261 @@
44 48
   </view>
45 49
 </template>
46 50
 <script>
47
-import { get, post, SM, webHandle } from "../../http/http.js";
48
-export default {
49
-  data() {
50
-    return {
51
-      msg: {}, //页面展示信息
52
-      targetDeptShow: [], //目标科室
53
-    };
54
-  },
55
-  methods: {
56
-    // 新建工单并签到
57
-    createOrder() {
58
-      get(`/workerOrder/createQuickOrder/${this.msg.id}`, {}).then((res) => {
59
-        if (res.status == 200) {
60
-          uni.navigateTo({
61
-            url: "../receiptpage/receiptpage",
62
-          });
63
-        } else {
64
-          uni.showToast({
65
-            icon: "none",
66
-            title: "请求失败!",
67
-          });
68
-        }
69
-      });
51
+  import {
52
+    get,
53
+    webHandle
54
+  } from "../../http/http.js";
55
+  export default {
56
+    data() {
57
+      return {
58
+        msg: {}, //页面展示信息
59
+        targetDeptShow: [], //目标科室
60
+      };
61
+    },
62
+    methods: {
63
+      // 新建工单并签到
64
+      createOrder() {
65
+        get(`/workerOrder/createQuickOrder/${this.msg.id}`, {}).then((res) => {
66
+          console.log(res)
67
+          if (res.status == 200) {
68
+            if (res.type === 'plan-spe-ddd-2') {
69
+              //需要扫描标本
70
+              uni.navigateTo({
71
+                url: `../../pages/scanning_code/scanning_code?type=${res.associationTypeName}&type1=${res.type}&id=${res.id}&deptCode=${res.deptCode}&dept=${res.deptName}&accountObj=undefined`,
72
+              });
73
+            } else {
74
+              uni.navigateTo({
75
+                url: "../receiptpage/receiptpage",
76
+              });
77
+            }
78
+          } else {
79
+            uni.showToast({
80
+              icon: "none",
81
+              title: "请求失败!",
82
+            });
83
+          }
84
+        });
85
+      },
70 86
     },
71
-  },
72
-  onLoad(options) {
73
-    console.log(options, "快捷建单");
74
-    this.msg = JSON.parse(options.infoDATA);
75
-    this.targetDeptShow = this.msg.targetDeptShow.split(",");
76
-    // #ifdef APP-PLUS
77
-    webHandle("no", "app");
78
-    // #endif
79
-    // #ifdef H5
80
-    webHandle("no", "wx");
81
-    // #endif
82
-  },
83
-};
87
+    onLoad(options) {
88
+      console.log(options, "快捷建单");
89
+      this.msg = JSON.parse(options.infoDATA);
90
+      this.targetDeptShow = this.msg.targetDeptShow.split(",");
91
+      // #ifdef APP-PLUS
92
+      webHandle("no", "app");
93
+      // #endif
94
+      // #ifdef H5
95
+      webHandle("no", "wx");
96
+      // #endif
97
+    },
98
+  };
84 99
 </script>
85 100
 <style lang="less">
86
-.Receipt_infopage {
87
-  .title {
88
-    font-size: 48rpx;
89
-    margin-top: 24rpx;
90
-    margin-bottom: 24rpx;
91
-    text-align: center;
92
-  }
101
+  .Receipt_infopage {
102
+    .title {
103
+      font-size: 48rpx;
104
+      margin-top: 24rpx;
105
+      margin-bottom: 24rpx;
106
+      text-align: center;
107
+    }
93 108
 
94
-  .page_item_wrap {
95
-    width: 100%;
96
-    height: auto;
97
-    box-sizing: border-box;
98
-    position: absolute;
99
-
100
-    .page_item {
101
-      margin-top: 16rpx;
102
-      margin-bottom: 124rpx;
103
-      background: #fff;
104
-      border-radius: 8rpx;
105
-      margin: 0 20rpx;
106
-      border: 2rpx solid #e5e9ed;
107
-      position: relative;
108
-      overflow: hidden;
109
-      padding: 0 16rpx;
110
-
111
-      .L {
112
-        width: 40rpx;
113
-        height: 40rpx;
114
-        border-radius: 50%;
115
-        background: #f9fafb;
116
-        position: absolute;
117
-        left: -20rpx;
118
-        top: 68rpx;
119
-        border: 2rpx solid #e5e9ed;
120
-      }
109
+    .page_item_wrap {
110
+      width: 100%;
111
+      height: auto;
112
+      box-sizing: border-box;
113
+      position: absolute;
121 114
 
122
-      .R {
123
-        width: 40rpx;
124
-        height: 40rpx;
125
-        border-radius: 50%;
126
-        background: #f9fafb;
127
-        position: absolute;
128
-        float: right;
129
-        right: -20rpx;
130
-        top: 68rpx;
115
+      .page_item {
116
+        margin-top: 16rpx;
117
+        margin-bottom: 124rpx;
118
+        background: #fff;
119
+        border-radius: 8rpx;
120
+        margin: 0 20rpx;
131 121
         border: 2rpx solid #e5e9ed;
132
-      }
133
-
134
-      .starting {
135
-        width: 50rpx;
136
-        height: 50rpx;
137
-        color: #fff;
138
-        background: #49b856;
139
-        display: inline-block;
140
-        border-radius: 50%;
141
-        text-align: center;
142
-        line-height: 46rpx;
143
-        font-size: 32rpx;
144
-        margin-right: 6rpx;
145
-      }
122
+        position: relative;
123
+        overflow: hidden;
124
+        padding: 0 16rpx;
146 125
 
147
-      .End {
148
-        width: 50rpx;
149
-        height: 50rpx;
150
-        color: #fff;
151
-        background: #39b199;
152
-        display: inline-block;
153
-        border-radius: 50%;
154
-        text-align: center;
155
-        line-height: 46rpx;
156
-        font-size: 32rpx;
157
-        margin-right: 6rpx;
158
-      }
126
+        .L {
127
+          width: 40rpx;
128
+          height: 40rpx;
129
+          border-radius: 50%;
130
+          background: #f9fafb;
131
+          position: absolute;
132
+          left: -20rpx;
133
+          top: 68rpx;
134
+          border: 2rpx solid #e5e9ed;
135
+        }
159 136
 
160
-      .page_item_top {
161
-        height: 88rpx;
162
-        border-bottom: 2rpx dashed #e5e9ed;
163
-        padding: 0 16rpx;
137
+        .R {
138
+          width: 40rpx;
139
+          height: 40rpx;
140
+          border-radius: 50%;
141
+          background: #f9fafb;
142
+          position: absolute;
143
+          float: right;
144
+          right: -20rpx;
145
+          top: 68rpx;
146
+          border: 2rpx solid #e5e9ed;
147
+        }
164 148
 
165
-        .page_item_top-inner {
166
-          display: flex;
167
-          justify-content: space-between;
168
-          align-items: center;
169
-          height: 100%;
149
+        .starting {
150
+          width: 50rpx;
151
+          height: 50rpx;
152
+          color: #fff;
153
+          background: #49b856;
154
+          display: inline-block;
155
+          border-radius: 50%;
156
+          text-align: center;
157
+          line-height: 46rpx;
158
+          font-size: 32rpx;
159
+          margin-right: 6rpx;
160
+        }
170 161
 
171
-          .page_item_top_L {
172
-            .emergencys {
173
-              background: #ff3b53 !important;
174
-              width: 124rpx !important;
175
-            }
162
+        .End {
163
+          width: 50rpx;
164
+          height: 50rpx;
165
+          color: #fff;
166
+          background: #39b199;
167
+          display: inline-block;
168
+          border-radius: 50%;
169
+          text-align: center;
170
+          line-height: 46rpx;
171
+          font-size: 32rpx;
172
+          margin-right: 6rpx;
173
+        }
176 174
 
177
-            .emergency {
178
-              background: #ff3b53 !important;
179
-            }
175
+        .page_item_top {
176
+          height: 88rpx;
177
+          border-bottom: 2rpx dashed #e5e9ed;
178
+          padding: 0 16rpx;
180 179
 
181
-            .emergency1 {
182
-              background: #49b856 !important;
183
-            }
180
+          .page_item_top-inner {
181
+            display: flex;
182
+            justify-content: space-between;
183
+            align-items: center;
184
+            height: 100%;
184 185
 
185
-            .page_item_cont_start {
186
-              text-align: center;
187
-              height: 44rpx;
188
-              width: 104rpx;
189
-              line-height: 44rpx;
190
-              border-radius: 8rpx;
191
-              background: #49b856;
192
-              color: #fff;
193
-              display: inline-block;
186
+            .page_item_top_L {
187
+              .emergencys {
188
+                background: #ff3b53 !important;
189
+                width: 124rpx !important;
190
+              }
191
+
192
+              .emergency {
193
+                background: #ff3b53 !important;
194
+              }
195
+
196
+              .emergency1 {
197
+                background: #49b856 !important;
198
+              }
199
+
200
+              .page_item_cont_start {
201
+                text-align: center;
202
+                height: 44rpx;
203
+                width: 104rpx;
204
+                line-height: 44rpx;
205
+                border-radius: 8rpx;
206
+                background: #49b856;
207
+                color: #fff;
208
+                display: inline-block;
209
+              }
210
+
211
+              .L_time {
212
+                color: #6cc076;
213
+                font-size: 32rpx;
214
+              }
215
+
216
+              .L_text {
217
+                font-size: 32rpx;
218
+                font-weight: 700;
219
+              }
194 220
             }
195 221
 
196
-            .L_time {
197
-              color: #6cc076;
222
+            .page_item_top_R {
198 223
               font-size: 32rpx;
199
-            }
200 224
 
201
-            .L_text {
202
-              font-size: 32rpx;
203
-              font-weight: 700;
225
+              .L_iocn {
226
+                color: rgb(7, 134, 60);
227
+                font-size: 36rpx;
228
+                font-weight: 700;
229
+              }
204 230
             }
205 231
           }
232
+        }
206 233
 
207
-          .page_item_top_R {
234
+        .page_item_cont {
235
+          min-height: 180rpx;
236
+          // max-height: 424rpx;
237
+          padding: 0 16rpx;
238
+          text-align: left;
239
+          position: relative;
240
+
241
+          .text_big {
208 242
             font-size: 32rpx;
243
+            font-weight: 700;
244
+            margin-top: 10rpx;
209 245
 
210
-            .L_iocn {
211
-              color: rgb(7, 134, 60);
212
-              font-size: 36rpx;
246
+            p {
213 247
               font-weight: 700;
248
+              line-height: 1.5;
214 249
             }
215 250
           }
216
-        }
217
-      }
218
-
219
-      .page_item_cont {
220
-        min-height: 180rpx;
221
-        // max-height: 424rpx;
222
-        padding: 0 16rpx;
223
-        text-align: left;
224
-        position: relative;
225 251
 
226
-        .text_big {
227
-          font-size: 32rpx;
228
-          font-weight: 700;
229
-          margin-top: 10rpx;
230
-
231
-          p {
232
-            font-weight: 700;
233
-            line-height: 1.5;
252
+          .line {
253
+            height: 20rpx;
254
+            width: 2rpx;
255
+            border-left: 2rpx solid #e5e9ed;
256
+            position: absolute;
257
+            top: 82rpx;
258
+            left: 40rpx;
234 259
           }
235
-        }
236
-
237
-        .line {
238
-          height: 20rpx;
239
-          width: 2rpx;
240
-          border-left: 2rpx solid #e5e9ed;
241
-          position: absolute;
242
-          top: 82rpx;
243
-          left: 40rpx;
244
-        }
245
-
246
-        .lines {
247
-          height: 40%;
248
-          width: 2rpx;
249
-          border-left: 2rpx solid #e5e9ed;
250
-          position: absolute;
251
-          top: 23%;
252
-          left: 36rpx;
253
-        }
254 260
 
255
-        .page_item_cont_T {
256
-          padding-top: 28rpx;
257
-          font-size: 28rpx;
258
-
259
-          .page_item_cont_title {
260
-            height: 100%;
261
-            font-size: 32rpx;
262
-            display: flex;
263
-            justify-content: space-between;
261
+          .lines {
262
+            height: 40%;
263
+            width: 2rpx;
264
+            border-left: 2rpx solid #e5e9ed;
265
+            position: absolute;
266
+            top: 23%;
267
+            left: 36rpx;
264 268
           }
265
-        }
266 269
 
267
-        .page_item_cont_B {
268
-          padding-top: 28rpx;
269
-          margin-bottom: 28rpx;
270
+          .page_item_cont_T {
271
+            padding-top: 28rpx;
272
+            font-size: 28rpx;
270 273
 
271
-          .page_item_cont_title {
272
-            font-size: 32rpx;
273
-            display: flex;
274
-            justify-content: space-between;
275
-          }
276
-
277
-          .page_item_cont_title1 {
278
-            height: 60rpx;
279
-            line-height: 60rpx;
280
-            font-size: 32rpx;
281
-            padding-left: 64rpx;
274
+            .page_item_cont_title {
275
+              height: 100%;
276
+              font-size: 32rpx;
277
+              display: flex;
278
+              justify-content: space-between;
279
+            }
282 280
           }
283
-        }
284
-      }
285
-
286
-      .page_item_foot {
287
-        border-top: 2rpx dashed #e5e9ed;
288
-        border-bottom: 2rpx dashed #e5e9ed;
289
-        padding: 28rpx 16rpx;
290
-        text-align: left;
291 281
 
292
-        .page_item_foot_text {
293
-          font-size: 32rpx;
294
-          margin-bottom: 20rpx;
282
+          .page_item_cont_B {
283
+            padding-top: 28rpx;
284
+            margin-bottom: 28rpx;
295 285
 
296
-          .text1 {
297
-            color: rgb(102, 102, 102);
298
-          }
286
+            .page_item_cont_title {
287
+              font-size: 32rpx;
288
+              display: flex;
289
+              justify-content: space-between;
290
+            }
299 291
 
300
-          .text2 {
301
-            float: right;
302
-            font-weight: 700;
292
+            .page_item_cont_title1 {
293
+              height: 60rpx;
294
+              line-height: 60rpx;
295
+              font-size: 32rpx;
296
+              padding-left: 64rpx;
297
+            }
303 298
           }
304 299
         }
305
-      }
306 300
 
307
-      #infos {
308
-        display: none;
309
-      }
310
-
311
-      .page_item_infos {
312
-        padding-bottom: 20rpx;
313
-        border-bottom: 2rpx dashed #e5e9ed;
314
-
315
-        .page_item_info2 {
301
+        .page_item_foot {
302
+          border-top: 2rpx dashed #e5e9ed;
303
+          border-bottom: 2rpx dashed #e5e9ed;
304
+          padding: 28rpx 16rpx;
316 305
           text-align: left;
317
-          line-height: 60rpx;
318
-          font-size: 32rpx;
319
-          padding-left: 16rpx;
320 306
 
321 307
           .page_item_foot_text {
322 308
             font-size: 32rpx;
@@ -332,49 +318,78 @@ export default {
332 318
             }
333 319
           }
334 320
         }
321
+
322
+        #infos {
323
+          display: none;
324
+        }
325
+
326
+        .page_item_infos {
327
+          padding-bottom: 20rpx;
328
+          border-bottom: 2rpx dashed #e5e9ed;
329
+
330
+          .page_item_info2 {
331
+            text-align: left;
332
+            line-height: 60rpx;
333
+            font-size: 32rpx;
334
+            padding-left: 16rpx;
335
+
336
+            .page_item_foot_text {
337
+              font-size: 32rpx;
338
+              margin-bottom: 20rpx;
339
+
340
+              .text1 {
341
+                color: rgb(102, 102, 102);
342
+              }
343
+
344
+              .text2 {
345
+                float: right;
346
+                font-weight: 700;
347
+              }
348
+            }
349
+          }
350
+        }
335 351
       }
336
-    }
337 352
 
338
-    .L-l {
339
-      width: 2rpx;
340
-      height: 40rpx;
341
-      background: #f9fafb;
342
-      position: absolute;
343
-      left: 20rpx;
344
-      top: 72rpx;
353
+      .L-l {
354
+        width: 2rpx;
355
+        height: 40rpx;
356
+        background: #f9fafb;
357
+        position: absolute;
358
+        left: 20rpx;
359
+        top: 72rpx;
360
+      }
361
+
362
+      .R-l {
363
+        width: 2rpx;
364
+        height: 40rpx;
365
+        background: #f9fafb;
366
+        position: absolute;
367
+        right: 20rpx;
368
+        top: 72rpx;
369
+      }
345 370
     }
346 371
 
347
-    .R-l {
348
-      width: 2rpx;
349
-      height: 40rpx;
372
+    .foot_btn2 {
373
+      position: fixed;
374
+      bottom: 0;
375
+      width: 100vw;
376
+      padding: 0 20rpx;
377
+      box-sizing: border-box;
378
+      line-height: 66rpx;
379
+      height: 100rpx;
380
+      border-top: 2rpx solid #e5e9ed;
350 381
       background: #f9fafb;
351
-      position: absolute;
352
-      right: 20rpx;
353
-      top: 72rpx;
354
-    }
355
-  }
382
+      text-align: center;
356 383
 
357
-  .foot_btn2 {
358
-    position: fixed;
359
-    bottom: 0;
360
-    width: 100vw;
361
-    padding: 0 20rpx;
362
-    box-sizing: border-box;
363
-    line-height: 66rpx;
364
-    height: 100rpx;
365
-    border-top: 2rpx solid #e5e9ed;
366
-    background: #f9fafb;
367
-    text-align: center;
368
-
369
-    .btn2 {
370
-      height: 66rpx;
371
-      width: 100%;
372
-      background-image: linear-gradient(to right, #72c172, #3bb197);
373
-      color: #fff;
374
-      border-radius: 8rpx;
375
-      font-size: 32rpx;
376
-      margin-top: 16rpx;
384
+      .btn2 {
385
+        height: 66rpx;
386
+        width: 100%;
387
+        background-image: linear-gradient(to right, #72c172, #3bb197);
388
+        color: #fff;
389
+        border-radius: 8rpx;
390
+        font-size: 32rpx;
391
+        margin-top: 16rpx;
392
+      }
377 393
     }
378 394
   }
379
-}
380 395
 </style>