Browse Source

mod:添加layout

weieryang 3 years ago
parent
commit
e95729b32a

+ 449 - 0
CallCenterWeb.UI/RMYY/src/views/layout/components/Navbar/orderMessage copy.vue

@@ -0,0 +1,449 @@
1
+<template>
2
+  <div class="topNotice">
3
+    <el-scrollbar wrap-class="scrollbar-wrapper">
4
+      <ul v-if="topNoticeData" class="content">
5
+        <li class="proitem">
6
+          <h5 class="proname">标题:{{ topNoticeData.SMS_Title }}</h5>
7
+          <span class="orderendtime" :title="topNoticeData.SMS_Content"
8
+            >内容:{{ topNoticeData.SMS_Content }}
9
+          </span>
10
+
11
+          <el-button
12
+            class="unread"
13
+            @click="handleChange(topNoticeData.SMS_Id,topNoticeData.F_WorkOrderId)"
14
+            >查看
15
+          </el-button>
16
+        </li>
17
+      </ul>
18
+      <div v-else class="nomsg">没有新消息</div>
19
+    </el-scrollbar>
20
+  </div>
21
+</template>
22
+
23
+<script>
24
+// getReadData
25
+import { getMsg } from "@/api/commonAPI";
26
+// import daibangdetail from "@/views/todoManagement/todoList/detail";
27
+// import orderDetail from "@/views/orderManagement/orderList/detail";
28
+// import taskDetail from "@/views/taskManagement/taskList/common/detail";
29
+// import memberDetail from "@/views/memberManagement/memberList/components/detail";
30
+import router from "@/router";
31
+export default {
32
+  name: "orderMessage",
33
+  data() {
34
+    return {
35
+      loading: false,
36
+      topNoticeData: {}, //顶部消息数据
37
+      readId: "",
38
+      detailId: "",
39
+      timer: "", //定时器
40
+      timer1: "", //顶部消息定时器
41
+    };
42
+  },
43
+  created() {
44
+    // this.getList();
45
+    this.getTopList();
46
+  },
47
+  methods: {
48
+    // 项目的消息
49
+    getTopList() {
50
+      this.loading = true;
51
+      const params = {
52
+        // istop: -1,
53
+        // isread: 0,
54
+      };
55
+      // 消息提醒
56
+      getMsg(params).then((response) => {
57
+        if (response.state == "success") {
58
+          const res = response.data[0];
59
+          console.log(res);
60
+          if (res && res.length != 0) {
61
+            this.topNoticeData = res;
62
+          }
63
+        }
64
+      });
65
+    },
66
+    getList() {
67
+      this.loading = true;
68
+      const params = {
69
+        istop: 1,
70
+      };
71
+      // 消息提醒
72
+      getMsg(params).then((response) => {
73
+        if (response.state == "success") {
74
+          const res = response.rows;
75
+          if (res && res.length != 0) {
76
+          } else {
77
+          }
78
+        }
79
+      });
80
+    },
81
+    //已读处理
82
+    getRead() {
83
+      this.$confirm("确定已读吗?", "提示", {
84
+        confirmButtonText: "确定",
85
+        cancelButtonText: "取消",
86
+        type: "warning",
87
+      })
88
+        .then(() => {
89
+          this.getReadataList();
90
+          this.$message({
91
+            type: "success",
92
+            message: "处理成功!",
93
+          });
94
+        })
95
+        .catch(() => {
96
+          this.$message({
97
+            type: "info",
98
+            message: "已取消处理",
99
+          });
100
+        });
101
+    },
102
+    handleChange(id,orderId) {
103
+      if (id) {
104
+        
105
+        this.getRead();
106
+      }
107
+    },
108
+    getReadataList() {
109
+      const params = {
110
+        ids: this.readId,
111
+        state: 1,
112
+      };
113
+      getReadData(params)
114
+        .then((response) => {
115
+          if (response.state == "success") {
116
+            this.getTopList();
117
+          }
118
+        })
119
+        .catch((result) => {
120
+          console.log("处理失败");
121
+        });
122
+    },
123
+  },
124
+  mounted() {
125
+    (this.timer1 = setInterval(() => {
126
+      const params = {
127
+        istop: -1,
128
+        isread: 0,
129
+      };
130
+      getMsg(params).then((response) => {
131
+        if (response.state == "success") {
132
+          const res = response.rows;
133
+          if (res && res.length) {
134
+            this.topNoticeData = [];
135
+          }
136
+        }
137
+      });
138
+    }, 120000)),
139
+      (this.timer = setInterval(() => {
140
+        const params = {
141
+          istop: 1,
142
+        };
143
+        getMsg(params).then((response) => {
144
+          if (response.state == "success") {
145
+            const res = response.rows;
146
+            if (res && res.length) {
147
+              const infoData = res[0];
148
+              var a = window.localStorage.getItem("num");
149
+              if (a != infoData.F_ID) {
150
+                window.localStorage.setItem("num", infoData.F_ID);
151
+                if (infoData.SMS_Type == 3) {
152
+                  this.readId = infoData.SMS_Id;
153
+                  this.detailId = infoData.F_ID;
154
+                  const h = this.$createElement;
155
+                  this.$msgbox({
156
+                    title: "待办消息",
157
+                    message: h("p", null, [
158
+                      h("span", null, "内容是 "),
159
+                      h("span", null, infoData.SMS_Content),
160
+                    ]),
161
+                    customClass: "messageBox",
162
+                    closeOnClickModal: false,
163
+                    showCancelButton: true,
164
+                    confirmButtonText: "详情",
165
+                    cancelButtonText: "关闭",
166
+                  })
167
+                    .then((action) => {
168
+                      this.$layer.iframe({
169
+                        content: {
170
+                          content: daibangdetail, // 传递的组件对象
171
+                          parent: this, // 当前的vue对象
172
+                          data: { rowid: infoData.F_ID.toString() }, // props
173
+                        },
174
+                        area: ["80%", "90%"],
175
+                        title: "详情",
176
+                      });
177
+                      this.getReadataList();
178
+                    })
179
+                    .catch((result) => {
180
+                      console.log("取消了");
181
+                    });
182
+                } else if (infoData.SMS_Type == 0) {
183
+                  this.readId = infoData.SMS_Id;
184
+                  this.detailId = infoData.F_ID;
185
+                  const h = this.$createElement;
186
+                  this.$msgbox({
187
+                    title: "订单消息",
188
+                    message: h("p", null, [
189
+                      h("span", null, "内容是 "),
190
+                      h("span", null, infoData.SMS_Content),
191
+                    ]),
192
+                    customClass: "messageBox",
193
+                    closeOnClickModal: false,
194
+                    showCancelButton: true,
195
+                    confirmButtonText: "详情",
196
+                    cancelButtonText: "关闭",
197
+                  })
198
+                    .then((action) => {
199
+                      this.$layer.iframe({
200
+                        content: {
201
+                          content: orderDetail, // 传递的组件对象
202
+                          parent: this, // 当前的vue对象
203
+                          data: { rowid: infoData.F_ID.toString() }, // props
204
+                        },
205
+                        area: ["80%", "90%"],
206
+                        title: "详情",
207
+                      });
208
+                      this.getReadataList();
209
+                    })
210
+                    .catch((result) => {
211
+                      console.log("取消了");
212
+                    });
213
+                } else if (infoData.SMS_Type == 1) {
214
+                  this.readId = infoData.SMS_Id;
215
+                  this.detailId = infoData.F_ID;
216
+                  const h = this.$createElement;
217
+                  this.$msgbox({
218
+                    title: "媒体消息",
219
+                    message: h("p", null, [
220
+                      h("span", null, "内容是 "),
221
+                      h("span", null, infoData.SMS_Content),
222
+                    ]),
223
+                    customClass: "messageBox",
224
+                    closeOnClickModal: false,
225
+                    showCancelButton: true,
226
+                    confirmButtonText: "详情",
227
+                    cancelButtonText: "关闭",
228
+                  })
229
+                    .then((action) => {
230
+                      router.push({ name: "mediaInformation" });
231
+                      this.getReadataList();
232
+                    })
233
+                    .catch((result) => {
234
+                      console.log("取消了");
235
+                    });
236
+                } else if (infoData.SMS_Type == 2) {
237
+                  this.readId = infoData.SMS_Id;
238
+                  this.detailId = infoData.F_ID;
239
+                  const h = this.$createElement;
240
+                  this.$msgbox({
241
+                    title: "任务消息",
242
+                    message: h("p", null, [
243
+                      h("span", null, "内容是 "),
244
+                      h("span", null, infoData.SMS_Content),
245
+                    ]),
246
+                    customClass: "messageBox",
247
+                    closeOnClickModal: false,
248
+                    showCancelButton: true,
249
+                    confirmButtonText: "详情",
250
+                    cancelButtonText: "关闭",
251
+                  })
252
+                    .then((action) => {
253
+                      this.$layer.iframe({
254
+                        content: {
255
+                          content: taskDetail, // 传递的组件对象
256
+                          parent: this, // 当前的vue对象
257
+                          data: { rowid: infoData.F_ID.toString() }, // props
258
+                        },
259
+                        area: ["80%", "90%"],
260
+                        title: "详情",
261
+                      });
262
+                      this.getReadataList();
263
+                    })
264
+                    .catch((result) => {
265
+                      console.log("取消了");
266
+                    });
267
+                } else if (infoData.SMS_Type == 4) {
268
+                  this.readId = infoData.SMS_Id;
269
+                  this.detailId = infoData.F_ID;
270
+                  const h = this.$createElement;
271
+                  this.$msgbox({
272
+                    title: "质检消息",
273
+                    message: h("p", null, [
274
+                      h("span", null, "内容是 "),
275
+                      h("span", null, infoData.SMS_Content),
276
+                    ]),
277
+                    customClass: "messageBox",
278
+                    closeOnClickModal: false,
279
+                    showCancelButton: true,
280
+                    confirmButtonText: "详情",
281
+                    cancelButtonText: "关闭",
282
+                  })
283
+                    .then((action) => {
284
+                      this.$layer.iframe({
285
+                        content: {
286
+                          content: daibangdetail, // 传递的组件对象
287
+                          parent: this, // 当前的vue对象
288
+                          data: { rowid: infoData.F_ID.toString() }, // props
289
+                        },
290
+                        area: ["80%", "90%"],
291
+                        title: "详情",
292
+                      });
293
+                      this.getReadataList();
294
+                    })
295
+                    .catch((result) => {
296
+                      console.log("取消了");
297
+                    });
298
+                } else if (infoData.SMS_Type == 5) {
299
+                  this.readId = infoData.SMS_Id;
300
+                  this.detailId = infoData.F_ID;
301
+                  const h = this.$createElement;
302
+                  this.$msgbox({
303
+                    title: "绩效消息",
304
+                    message: h("p", null, [
305
+                      h("span", null, "内容是 "),
306
+                      h("span", null, infoData.SMS_Content),
307
+                    ]),
308
+                    customClass: "messageBox",
309
+                    closeOnClickModal: false,
310
+                    showCancelButton: true,
311
+                    confirmButtonText: "详情",
312
+                    cancelButtonText: "关闭",
313
+                  })
314
+                    .then((action) => {
315
+                      this.$layer.iframe({
316
+                        content: {
317
+                          content: daibangdetail, // 传递的组件对象
318
+                          parent: this, // 当前的vue对象
319
+                          data: { rowid: infoData.F_ID.toString() }, // props
320
+                        },
321
+                        area: ["80%", "90%"],
322
+                        title: "详情",
323
+                      });
324
+                      this.getReadataList();
325
+                    })
326
+                    .catch((result) => {
327
+                      console.log("取消了");
328
+                    });
329
+                } else if (infoData.SMS_Type == 6) {
330
+                  this.readId = infoData.SMS_Id;
331
+                  this.detailId = infoData.F_ID;
332
+                  const h = this.$createElement;
333
+                  this.$msgbox({
334
+                    title: "转移消息",
335
+                    message: h("p", null, [
336
+                      h("span", null, "内容是 "),
337
+                      h("span", null, infoData.SMS_Content),
338
+                    ]),
339
+                    customClass: "messageBox",
340
+                    closeOnClickModal: false,
341
+                    showCancelButton: true,
342
+                    confirmButtonText: "详情",
343
+                    cancelButtonText: "关闭",
344
+                  })
345
+                    .then((action) => {
346
+                      this.$layer.iframe({
347
+                        content: {
348
+                          content: memberDetail, // 传递的组件对象
349
+                          parent: this, // 当前的vue对象
350
+                          data: { rowid: infoData.F_ID.toString() }, // props
351
+                        },
352
+                        area: ["80%", "90%"],
353
+                        title: "详情",
354
+                      });
355
+                      this.getReadataList();
356
+                    })
357
+                    .catch((result) => {
358
+                      console.log("取消了");
359
+                    });
360
+                }
361
+              }
362
+            }
363
+          }
364
+        });
365
+      }, 120000));
366
+  },
367
+};
368
+</script>
369
+
370
+<style rel="stylesheet/scss" lang="scss" >
371
+.topNoticePop {
372
+  padding: 0;
373
+  .topNotice {
374
+    .scrollbar-wrapper {
375
+      max-height: 488px;
376
+    }
377
+    .footer_menu {
378
+      .el-dropdown-menu__item {
379
+        padding: 20px;
380
+        line-height: 20px;
381
+      }
382
+    }
383
+  }
384
+}
385
+.messageBox {
386
+  position: absolute !important;
387
+  bottom: 0 !important;
388
+  right: 0 !important;
389
+}
390
+</style>
391
+
392
+<style rel="stylesheet/scss" lang="scss" scoped>
393
+.topNoticePop {
394
+  .topNotice {
395
+    .header {
396
+      padding: 20px;
397
+      background-color: #fff;
398
+      border-bottom: 1px solid #e4eaec;
399
+      .title {
400
+        margin: 0;
401
+        color: #37474f;
402
+        font-weight: 400;
403
+        font-size: 1em;
404
+        text-shadow: rgba(0, 0, 0, 0.05) 0 0 1px;
405
+      }
406
+    }
407
+    .content {
408
+      list-style: none;
409
+      padding: 0 20px;
410
+      margin: 0;
411
+      .proitem {
412
+        border-bottom: 1px solid #e4eaec;
413
+        &:last-child {
414
+          border-bottom: none;
415
+        }
416
+        padding: 10px 0;
417
+        .proname {
418
+          margin: 0;
419
+          padding: 0;
420
+          font-weight: 400;
421
+          font-size: 14px;
422
+        }
423
+        .orderendtime {
424
+          display: inline-block;
425
+          font-size: 12px;
426
+          width: 260px;
427
+          overflow: hidden;
428
+          text-overflow: ellipsis;
429
+          white-space: nowrap;
430
+          cursor: pointer;
431
+        }
432
+      }
433
+    }
434
+    .nomsg {
435
+      min-height: 270px;
436
+      display: flex;
437
+      align-items: center;
438
+      justify-content: center;
439
+    }
440
+    .footer_menu {
441
+      background-color: #f3f7f9;
442
+      border-top: 1px solid #e4eaec;
443
+    }
444
+  }
445
+}
446
+.unread {
447
+  float: right;
448
+}
449
+</style>

+ 197 - 0
CallCenterWeb.UI/RMYY/src/views/layout/components/Navbar/orderMessage.vue

@@ -0,0 +1,197 @@
1
+<template>
2
+  <div class="topNotice">
3
+    <el-scrollbar wrap-class="scrollbar-wrapper">
4
+      <ul v-if="topNoticeData" class="content">
5
+        <li class="proitem">
6
+          <h5 class="proname">标题:{{ topNoticeData.SMS_Title }}</h5>
7
+          <span class="orderendtime" :title="topNoticeData.SMS_Content"
8
+            >内容:{{ topNoticeData.SMS_Content }}
9
+          </span>
10
+
11
+          <el-button
12
+            class="unread"
13
+            @click="
14
+              handleChange(
15
+                topNoticeData.SMS_Id,
16
+                topNoticeData.F_WorkOrderId,
17
+                topNoticeData.SMS_Type
18
+              )
19
+            "
20
+            >查看
21
+          </el-button>
22
+        </li>
23
+      </ul>
24
+      <div v-else class="nomsg">没有新消息</div>
25
+    </el-scrollbar>
26
+  </div>
27
+</template>
28
+
29
+<script>
30
+// getReadData
31
+import { getMsg, updateState } from "@/api/commonAPI";
32
+import detail from "@/views/orderManage/components/orderDetail.vue";
33
+import askDetail from "@/views/orderManage/components/askdetail.vue";
34
+export default {
35
+  name: "orderMessage",
36
+  props: {
37
+    layerid: {
38
+      type: String,
39
+      default: "",
40
+    },
41
+  },
42
+  data() {
43
+    return {
44
+      loading: false,
45
+      topNoticeData: {}, //顶部消息数据
46
+    };
47
+  },
48
+  created() {
49
+    this.getTopList();
50
+  },
51
+  methods: {
52
+    // 项目的消息
53
+    getTopList() {
54
+      this.loading = true;
55
+      const params = {};
56
+      // 消息提醒
57
+      getMsg(params).then((response) => {
58
+        if (response.state == "success") {
59
+          const res = response.data[0];
60
+          if (res && res.length != 0) {
61
+            this.topNoticeData = res;
62
+          }
63
+        }
64
+      });
65
+    },
66
+    //已读处理
67
+    getOrder(ids, orderId, orderType) {
68
+      let orderDetail;
69
+      if (orderType === 0) {
70
+        orderDetail = askDetail;
71
+      }
72
+      if (orderType === 1) {
73
+        orderDetail = detail;
74
+      }
75
+      const params = {
76
+        ids: ids,
77
+        state: 1,
78
+      };
79
+      updateState(params)
80
+        .then((response) => {
81
+          this.loading = false;
82
+          if (response.state.toLowerCase() === "success") {
83
+            this.$parent.$layer.close(this.layerid);
84
+            this.$layer.iframe({
85
+              content: {
86
+                content: orderDetail, // 传递的组件对象
87
+                parent: this, // 当前的vue对象
88
+                data: {
89
+                  rowid: orderId,
90
+                }, // props
91
+              },
92
+              area: ["80%", "90%"],
93
+              title: "工单详情",
94
+            });
95
+          } else {
96
+            this.$message({
97
+              message: "失败!",
98
+              type: "success",
99
+              duration: 1000,
100
+            });
101
+          }
102
+        })
103
+        .catch((response) => {
104
+          this.loading = false;
105
+        });
106
+    },
107
+    handleChange(ids, orderId, orderType) {
108
+      if (ids) {
109
+        this.getOrder(ids, orderId, orderType);
110
+        console.log("123");
111
+      }
112
+    },
113
+  },
114
+  mounted() {},
115
+};
116
+</script>
117
+
118
+<style rel="stylesheet/scss" lang="scss" >
119
+.topNoticePop {
120
+  padding: 0;
121
+  .topNotice {
122
+    .scrollbar-wrapper {
123
+      max-height: 488px;
124
+    }
125
+    .footer_menu {
126
+      .el-dropdown-menu__item {
127
+        padding: 20px;
128
+        line-height: 20px;
129
+      }
130
+    }
131
+  }
132
+}
133
+.messageBox {
134
+  position: absolute !important;
135
+  bottom: 0 !important;
136
+  right: 0 !important;
137
+}
138
+</style>
139
+
140
+<style rel="stylesheet/scss" lang="scss" scoped>
141
+.topNoticePop {
142
+  .topNotice {
143
+    .header {
144
+      padding: 20px;
145
+      background-color: #fff;
146
+      border-bottom: 1px solid #e4eaec;
147
+      .title {
148
+        margin: 0;
149
+        color: #37474f;
150
+        font-weight: 400;
151
+        font-size: 1em;
152
+        text-shadow: rgba(0, 0, 0, 0.05) 0 0 1px;
153
+      }
154
+    }
155
+    .content {
156
+      list-style: none;
157
+      padding: 0 20px;
158
+      margin: 0;
159
+      .proitem {
160
+        border-bottom: 1px solid #e4eaec;
161
+        &:last-child {
162
+          border-bottom: none;
163
+        }
164
+        padding: 10px 0;
165
+        .proname {
166
+          margin: 0;
167
+          padding: 0;
168
+          font-weight: 400;
169
+          font-size: 14px;
170
+        }
171
+        .orderendtime {
172
+          display: inline-block;
173
+          font-size: 12px;
174
+          width: 260px;
175
+          overflow: hidden;
176
+          text-overflow: ellipsis;
177
+          white-space: nowrap;
178
+          cursor: pointer;
179
+        }
180
+      }
181
+    }
182
+    .nomsg {
183
+      min-height: 270px;
184
+      display: flex;
185
+      align-items: center;
186
+      justify-content: center;
187
+    }
188
+    .footer_menu {
189
+      background-color: #f3f7f9;
190
+      border-top: 1px solid #e4eaec;
191
+    }
192
+  }
193
+}
194
+.unread {
195
+  float: right;
196
+}
197
+</style>

+ 583 - 0
CallCenterWeb.UI/RMYY/src/views/orderManage/mySubmit/scheduleEdit.vue

@@ -0,0 +1,583 @@
1
+<template>
2
+  <div>
3
+    <el-form :model="ruleForm" label-width="150px" class="order_form">
4
+      <el-col :span="24">
5
+        <el-row v-if="ruleForm.WorkOrderCategory === '2001'">
6
+          <el-col>
7
+            <el-form-item label="设备信息">
8
+              <el-button icon="el-icon-plus" @click="addItem()">添加</el-button>
9
+            </el-form-item>
10
+          </el-col>
11
+        </el-row>
12
+        <el-row v-if="ruleForm.WorkOrderCategory === '2001'">
13
+          <el-row v-for="(item, index) in devList" :key="index">
14
+            <el-col :span="12">
15
+              <el-form-item prop="devname">
16
+                <el-select
17
+                  v-model="item.devname"
18
+                  placeholder="请选择设备"
19
+                  @change="selectChange"
20
+                >
21
+                  <el-option
22
+                    v-for="item in equipArr"
23
+                    :key="item.F_EquipID"
24
+                    :label="item.F_EquipName"
25
+                    :value="`${item.F_EquipName},${item.F_EquipID}`"
26
+                  />
27
+                </el-select>
28
+              </el-form-item>
29
+            </el-col>
30
+            <el-col :span="12">
31
+              <el-form-item prop="num">
32
+                <el-input-number v-model="item.num" :min="1" size="medium" />
33
+                <!-- <el-button v-if="devList.length>1" type="primary" icon="el-icon-close" circle @click="removeItem(index)" /> -->
34
+              </el-form-item>
35
+            </el-col>
36
+          </el-row>
37
+        </el-row>
38
+
39
+        <el-row v-if="ruleForm.WorkOrderCategory === '2002'">
40
+          <el-col>
41
+            <el-form-item label="物资信息">
42
+              <el-button @click="addItem()">添加</el-button>
43
+            </el-form-item>
44
+          </el-col>
45
+        </el-row>
46
+        <el-row v-if="ruleForm.WorkOrderCategory === '2002'">
47
+          <el-row v-for="(item, index) in devList" :key="index">
48
+            <el-col :span="12">
49
+              <el-form-item prop="devname">
50
+                <el-select v-model="item.devname" placeholder="请选择物资">
51
+                  <el-option
52
+                    v-for="item in goodsArr"
53
+                    :key="item.F_DictionaryValueId"
54
+                    :label="item.F_Name"
55
+                    :value="`${item.F_Name},${item.F_DictionaryValueId}`"
56
+                  />
57
+                </el-select>
58
+              </el-form-item>
59
+            </el-col>
60
+            <el-col :span="12">
61
+              <el-form-item prop="num">
62
+                <el-input-number v-model="item.num" :min="1" size="medium" />
63
+              </el-form-item>
64
+            </el-col>
65
+          </el-row>
66
+        </el-row>
67
+
68
+        <el-row v-if="ruleForm.WorkOrderCategory === '2003'">
69
+          <el-col>
70
+            <el-form-item label="病床信息">
71
+              <el-button @click="addItem()">添加</el-button>
72
+            </el-form-item>
73
+          </el-col>
74
+        </el-row>
75
+        <el-row v-if="ruleForm.WorkOrderCategory === '2003'">
76
+          <el-row v-for="(item, index) in devList" :key="index">
77
+            <el-col :span="12">
78
+              <el-form-item prop="devname">
79
+                <el-select v-model="item.devname" placeholder="请选择病床">
80
+                  <el-option
81
+                    v-for="item in bedsArr"
82
+                    :key="item.F_DictionaryValueId"
83
+                    :label="item.F_Name"
84
+                    :value="`${item.F_Name},${item.F_DictionaryValueId}`"
85
+                  />
86
+                </el-select>
87
+              </el-form-item>
88
+            </el-col>
89
+            <el-col :span="12">
90
+              <el-form-item prop="num">
91
+                <el-input-number v-model="item.num" :min="1" size="medium" />
92
+              </el-form-item>
93
+            </el-col>
94
+          </el-row>
95
+        </el-row>
96
+
97
+        <el-row v-if="ruleForm.WorkOrderCategory === '2006'">
98
+          <el-col>
99
+            <el-form-item label="标本信息">
100
+              <el-button @click="addItem()">添加</el-button>
101
+            </el-form-item>
102
+          </el-col>
103
+        </el-row>
104
+        <el-row v-if="ruleForm.WorkOrderCategory === '2006'">
105
+          <el-row v-for="(item, index) in devList" :key="index">
106
+            <el-col :span="12">
107
+              <el-form-item prop="devname">
108
+                <el-select v-model="item.devname" placeholder="请选择标本">
109
+                  <el-option
110
+                    v-for="item in specimenArr"
111
+                    :key="item.F_DictionaryValueId"
112
+                    :label="item.F_Name"
113
+                    :value="`${item.F_Name},${item.F_DictionaryValueId}`"
114
+                  />
115
+                </el-select>
116
+              </el-form-item>
117
+            </el-col>
118
+            <el-col :span="12">
119
+              <el-form-item prop="num">
120
+                <el-input-number v-model="item.num" :min="1" size="medium" />
121
+              </el-form-item>
122
+            </el-col>
123
+          </el-row>
124
+        </el-row>
125
+
126
+        <el-row v-if="ruleForm.WorkOrderCategory === '2007'">
127
+          <el-col>
128
+            <el-form-item label="药品信息">
129
+              <el-button @click="addItem()">添加</el-button>
130
+            </el-form-item>
131
+          </el-col>
132
+        </el-row>
133
+        <el-row v-if="ruleForm.WorkOrderCategory === '2007'">
134
+          <el-row v-for="(item, index) in devList" :key="index">
135
+            <el-col :span="12">
136
+              <el-form-item prop="devname">
137
+                <el-select v-model="item.devname" placeholder="请选择药品">
138
+                  <el-option
139
+                    v-for="item in drugArr"
140
+                    :key="item.F_DictionaryValueId"
141
+                    :label="item.F_Name"
142
+                    :value="`${item.F_Name},${item.F_DictionaryValueId}`"
143
+                  />
144
+                </el-select>
145
+              </el-form-item>
146
+            </el-col>
147
+            <el-col :span="12">
148
+              <el-form-item prop="num">
149
+                <el-input-number v-model="item.num" :min="1" size="medium" />
150
+              </el-form-item>
151
+            </el-col>
152
+          </el-row>
153
+        </el-row>
154
+
155
+        <el-col v-if="ruleForm.WorkOrderCategory === '2004'" :span="12">
156
+          <el-form-item label="处方数量">
157
+            <el-input-number
158
+              v-model="ruleForm.specimenNumber"
159
+              :min="1"
160
+              size="medium"
161
+              class="inputNumber"
162
+            />
163
+          </el-form-item>
164
+        </el-col>
165
+        <el-row>
166
+          <el-col :span="24">
167
+            <el-form-item label="送达地点">
168
+              <el-input
169
+                v-model="ruleForm.ToPlace"
170
+                type="text"
171
+                placeholder="请输入送达地点"
172
+              />
173
+            </el-form-item>
174
+          </el-col>
175
+        </el-row>
176
+        <el-row>
177
+          <el-col :span="24">
178
+            <el-form-item label="工单内容" prop="remark">
179
+              <el-input
180
+                v-model="ruleForm.Content"
181
+                type="textarea"
182
+                placeholder="请输入工单内容"
183
+              />
184
+            </el-form-item>
185
+          </el-col>
186
+        </el-row>
187
+        <el-row>
188
+          <el-col :span="24">
189
+            <el-form-item label="上传附件" prop="repairImageid">
190
+              <el-upload
191
+                :headers="headers"
192
+                :on-success="handle_success"
193
+                :action="imgUrl"
194
+                list-type="picture-card"
195
+              >
196
+                <i class="el-icon-plus" />
197
+              </el-upload>
198
+            </el-form-item>
199
+          </el-col>
200
+        </el-row>
201
+        <el-row v-if="iswomanage != 1">
202
+          <el-col :span="24">
203
+            <el-form-item label="下步流程" prop="opt">
204
+              <el-radio-group v-model="ruleForm.opt">
205
+                <el-radio label="1">无</el-radio>
206
+                <el-radio label="2">指派</el-radio>
207
+              </el-radio-group>
208
+            </el-form-item>
209
+          </el-col>
210
+        </el-row>
211
+        <el-row v-if="ruleForm.opt == '2'">
212
+          <el-col :span="12">
213
+            <el-form-item label="指派部门">
214
+              <select-dept-tree
215
+                :deptparam="deptidArr1"
216
+                @post-deptid="getDeptid1"
217
+              />
218
+            </el-form-item>
219
+          </el-col>
220
+          <el-col :span="12">
221
+            <el-form-item label="接收人">
222
+              <el-select
223
+                v-model="ruleForm.DealMan"
224
+                placeholder="请选择接收人"
225
+                style="width: 100%"
226
+                @change="changeRepairman1"
227
+              >
228
+                <el-option
229
+                  v-for="item in repairman1"
230
+                  :key="item.usercode"
231
+                  :label="item.username"
232
+                  :value="item.usercode"
233
+                />
234
+              </el-select>
235
+            </el-form-item>
236
+          </el-col>
237
+        </el-row>
238
+        <el-row>
239
+          <el-form-item>
240
+            <el-button type="primary" @click="submitForm">保存</el-button>
241
+          </el-form-item>
242
+        </el-row>
243
+      </el-col>
244
+    </el-form>
245
+  </div>
246
+</template>
247
+
248
+<script>
249
+// import { addWorkOrder, getModelDetail, updateWorkOrder } from '@/api/comDispatch/hospitalBedTransfer'
250
+import {
251
+  GetDicValueList,
252
+  GetequipList,
253
+  UpdateSchedulingWorkOrder,
254
+  GetWorkOrder,
255
+} from "@/api/comDispatch/addOrEditDispatch";
256
+import { GetPerson } from "@/api/commonAPI";
257
+export default {
258
+  name: "AddOrEditDispatch",
259
+  props: {
260
+    ordreId: {
261
+      type: String,
262
+      default: "",
263
+    },
264
+    orderTypeData: {
265
+      type: Object,
266
+      default() {
267
+        return {};
268
+      },
269
+    },
270
+    layerid: {
271
+      type: String,
272
+      default: "",
273
+    },
274
+    callid: {
275
+      type: String,
276
+      default: "",
277
+    },
278
+    wid: {
279
+      type: String,
280
+      default: "",
281
+    },
282
+    iswomanage: {
283
+      type: String,
284
+      default: "",
285
+    },
286
+  },
287
+  data() {
288
+    return {
289
+      headers: {
290
+        Authorization: localStorage.getItem("Admin-Token"),
291
+      },
292
+      imgUrl:
293
+        this.$store.getters.serverConfig.BASE_API + "FaultRepair/UploadFile",
294
+      type2Arr: [],
295
+      hospitalsParam: {
296
+        id: 0,
297
+        name: "",
298
+      },
299
+      departmentsParam: {
300
+        id: 0,
301
+        name: "",
302
+      },
303
+      repairmanParam: {
304
+        id: 0,
305
+        name: "",
306
+      },
307
+      devList: [
308
+        {
309
+          devname: "",
310
+          num: 1,
311
+        },
312
+      ],
313
+      detailists: [],
314
+      deptidArr: [],
315
+      deptidArr1: [],
316
+      repairman: [],
317
+      repairman1: [],
318
+      equipArr: [
319
+        { label: "设备1", value: "01" },
320
+        { label: "设备2", value: "02" },
321
+      ],
322
+      goodsArr: [
323
+        { label: "物资1", value: "01" },
324
+        { label: "物资2", value: "02" },
325
+      ],
326
+      bedsArr: [
327
+        { label: "床1", value: "01" },
328
+        { label: "床2", value: "02" },
329
+      ],
330
+      specimenArr: [
331
+        { label: "标本1", value: "01" },
332
+        { label: "标本2", value: "02" },
333
+      ],
334
+      drugArr: [
335
+        { label: "药1", value: "01" },
336
+        { label: "药2", value: "02" },
337
+      ],
338
+      ruleForm: {
339
+        Applicant: "", // 申请人
340
+        ApplicationDept: "", // 申请部门
341
+        Phone: "", // 联系电话
342
+        WorkOrderCategory: "", // 工单类别
343
+        Content: "", // 工单内容
344
+        Location: "", // 科室位置
345
+        ToPlace: "", // 送达地点
346
+        File: "", // 文件
347
+        DealDept: "", // 处理部门
348
+        DealMan: "", // 从节目
349
+        WorkOrderCode: "", // 工单编号
350
+      },
351
+    };
352
+  },
353
+
354
+  created() {
355
+    this.getequis();
356
+    this.getgoods();
357
+    this.getbeds();
358
+    this.getbiaoben();
359
+    this.getdrugs();
360
+    console.log(this.ordreId);
361
+    if (this.ordreId) {
362
+      this.getDetail();
363
+    }
364
+    console.log(this.iswomanage, "444");
365
+  },
366
+  methods: {
367
+    addItem() {
368
+      const params = {
369
+        devname: "",
370
+        num: 1,
371
+      };
372
+      this.devList.push(params);
373
+    },
374
+    removeItem(index) {
375
+      console.log(index);
376
+      this.devList.splice(index, 1);
377
+    },
378
+    selectChange(val) {
379
+      console.log(val);
380
+    },
381
+    getDeptid(data) {
382
+      this.ruleForm.ApplicationDept = data[data.length - 1];
383
+      this.getRepairman(data[data.length - 1], 0);
384
+    },
385
+    getDeptid1(data) {
386
+      this.ruleForm.DealDept = data[data.length - 1];
387
+      this.getRepairman1(data[data.length - 1], 0);
388
+    },
389
+    getRepairman(id, state) {
390
+      return new Promise((resolve) => {
391
+        const params = {
392
+          deptid: id, // 字典管理的工单标识
393
+        };
394
+        GetPerson(params).then((res) => {
395
+          if (state === 0) {
396
+            this.repairman = res.rows;
397
+          } else if (state === 1) {
398
+            this.assignman = res.rows;
399
+          }
400
+        });
401
+        resolve();
402
+      });
403
+    },
404
+    getRepairman1(id, state) {
405
+      return new Promise((resolve) => {
406
+        const params = {
407
+          deptid: id, // 字典管理的工单标识
408
+        };
409
+        GetPerson(params).then((res) => {
410
+          if (state === 0) {
411
+            this.repairman1 = res.rows;
412
+          } else if (state === 1) {
413
+            this.assignman1 = res.rows;
414
+          }
415
+        });
416
+        resolve();
417
+      });
418
+    },
419
+    changeRepairman(data) {},
420
+    changeRepairman1(data) {},
421
+    handle_success(res) {
422
+      this.ruleForm.repairImageid += res.data[0].F_FileId + ",";
423
+    },
424
+    getequis() {
425
+      const params = {};
426
+      GetequipList(params).then((res) => {
427
+        this.equipArr = res.data;
428
+      });
429
+    },
430
+    getgoods() {
431
+      const params = {
432
+        Flag: "WZXX",
433
+        Name: "",
434
+      };
435
+      GetDicValueList(params).then((res) => {
436
+        this.goodsArr = res.rows;
437
+      });
438
+    },
439
+    getbeds() {
440
+      const params = {
441
+        Flag: "BCXX",
442
+        Name: "",
443
+      };
444
+      GetDicValueList(params).then((res) => {
445
+        this.bedsArr = res.rows;
446
+      });
447
+    },
448
+    getbiaoben() {
449
+      const params = {
450
+        Flag: "BBXX",
451
+        Name: "",
452
+      };
453
+      GetDicValueList(params).then((res) => {
454
+        this.specimenArr = res.rows;
455
+      });
456
+    },
457
+    getdrugs() {
458
+      const params = {
459
+        Flag: "YPXX",
460
+        Name: "",
461
+      };
462
+      GetDicValueList(params).then((res) => {
463
+        this.drugArr = res.rows;
464
+      });
465
+    },
466
+    getDetail() {
467
+      const datas = {
468
+        WorkOrderCode: this.ordreId,
469
+        type: 0,
470
+      };
471
+      // 详情 GetWorkOrder
472
+      GetWorkOrder(datas)
473
+        .then((response) => {
474
+          if (response.state.toLowerCase() === "success") {
475
+            console.log(response);
476
+            const res = response.data[0];
477
+
478
+            this.ruleForm.Applicant = res.F_Applicant; // 申请人
479
+            this.ruleForm.ApplicationDept = res.F_ApplicationDept; // 申请部门
480
+            this.ruleForm.Location = res.F_Location; // 科室位置
481
+            this.ruleForm.Phone = res.F_Phone; // 联系电话
482
+            this.ruleForm.WorkOrderCategory = res.F_WorkOrderCategory; // 工单类别
483
+            this.ruleForm.WorkOrderCode = res.F_WorkOrderCode; // 工单编号
484
+
485
+            // this.ruleForm.Content = res.F_Content; // 工单内容
486
+            //
487
+            // this.ruleForm.ToPlace = res.F_ToPlace; // 送达地点
488
+            // this.ruleForm.File = res.FileUrl; // 文件
489
+            // this.ruleForm.DealDept = res.F_DealDept; // 处理部门
490
+            // this.ruleForm.DealMan = res.F_DealMan; // 处理人
491
+            console.log(this.ruleForm);
492
+          }
493
+        })
494
+        .catch(() => {});
495
+    },
496
+    submitForm() {
497
+      console.log(this.devList);
498
+      const details = [];
499
+      this.devList.forEach(function (v, n) {
500
+        details.push({
501
+          F_DicId: v.devname.split(",")[1],
502
+          F_DicName: v.devname.split(",")[0],
503
+          F_Number: v.num,
504
+        });
505
+      });
506
+      console.log(details);
507
+      console.log(this.orderTypeData);
508
+      if (this.ruleForm.repairImageid === "") {
509
+        this.ruleForm.repairImageid = "";
510
+      } else {
511
+        this.ruleForm.repairImageid = this.ruleForm.repairImageid.slice(
512
+          0,
513
+          this.ruleForm.repairImageid.length - 1
514
+        );
515
+      }
516
+
517
+      var datas = {
518
+        usertype: 0,
519
+        Applicant: this.ruleForm.Applicant, // 申请人
520
+        ApplicationDept: this.ruleForm.ApplicationDept, // 申请部门
521
+        Phone: this.ruleForm.Phone, // 联系电话
522
+        WorkOrderCategory: this.ruleForm.WorkOrderCategory, // 工单类别
523
+        Content: this.ruleForm.Content, // 工单内容
524
+        Location: this.ruleForm.Location, // 科室位置
525
+        ToPlace: this.ruleForm.ToPlace, // 送达地点
526
+        File: this.ruleForm.File, // 文件
527
+        DealDept: this.ruleForm.DealDept, // 处理部门
528
+        DealMan: this.ruleForm.DealMan, // 从节目
529
+        WorkOrderCode: this.ruleForm.WorkOrderCode, // 工单编号
530
+        detailists: details,
531
+      };
532
+      console.log(datas);
533
+      // 添加
534
+      if (this.ordreId) {
535
+        UpdateSchedulingWorkOrder(datas)
536
+          .then((response) => {
537
+            if (response.state.toLowerCase() === "success") {
538
+              if (this.layerid) {
539
+                this.$parent.$layer.close(this.layerid);
540
+                this.$parent.getList(); // 重新加载父级数据
541
+              }
542
+              this.$message.success("恭喜你,修改成功!");
543
+            }
544
+          })
545
+          .catch(() => {});
546
+      }
547
+    },
548
+    // resetForm() {
549
+    //   this.$refs.ruleForm.resetFields()
550
+    //   this.itemessageList = [
551
+    //     {
552
+    //       buttonState: true,
553
+    //       delivered: '',
554
+    //       itemIndex: 0,
555
+    //       specimenList: [
556
+    //         {
557
+    //           pidIndex: 0,
558
+    //           buttonState: true,
559
+    //           specimenName: '',
560
+    //           specimenNumber: ''
561
+    //         }
562
+    //       ]
563
+    //     }
564
+    //   ]
565
+    // }
566
+  },
567
+};
568
+</script>
569
+<style rel="stylesheet/scss" lang="scss">
570
+.addOp span {
571
+  display: inline-block;
572
+  width: 30px;
573
+  height: 30px;
574
+  line-height: 30px;
575
+  text-align: center;
576
+  border-radius: 50%;
577
+  background-color: #409eff;
578
+  color: #fff;
579
+  vertical-align: middle;
580
+  margin-right: 5px;
581
+  cursor: pointer;
582
+}
583
+</style>