瀏覽代碼

汇总单

seimin 2 年之前
父節點
當前提交
0ee93f0caf

+ 3 - 0
src/App.vue

@@ -25,6 +25,9 @@ export default {
25 25
 .fr {
26 26
   float: right;
27 27
 }
28
+.fontBold{
29
+  font-weight: bold;
30
+}
28 31
 .overflowEllipsis2 {
29 32
   overflow: hidden;
30 33
   text-overflow: ellipsis;

+ 312 - 0
src/components/ConsumableMaterial/index.vue

@@ -0,0 +1,312 @@
1
+<template>
2
+  <div class="eventInformation" @click="showModal(model)">
3
+    <div class="head">
4
+      <p>
5
+        <span>{{ model.consumableName }}</span>
6
+        <span class="textRight">单价:<strong class="fontBold">{{ model.consumableEndPrice }}元</strong></span>
7
+      </p>
8
+    </div>
9
+    <p>
10
+      <span class="fl"></span>
11
+      <span class="fr"><strong class="fontBold">×{{ model.consumablesNum }}</strong>&emsp;&emsp;<span class="totalPrice">总价:<strong class="fontBold">{{model.consumablesNum * model.consumableEndPrice}}元</strong></span></span>
12
+    </p>
13
+    <!-- 弹窗 -->
14
+    <showModel
15
+      v-if="models.disjunctor"
16
+      :title="models.title"
17
+      :icon="models.icon"
18
+      :disjunctor="models.disjunctor"
19
+      @ok="ok"
20
+      @cancel="cancel"
21
+      @remove="remove"
22
+      :operate="models.operate"
23
+      selectName="hc_edit"
24
+      :data="hcData"
25
+    ></showModel>
26
+  </div>
27
+</template>
28
+
29
+<script>
30
+import showModel from "../showModel/showModel.vue";
31
+export default {
32
+  name: "ConsumableMaterial",
33
+  data() {
34
+    return {
35
+      hcData: {},
36
+      loadShow: true,
37
+      // 弹窗model
38
+      models: {
39
+        disjunctor: false
40
+      },
41
+    };
42
+  },
43
+  props: ["model", "id", "summaryId", "incidentId"],
44
+  components: {
45
+    showModel,
46
+  },
47
+  methods: {
48
+    // 移除
49
+    remove(data) {
50
+      console.log(data);
51
+      const toast = this.$createToast({
52
+        txt: "Loading...",
53
+        mask: true
54
+      });
55
+      toast.show();
56
+      this.$http
57
+        .post("service/bpm/data/addSummaryDoc", {
58
+            "consumableList": [
59
+                {
60
+                    "consumablesId": data.hc.id,
61
+                    "consumablesNum": data.consumablesNum
62
+                }
63
+            ],
64
+            "summaryId": this.summaryId,
65
+            "remove": 'remove',
66
+        })
67
+        .then(res => {
68
+          toast.hide();
69
+          this.models.disjunctor = false;
70
+          if (res.data.status == 200) {
71
+            this.$createDialog({
72
+              type: "alert",
73
+              title: "操作成功",
74
+              icon: "cubeic-right",
75
+              onConfirm: (e, promptValue) => {
76
+                this.loadShow = false;
77
+                this.$emit("refresh");
78
+              }
79
+            }).show();
80
+          } else {
81
+            this.$createDialog({
82
+              type: "alert",
83
+              title: "系统错误,请稍后再试!",
84
+              icon: "cubeic-wrong",
85
+              onConfirm: (e, promptValue) => {
86
+                this.loadShow = false;
87
+                this.$emit("refresh");
88
+              }
89
+            }).show();
90
+          }
91
+        });
92
+    },
93
+    //确定
94
+    ok(data) {
95
+      console.log(data);
96
+      const reg = /(^[1-9][0-9]*$)/;
97
+      if(!reg.test(data.consumablesNum)){
98
+          this.$createDialog({
99
+            type: "alert",
100
+            title: "请输入大于0的正整数!",
101
+            icon: "cubeic-warn"
102
+          }).show();
103
+          return;
104
+      }
105
+      const toast = this.$createToast({
106
+        txt: "Loading...",
107
+        mask: true
108
+      });
109
+      toast.show();
110
+      this.$http
111
+        .post("service/bpm/data/addSummaryDoc", {
112
+            "consumableList": [
113
+                {
114
+                    "consumablesId": data.hc.id,
115
+                    "consumablesNum": data.consumablesNum
116
+                }
117
+            ],
118
+            "summaryId": this.summaryId,
119
+            "modifyNum": 'edit',
120
+        })
121
+        .then(res => {
122
+          toast.hide();
123
+          this.models.disjunctor = false;
124
+          if (res.data.status == 200) {
125
+            this.$createDialog({
126
+              type: "alert",
127
+              title: "操作成功",
128
+              icon: "cubeic-right",
129
+              onConfirm: (e, promptValue) => {
130
+                this.loadShow = false;
131
+                this.$emit("refresh");
132
+              }
133
+            }).show();
134
+          } else {
135
+            this.$createDialog({
136
+              type: "alert",
137
+              title: "系统错误,请稍后再试!",
138
+              icon: "cubeic-wrong",
139
+              onConfirm: (e, promptValue) => {
140
+                this.loadShow = false;
141
+                this.$emit("refresh");
142
+              }
143
+            }).show();
144
+          }
145
+        });
146
+    },
147
+    //取消
148
+    cancel() {
149
+      this.models.disjunctor = false;
150
+    },
151
+    // 弹窗
152
+    showModal(item) {
153
+      console.log(item)
154
+      this.modelsData = item;
155
+      this.hcData = {
156
+        hc: {
157
+          endPrice: item.consumableEndPrice,
158
+          brandModel: item.consumableBrandModel,
159
+          name: item.consumableName,
160
+          id: item.consumableId,
161
+        },
162
+        incidentId: this.incidentId,
163
+        summaryId: this.summaryId,
164
+        consumablesNum: item.consumablesNum,
165
+      }
166
+      this.models = {
167
+        disjunctor: true,
168
+        title: "提示",
169
+        icon: "warn",
170
+        operate: {
171
+          ok: "确定",
172
+          cancel: "取消",
173
+          remove: '移除'
174
+        }
175
+      };
176
+    },
177
+  },
178
+  created() {
179
+    console.log(this.model);
180
+  }
181
+};
182
+</script>
183
+
184
+<style lang="less" scoped>
185
+.eventInformation {
186
+  .totalPrice{
187
+    display: inline-block;
188
+    width: 2rem;
189
+    text-align: right;
190
+  }
191
+  .boeder_B {
192
+    border-bottom: 0.01rem solid #ccc;
193
+  }
194
+  .shows {
195
+    display: none;
196
+  }
197
+  .head {
198
+    border-bottom: 0.01rem solid #e6e6e6;
199
+    p {
200
+      padding: 0.24rem 0.3rem;
201
+      display: flex;
202
+      justify-content: space-between;
203
+      align-items: center;
204
+      i {
205
+        color: #00559d;
206
+      }
207
+      span {
208
+        flex: 1;
209
+        flex-shrink: 0;
210
+        width: 50%;
211
+        &.textRight{
212
+          text-align: right;
213
+        }
214
+      }
215
+    }
216
+  }
217
+  p {
218
+    line-height: 0.4rem;
219
+    padding: 0.1rem 0.24rem;
220
+    overflow: hidden;
221
+    .overflowEllipsis2 {
222
+      margin-left: 1.96rem;
223
+    }
224
+  }
225
+  .info_hide {
226
+    padding: 0.2rem 0.24rem;
227
+    border-bottom: 0.01rem solid #e6e6e6;
228
+    .hide {
229
+      color: #00559d;
230
+    }
231
+  }
232
+  .imgs-container {
233
+    a {
234
+      color: #03c !important;
235
+      &:visited {
236
+        color: #551a8b !important;
237
+      }
238
+    }
239
+    img {
240
+      width: 1.5rem;
241
+      height: 1.5rem;
242
+      margin-right: 0.7rem;
243
+      &:nth-child(1) {
244
+        margin-left: 0.75rem;
245
+      }
246
+    }
247
+  }
248
+  .progress {
249
+    padding: 0.2rem 0.2rem;
250
+    overflow: hidden;
251
+    transition-duration: 0.2s;
252
+    transition-timing-function: linear;
253
+    &.progressHide {
254
+      height: 1.7rem;
255
+    }
256
+    .progress_info {
257
+      overflow: hidden;
258
+      margin-bottom: 0.1rem;
259
+      &:nth-last-child(1) {
260
+        .cont {
261
+          border: none !important;
262
+        }
263
+      }
264
+      .progress_info_L {
265
+        float: left;
266
+        color: #333;
267
+        max-width: 18%;
268
+      }
269
+      .progress_info_R {
270
+        float: right;
271
+        margin-left: 0.09rem;
272
+        width: 80%;
273
+        font-size: 0.25rem;
274
+        .time {
275
+          i {
276
+            margin-left: -0.15rem;
277
+            &.icon-icon_weizuo {
278
+              color: #005495;
279
+            }
280
+            &.icon-icon_zhengzaijinx {
281
+              color: #48a843;
282
+              font-size: 0.37rem;
283
+            }
284
+          }
285
+          span {
286
+            margin-left: 0.15rem;
287
+          }
288
+        }
289
+        .cont {
290
+          border-left: 1px solid #999;
291
+          padding-left: 0.4rem;
292
+          min-height: 0.4rem;
293
+          &.blue {
294
+            border-left: 1px solid #005395;
295
+          }
296
+        }
297
+
298
+        .text1 {
299
+          font-size: 0.15rem;
300
+        }
301
+        .text2 {
302
+          color: #666;
303
+          word-break: break-all;
304
+        }
305
+        p {
306
+          padding: 0;
307
+        }
308
+      }
309
+    }
310
+  }
311
+}
312
+</style>

+ 226 - 0
src/components/WorkHourManagement/index.vue

@@ -0,0 +1,226 @@
1
+<template>
2
+  <div class="eventInformation" @click="showModal(model)">
3
+    <div class="head">
4
+      <p>
5
+        <span>{{ model.workName }}</span>
6
+        <span class="textRight"></span>
7
+      </p>
8
+    </div>
9
+    <p>
10
+      <span class="fl"></span>
11
+      <span class="fr"><span class="totalPrice">单次:<strong class="fontBold">{{model.wage}}元</strong></span></span>
12
+    </p>
13
+  </div>
14
+</template>
15
+
16
+<script>
17
+export default {
18
+  name: "WorkHourManagement",
19
+  data() {
20
+    return {
21
+      loadShow: true,
22
+    };
23
+  },
24
+  props: ["model", "id", "summaryId", "incidentId", "summaryObj"],
25
+  methods: {
26
+    // 移除
27
+    remove(data) {
28
+      console.log(data);
29
+      console.log(String(this.summaryObj.workHourManagementList.map(v => v.id).filter(v => v != this.id)))
30
+      const toast = this.$createToast({
31
+        txt: "Loading...",
32
+        mask: true
33
+      });
34
+      toast.show();
35
+      this.$http
36
+        .post("service/bpm/data/addSummaryDoc", {
37
+            "workHourIds": String(this.summaryObj.workHourManagementList.map(v => v.id).filter(v => v != this.id)),
38
+            "summaryId": this.summaryId,
39
+        })
40
+        .then(res => {
41
+          toast.hide();
42
+          if (res.data.status == 200) {
43
+            this.$createDialog({
44
+              type: "alert",
45
+              icon: "cubeic-right",
46
+              title: "操作成功",
47
+              onConfirm: (e, promptValue) => {
48
+                this.loadShow = false;
49
+                this.$emit("refresh");
50
+              },
51
+            }).show();
52
+          } else {
53
+            this.$createDialog({
54
+              type: "alert",
55
+              title: "系统错误,请稍后再试!",
56
+              icon: "cubeic-wrong",
57
+              onConfirm: (e, promptValue) => {
58
+                this.loadShow = false;
59
+                this.$emit("refresh");
60
+              }
61
+            }).show();
62
+          }
63
+        });
64
+    },
65
+    // 弹窗
66
+    showModal(item){
67
+      this.$createDialog({
68
+        type: "confirm",
69
+        title: "提示",
70
+        content: `您确认要移除工时【${item.workName}】吗`,
71
+        icon: "cubeic-right",
72
+        confirmBtn: {
73
+          text: "确定",
74
+          active: true,
75
+          disabled: false,
76
+          href: "javascript:;"
77
+        },
78
+        cancelBtn: {
79
+          text: "取消",
80
+          active: false,
81
+          disabled: false,
82
+          href: "javascript:;"
83
+        },
84
+        onConfirm: (e, promptValue) => {
85
+          this.loadShow = true;
86
+          this.remove(item);
87
+        },
88
+        onCancel: () => {}
89
+      }).show();
90
+    }
91
+  },
92
+  created() {
93
+    console.log(this.model);
94
+  }
95
+};
96
+</script>
97
+
98
+<style lang="less" scoped>
99
+.eventInformation {
100
+  .totalPrice{
101
+    display: inline-block;
102
+    width: 2rem;
103
+    text-align: right;
104
+  }
105
+  .boeder_B {
106
+    border-bottom: 0.01rem solid #ccc;
107
+  }
108
+  .shows {
109
+    display: none;
110
+  }
111
+  .head {
112
+    border-bottom: 0.01rem solid #e6e6e6;
113
+    p {
114
+      padding: 0.24rem 0.3rem;
115
+      display: flex;
116
+      justify-content: space-between;
117
+      align-items: center;
118
+      i {
119
+        color: #00559d;
120
+      }
121
+      span {
122
+        flex: 1;
123
+        flex-shrink: 0;
124
+        width: 50%;
125
+        &.textRight{
126
+          text-align: right;
127
+        }
128
+      }
129
+    }
130
+  }
131
+  p {
132
+    line-height: 0.4rem;
133
+    padding: 0.1rem 0.24rem;
134
+    overflow: hidden;
135
+    .overflowEllipsis2 {
136
+      margin-left: 1.96rem;
137
+    }
138
+  }
139
+  .info_hide {
140
+    padding: 0.2rem 0.24rem;
141
+    border-bottom: 0.01rem solid #e6e6e6;
142
+    .hide {
143
+      color: #00559d;
144
+    }
145
+  }
146
+  .imgs-container {
147
+    a {
148
+      color: #03c !important;
149
+      &:visited {
150
+        color: #551a8b !important;
151
+      }
152
+    }
153
+    img {
154
+      width: 1.5rem;
155
+      height: 1.5rem;
156
+      margin-right: 0.7rem;
157
+      &:nth-child(1) {
158
+        margin-left: 0.75rem;
159
+      }
160
+    }
161
+  }
162
+  .progress {
163
+    padding: 0.2rem 0.2rem;
164
+    overflow: hidden;
165
+    transition-duration: 0.2s;
166
+    transition-timing-function: linear;
167
+    &.progressHide {
168
+      height: 1.7rem;
169
+    }
170
+    .progress_info {
171
+      overflow: hidden;
172
+      margin-bottom: 0.1rem;
173
+      &:nth-last-child(1) {
174
+        .cont {
175
+          border: none !important;
176
+        }
177
+      }
178
+      .progress_info_L {
179
+        float: left;
180
+        color: #333;
181
+        max-width: 18%;
182
+      }
183
+      .progress_info_R {
184
+        float: right;
185
+        margin-left: 0.09rem;
186
+        width: 80%;
187
+        font-size: 0.25rem;
188
+        .time {
189
+          i {
190
+            margin-left: -0.15rem;
191
+            &.icon-icon_weizuo {
192
+              color: #005495;
193
+            }
194
+            &.icon-icon_zhengzaijinx {
195
+              color: #48a843;
196
+              font-size: 0.37rem;
197
+            }
198
+          }
199
+          span {
200
+            margin-left: 0.15rem;
201
+          }
202
+        }
203
+        .cont {
204
+          border-left: 1px solid #999;
205
+          padding-left: 0.4rem;
206
+          min-height: 0.4rem;
207
+          &.blue {
208
+            border-left: 1px solid #005395;
209
+          }
210
+        }
211
+
212
+        .text1 {
213
+          font-size: 0.15rem;
214
+        }
215
+        .text2 {
216
+          color: #666;
217
+          word-break: break-all;
218
+        }
219
+        p {
220
+          padding: 0;
221
+        }
222
+      }
223
+    }
224
+  }
225
+}
226
+</style>

+ 47 - 2
src/components/showModel/showModel.vue

@@ -60,15 +60,25 @@
60 60
             style="border:1px solid #ececec;height:2rem;resize:none;"
61 61
           ></cube-textarea>
62 62
         </div>
63
+        <!-- 耗材 -->
64
+        <div class="select-wrap hc" v-if="selectName === 'hc_add' || selectName === 'hc_edit'">
65
+          <div class="hc_item">名称:{{ data.hc.name }}</div>
66
+          <div class="hc_item">型号品牌:{{ data.hc.brandModel }}</div>
67
+          <div class="hc_item">单价:{{ data.hc.endPrice }}元</div>
68
+          <div class="hc_item">使用数量:<cube-input type="number" style="flex:1" v-model="consumablesNum"></cube-input></div>
69
+        </div>
63 70
       </div>
64 71
       <div class="showModel__footer">
65 72
         <div v-if="operate.ok" class="showModel__ok" @click="ok">
66 73
           {{ operate.ok || "" }}
67 74
         </div>
68
-        <div v-if="operate.cancel" class="showModel__cancel" @click="cancel">
75
+        <div v-if="operate.remove && selectName === 'hc_edit'" class="showModel__remove" @click.stop="remove">
76
+          {{ operate.remove || "" }}
77
+        </div>
78
+        <div v-if="operate.cancel" class="showModel__cancel" @click.stop="cancel">
69 79
           {{ operate.cancel || "" }}
70 80
         </div>
71
-        <div v-if="operate.know" class="showModel__know" @click="know">
81
+        <div v-if="operate.know" class="showModel__know" @click.stop="know">
72 82
           {{ operate.know || "" }}
73 83
         </div>
74 84
         <div
@@ -87,6 +97,7 @@
87 97
 export default {
88 98
   data() {
89 99
     return {
100
+      consumablesNum: this.data ? (this.data.consumablesNum ? this.data.consumablesNum : 1) : 1,
90 101
       loginUser: JSON.parse(localStorage.getItem("loginUser")),
91 102
       logs: [],
92 103
       time: 5, //5秒后自动关闭
@@ -121,6 +132,11 @@ export default {
121 132
     }
122 133
   },
123 134
   props: {
135
+    // 携带的数据
136
+    data: {
137
+      type: Object,
138
+      default: () => {}
139
+    },
124 140
     // 显示隐藏
125 141
     disjunctor: {
126 142
       type: Boolean,
@@ -311,12 +327,18 @@ export default {
311 327
     ok() {
312 328
       if (this.selectName === "user") {
313 329
         this.$emit("ok", this.selectUserId);
330
+      } else if (this.selectName === "hc_add" || this.selectName === "hc_edit") {
331
+        this.$emit("ok", {hc: this.data.hc, consumablesNum:this.consumablesNum});
314 332
       } else if (this.textName === "textarea") {
315 333
         this.$emit("ok", this.textareaData);
316 334
       } else {
317 335
         this.$emit("ok");
318 336
       }
319 337
     },
338
+    // 移除
339
+    remove(){
340
+      this.$emit("remove", {hc: this.data.hc, consumablesNum:this.consumablesNum});
341
+    },
320 342
     // 取消
321 343
     cancel() {
322 344
       this.$emit("cancel");
@@ -333,6 +355,7 @@ export default {
333 355
     }
334 356
   },
335 357
   created() {
358
+    console.log(this.data)
336 359
     if (this.selectName === "user") {
337 360
       this.getZpBranch();
338 361
       // this.getZpGroup();
@@ -427,6 +450,14 @@ export default {
427 450
       .select-wrap {
428 451
         width: 80%;
429 452
         margin: 0 auto;
453
+        &.hc{
454
+          font-size: 0.32rem;
455
+          .hc_item{
456
+            margin-bottom: 0.1rem;
457
+            display: flex;
458
+            align-items: center;
459
+          }
460
+        }
430 461
       }
431 462
       .specialCloseFlag {
432 463
         width: 90%;
@@ -460,6 +491,15 @@ export default {
460 491
           height: 0.87rem;
461 492
           background-color: rgb(229, 233, 237);
462 493
         }
494
+        &:nth-of-type(3)::before {
495
+          content: "";
496
+          position: absolute;
497
+          left: 0;
498
+          bottom: 0;
499
+          width: 0.02rem;
500
+          height: 0.87rem;
501
+          background-color: rgb(229, 233, 237);
502
+        }
463 503
       }
464 504
 
465 505
       .showModel__ok {
@@ -467,6 +507,11 @@ export default {
467 507
         color: #005395;
468 508
       }
469 509
 
510
+      .showModel__remove {
511
+        flex: 1;
512
+        color: #f30922;
513
+      }
514
+
470 515
       .showModel__cancel {
471 516
         flex: 1;
472 517
       }

+ 36 - 0
src/router/index.js

@@ -10,6 +10,9 @@ import NewIncident from './../views/newIncident.vue'//新建事件
10 10
 import Inspection from './../views/inspection.vue'//巡检列表
11 11
 import InspectionDetail from './../views/inspectionDetail.vue'//巡检详情
12 12
 import InspectionDoneDetail from './../views/inspectionDoneDetail.vue'//已完成巡检详情
13
+import ConsumableList from '../views/ConsumableList.vue'//耗材列表
14
+import WorkHourManagementOne from '../views/WorkHourManagementOne.vue'//工时管理一级目录
15
+import WorkHourManagementTwo from '../views/WorkHourManagementTwo.vue'//工时管理二级目录
13 16
 import NoticeDetails from './../views/noticeDetails.vue'//公告详情
14 17
 import NoticeList from './../views/noticeList.vue'//公告列表
15 18
 import KnowList from './../views/knowList.vue'//知识库列表(点赞)
@@ -25,6 +28,7 @@ import Processing from './../views/processing.vue' //处理中页面
25 28
 import Solved from './../views/solved.vue' //已解决页面
26 29
 import Closed from './../views/closed.vue' //已关闭页面
27 30
 import WaitConfirm from './../views/waitConfirm.vue' //待审核页面
31
+import SummaryOrder from './../views/summaryOrder.vue' //汇总单处理页面
28 32
 import ScanResult from './../views/scanResult.vue' //扫一扫结果页面
29 33
 import SearchDept from './../views/searchDept.vue' //搜索页面
30 34
 Vue.use(Router)
@@ -95,6 +99,30 @@ export default new Router({
95 99
       },
96 100
     },
97 101
     {
102
+      path: '/main/consumableList/:incidentId/:summaryId',
103
+      name: 'ConsumableList',
104
+      component: ConsumableList,
105
+      meta: {
106
+        allowBack: false
107
+      },
108
+    },
109
+    {
110
+      path: '/main/workHourManagementOne/:incidentId/:summaryId',
111
+      name: 'WorkHourManagementOne',
112
+      component: WorkHourManagementOne,
113
+      meta: {
114
+        allowBack: false
115
+      },
116
+    },
117
+    {
118
+      path: '/main/workHourManagementTwo/:incidentId/:summaryId/:parentId/:parentName',
119
+      name: 'WorkHourManagementTwo',
120
+      component: WorkHourManagementTwo,
121
+      meta: {
122
+        allowBack: false
123
+      },
124
+    },
125
+    {
98 126
       path: '/main/my',
99 127
       component: My,
100 128
       meta: {
@@ -159,6 +187,14 @@ export default new Router({
159 187
     },
160 188
   },
161 189
   {
190
+    path: '/summaryOrder/:incidentId/:processInstanceId',
191
+    name: 'SummaryOrder',
192
+    component: SummaryOrder,
193
+    meta: {
194
+      allowBack: false
195
+    },
196
+  },
197
+  {
162 198
     path: '/newIncident',
163 199
     name: 'NewIncident',
164 200
     component: NewIncident,

+ 695 - 0
src/views/ConsumableList.vue

@@ -0,0 +1,695 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="header">耗材列表</div>
6
+        <div class="seatchHeader">
7
+          <div class="search fl">
8
+            <input
9
+              class="searchInp"
10
+              type="text"
11
+              v-model="title"
12
+              placeholder="可通过名称、型号品牌进行检索支持拼音"
13
+              @input="searchData()"
14
+            />
15
+          </div>
16
+          <!-- <button class="selectBtn fr" @click="showPicker">筛选</button> -->
17
+        </div>
18
+        <div class="scroll-list-wrap">
19
+          <cube-scroll
20
+            ref="scroll"
21
+            :data="items"
22
+            :options="options"
23
+            @pulling-down="onPullingDown"
24
+            @pulling-up="onPullingUp"
25
+          >
26
+            <div class="conentBox">
27
+              <div
28
+                class="conent"
29
+                v-for="(item, index) in items"
30
+                @click="showModal(item)"
31
+                :key="index"
32
+              >
33
+                <div class="head">
34
+                  <p>
35
+                    <span>{{ item.name }}</span>
36
+                    <span>{{ item.brandModel }}</span>
37
+                  </p>
38
+                </div>
39
+                <div class="center">
40
+                  <p>
41
+                    <span class="fl"></span>
42
+                    <span class="grayFont overflowEllipsis2">{{item.endPrice}}元</span>
43
+                  </p>
44
+                </div>
45
+              </div>
46
+              <div class="wushuju" v-show="wushuju">
47
+                <img src="./../../static/images/wushuju.svg" alt />
48
+                <p>暂无数据</p>
49
+              </div>
50
+            </div>
51
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
52
+              <div
53
+                v-if="props.pullDownRefresh"
54
+                class="cube-pulldown-wrapper"
55
+                :style="props.pullDownStyle"
56
+              >
57
+                <div
58
+                  v-show="props.beforePullDown"
59
+                  class="before-trigger"
60
+                  :style="{ paddingTop: props.bubbleY + 'px' }"
61
+                >
62
+                  <span
63
+                    :class="{
64
+                      rotate: props.bubbleY > pullDownRefreshThreshold - 40
65
+                    }"
66
+                    >↓</span
67
+                  >
68
+                </div>
69
+                <div class="after-trigger" v-show="!props.beforePullDown">
70
+                  <div v-show="props.isPullingDown" class="loading">
71
+                    <cube-loading></cube-loading>
72
+                  </div>
73
+                  <div v-show="!props.isPullingDown" class="text">
74
+                    <span class="refresh-text">更新成功</span>
75
+                  </div>
76
+                </div>
77
+              </div>
78
+            </template>
79
+          </cube-scroll>
80
+        </div>
81
+      </div>
82
+    </div>
83
+    <load-ing v-if="!items.length && !wushuju"></load-ing>
84
+    <!-- 弹窗 -->
85
+    <showModel
86
+      v-if="models.disjunctor"
87
+      :title="models.title"
88
+      :icon="models.icon"
89
+      :disjunctor="models.disjunctor"
90
+      @ok="ok"
91
+      @cancel="cancel"
92
+      :operate="models.operate"
93
+      selectName="hc_add"
94
+      :data="hcData"
95
+    ></showModel>
96
+  </div>
97
+</template>
98
+<script>
99
+import Vue from "vue";
100
+import showModel from "../components/showModel/showModel.vue";
101
+import CubePage from "../components/cube-page.vue";
102
+import SwitchOption from "../components/switch-option";
103
+import InputOption from "../components/input-option";
104
+import SelectOption from "../components/select-option";
105
+import LoadIng from "./loading.vue";
106
+export default {
107
+  data() {
108
+    return {
109
+      hcData: {},
110
+      modelsData: {}, //点击弹窗的那一项数据
111
+      // 弹窗model
112
+      models: {
113
+        disjunctor: false
114
+      },
115
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
116
+      items: [],
117
+      pullDownRefresh: true,
118
+      pullDownRefreshThreshold: 60,
119
+      pullDownRefreshStop: 40,
120
+      pullDownRefreshTxt: "Refresh success",
121
+      pullUpLoad: true,
122
+      pullUpLoadThreshold: 0,
123
+      pullUpLoadMoreTxt: "加载更多",
124
+      pullUpLoadNoMoreTxt: "没有更多数据",
125
+      customPullDown: true,
126
+      wushuju: false,
127
+      title: "", //搜索内容
128
+      // stateData: [
129
+      //   {
130
+      //     text: "全部",
131
+      //     value: "all"
132
+      //   },
133
+      //   {
134
+      //     text: "待处理",
135
+      //     value: "todo"
136
+      //   },
137
+      //   {
138
+      //     text: "处理过",
139
+      //     value: "done"
140
+      //   }
141
+      // ],
142
+      // stateValue: "todo",
143
+      sum: 20,
144
+      idx: 0,
145
+      stateClass: "",
146
+      loadShow: true,
147
+      searching: false
148
+    };
149
+  },
150
+  components: {
151
+    CubePage,
152
+    SwitchOption,
153
+    InputOption,
154
+    SelectOption,
155
+    LoadIng,
156
+    showModel,
157
+  },
158
+  computed: {
159
+    options() {
160
+      return {
161
+        pullDownRefresh: this.pullDownRefreshObj,
162
+        pullUpLoad: this.pullUpLoadObj,
163
+        scrollbar: true
164
+      };
165
+    },
166
+    pullDownRefreshObj: function() {
167
+      return this.pullDownRefresh
168
+        ? {
169
+            threshold: parseInt(this.pullDownRefreshThreshold),
170
+            txt: this.pullDownRefreshTxt
171
+          }
172
+        : false;
173
+    },
174
+    pullUpLoadObj: function() {
175
+      return this.pullUpLoad
176
+        ? {
177
+            threshold: parseInt(this.pullUpLoadThreshold),
178
+            txt: {
179
+              more: this.pullUpLoadMoreTxt,
180
+              noMore: this.pullUpLoadNoMoreTxt
181
+            }
182
+          }
183
+        : false;
184
+    }
185
+  },
186
+  methods: {
187
+    //确定
188
+    ok(data) {
189
+      console.log(data);
190
+      const reg = /(^[1-9][0-9]*$)/;
191
+      if(!reg.test(data.consumablesNum)){
192
+          this.$createDialog({
193
+            type: "alert",
194
+            title: "请输入大于0的正整数!",
195
+            icon: "cubeic-warn"
196
+          }).show();
197
+          return;
198
+      }
199
+      const toast = this.$createToast({
200
+        txt: "Loading...",
201
+        mask: true
202
+      });
203
+      toast.show();
204
+      this.$http
205
+        .post("service/bpm/data/addSummaryDoc", {
206
+            "consumableList": [
207
+                {
208
+                    "consumablesId": data.hc.id,
209
+                    "consumablesNum": data.consumablesNum
210
+                }
211
+            ],
212
+            "summaryId": this.$route.params.summaryId
213
+        })
214
+        .then(res => {
215
+          toast.hide();
216
+          this.models.disjunctor = false;
217
+          if (res.data.status == 200) {
218
+            this.$createDialog({
219
+              type: "alert",
220
+              title: "操作成功",
221
+              icon: "cubeic-right",
222
+              onConfirm: (e, promptValue) => {
223
+                this.loadShow = false;
224
+                this.items = [];
225
+                this.idx = 0;
226
+                this.$router.push({
227
+                  path: `/summaryOrder/${this.$route.params.incidentId}`
228
+                })
229
+              }
230
+            }).show();
231
+          } else {
232
+            this.$createDialog({
233
+              type: "alert",
234
+              title: "系统错误,请稍后再试!",
235
+              icon: "cubeic-wrong",
236
+              onConfirm: (e, promptValue) => {
237
+                this.loadShow = false;
238
+                this.items = [];
239
+                this.idx = 0;
240
+                this.$router.push({
241
+                  path: `/summaryOrder/${this.$route.params.incidentId}`
242
+                })
243
+              }
244
+            }).show();
245
+          }
246
+        });
247
+    },
248
+    //取消
249
+    cancel() {
250
+      this.models.disjunctor = false;
251
+    },
252
+    // 弹窗
253
+    showModal(item) {
254
+      this.modelsData = item;
255
+      this.hcData = {
256
+        hc: item,
257
+        incidentId: this.$route.params.incidentId,
258
+        summaryId: this.$route.params.summaryId,
259
+      }
260
+      this.models = {
261
+        disjunctor: true,
262
+        title: "提示",
263
+        icon: "warn",
264
+        operate: {
265
+          ok: "确定",
266
+          cancel: "取消"
267
+        }
268
+      };
269
+    },
270
+    getParamsState() {
271
+      console.log(this.$route.params.state)
272
+      if (this.$route.params.state) {
273
+        console.log(this.$route.params.state);
274
+        this.stateValue = this.$route.params.state;
275
+      }
276
+    },
277
+    showPicker() {
278
+      if (!this.picker) {
279
+        this.picker = this.$createPicker({
280
+          title: "",
281
+          data: [this.stateData],
282
+          selectedIndex: [1],
283
+          onSelect: this.selectHandle,
284
+          onCancel: this.cancelHandle
285
+        });
286
+      }
287
+      this.picker.show();
288
+    },
289
+    selectHandle(selectedVal, selectedIndex, selectedText) {
290
+      console.log(selectedVal, selectedIndex, selectedText);
291
+
292
+      this.stateValue = selectedVal[0];
293
+      this.items = [];
294
+      this.getData();
295
+    },
296
+    cancelHandle() {},
297
+    // 搜索
298
+    searchData() {
299
+      this.items = [];
300
+      this.searching = true;
301
+      this.getData();
302
+    },
303
+    // 获取列表
304
+    getData() {
305
+      console.log(this.stateValue);
306
+      if (this.searching) {
307
+        this.idx = 0;
308
+      }
309
+      let postData = {
310
+        idx: this.idx,
311
+        sum: this.sum,
312
+        consumable: {
313
+          keyWord: this.title || '',
314
+        }
315
+      };
316
+      this.$http
317
+        .post(
318
+          "service/bpm/data/fetchDataList/consumable",
319
+          postData
320
+        )
321
+        .then((res) => {
322
+          if(res.status == 200){
323
+            if (res.data.list.length > 0) {
324
+              this.wushuju = false;
325
+              if (this.searching) {
326
+                this.items = res.data.list;
327
+              } else {
328
+                this.items = this.items.concat(res.data.list);
329
+              }
330
+            } else {
331
+              this.wushuju = this.searching;
332
+            }
333
+          }else{
334
+            this.$createDialog({
335
+              type: "alert",
336
+              title: "操作失败",
337
+              content: "请求失败!",
338
+              icon: "cubeic-wrong"
339
+            }).show();
340
+          }
341
+          this.loadShow = false;
342
+        });
343
+    },
344
+    onPullingDown() {
345
+      // 模拟更新数据
346
+      var that = this;
347
+      that.items = [];
348
+      that.idx = 0;
349
+      that.searching = false;
350
+      setTimeout(() => {
351
+        that.getData();
352
+      }, 1000);
353
+    },
354
+    onPullingUp() {
355
+      var that = this;
356
+      that.idx = that.idx + 1;
357
+      that.searching = false;
358
+      that.getData();
359
+    },
360
+    updatePullDownRefresh(val) {
361
+      this.pullDownRefresh = val;
362
+    },
363
+    updatePullDownRefreshThreshold(val) {
364
+      this.pullDownRefreshThreshold = val;
365
+    },
366
+    updatePullDownRefreshTxt(val) {
367
+      this.pullDownRefreshTxt = val;
368
+    },
369
+    updatePullUpLoad(val) {
370
+      this.pullUpLoad = val;
371
+    },
372
+    updatePullUpLoadThreshold(val) {
373
+      this.pullUpLoadThreshold = val;
374
+    },
375
+    updatePullUpLoadMoreTxt(val) {
376
+      this.pullUpLoadMoreTxt = val;
377
+    },
378
+    updatePullUpLoadNoMoreTxt(val) {
379
+      this.pullUpLoadNoMoreTxt = val;
380
+    },
381
+    updateCustomPullDown(val) {
382
+      this.customPullDown = val;
383
+    },
384
+    rebuildScroll() {
385
+      Vue.nextTick(() => {
386
+        this.$refs.scroll.destroy();
387
+        this.$refs.scroll.initScroll();
388
+      });
389
+    }
390
+  },
391
+  created() {
392
+    // this.$route.params.data
393
+    // this.getParamsState();
394
+    this.getData(this.idx, this.sum);
395
+  }
396
+};
397
+</script>
398
+<style lang="stylus" rel="stylesheet/stylus" scoped>
399
+.scroll-list-wrap {
400
+  /* height: 350px */
401
+  height: 90vh;
402
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
403
+  border-radius: 5px;
404
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
405
+  // overflow: hidden;
406
+  padding-top: 1.76rem;
407
+}
408
+
409
+.foods-wrapper {
410
+  .food-item {
411
+    display: flex;
412
+
413
+    /* padding: 18px */
414
+    /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
415
+    /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
416
+    &:last-child {
417
+      border-none();
418
+      margin-bottom: 0;
419
+    }
420
+
421
+    .icon {
422
+      flex: 0 0 57px;
423
+      margin-right: 10px;
424
+    }
425
+
426
+    .food-content {
427
+      flex: 1;
428
+
429
+      .name {
430
+        margin: 2px 0 8px 0;
431
+        height: 14px;
432
+        line-height: 14px;
433
+        font-size: 14px;
434
+        color: rgb(7, 17, 27);
435
+      }
436
+
437
+      .description, .extra {
438
+        line-height: 10px;
439
+        font-size: 10px;
440
+        color: rgb(147, 153, 159);
441
+      }
442
+
443
+      .description {
444
+        line-height: 12px;
445
+        margin-bottom: 8px;
446
+      }
447
+
448
+      .extra {
449
+        .count {
450
+          margin-right: 12px;
451
+        }
452
+      }
453
+
454
+      .price {
455
+        font-weight: 700;
456
+        line-height: 24px;
457
+
458
+        .now {
459
+          margin-right: 8px;
460
+          font-size: 14px;
461
+          color: rgb(240, 20, 20);
462
+        }
463
+
464
+        .old {
465
+          text-decoration: line-through;
466
+          font-size: 10px;
467
+          color: rgb(147, 153, 159);
468
+        }
469
+      }
470
+
471
+      .cartcontrol-wrapper {
472
+        position: absolute;
473
+        right: 0;
474
+        bottom: 12px;
475
+
476
+        .scroll-wrapper {
477
+          .cube-pulldown-wrapper {
478
+            .before-trigger {
479
+              font-size: 30px;
480
+              line-height: 30px;
481
+              align-self: flex-end;
482
+
483
+              span {
484
+                display: inline-block;
485
+                transition: all 0.3s;
486
+                color: #666;
487
+
488
+                &.rotate {
489
+                  transform: rotate(180deg);
490
+                }
491
+              }
492
+            }
493
+
494
+            .after-trigger {
495
+              .refresh-text {
496
+                color: grey;
497
+              }
498
+            }
499
+          }
500
+        }
501
+      }
502
+    }
503
+  }
504
+}
505
+</style>
506
+<style lang="less" scoped>
507
+.bgColor {
508
+  background-color: white;
509
+}
510
+.food-item {
511
+  border-top: 0.16rem rgb(238, 238, 238) solid;
512
+}
513
+.food-content {
514
+  border-top: 0.01rem rgb(223, 222, 222) solid;
515
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
516
+}
517
+.title {
518
+  display: flex;
519
+  justify-content: space-between;
520
+  height: 0.7rem;
521
+  line-height: 0.7rem;
522
+  border-top: 0.01rem rgb(223, 222, 222) solid;
523
+  padding: 0 0.24rem;
524
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
525
+}
526
+.title i {
527
+  font-size: 0.32rem;
528
+  color: #005395;
529
+}
530
+.title div:nth-child(1) {
531
+  font-size: 0.32rem;
532
+}
533
+.title div:nth-child(1) span {
534
+  display: inline-block;
535
+  margin-left: 0.08rem;
536
+}
537
+.title div:nth-child(2) {
538
+  padding: 0.05rem 0.3rem;
539
+  /* border: 0.01rem rgb(0,0,255) solid; */
540
+  border-radius: 16px;
541
+  /* color: rgb(0,0,255); */
542
+  height: 0.25rem;
543
+  line-height: 0.25rem;
544
+  margin-top: 0.15rem;
545
+  font-size: 0.24rem;
546
+}
547
+.weishouli {
548
+  color: #991f00;
549
+  border: 0.01rem #991f00 solid;
550
+  background-color: #f4e8e5;
551
+}
552
+.bushouli {
553
+  color: #666666;
554
+  background-color: #eeeeee;
555
+  border: 0.01rem #666666 solid;
556
+}
557
+.chulizhong {
558
+  color: #003057;
559
+  background-color: #e5eaee;
560
+  border: 0.01rem #003057 solid;
561
+}
562
+.daipingjia {
563
+  color: #825b00;
564
+  background-color: #f2eee5;
565
+  border: 0.01rem #825b00 solid;
566
+}
567
+.yijiejue {
568
+  color: #40a19c;
569
+  background-color: #ebf5f5;
570
+  border: 0.01rem #40a19c solid;
571
+}
572
+.yichehui {
573
+  color: #48a843;
574
+  background-color: #ecf6ec;
575
+  border: 0.01rem #48a843 solid;
576
+}
577
+.timeBox {
578
+  display: flex;
579
+  justify-content: space-between;
580
+  font-size: 0.24rem;
581
+  color: #999999;
582
+  border-top: 0.01rem rgb(223, 222, 222) solid;
583
+  height: 0.7rem;
584
+  line-height: 0.7rem;
585
+  padding: 0 0.24rem 0 0.64rem;
586
+}
587
+.wushuju {
588
+  margin-top: 2.4rem;
589
+  text-align: center;
590
+  color: #999;
591
+}
592
+.wushuju img {
593
+  width: 5.12rem;
594
+  height: 2.84rem;
595
+}
596
+.demo {
597
+  .header {
598
+    width: 100%;
599
+    height: 0.88rem;
600
+    line-height: 0.88rem;
601
+    text-align: center;
602
+    color: #fff;
603
+    font-size: 0.37rem;
604
+    background: linear-gradient(#2e2f32, #414246);
605
+    position: fixed;
606
+    top: 0;
607
+    z-index: 6;
608
+  }
609
+  .seatchHeader {
610
+    width: 100%;
611
+    background-color: #eee;
612
+    padding: 0.16rem;
613
+    overflow: hidden;
614
+    position: fixed;
615
+    top: 0.88rem;
616
+    z-index: 6;
617
+    box-sizing: border-box;
618
+    .search {
619
+      width: 100%;
620
+      height: 0.56rem;
621
+      font-size: 0.26rem;
622
+      color: #b2b2b2;
623
+      box-sizing: border-box;
624
+      .searchInp {
625
+        text-align: center;
626
+        background-color: #fff;
627
+        width: 100%;
628
+        height: 100%;
629
+        border-radius: 0.09rem;
630
+        border: none;
631
+        &:focus {
632
+          outline: none;
633
+        }
634
+      }
635
+    }
636
+    .selectBtn {
637
+      width: 1.2rem;
638
+      height: 0.56rem;
639
+      font-size: 0.32rem;
640
+      color: #005395;
641
+      border-color: #005395;
642
+      background-color: #fff;
643
+      border-radius: 0.09rem;
644
+      &:focus {
645
+        outline: none;
646
+      }
647
+    }
648
+  }
649
+}
650
+.conentBox {
651
+  width: 100%;
652
+  .conent {
653
+    font-size: 0.32rem;
654
+    font-weight: 400;
655
+    line-height: 0.45rem;
656
+    border-bottom: 0.16rem solid #e5e5e5;
657
+    .head {
658
+      border-bottom: 0.01rem solid #e6e6e6;
659
+      p {
660
+        padding: 0.24rem 0.48rem;
661
+        display: flex;
662
+        justify-content: space-between;
663
+        align-items: center;
664
+        i {
665
+          color: #00559d;
666
+        }
667
+        .btn {
668
+          float: right;
669
+        }
670
+      }
671
+    }
672
+    .center {
673
+      color: #333333;
674
+      border-bottom: 0.01rem solid #e6e6e6;
675
+      padding: 0.24rem 0.48rem;
676
+      p {
677
+        display: flex;
678
+        justify-content: space-between;
679
+        align-items: center;
680
+        .grayFont {
681
+          color: #666;
682
+        }
683
+      }
684
+    }
685
+    .bottom {
686
+      overflow: hidden;
687
+      line-height: 0.86rem;
688
+      border-bottom: 0.01rem solid #e6e6e6;
689
+      font-size: 0.24rem;
690
+      color: #999;
691
+      padding: 0 0.24rem 0 0.48rem;
692
+    }
693
+  }
694
+}
695
+</style>

+ 457 - 0
src/views/WorkHourManagementOne.vue

@@ -0,0 +1,457 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="header">工时(一级目录)</div>
6
+        <div class="scroll-list-wrap">
7
+          <cube-scroll
8
+            :data="items"
9
+          >
10
+            <div class="conentBox">
11
+              <div
12
+                class="conent"
13
+                v-for="(item, index) in items"
14
+                @click="toDetail(item)"
15
+                :key="index"
16
+              >
17
+                <div class="head">
18
+                  <p>
19
+                    <span>{{ item.workName }}</span>
20
+                  </p>
21
+                </div>
22
+              </div>
23
+              <div class="wushuju" v-show="wushuju">
24
+                <img src="./../../static/images/wushuju.svg" alt />
25
+                <p>暂无数据</p>
26
+              </div>
27
+            </div>
28
+            <template v-if="customPullDown" slot="pulldown" slot-scope="props">
29
+              <div
30
+                v-if="props.pullDownRefresh"
31
+                class="cube-pulldown-wrapper"
32
+                :style="props.pullDownStyle"
33
+              >
34
+                <div
35
+                  v-show="props.beforePullDown"
36
+                  class="before-trigger"
37
+                  :style="{ paddingTop: props.bubbleY + 'px' }"
38
+                >
39
+                  <span
40
+                    :class="{
41
+                      rotate: props.bubbleY > pullDownRefreshThreshold - 40
42
+                    }"
43
+                    >↓</span
44
+                  >
45
+                </div>
46
+                <div class="after-trigger" v-show="!props.beforePullDown">
47
+                  <div v-show="props.isPullingDown" class="loading">
48
+                    <cube-loading></cube-loading>
49
+                  </div>
50
+                  <div v-show="!props.isPullingDown" class="text">
51
+                    <span class="refresh-text">更新成功</span>
52
+                  </div>
53
+                </div>
54
+              </div>
55
+            </template>
56
+          </cube-scroll>
57
+        </div>
58
+      </div>
59
+    </div>
60
+    <load-ing v-if="!items.length && !wushuju"></load-ing>
61
+  </div>
62
+</template>
63
+<script>
64
+import Vue from "vue";
65
+import CubePage from "../components/cube-page.vue";
66
+import SwitchOption from "../components/switch-option";
67
+import InputOption from "../components/input-option";
68
+import SelectOption from "../components/select-option";
69
+import LoadIng from "./loading.vue";
70
+export default {
71
+  data() {
72
+    return {
73
+      hcData: {},
74
+      modelsData: {}, //点击弹窗的那一项数据
75
+      // 弹窗model
76
+      models: {
77
+        disjunctor: false
78
+      },
79
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
80
+      items: [],
81
+      pullDownRefresh: true,
82
+      pullDownRefreshThreshold: 60,
83
+      pullDownRefreshStop: 40,
84
+      pullDownRefreshTxt: "Refresh success",
85
+      pullUpLoad: true,
86
+      pullUpLoadThreshold: 0,
87
+      pullUpLoadMoreTxt: "加载更多",
88
+      pullUpLoadNoMoreTxt: "没有更多数据",
89
+      customPullDown: true,
90
+      wushuju: false,
91
+      sum: 1000,
92
+      idx: 0,
93
+      stateClass: "",
94
+      loadShow: true,
95
+      searching: false
96
+    };
97
+  },
98
+  components: {
99
+    CubePage,
100
+    SwitchOption,
101
+    InputOption,
102
+    SelectOption,
103
+    LoadIng,
104
+  },
105
+  methods: {
106
+    // 弹窗
107
+    toDetail(item) {
108
+      this.$router.push({
109
+        path: `/main/WorkHourManagementTwo/${this.$route.params.incidentId}/${this.$route.params.summaryId}/${item.id}/${item.workName}`
110
+      });
111
+    },
112
+    // 获取列表
113
+    getData() {
114
+      if (this.searching) {
115
+        this.idx = 0;
116
+      }
117
+      let postData = {
118
+        idx: this.idx,
119
+        sum: this.sum,
120
+        workHourManagement: {
121
+          treeLevel: 1
122
+        }
123
+      };
124
+      this.$http
125
+        .post(
126
+          "service/bpm/data/fetchDataList/workHourManagement",
127
+          postData
128
+        )
129
+        .then((res) => {
130
+          if(res.status == 200){
131
+            if (res.data.list.length > 0) {
132
+              this.wushuju = false;
133
+              if (this.searching) {
134
+                this.items = res.data.list;
135
+              } else {
136
+                this.items = this.items.concat(res.data.list);
137
+              }
138
+            } else {
139
+              this.wushuju = true;
140
+            }
141
+          }else{
142
+            this.$createDialog({
143
+              type: "alert",
144
+              title: "操作失败",
145
+              content: "请求失败!",
146
+              icon: "cubeic-wrong"
147
+            }).show();
148
+          }
149
+          this.loadShow = false;
150
+        });
151
+    },
152
+  },
153
+  created() {
154
+    // this.$route.params.data
155
+    // this.getParamsState();
156
+    this.getData(this.idx, this.sum);
157
+  }
158
+};
159
+</script>
160
+<style lang="stylus" rel="stylesheet/stylus" scoped>
161
+.scroll-list-wrap {
162
+  /* height: 350px */
163
+  height: 90vh;
164
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
165
+  border-radius: 5px;
166
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
167
+  // overflow: hidden;
168
+  padding-top: 0.88rem;
169
+}
170
+
171
+.foods-wrapper {
172
+  .food-item {
173
+    display: flex;
174
+
175
+    /* padding: 18px */
176
+    /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
177
+    /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
178
+    &:last-child {
179
+      border-none();
180
+      margin-bottom: 0;
181
+    }
182
+
183
+    .icon {
184
+      flex: 0 0 57px;
185
+      margin-right: 10px;
186
+    }
187
+
188
+    .food-content {
189
+      flex: 1;
190
+
191
+      .name {
192
+        margin: 2px 0 8px 0;
193
+        height: 14px;
194
+        line-height: 14px;
195
+        font-size: 14px;
196
+        color: rgb(7, 17, 27);
197
+      }
198
+
199
+      .description, .extra {
200
+        line-height: 10px;
201
+        font-size: 10px;
202
+        color: rgb(147, 153, 159);
203
+      }
204
+
205
+      .description {
206
+        line-height: 12px;
207
+        margin-bottom: 8px;
208
+      }
209
+
210
+      .extra {
211
+        .count {
212
+          margin-right: 12px;
213
+        }
214
+      }
215
+
216
+      .price {
217
+        font-weight: 700;
218
+        line-height: 24px;
219
+
220
+        .now {
221
+          margin-right: 8px;
222
+          font-size: 14px;
223
+          color: rgb(240, 20, 20);
224
+        }
225
+
226
+        .old {
227
+          text-decoration: line-through;
228
+          font-size: 10px;
229
+          color: rgb(147, 153, 159);
230
+        }
231
+      }
232
+
233
+      .cartcontrol-wrapper {
234
+        position: absolute;
235
+        right: 0;
236
+        bottom: 12px;
237
+
238
+        .scroll-wrapper {
239
+          .cube-pulldown-wrapper {
240
+            .before-trigger {
241
+              font-size: 30px;
242
+              line-height: 30px;
243
+              align-self: flex-end;
244
+
245
+              span {
246
+                display: inline-block;
247
+                transition: all 0.3s;
248
+                color: #666;
249
+
250
+                &.rotate {
251
+                  transform: rotate(180deg);
252
+                }
253
+              }
254
+            }
255
+
256
+            .after-trigger {
257
+              .refresh-text {
258
+                color: grey;
259
+              }
260
+            }
261
+          }
262
+        }
263
+      }
264
+    }
265
+  }
266
+}
267
+</style>
268
+<style lang="less" scoped>
269
+.bgColor {
270
+  background-color: white;
271
+}
272
+.food-item {
273
+  border-top: 0.16rem rgb(238, 238, 238) solid;
274
+}
275
+.food-content {
276
+  border-top: 0.01rem rgb(223, 222, 222) solid;
277
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
278
+}
279
+.title {
280
+  display: flex;
281
+  justify-content: space-between;
282
+  height: 0.7rem;
283
+  line-height: 0.7rem;
284
+  border-top: 0.01rem rgb(223, 222, 222) solid;
285
+  padding: 0 0.24rem;
286
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
287
+}
288
+.title i {
289
+  font-size: 0.32rem;
290
+  color: #005395;
291
+}
292
+.title div:nth-child(1) {
293
+  font-size: 0.32rem;
294
+}
295
+.title div:nth-child(1) span {
296
+  display: inline-block;
297
+  margin-left: 0.08rem;
298
+}
299
+.title div:nth-child(2) {
300
+  padding: 0.05rem 0.3rem;
301
+  /* border: 0.01rem rgb(0,0,255) solid; */
302
+  border-radius: 16px;
303
+  /* color: rgb(0,0,255); */
304
+  height: 0.25rem;
305
+  line-height: 0.25rem;
306
+  margin-top: 0.15rem;
307
+  font-size: 0.24rem;
308
+}
309
+.weishouli {
310
+  color: #991f00;
311
+  border: 0.01rem #991f00 solid;
312
+  background-color: #f4e8e5;
313
+}
314
+.bushouli {
315
+  color: #666666;
316
+  background-color: #eeeeee;
317
+  border: 0.01rem #666666 solid;
318
+}
319
+.chulizhong {
320
+  color: #003057;
321
+  background-color: #e5eaee;
322
+  border: 0.01rem #003057 solid;
323
+}
324
+.daipingjia {
325
+  color: #825b00;
326
+  background-color: #f2eee5;
327
+  border: 0.01rem #825b00 solid;
328
+}
329
+.yijiejue {
330
+  color: #40a19c;
331
+  background-color: #ebf5f5;
332
+  border: 0.01rem #40a19c solid;
333
+}
334
+.yichehui {
335
+  color: #48a843;
336
+  background-color: #ecf6ec;
337
+  border: 0.01rem #48a843 solid;
338
+}
339
+.timeBox {
340
+  display: flex;
341
+  justify-content: space-between;
342
+  font-size: 0.24rem;
343
+  color: #999999;
344
+  border-top: 0.01rem rgb(223, 222, 222) solid;
345
+  height: 0.7rem;
346
+  line-height: 0.7rem;
347
+  padding: 0 0.24rem 0 0.64rem;
348
+}
349
+.wushuju {
350
+  margin-top: 2.4rem;
351
+  text-align: center;
352
+  color: #999;
353
+}
354
+.wushuju img {
355
+  width: 5.12rem;
356
+  height: 2.84rem;
357
+}
358
+.demo {
359
+  .header {
360
+    width: 100%;
361
+    height: 0.88rem;
362
+    line-height: 0.88rem;
363
+    text-align: center;
364
+    color: #fff;
365
+    font-size: 0.37rem;
366
+    background: linear-gradient(#2e2f32, #414246);
367
+    position: fixed;
368
+    top: 0;
369
+    z-index: 6;
370
+  }
371
+  .seatchHeader {
372
+    width: 100%;
373
+    background-color: #eee;
374
+    padding: 0.16rem;
375
+    overflow: hidden;
376
+    position: fixed;
377
+    top: 0.88rem;
378
+    z-index: 6;
379
+    box-sizing: border-box;
380
+    .search {
381
+      width: 100%;
382
+      height: 0.56rem;
383
+      font-size: 0.26rem;
384
+      color: #b2b2b2;
385
+      box-sizing: border-box;
386
+      .searchInp {
387
+        text-align: center;
388
+        background-color: #fff;
389
+        width: 100%;
390
+        height: 100%;
391
+        border-radius: 0.09rem;
392
+        border: none;
393
+        &:focus {
394
+          outline: none;
395
+        }
396
+      }
397
+    }
398
+    .selectBtn {
399
+      width: 1.2rem;
400
+      height: 0.56rem;
401
+      font-size: 0.32rem;
402
+      color: #005395;
403
+      border-color: #005395;
404
+      background-color: #fff;
405
+      border-radius: 0.09rem;
406
+      &:focus {
407
+        outline: none;
408
+      }
409
+    }
410
+  }
411
+}
412
+.conentBox {
413
+  width: 100%;
414
+  .conent {
415
+    font-size: 0.32rem;
416
+    font-weight: 400;
417
+    line-height: 0.45rem;
418
+    border-bottom: 0.16rem solid #e5e5e5;
419
+    .head {
420
+      border-bottom: 0.01rem solid #e6e6e6;
421
+      p {
422
+        padding: 0.24rem 0.48rem;
423
+        display: flex;
424
+        justify-content: center;
425
+        align-items: center;
426
+        i {
427
+          color: #00559d;
428
+        }
429
+        .btn {
430
+          float: right;
431
+        }
432
+      }
433
+    }
434
+    .center {
435
+      color: #333333;
436
+      border-bottom: 0.01rem solid #e6e6e6;
437
+      padding: 0.24rem 0.48rem;
438
+      p {
439
+        display: flex;
440
+        justify-content: space-between;
441
+        align-items: center;
442
+        .grayFont {
443
+          color: #666;
444
+        }
445
+      }
446
+    }
447
+    .bottom {
448
+      overflow: hidden;
449
+      line-height: 0.86rem;
450
+      border-bottom: 0.01rem solid #e6e6e6;
451
+      font-size: 0.24rem;
452
+      color: #999;
453
+      padding: 0 0.24rem 0 0.48rem;
454
+    }
455
+  }
456
+}
457
+</style>

+ 514 - 0
src/views/WorkHourManagementTwo.vue

@@ -0,0 +1,514 @@
1
+<template>
2
+  <div class="bgColor">
3
+    <div slot="content" class="scroll-wrapper">
4
+      <div class="demo">
5
+        <div class="header">一级目录选择的是:{{ $route.params.parentName }}</div>
6
+        <div class="scroll-list-wrap">
7
+          <cube-scroll
8
+            :data="items"
9
+          >
10
+            <div class="conentBox">
11
+              <!-- <div
12
+                class="conent"
13
+                v-for="(item, index) in items"
14
+                @click="toDetail(item)"
15
+                :key="index"
16
+              >
17
+                <div class="head">
18
+                  <p>
19
+                    <span>{{ item.workName }}</span>
20
+                  </p>
21
+                </div>
22
+              </div> -->
23
+              <cube-checkbox-group v-model="checkList" :options="itemsCopy" style="font-size: 0.4rem;" />
24
+              <div class="wushuju" v-show="wushuju">
25
+                <img src="./../../static/images/wushuju.svg" alt />
26
+                <p>暂无数据</p>
27
+              </div>
28
+            </div>
29
+          </cube-scroll>
30
+          <div class="sub">
31
+            <cube-button type="submit" @click="subVali()" v-show="!wushuju">确定</cube-button>
32
+            <cube-button type="submit" @click="goBack()">返回</cube-button>
33
+          </div>
34
+        </div>
35
+      </div>
36
+    </div>
37
+    <load-ing v-if="!items.length && !wushuju"></load-ing>
38
+  </div>
39
+</template>
40
+<script>
41
+import Vue from "vue";
42
+import CubePage from "../components/cube-page.vue";
43
+import SwitchOption from "../components/switch-option";
44
+import InputOption from "../components/input-option";
45
+import SelectOption from "../components/select-option";
46
+import LoadIng from "./loading.vue";
47
+export default {
48
+  data() {
49
+    return {
50
+      itemsCopy:[],
51
+      checkList:[],
52
+      hcData: {},
53
+      valConfig: JSON.parse(localStorage.getItem("valConfig")) - 0, //报修主体
54
+      items: [],
55
+      pullDownRefresh: true,
56
+      pullDownRefreshThreshold: 60,
57
+      pullDownRefreshStop: 40,
58
+      pullDownRefreshTxt: "Refresh success",
59
+      pullUpLoad: true,
60
+      pullUpLoadThreshold: 0,
61
+      pullUpLoadMoreTxt: "加载更多",
62
+      pullUpLoadNoMoreTxt: "没有更多数据",
63
+      customPullDown: true,
64
+      wushuju: false,
65
+      sum: 1000,
66
+      idx: 0,
67
+      stateClass: "",
68
+      loadShow: true,
69
+      searching: false
70
+    };
71
+  },
72
+  components: {
73
+    CubePage,
74
+    SwitchOption,
75
+    InputOption,
76
+    SelectOption,
77
+    LoadIng,
78
+  },
79
+  methods: {
80
+    // 确定
81
+    subVali(){
82
+      console.log(this.checkList);
83
+      const toast = this.$createToast({
84
+        txt: "Loading...",
85
+        mask: true
86
+      });
87
+      toast.show();
88
+      this.$http
89
+        .post("service/bpm/data/addSummaryDoc", {
90
+            "workHourIds": String(this.checkList),
91
+            "summaryId": this.$route.params.summaryId
92
+        })
93
+        .then(res => {
94
+          toast.hide();
95
+          if (res.data.status == 200) {
96
+            this.$createDialog({
97
+              type: "alert",
98
+              title: "操作成功",
99
+              icon: "cubeic-right",
100
+              onConfirm: (e, promptValue) => {
101
+                this.loadShow = false;
102
+                this.items = [];
103
+                this.idx = 0;
104
+                this.$router.push({
105
+                  path: `/summaryOrder/${this.$route.params.incidentId}`
106
+                })
107
+              }
108
+            }).show();
109
+          } else {
110
+            this.$createDialog({
111
+              type: "alert",
112
+              title: "系统错误,请稍后再试!",
113
+              icon: "cubeic-wrong",
114
+              onConfirm: (e, promptValue) => {
115
+                this.loadShow = false;
116
+                this.items = [];
117
+                this.idx = 0;
118
+                this.$router.push({
119
+                  path: `/summaryOrder/${this.$route.params.incidentId}`
120
+                })
121
+              }
122
+            }).show();
123
+          }
124
+        });
125
+    },
126
+    // 返回
127
+    goBack(){
128
+      this.$router.go(-1);
129
+    },
130
+    // 弹窗
131
+    toDetail(item) {
132
+      this.$router.push({
133
+        path: `/main/WorkHourManagementTwo/${this.$route.params.incidentId}/${this.summaryId}/${item.id}`
134
+      });
135
+    },
136
+    // 获取列表
137
+    getData() {
138
+      if (this.searching) {
139
+        this.idx = 0;
140
+      }
141
+      this.$http
142
+        .post(
143
+          "service/bpm/data/querySummaryDoc",
144
+          {incidentId: this.$route.params.incidentId}
145
+        )
146
+        .then((res) => {
147
+          if(res.data.status == 200){
148
+            let workHourManagementList = res.data.workHourManagementList || [];
149
+            this.checkList = workHourManagementList.map(v => v.id);
150
+            console.log(this.checkList)
151
+            // ###########################
152
+            let postData = {
153
+              idx: this.idx,
154
+              sum: this.sum,
155
+              workHourManagement: {
156
+                parent: {id: this.$route.params.parentId}
157
+              }
158
+            };
159
+            this.$http
160
+              .post(
161
+                "service/bpm/data/fetchDataList/workHourManagement",
162
+                postData
163
+              )
164
+              .then((res) => {
165
+                if(res.data.status == 200){
166
+                  if (res.data.list.length > 0) {
167
+                    this.wushuju = false;
168
+                    if (this.searching) {
169
+                      this.items = res.data.list;
170
+                      this.itemsCopy = res.data.list.map(v => ({label:v.workName, value: v.id}));
171
+                    } else {
172
+                      this.items = this.items.concat(res.data.list);
173
+                      this.itemsCopy = this.itemsCopy.concat(res.data.list.map(v => ({label:v.workName, value: v.id})));
174
+                    }
175
+                  } else {
176
+                    this.wushuju = true;
177
+                  }
178
+                }else{
179
+                  this.$createDialog({
180
+                    type: "alert",
181
+                    title: "操作失败",
182
+                    content: "请求失败!",
183
+                    icon: "cubeic-wrong"
184
+                  }).show();
185
+                }
186
+                this.loadShow = false;
187
+              });
188
+            // ###########################
189
+          }else{
190
+            this.$createDialog({
191
+              type: "alert",
192
+              title: "操作失败",
193
+              content: "请求失败!",
194
+              icon: "cubeic-wrong"
195
+            }).show();
196
+          }
197
+        });
198
+    },
199
+  },
200
+  created() {
201
+    // this.$route.params.data
202
+    // this.getParamsState();
203
+    this.getData(this.idx, this.sum);
204
+  }
205
+};
206
+</script>
207
+<style lang="stylus" rel="stylesheet/stylus" scoped>
208
+.sub {
209
+  background: #ececec;
210
+  display: flex;
211
+  .cube-btn {
212
+    background-color: #005395 !important;
213
+    flex: 1;
214
+    margin: 0.2rem 1%;
215
+    border-radius: 8px;
216
+  }
217
+}
218
+.scroll-list-wrap {
219
+  /* height: 350px */
220
+  height: 76vh;
221
+  /* border: 1px solid rgba(0, 0, 0, 0.1) */
222
+  border-radius: 5px;
223
+  transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
224
+  // overflow: hidden;
225
+  padding-top: 0.88rem;
226
+}
227
+
228
+.foods-wrapper {
229
+  .food-item {
230
+    display: flex;
231
+
232
+    /* padding: 18px */
233
+    /* border-bottom: 1px solid rgba(7, 17, 27, 0.1) */
234
+    /* border-top: 1px solid rgba(7, 17, 27, 0.1)!important */
235
+    &:last-child {
236
+      border-none();
237
+      margin-bottom: 0;
238
+    }
239
+
240
+    .icon {
241
+      flex: 0 0 57px;
242
+      margin-right: 10px;
243
+    }
244
+
245
+    .food-content {
246
+      flex: 1;
247
+
248
+      .name {
249
+        margin: 2px 0 8px 0;
250
+        height: 14px;
251
+        line-height: 14px;
252
+        font-size: 14px;
253
+        color: rgb(7, 17, 27);
254
+      }
255
+
256
+      .description, .extra {
257
+        line-height: 10px;
258
+        font-size: 10px;
259
+        color: rgb(147, 153, 159);
260
+      }
261
+
262
+      .description {
263
+        line-height: 12px;
264
+        margin-bottom: 8px;
265
+      }
266
+
267
+      .extra {
268
+        .count {
269
+          margin-right: 12px;
270
+        }
271
+      }
272
+
273
+      .price {
274
+        font-weight: 700;
275
+        line-height: 24px;
276
+
277
+        .now {
278
+          margin-right: 8px;
279
+          font-size: 14px;
280
+          color: rgb(240, 20, 20);
281
+        }
282
+
283
+        .old {
284
+          text-decoration: line-through;
285
+          font-size: 10px;
286
+          color: rgb(147, 153, 159);
287
+        }
288
+      }
289
+
290
+      .cartcontrol-wrapper {
291
+        position: absolute;
292
+        right: 0;
293
+        bottom: 12px;
294
+
295
+        .scroll-wrapper {
296
+          .cube-pulldown-wrapper {
297
+            .before-trigger {
298
+              font-size: 30px;
299
+              line-height: 30px;
300
+              align-self: flex-end;
301
+
302
+              span {
303
+                display: inline-block;
304
+                transition: all 0.3s;
305
+                color: #666;
306
+
307
+                &.rotate {
308
+                  transform: rotate(180deg);
309
+                }
310
+              }
311
+            }
312
+
313
+            .after-trigger {
314
+              .refresh-text {
315
+                color: grey;
316
+              }
317
+            }
318
+          }
319
+        }
320
+      }
321
+    }
322
+  }
323
+}
324
+</style>
325
+<style lang="less" scoped>
326
+.bgColor {
327
+  background-color: white;
328
+}
329
+.food-item {
330
+  border-top: 0.16rem rgb(238, 238, 238) solid;
331
+}
332
+.food-content {
333
+  border-top: 0.01rem rgb(223, 222, 222) solid;
334
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
335
+}
336
+.title {
337
+  display: flex;
338
+  justify-content: space-between;
339
+  height: 0.7rem;
340
+  line-height: 0.7rem;
341
+  border-top: 0.01rem rgb(223, 222, 222) solid;
342
+  padding: 0 0.24rem;
343
+  border-bottom: 0.01rem rgb(223, 222, 222) solid;
344
+}
345
+.title i {
346
+  font-size: 0.32rem;
347
+  color: #005395;
348
+}
349
+.title div:nth-child(1) {
350
+  font-size: 0.32rem;
351
+}
352
+.title div:nth-child(1) span {
353
+  display: inline-block;
354
+  margin-left: 0.08rem;
355
+}
356
+.title div:nth-child(2) {
357
+  padding: 0.05rem 0.3rem;
358
+  /* border: 0.01rem rgb(0,0,255) solid; */
359
+  border-radius: 16px;
360
+  /* color: rgb(0,0,255); */
361
+  height: 0.25rem;
362
+  line-height: 0.25rem;
363
+  margin-top: 0.15rem;
364
+  font-size: 0.24rem;
365
+}
366
+.weishouli {
367
+  color: #991f00;
368
+  border: 0.01rem #991f00 solid;
369
+  background-color: #f4e8e5;
370
+}
371
+.bushouli {
372
+  color: #666666;
373
+  background-color: #eeeeee;
374
+  border: 0.01rem #666666 solid;
375
+}
376
+.chulizhong {
377
+  color: #003057;
378
+  background-color: #e5eaee;
379
+  border: 0.01rem #003057 solid;
380
+}
381
+.daipingjia {
382
+  color: #825b00;
383
+  background-color: #f2eee5;
384
+  border: 0.01rem #825b00 solid;
385
+}
386
+.yijiejue {
387
+  color: #40a19c;
388
+  background-color: #ebf5f5;
389
+  border: 0.01rem #40a19c solid;
390
+}
391
+.yichehui {
392
+  color: #48a843;
393
+  background-color: #ecf6ec;
394
+  border: 0.01rem #48a843 solid;
395
+}
396
+.timeBox {
397
+  display: flex;
398
+  justify-content: space-between;
399
+  font-size: 0.24rem;
400
+  color: #999999;
401
+  border-top: 0.01rem rgb(223, 222, 222) solid;
402
+  height: 0.7rem;
403
+  line-height: 0.7rem;
404
+  padding: 0 0.24rem 0 0.64rem;
405
+}
406
+.wushuju {
407
+  margin-top: 2.4rem;
408
+  text-align: center;
409
+  color: #999;
410
+}
411
+.wushuju img {
412
+  width: 5.12rem;
413
+  height: 2.84rem;
414
+}
415
+.demo {
416
+  .header {
417
+    width: 100%;
418
+    height: 0.88rem;
419
+    line-height: 0.88rem;
420
+    text-align: center;
421
+    color: #fff;
422
+    font-size: 0.37rem;
423
+    background: linear-gradient(#2e2f32, #414246);
424
+    position: fixed;
425
+    top: 0;
426
+    z-index: 6;
427
+  }
428
+  .seatchHeader {
429
+    width: 100%;
430
+    background-color: #eee;
431
+    padding: 0.16rem;
432
+    overflow: hidden;
433
+    position: fixed;
434
+    top: 0.88rem;
435
+    z-index: 6;
436
+    box-sizing: border-box;
437
+    .search {
438
+      width: 100%;
439
+      height: 0.56rem;
440
+      font-size: 0.26rem;
441
+      color: #b2b2b2;
442
+      box-sizing: border-box;
443
+      .searchInp {
444
+        text-align: center;
445
+        background-color: #fff;
446
+        width: 100%;
447
+        height: 100%;
448
+        border-radius: 0.09rem;
449
+        border: none;
450
+        &:focus {
451
+          outline: none;
452
+        }
453
+      }
454
+    }
455
+    .selectBtn {
456
+      width: 1.2rem;
457
+      height: 0.56rem;
458
+      font-size: 0.32rem;
459
+      color: #005395;
460
+      border-color: #005395;
461
+      background-color: #fff;
462
+      border-radius: 0.09rem;
463
+      &:focus {
464
+        outline: none;
465
+      }
466
+    }
467
+  }
468
+}
469
+.conentBox {
470
+  width: 100%;
471
+  .conent {
472
+    font-size: 0.32rem;
473
+    font-weight: 400;
474
+    line-height: 0.45rem;
475
+    border-bottom: 0.16rem solid #e5e5e5;
476
+    .head {
477
+      border-bottom: 0.01rem solid #e6e6e6;
478
+      p {
479
+        padding: 0.24rem 0.48rem;
480
+        display: flex;
481
+        justify-content: center;
482
+        align-items: center;
483
+        i {
484
+          color: #00559d;
485
+        }
486
+        .btn {
487
+          float: right;
488
+        }
489
+      }
490
+    }
491
+    .center {
492
+      color: #333333;
493
+      border-bottom: 0.01rem solid #e6e6e6;
494
+      padding: 0.24rem 0.48rem;
495
+      p {
496
+        display: flex;
497
+        justify-content: space-between;
498
+        align-items: center;
499
+        .grayFont {
500
+          color: #666;
501
+        }
502
+      }
503
+    }
504
+    .bottom {
505
+      overflow: hidden;
506
+      line-height: 0.86rem;
507
+      border-bottom: 0.01rem solid #e6e6e6;
508
+      font-size: 0.24rem;
509
+      color: #999;
510
+      padding: 0 0.24rem 0 0.48rem;
511
+    }
512
+  }
513
+}
514
+</style>

+ 14 - 7
src/views/incidentList.vue

@@ -152,7 +152,7 @@
152 152
     </div>
153 153
     <load-ing v-show="loadShow"></load-ing>
154 154
     <!-- 指派弹窗 -->
155
-    <showModel 
155
+    <showModel
156 156
       v-if="models.disjunctor"
157 157
       :title="models.title"
158 158
       :icon="models.icon"
@@ -454,12 +454,19 @@ export default {
454 454
       } else if (data.state.value == "close") {
455 455
         name = "Closed";
456 456
       }
457
-      this.$router.push({
458
-        name: name,
459
-        params: {
460
-          data: data
461
-        }
462
-      });
457
+      if(data.duty && data.duty.addSummary == 1 && name == "Processing"){
458
+        // 责任科室【是否需要填写汇总单】开启,并且工单状态是处理中
459
+        this.$router.push({
460
+          path: `/summaryOrder/${data.id}/${data.processInstanceId}`
461
+        });
462
+      }else{
463
+        this.$router.push({
464
+          name: name,
465
+          params: {
466
+            data: data
467
+          }
468
+        });
469
+      }
463 470
     },
464 471
 
465 472
     getData() {

+ 16 - 8
src/views/indes.vue

@@ -43,14 +43,14 @@
43 43
       >
44 44
         <div class="buildOrder">
45 45
           <div
46
-            class="buildOrderItem" 
46
+            class="buildOrderItem"
47 47
             @click="goTo('/main/incidentList/all/0/today')"
48 48
           >
49 49
             <div class="s_num">{{ newStatistics.createOrders }}</div>
50 50
             <div>今日建单</div>
51 51
           </div>
52 52
           <div
53
-            class="buildOrderItem" 
53
+            class="buildOrderItem"
54 54
             @click="goTo('/main/incidentList/all/1544')"
55 55
           >
56 56
             <!-- <div class="s_num">{{ newStatistics.todoOrders }}</div> -->
@@ -387,12 +387,20 @@ export default {
387 387
       } else if (data.state.value == "close") {
388 388
         name = "Closed";
389 389
       }
390
-      this.$router.push({
391
-        name: name,
392
-        params: {
393
-          data: data
394
-        }
395
-      });
390
+      if(data.duty && data.duty.addSummary == 1 && name == "Processing"){
391
+        name = 'SummaryOrder';
392
+        // 责任科室【是否需要填写汇总单】开启,并且工单状态是处理中
393
+        this.$router.push({
394
+          path: `/summaryOrder/${data.id}`
395
+        });
396
+      }else{
397
+        this.$router.push({
398
+          name: name,
399
+          params: {
400
+            data: data
401
+          }
402
+        });
403
+      }
396 404
     }
397 405
   },
398 406
   created() {

+ 690 - 0
src/views/summaryOrder.vue

@@ -0,0 +1,690 @@
1
+<template>
2
+  <div class="againAssign">
3
+    <div class="conentBox">
4
+      <div class="header">汇总单</div>
5
+      <div v-if="$route.params.incidentId" class="conent">
6
+        <div class="navBar">
7
+          <div class="fl p50">
8
+            <a
9
+              :class="{ active: actives == 'info' }"
10
+              href="javascript:;"
11
+              @click="toInfo('info')"
12
+              >耗材清单</a
13
+            >
14
+          </div>
15
+          <div class="fl">
16
+            <a
17
+              :class="{ active: actives == 'progress' }"
18
+              href="javascript:;"
19
+              @click="toInfo('progress')"
20
+              >工时清单</a
21
+            >
22
+          </div>
23
+        </div>
24
+        <div class="label headtop" id="info">耗材清单</div>
25
+
26
+        <div class="info">
27
+          <ConsumableMaterial v-for="item in summaryObj.consumableList" :key="item.id" class="bottomBorder" :model="item" :id="item.id" :summaryId="summaryId" :incidentId="$route.params.incidentId" @refresh="refresh"></ConsumableMaterial>
28
+          <p class="textCenter">
29
+            <span>耗材总价:<strong class="fontBold">{{ totalPriceConsumable }}元</strong></span>
30
+          </p>
31
+          <p
32
+            class="addConsumableMaterial textCenter"
33
+            @click="addConsumableMaterial()"
34
+          >
35
+            <span class="dash dash-jia"></span>
36
+          </p>
37
+          <div class="label" id="progress">工时清单</div>
38
+          <WorkHourManagement v-for="item in summaryObj.workHourManagementList" :key="item.id" class="bottomBorder" :model="item" :id="item.id" :summaryId="summaryId" :incidentId="$route.params.incidentId" @refresh="refresh" :summaryObj="summaryObj"></WorkHourManagement>
39
+          <p class="textCenter">
40
+            <span>工时总价:<strong class="fontBold">{{ totalPriceWorkHourManagement }}元</strong></span>
41
+          </p>
42
+          <p class="addConsumableMaterial textCenter" @click="addWorkHourManagementOne()">
43
+            <span class="dash dash-jia"></span>
44
+          </p>
45
+        </div>
46
+      </div>
47
+      <load-ing v-if="loadShow"></load-ing>
48
+      <promp-ting
49
+        :conents="promptingConent"
50
+        :status="promptingStatus"
51
+      ></promp-ting>
52
+    </div>
53
+    <seiminModel ref="seiminModel"></seiminModel>
54
+    <div class="sub">
55
+      <cube-button type="submit" @click="temporaryStorage()">暂存</cube-button>
56
+      <cube-button type="submit" @click="submitHandler()">提交汇总单</cube-button>
57
+    </div>
58
+  </div>
59
+</template>
60
+<script>
61
+import seiminModel from "./../custom/seiminModel";
62
+import LoadIng from "./../views/loading.vue";
63
+import PrompTing from "./../views/prompting.vue";
64
+import ConsumableMaterial from "./../components/ConsumableMaterial/index.vue";
65
+import WorkHourManagement from "./../components/WorkHourManagement/index.vue";
66
+
67
+export default {
68
+  data() {
69
+    return {
70
+      // 耗材总价格
71
+      totalPriceConsumable: 0,
72
+      totalPriceWorkHourManagement: 0,
73
+      summaryObj: {},
74
+      loginUser: JSON.parse(localStorage.getItem("loginUser")),
75
+      id: "",
76
+      actives: "info",
77
+      model: {}, //提交数据
78
+      loadShow: false,
79
+      pro_hides: false, //展开/收起处理进度
80
+      name: "",
81
+      label: "incidentInfo", //顶部快速定位
82
+      modelData: {
83
+        incident: {}
84
+      }, //上传的model
85
+      model: {
86
+        handleCategory: "", //处理方式
87
+        closecode: "", //关闭代码
88
+        category: [], //确认事件分类
89
+        handleDescription: "", //处理方案
90
+        knowledge: false, //是否提交知识库
91
+        isHelper: false, //是否需要协同
92
+        solutionType: [], //知识库类型
93
+        handlerUser: "", //升级/转派对象
94
+        isupreason: "", //升级原因
95
+        transferReason: "", //转派原因
96
+        synergeticReason: "", //协同原因
97
+        selectArea: "",
98
+        selectPlace: "",
99
+        transferMode: "", //转派方式
100
+        branch: "", //院区
101
+        duty: "" //责任科室
102
+      },
103
+      promptingConent: "",
104
+      promptingStatus: ""
105
+    };
106
+  },
107
+  methods: {
108
+    // 暂存
109
+    temporaryStorage(){
110
+      console.log(this.summaryObj);
111
+      const toast = this.$createToast({
112
+        txt: "Loading...",
113
+        mask: true
114
+      });
115
+      toast.show();
116
+      this.$http
117
+        .post("service/bpm/data/addSummaryDoc", {
118
+            "summaryId": this.summaryId,
119
+            "staging": '暂存',
120
+        })
121
+        .then(res => {
122
+          toast.hide();
123
+          if (res.data.status == 200) {
124
+            this.$createDialog({
125
+              type: "alert",
126
+              title: "操作成功",
127
+              icon: "cubeic-right",
128
+              onConfirm: (e, promptValue) => {
129
+                this.$router.push({
130
+                  path: `/main/incidentList/todo/0`
131
+                })
132
+              }
133
+            }).show();
134
+          } else {
135
+            this.$createDialog({
136
+              type: "alert",
137
+              title: "系统错误,请稍后再试!",
138
+              icon: "cubeic-wrong",
139
+              onConfirm: (e, promptValue) => {
140
+                this.$router.push({
141
+                  path: `/main/incidentList/todo/0`
142
+                })
143
+              }
144
+            }).show();
145
+          }
146
+        });
147
+    },
148
+    // 刷新
149
+    refresh(){
150
+      this.getInfo();
151
+    },
152
+    // 新增耗材
153
+    addConsumableMaterial() {
154
+      this.$router.push({
155
+        path: `/main/ConsumableList/${this.$route.params.incidentId}/${this.summaryId}`
156
+      });
157
+    },
158
+    // 新增工时
159
+    addWorkHourManagementOne() {
160
+      this.$router.push({
161
+        path: `/main/WorkHourManagementOne/${this.$route.params.incidentId}/${this.summaryId}`
162
+      });
163
+    },
164
+    // 获取汇总单信息
165
+    getInfo() {
166
+      this.$http.post("/service/bpm/data/querySummaryDoc", {incidentId: this.$route.params.incidentId}).then(res => {
167
+        if(res.data.status == 200){
168
+          this.summaryObj = res.data;
169
+          if(this.summaryObj.consumableList){
170
+            this.totalPriceConsumable = this.summaryObj.consumableList.reduce((pre, current) => pre + current.consumableEndPrice * current.consumablesNum, 0)
171
+          }else{
172
+            this.totalPriceConsumable = 0;
173
+          }
174
+          if(this.summaryObj.workHourManagementList){
175
+            this.totalPriceWorkHourManagement = this.summaryObj.workHourManagementList.reduce((pre, current) => pre + current.wage, 0)
176
+          }else{
177
+            this.totalPriceWorkHourManagement = 0;
178
+          }
179
+          this.summaryId = res.data.summaryId;
180
+        }else if(res.data.status == 201){
181
+          // 事件第一次绑定汇总单
182
+          this.summaryId = res.data.summaryId;
183
+        }
184
+      });
185
+    },
186
+    // 快速定位
187
+    toInfo(id) {
188
+      this.actives = id;
189
+      $("body,html").animate(
190
+        {
191
+          scrollTop:
192
+            $("#" + id).offset().top -
193
+            $(".header")[0].offsetHeight -
194
+            $(".navBar")[0].offsetHeight
195
+        },
196
+        260
197
+      );
198
+    },
199
+    // 提交
200
+    submitHandler() {
201
+      this.loadShow = true;
202
+      // 获取事件数据
203
+      this.$http
204
+        .get(
205
+          "/service/form/renderForm/handlerform/" +
206
+            this.$route.params.processInstanceId +
207
+            "/" +
208
+            this.loginUser.id +
209
+            "/" +
210
+            this.$route.params.incidentId,
211
+          {}
212
+        )
213
+        .then(res => {
214
+          this.modelData = res.data.model;
215
+          console.log(this.modelData)
216
+          this.modelData.incident.handleCategory = {id: 1565};
217
+          this.modelData.loginUser= this.loginUser;
218
+          this.$http
219
+          .post(
220
+            "service/bpm/bpm/completeTask/" +
221
+              this.modelData.incident.taskId +
222
+              "/" +
223
+              this.loginUser.id,
224
+            this.modelData
225
+          )
226
+          .then((res) => {
227
+            if (res.data) {
228
+              this.dialog = this
229
+                .$createDialog({
230
+                  type: "alert",
231
+                  title: "提交成功",
232
+                  content: "点击返回事件列表",
233
+                  icon: "cubeic-right",
234
+                  onConfirm: (e, promptValue) => {
235
+                    this.$router.push({ path: `/main/incidentList/todo/0` });
236
+                  }
237
+                })
238
+                .show();
239
+            } else {
240
+              this.loadShow = false;
241
+              this.dialog = this
242
+                .$createDialog({
243
+                  type: "alert",
244
+                  title: "系统错误,请稍后再试!",
245
+                  content: "请求失败",
246
+                  icon: "cubeic-wrong",
247
+                })
248
+                .show();
249
+            }
250
+          });
251
+        });
252
+    }
253
+  },
254
+  mounted() {
255
+    console.log(this.$route);
256
+    console.log(this.modelData, this.model, 999);
257
+    this.getInfo();
258
+  },
259
+  components: {
260
+    seiminModel,
261
+    LoadIng,
262
+    PrompTing,
263
+    ConsumableMaterial,
264
+    WorkHourManagement,
265
+  }
266
+};
267
+</script>
268
+
269
+<style lang="less" scoped>
270
+.bottomBorder {
271
+  border-bottom: 0.2rem solid #eee;
272
+}
273
+.textCenter {
274
+  text-align: center;
275
+}
276
+.addConsumableMaterial {
277
+  border-top: 0.01rem solid #e6e6e6;
278
+  border-bottom: 0.01rem solid #e6e6e6;
279
+}
280
+.hcList {
281
+  display: flex;
282
+  align-items: center;
283
+  margin-top: 0.1rem;
284
+}
285
+.hcItem {
286
+  flex: 4;
287
+  margin: 0 0.05rem;
288
+}
289
+.hcItemClose {
290
+  flex: 1;
291
+  font-size: 0.4rem;
292
+}
293
+.addHc {
294
+  width: 90%;
295
+  height: 1rem;
296
+  margin: 0 auto;
297
+  border: 0.02rem solid #ccc;
298
+  display: flex;
299
+  justify-content: center;
300
+  align-items: center;
301
+}
302
+.addHc .cubeic-add {
303
+  font-size: 0.8rem;
304
+}
305
+.newIncident .cube-form-group {
306
+  border-bottom: 0.02rem solid rgb(245, 245, 245);
307
+}
308
+.newIncident .sub .cube-btn {
309
+  margin-top: 1.1rem;
310
+}
311
+.btn_plcaeholde .cube-btn {
312
+  padding-left: 0;
313
+  padding-right: 0;
314
+  text-align: left;
315
+  color: inherit;
316
+  background: none;
317
+  border: none;
318
+}
319
+.btn_plcaeholde .cube-btn:active {
320
+  background-color: #fff;
321
+}
322
+.btn_plcaeholde .cube-btn::after {
323
+  content: ">";
324
+  float: right;
325
+  margin-right: 0.15rem;
326
+}
327
+.cube-form_standard .cube-upload-def .cube-upload-btn,
328
+.cube-form_standard .cube-upload-def .cube-upload-file {
329
+  margin-left: 3% !important;
330
+}
331
+// .sub .cube-btn {
332
+//   background-color: #005395 !important;
333
+//   width: 90%;
334
+//   margin: 0 auto;
335
+//   border-radius: 8px;
336
+// }
337
+.sub {
338
+  background: #ececec;
339
+  display: flex;
340
+  .cube-btn {
341
+    background-color: #005395 !important;
342
+    width: 48%;
343
+    margin: 0.2rem auto;
344
+    border-radius: 8px;
345
+  }
346
+}
347
+.cube-picker-wheel-item {
348
+  text-overflow: ellipsis;
349
+}
350
+</style>
351
+<style lang="less" scoped>
352
+.header {
353
+  width: 100%;
354
+  height: 0.88rem;
355
+  line-height: 0.88rem;
356
+  text-align: center;
357
+  color: #fff;
358
+  font-size: 0.37rem;
359
+  background: linear-gradient(#2e2f32, #414246);
360
+  position: fixed;
361
+  top: 0;
362
+  z-index: 6;
363
+}
364
+.incidentTitle {
365
+  .titleRefer {
366
+    display: flex;
367
+    align-items: center;
368
+    justify-content: space-between;
369
+    .titleTxtArea {
370
+      font-size: 0.3rem;
371
+      color: #333;
372
+      height: 2rem;
373
+      width: 62%;
374
+      &:focus {
375
+        outline: none;
376
+      }
377
+    }
378
+    .abtn {
379
+      display: inline-block;
380
+      width: 37%;
381
+      text-align: center;
382
+      height: 0.48rem;
383
+      color: #005395;
384
+      font-size: 0.28rem;
385
+    }
386
+  }
387
+}
388
+.form-custom {
389
+  .cube-form-item {
390
+    .cube-btn {
391
+      padding-left: 0;
392
+      padding-right: 0;
393
+      text-align: left;
394
+      color: inherit;
395
+      background: none;
396
+      border: none;
397
+    }
398
+  }
399
+}
400
+
401
+.label {
402
+  background-color: rgb(238, 238, 238);
403
+  height: 0.6rem;
404
+  line-height: 0.6rem;
405
+  padding-left: 0.2rem;
406
+  font-size: 0.24rem;
407
+  color: #666666;
408
+  span {
409
+    font-size: 0.2rem;
410
+    display: inline-block;
411
+    margin-left: 0.08rem;
412
+    color: #999999;
413
+  }
414
+  &.formLabel {
415
+    background-color: #fff;
416
+  }
417
+}
418
+
419
+.zhidu {
420
+  display: flex;
421
+  height: 0.7rem;
422
+  line-height: 0.7rem;
423
+  border-bottom: 0.02rem solid rgb(245, 245, 245);
424
+  div:nth-child(1) {
425
+    width: 27.5%;
426
+    padding-left: 6%;
427
+  }
428
+}
429
+
430
+.bgColor {
431
+  background-color: white;
432
+  &.newIncident {
433
+    padding-top: 1.84rem;
434
+  }
435
+}
436
+
437
+.uplod {
438
+  padding: 0 0.24rem;
439
+  border-bottom: 0.02rem solid rgb(245, 245, 245);
440
+}
441
+.handleRadio {
442
+  border-bottom: 0.02rem solid rgb(245, 245, 245);
443
+}
444
+.synerBox {
445
+  height: 3rem;
446
+  overflow: scroll;
447
+}
448
+
449
+i.iconfont.blue {
450
+  color: #005395;
451
+  // &::after {
452
+  //   content: "";
453
+  //   width: 0.01rem;
454
+  //   height: 0.4rem;
455
+  //   background: #005395;
456
+  //   position: relative;
457
+  //   display: block;
458
+  //   left: 0.14rem;
459
+  // }
460
+}
461
+.againAssign {
462
+  .header {
463
+    width: 100%;
464
+    height: 0.88rem;
465
+    line-height: 0.88rem;
466
+    text-align: center;
467
+    color: #fff;
468
+    font-size: 0.37rem;
469
+    background: linear-gradient(#2e2f32, #414246);
470
+    position: fixed;
471
+    top: 0;
472
+    z-index: 6;
473
+  }
474
+  .navBar {
475
+    width: 100%;
476
+    height: 0.96rem;
477
+    line-height: 0.96rem;
478
+    background-color: #fafafa;
479
+    font-size: 0.28rem;
480
+    position: fixed;
481
+    top: 0.88rem;
482
+    z-index: 9;
483
+    div {
484
+      width: 33.33%;
485
+      text-align: center;
486
+      &.p50 {
487
+        width: 49.99%;
488
+      }
489
+      a {
490
+        display: inline-block;
491
+        height: 0.9rem;
492
+        width: 1.7rem;
493
+        padding: 0 0.1rem;
494
+        &.active {
495
+          color: #005395;
496
+          border-bottom: 0.06rem solid #005395;
497
+        }
498
+      }
499
+    }
500
+  }
501
+
502
+  .headtop {
503
+    margin-top: 1.84rem;
504
+  }
505
+  .label {
506
+    background-color: #eeeeee;
507
+    height: 0.6rem;
508
+    line-height: 0.58rem;
509
+    padding-left: 0.2rem;
510
+    font-size: 0.24rem;
511
+    color: #666666;
512
+    span {
513
+      font-size: 0.2rem;
514
+      display: inline-block;
515
+      margin-left: 0.08rem;
516
+      color: #999999;
517
+    }
518
+    &.formLabel {
519
+      background-color: #fff;
520
+    }
521
+  }
522
+  .conentBox {
523
+    width: 100%;
524
+    .conent {
525
+      font-size: 0.32rem;
526
+      font-weight: 400;
527
+      line-height: 0.45rem;
528
+      // border-bottom: 0.16rem solid #e5e5e5;
529
+
530
+      .shows {
531
+        display: none;
532
+      }
533
+      .boeder_B {
534
+        border-bottom: 0.01rem solid #ccc;
535
+      }
536
+      p {
537
+        &.desc {
538
+          overflow: hidden;
539
+        }
540
+        .grayFont {
541
+          width: 75%;
542
+          text-align: right;
543
+          overflow-x: scroll;
544
+        }
545
+      }
546
+      .bottom {
547
+        overflow: hidden;
548
+        line-height: 0.86rem;
549
+        border-bottom: 0.01rem solid #e6e6e6;
550
+        font-size: 0.24rem;
551
+        color: #999;
552
+        padding: 0 0.24rem 0 0.48rem;
553
+      }
554
+      .info {
555
+        color: #999;
556
+        font-size: 0.28rem;
557
+        overflow: hidden;
558
+        .head {
559
+          border-bottom: 0.01rem solid #e6e6e6;
560
+          p {
561
+            padding: 0.24rem 0.3rem;
562
+            i {
563
+              color: #00559d;
564
+            }
565
+          }
566
+        }
567
+        p {
568
+          line-height: 0.4rem;
569
+          padding: 0.1rem 0.24rem;
570
+          overflow: hidden;
571
+          .overflowEllipsis2 {
572
+            margin-left: 1.96rem;
573
+          }
574
+        }
575
+        .info_hide {
576
+          padding: 0.2rem 0.24rem;
577
+          border-bottom: 0.01rem solid #e6e6e6;
578
+          .hide {
579
+            color: #00559d;
580
+          }
581
+        }
582
+        .imgs-container {
583
+          a {
584
+            color: #03c !important;
585
+            &:visited {
586
+              color: #551a8b !important;
587
+            }
588
+          }
589
+          img {
590
+            width: 1.5rem;
591
+            height: 1.5rem;
592
+            margin-right: 0.7rem;
593
+            &:nth-child(1) {
594
+              margin-left: 0.75rem;
595
+            }
596
+          }
597
+        }
598
+        .progress {
599
+          padding: 0.2rem 0.2rem;
600
+          overflow: hidden;
601
+          transition-duration: 0.2s;
602
+          transition-timing-function: linear;
603
+          &.progressHide {
604
+            height: 1.7rem;
605
+          }
606
+          .progress_info {
607
+            overflow: hidden;
608
+            margin-bottom: 0.1rem;
609
+            &:nth-last-child(1) {
610
+              .cont {
611
+                border: none !important;
612
+              }
613
+            }
614
+            .progress_info_L {
615
+              float: left;
616
+              color: #333;
617
+              max-width: 18%;
618
+            }
619
+            .progress_info_R {
620
+              float: right;
621
+              margin-left: 0.09rem;
622
+              width: 80%;
623
+              font-size: 0.25rem;
624
+              .time {
625
+                i {
626
+                  margin-left: -0.15rem;
627
+                  &.icon-icon_weizuo {
628
+                    color: #005495;
629
+                  }
630
+                  &.icon-icon_zhengzaijinx {
631
+                    color: #48a843;
632
+                    font-size: 0.37rem;
633
+                  }
634
+                }
635
+                span {
636
+                  margin-left: 0.15rem;
637
+                }
638
+              }
639
+              .cont {
640
+                border-left: 1px solid #999;
641
+                padding-left: 0.4rem;
642
+                min-height: 0.4rem;
643
+                &.blue {
644
+                  border-left: 1px solid #005395;
645
+                }
646
+              }
647
+
648
+              .text1 {
649
+                font-size: 0.15rem;
650
+              }
651
+              .text2 {
652
+                color: #666;
653
+                word-break: break-all;
654
+              }
655
+              p {
656
+                padding: 0;
657
+              }
658
+            }
659
+          }
660
+        }
661
+      }
662
+      .txtLabel {
663
+        width: 100%;
664
+        overflow: hidden;
665
+        padding: 0.32rem 0.24rem 0.32rem 0.32rem;
666
+        .txt {
667
+          width: 30%;
668
+          color: #666;
669
+        }
670
+        .cube-textarea-wrapper {
671
+          width: 62%;
672
+        }
673
+      }
674
+      .sub {
675
+        background: #ececec;
676
+        .cube-btn {
677
+          background-color: #005395 !important;
678
+          width: 90%;
679
+          margin: 0.2rem auto;
680
+          border-radius: 8px;
681
+        }
682
+      }
683
+    }
684
+  }
685
+  .showwrap {
686
+    width: 75%;
687
+    text-align: right;
688
+  }
689
+}
690
+</style>

+ 74 - 5
static/css/fontnew/demo_index.html

@@ -3,8 +3,8 @@
3 3
 <head>
4 4
   <meta charset="utf-8"/>
5 5
   <title>iconfont Demo</title>
6
-  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
7
-  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
6
+  <link rel="shortcut icon" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg" type="image/x-icon"/>
7
+  <link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01Z5paLz1O0zuCC7osS_!!6000000001644-55-tps-83-82.svg"/>
8 8
   <link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
9 9
   <link rel="stylesheet" href="demo.css">
10 10
   <link rel="stylesheet" href="iconfont.css">
@@ -55,6 +55,24 @@
55 55
           <ul class="icon_lists dib-box">
56 56
           
57 57
             <li class="dib">
58
+              <span class="icon dash">&#xe600;</span>
59
+                <div class="name">加</div>
60
+                <div class="code-name">&amp;#xe600;</div>
61
+              </li>
62
+          
63
+            <li class="dib">
64
+              <span class="icon dash">&#xe612;</span>
65
+                <div class="name">lock</div>
66
+                <div class="code-name">&amp;#xe612;</div>
67
+              </li>
68
+          
69
+            <li class="dib">
70
+              <span class="icon dash">&#xe69e;</span>
71
+                <div class="name">unlock</div>
72
+                <div class="code-name">&amp;#xe69e;</div>
73
+              </li>
74
+          
75
+            <li class="dib">
58 76
               <span class="icon dash">&#xe8b5;</span>
59 77
                 <div class="name">扫一扫</div>
60 78
                 <div class="code-name">&amp;#xe8b5;</div>
@@ -96,9 +114,9 @@
96 114
 <pre><code class="language-css"
97 115
 >@font-face {
98 116
   font-family: 'dash';
99
-  src: url('iconfont.woff2?t=1641526164246') format('woff2'),
100
-       url('iconfont.woff?t=1641526164246') format('woff'),
101
-       url('iconfont.ttf?t=1641526164246') format('truetype');
117
+  src: url('iconfont.woff2?t=1672887795273') format('woff2'),
118
+       url('iconfont.woff?t=1672887795273') format('woff'),
119
+       url('iconfont.ttf?t=1672887795273') format('truetype');
102 120
 }
103 121
 </code></pre>
104 122
           <h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -125,6 +143,33 @@
125 143
         <ul class="icon_lists dib-box">
126 144
           
127 145
           <li class="dib">
146
+            <span class="icon dash dash-jia"></span>
147
+            <div class="name">
148
+              加
149
+            </div>
150
+            <div class="code-name">.dash-jia
151
+            </div>
152
+          </li>
153
+          
154
+          <li class="dib">
155
+            <span class="icon dash dash-lock"></span>
156
+            <div class="name">
157
+              lock
158
+            </div>
159
+            <div class="code-name">.dash-lock
160
+            </div>
161
+          </li>
162
+          
163
+          <li class="dib">
164
+            <span class="icon dash dash-unlock"></span>
165
+            <div class="name">
166
+              unlock
167
+            </div>
168
+            <div class="code-name">.dash-unlock
169
+            </div>
170
+          </li>
171
+          
172
+          <li class="dib">
128 173
             <span class="icon dash dash-saoyisao"></span>
129 174
             <div class="name">
130 175
               扫一扫
@@ -189,6 +234,30 @@
189 234
           
190 235
             <li class="dib">
191 236
                 <svg class="icon svg-icon" aria-hidden="true">
237
+                  <use xlink:href="#dash-jia"></use>
238
+                </svg>
239
+                <div class="name">加</div>
240
+                <div class="code-name">#dash-jia</div>
241
+            </li>
242
+          
243
+            <li class="dib">
244
+                <svg class="icon svg-icon" aria-hidden="true">
245
+                  <use xlink:href="#dash-lock"></use>
246
+                </svg>
247
+                <div class="name">lock</div>
248
+                <div class="code-name">#dash-lock</div>
249
+            </li>
250
+          
251
+            <li class="dib">
252
+                <svg class="icon svg-icon" aria-hidden="true">
253
+                  <use xlink:href="#dash-unlock"></use>
254
+                </svg>
255
+                <div class="name">unlock</div>
256
+                <div class="code-name">#dash-unlock</div>
257
+            </li>
258
+          
259
+            <li class="dib">
260
+                <svg class="icon svg-icon" aria-hidden="true">
192 261
                   <use xlink:href="#dash-saoyisao"></use>
193 262
                 </svg>
194 263
                 <div class="name">扫一扫</div>

+ 15 - 3
static/css/fontnew/iconfont.css

@@ -1,8 +1,8 @@
1 1
 @font-face {
2 2
   font-family: "dash"; /* Project id 2879659 */
3
-  src: url('iconfont.woff2?t=1641526164246') format('woff2'),
4
-       url('iconfont.woff?t=1641526164246') format('woff'),
5
-       url('iconfont.ttf?t=1641526164246') format('truetype');
3
+  src: url('iconfont.woff2?t=1672887795273') format('woff2'),
4
+       url('iconfont.woff?t=1672887795273') format('woff'),
5
+       url('iconfont.ttf?t=1672887795273') format('truetype');
6 6
 }
7 7
 
8 8
 .dash {
@@ -13,6 +13,18 @@
13 13
   -moz-osx-font-smoothing: grayscale;
14 14
 }
15 15
 
16
+.dash-jia:before {
17
+  content: "\e600";
18
+}
19
+
20
+.dash-lock:before {
21
+  content: "\e612";
22
+}
23
+
24
+.dash-unlock:before {
25
+  content: "\e69e";
26
+}
27
+
16 28
 .dash-saoyisao:before {
17 29
   content: "\e8b5";
18 30
 }

File diff suppressed because it is too large
+ 1 - 1
static/css/fontnew/iconfont.js


+ 21 - 0
static/css/fontnew/iconfont.json

@@ -6,6 +6,27 @@
6 6
   "description": "引入一个新的字体图标",
7 7
   "glyphs": [
8 8
     {
9
+      "icon_id": "1302",
10
+      "name": "加",
11
+      "font_class": "jia",
12
+      "unicode": "e600",
13
+      "unicode_decimal": 58880
14
+    },
15
+    {
16
+      "icon_id": "1802972",
17
+      "name": "lock",
18
+      "font_class": "lock",
19
+      "unicode": "e612",
20
+      "unicode_decimal": 58898
21
+    },
22
+    {
23
+      "icon_id": "10972117",
24
+      "name": "unlock",
25
+      "font_class": "unlock",
26
+      "unicode": "e69e",
27
+      "unicode_decimal": 59038
28
+    },
29
+    {
9 30
       "icon_id": "11372685",
10 31
       "name": "扫一扫",
11 32
       "font_class": "saoyisao",

二進制
static/css/fontnew/iconfont.ttf


二進制
static/css/fontnew/iconfont.woff


二進制
static/css/fontnew/iconfont.woff2