소스 검색

追加执行人复选框

seimin 1 년 전
부모
커밋
04d41c9f30
2개의 변경된 파일319개의 추가작업 그리고 14개의 파일을 삭제
  1. 266 0
      components/checkboxModal/checkboxModal.vue
  2. 53 14
      pages/receipt_infopage/receipt_infopage.vue

+ 266 - 0
components/checkboxModal/checkboxModal.vue

@@ -0,0 +1,266 @@
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="tips" v-html="content" v-if="content"></view>
9
+        <view class="uni-list-cell">
10
+          <checkbox-group @change="forceDeptInputBlur">
11
+            <checkbox value="forceDept" :checked="forceDept" color="#49b856" />可同时复制同类型所有待到达、到送达工单,是否一起复制?
12
+          </checkbox-group>
13
+        </view>
14
+      </view>
15
+      <view class="changeHospital__footer">
16
+        <view v-if="operate.ok" class="changeHospital__ok" @click="ok" hover-class="seimin-btn-hover">
17
+          {{ operate.ok || "" }}
18
+        </view>
19
+        <view v-if="operate.cancel" class="changeHospital__cancel" @click="cancel" hover-class="seimin-btn-hover">
20
+          {{ operate.cancel || "" }}
21
+        </view>
22
+      </view>
23
+    </view>
24
+  </view>
25
+</template>
26
+
27
+<script>
28
+  import {
29
+    post
30
+  } from "../../http/http.js";
31
+  export default {
32
+    data() {
33
+      return {
34
+        forceDept: false,
35
+        hosId: null,
36
+        timer: null,
37
+      };
38
+    },
39
+    watch: {
40
+      disjunctor(newValue) {
41
+        if (newValue && this.operate.know == "知道了") {
42
+          this.time = 5;
43
+          this.timer = setInterval(() => {
44
+            this.time--;
45
+            if (this.time <= 0) {
46
+              clearInterval(this.timer);
47
+              this.know();
48
+            }
49
+          }, 1000);
50
+        }
51
+      },
52
+    },
53
+    props: {
54
+      // 显示隐藏
55
+      disjunctor: {
56
+        type: Boolean,
57
+        default: false,
58
+      },
59
+      // 标题
60
+      title: {
61
+        type: String,
62
+        default: "提示",
63
+      },
64
+      // 内容
65
+      content: {
66
+        type: String,
67
+        default: "",
68
+      },
69
+      // 操作按钮文字
70
+      operate: {
71
+        type: Object,
72
+        default: () => {
73
+          return {
74
+            ok: "确认",
75
+            cancel: "取消",
76
+          };
77
+        },
78
+      },
79
+    },
80
+    methods: {
81
+      // 可同时复制同类型所有待到达、到送达工单,是否一起复制?
82
+      forceDeptInputBlur(e) {
83
+        this.forceDept = e.detail.value.length > 0;
84
+      },
85
+      // 确定
86
+      ok() {
87
+        this.$emit("ok", this.forceDept);
88
+      },
89
+      // 取消
90
+      cancel() {
91
+        this.$emit("cancel");
92
+      },
93
+    },
94
+    created() {
95
+      this.hosId = uni.getStorageSync('userData').user.currentHospital.id;
96
+    }
97
+  };
98
+</script>
99
+
100
+<style lang="less" scoped>
101
+  .changeHospital {
102
+    position: fixed;
103
+    left: 0;
104
+    right: 0;
105
+    top: 0;
106
+    bottom: 0;
107
+    background-color: rgba(0, 0, 0, 0.2);
108
+    z-index: 999;
109
+    
110
+    .tips {
111
+      width: 90%;
112
+      text-align: left;
113
+    }
114
+
115
+    .uni-list-cell {
116
+      width: 90%;
117
+      display: flex;
118
+      flex-direction: row;
119
+      justify-content: space-evenly;
120
+      align-items: center;
121
+      text-align: center;
122
+      margin-top: 32rpx;
123
+
124
+      .uni-list-cell-left {
125
+        flex: 3;
126
+        font-size: 32rpx;
127
+        color: #666;
128
+      }
129
+
130
+      .uni-list-cell-db {
131
+        border: 1px solid #e5e9ed;
132
+        background-color: #fff;
133
+        padding: 16rpx 0;
134
+        flex: 5;
135
+      }
136
+
137
+      .uni-list-cell-db-text {
138
+        flex: 5;
139
+        text-align: left;
140
+      }
141
+    }
142
+
143
+    .changeHospital__wrap {
144
+      width: 90vw;
145
+      position: absolute;
146
+      left: 50%;
147
+      top: 50%;
148
+      transform: translate(-50%, -50%);
149
+      background-color: #fff;
150
+      border-radius: 12rpx;
151
+      color: #666;
152
+
153
+      .changeHospital__header {
154
+        font-size: 36rpx;
155
+        color: #000;
156
+        height: 84rpx;
157
+        display: flex;
158
+        justify-content: center;
159
+        align-items: center;
160
+      }
161
+
162
+      .changeHospital__article {
163
+        width: 90%;
164
+        margin: 0 auto 25rpx;
165
+        padding: 48rpx 0;
166
+        background-color: rgb(249, 250, 251);
167
+        border: 2rpx solid rgb(229, 233, 237);
168
+        border-radius: 12rpx;
169
+        box-sizing: border-box;
170
+        display: flex;
171
+        flex-direction: column;
172
+        justify-content: center;
173
+        align-items: center;
174
+
175
+        &.p0 {
176
+          padding: 0;
177
+        }
178
+
179
+        .changeHospital__icon {
180
+          font-size: 138rpx;
181
+          margin-bottom: 32rpx;
182
+
183
+          &.changeHospital__icon--success {
184
+            color: rgb(52, 179, 73);
185
+          }
186
+
187
+          &.changeHospital__icon--warn {
188
+            color: rgb(245, 165, 35);
189
+          }
190
+
191
+          &.changeHospital__icon--error {
192
+            color: rgb(255, 58, 82);
193
+          }
194
+        }
195
+
196
+        .changeHospital__content {
197
+          font-size: 36rpx;
198
+        }
199
+
200
+        .changeHospital__info {
201
+          font-size: 32rpx;
202
+          color: rgb(102, 102, 102);
203
+        }
204
+
205
+        .specialCloseFlag {
206
+          width: 90%;
207
+          height: 100%;
208
+          padding: 16rpx;
209
+        }
210
+
211
+        .radio-wrap {
212
+          .radio-item {
213
+            margin-top: 16rpx;
214
+
215
+            /deep/ .uni-radio-input-checked {
216
+              background-color: #49b856 !important;
217
+              border-color: #49b856 !important;
218
+            }
219
+          }
220
+        }
221
+      }
222
+
223
+      .changeHospital__footer {
224
+        box-sizing: border-box;
225
+        height: 100rpx;
226
+        border-top: 2rpx solid rgb(229, 233, 237);
227
+        display: flex;
228
+        align-items: center;
229
+
230
+        view {
231
+          height: 100%;
232
+          display: flex;
233
+          align-items: center;
234
+          justify-content: center;
235
+          font-size: 36rpx;
236
+          color: rgb(102, 102, 102);
237
+          position: relative;
238
+
239
+          &:nth-of-type(2)::before {
240
+            content: "";
241
+            position: absolute;
242
+            left: 0;
243
+            bottom: 0;
244
+            width: 2rpx;
245
+            height: 87rpx;
246
+            background-color: rgb(229, 233, 237);
247
+          }
248
+        }
249
+
250
+        .changeHospital__ok {
251
+          flex: 1;
252
+          color: rgb(73, 184, 86);
253
+        }
254
+
255
+        .changeHospital__cancel {
256
+          flex: 1;
257
+        }
258
+
259
+        .changeHospital__know {
260
+          flex: 1;
261
+          color: rgb(73, 184, 86);
262
+        }
263
+      }
264
+    }
265
+  }
266
+</style>

+ 53 - 14
pages/receipt_infopage/receipt_infopage.vue

@@ -425,6 +425,10 @@
425 425
     <selectAccount v-if="hosModels.disjunctor" :title="hosModels.title" :disjunctor="hosModels.disjunctor" @ok="hosOk"
426 426
       @cancel="hosCancel">
427 427
     </selectAccount>
428
+    <!-- 手动查询弹窗 -->
429
+    <checkboxModal v-if="speModels.disjunctor" :content="speModels.content" :disjunctor="speModels.disjunctor"
430
+      @ok="speOk" @cancel="speCancel">
431
+    </checkboxModal>
428 432
   </view>
429 433
 </template>
430 434
 <script>
@@ -446,6 +450,14 @@
446 450
     },
447 451
     data() {
448 452
       return {
453
+        other: {
454
+          user: {},
455
+          data: {},
456
+        },
457
+        // 手动查询弹窗model
458
+        speModels: {
459
+          disjunctor: false,
460
+        },
449 461
         taskTypeConfig: {},
450 462
         // 填写交接人账号弹窗model
451 463
         hosModels: {
@@ -507,6 +519,28 @@
507 519
       },
508 520
     },
509 521
     methods: {
522
+      // 手动查询-确认
523
+      speOk(bulkCopy) {
524
+        console.log(bulkCopy);
525
+        this.speModels.disjunctor = false;
526
+        let { user, data } = this.other;
527
+        this.additionalUserCommon(user.id, data.id, data.worker.id, bulkCopy);
528
+      },
529
+      // 手动查询-取消
530
+      speCancel() {
531
+        this.speModels.disjunctor = false;
532
+      },
533
+      // 手动查询弹窗
534
+      showCheckboxModal(user, data) {
535
+        this.other = {
536
+          user,
537
+          data,
538
+        }
539
+        this.speModels = {
540
+          content: `您要最追加的人员为${user.name},您确认要追加吗?`,
541
+          disjunctor: true,
542
+        }
543
+      },
510 544
       // 判断药品页面控制-是否显示关联批次药品
511 545
       isShowDrugsBatchInfo(){
512 546
         post("/simple/data/fetchDataList/taskType", {
@@ -1105,18 +1139,22 @@
1105 1139
                 });
1106 1140
               }
1107 1141
               if(user.type == 'myQrCode' && user.id && user.name){
1108
-                uni.showModal({
1109
-                  title: "提示",
1110
-                  content: `您要最追加的人员为${user.name},您确认要追加吗?`,
1111
-                  success: (res) => {
1112
-                    if (res.confirm) {
1113
-                      console.log("用户点击确定");
1114
-                      this.additionalUserCommon(user.id, data.id, data.worker.id);
1115
-                    } else if (res.cancel) {
1116
-                      console.log("用户点击取消");
1117
-                    }
1118
-                  },
1119
-                });
1142
+                if(data.taskType.associationType.value == 'other'){
1143
+                  this.showCheckboxModal(user, data);
1144
+                }else{
1145
+                  uni.showModal({
1146
+                    title: "提示",
1147
+                    content: `您要最追加的人员为${user.name},您确认要追加吗?`,
1148
+                    success: (res) => {
1149
+                      if (res.confirm) {
1150
+                        console.log("用户点击确定");
1151
+                        this.additionalUserCommon(user.id, data.id, data.worker.id, false);
1152
+                      } else if (res.cancel) {
1153
+                        console.log("用户点击取消");
1154
+                      }
1155
+                    },
1156
+                  });
1157
+                }
1120 1158
               }else{
1121 1159
                 uni.showToast({
1122 1160
                   icon: "none",
@@ -1136,8 +1174,8 @@
1136 1174
         });
1137 1175
       },
1138 1176
       // 追加陪检人
1139
-      additionalUserCommon(userId, gdId, workerId) {
1140
-        console.log(userId, gdId, workerId);
1177
+      additionalUserCommon(userId, gdId, workerId, bulkCopy) {
1178
+        console.log(userId, gdId, workerId, bulkCopy);
1141 1179
         uni.showLoading({
1142 1180
           title: "加载中",
1143 1181
           mask: true,
@@ -1146,6 +1184,7 @@
1146 1184
           userId,
1147 1185
           gdId,
1148 1186
           workerId,
1187
+          bulkCopy: bulkCopy ? 1 : undefined,
1149 1188
         }).then((result) => {
1150 1189
           uni.hideLoading();
1151 1190
           if (result.state == 200) {