|
|
@@ -59,6 +59,48 @@
|
|
59
|
59
|
<view class="btnClass">
|
|
60
|
60
|
<button type="primary" :disabled="disabledButton" @click="submit('valiForm')">提交工单</button>
|
|
61
|
61
|
</view>
|
|
|
62
|
+ <view style="margin-top: 20px;">
|
|
|
63
|
+ <!-- 基于 uni-list 的页面布局 -->
|
|
|
64
|
+ <uni-section title="历史工单" type="line">
|
|
|
65
|
+ <uni-list>
|
|
|
66
|
+ <!-- <uni-list-item title="列表文字" />
|
|
|
67
|
+ <uni-list-item title="列表文字" rightText="右侧文字" />
|
|
|
68
|
+ <uni-list-item title="列表文字" note="列表描述信息" rightText="右侧文字" /> -->
|
|
|
69
|
+ <uni-list-item v-for="(item, index) in listData" :key="index" :title="item.F_WoCode" :to="'/pages/myTask/workOrderDetail/workOrderDetail?wid='+item.F_WoCode">
|
|
|
70
|
+ <template v-slot:body>
|
|
|
71
|
+ <view class="uni-list-box">
|
|
|
72
|
+ <view class="uni-content">
|
|
|
73
|
+ <view class="uni-note">工单编号:{{item.F_WoCode}}</view>
|
|
|
74
|
+ <view class="uni-note" v-show="item.F_ProposerDept">
|
|
|
75
|
+ 上报科室:{{ $mHelper.findParents(departList,item.F_ProposerDept)}}
|
|
|
76
|
+ </view>
|
|
|
77
|
+ <view class="uni-note">上报时间:{{item.F_CreateTime}}</view>
|
|
|
78
|
+ <view class="uni-note">工单状态:{{item.StateName}}</view>
|
|
|
79
|
+ </view>
|
|
|
80
|
+ </view>
|
|
|
81
|
+ </template>
|
|
|
82
|
+ </uni-list-item>
|
|
|
83
|
+ </uni-list>
|
|
|
84
|
+ </uni-section>
|
|
|
85
|
+ <!-- <uni-list :border="true">
|
|
|
86
|
+ <uni-list-item title="历史工单"></uni-list-item>
|
|
|
87
|
+ <uni-list-item class="tableList" direction="column" v-for="(item, index) in listData" :key="index"
|
|
|
88
|
+ :to="'/pages/myTask/workOrderDetail/workOrderDetail?wid='+item.F_WoCode">
|
|
|
89
|
+ <template v-slot:body>
|
|
|
90
|
+ <view class="uni-list-box">
|
|
|
91
|
+ <view class="uni-content">
|
|
|
92
|
+ <view class="uni-note">工单编号:{{item.F_WoCode}}</view>
|
|
|
93
|
+ <view class="uni-note" v-show="item.F_ProposerDept">
|
|
|
94
|
+ 上报科室:{{ $mHelper.findParents(departList,item.F_ProposerDept)}}
|
|
|
95
|
+ </view>
|
|
|
96
|
+ <view class="uni-note">上报时间:{{item.F_CreateTime}}</view>
|
|
|
97
|
+ <view class="uni-note">工单状态:{{item.StateName}}</view>
|
|
|
98
|
+ </view>
|
|
|
99
|
+ </view>
|
|
|
100
|
+ </template>
|
|
|
101
|
+ </uni-list-item>
|
|
|
102
|
+ </uni-list> -->
|
|
|
103
|
+ </view>
|
|
62
|
104
|
</view>
|
|
63
|
105
|
</view>
|
|
64
|
106
|
</template>
|
|
|
@@ -79,6 +121,7 @@
|
|
79
|
121
|
},
|
|
80
|
122
|
data() {
|
|
81
|
123
|
return {
|
|
|
124
|
+ listData: [],
|
|
82
|
125
|
getFontSizeValue: '1rem',
|
|
83
|
126
|
showsb: false,
|
|
84
|
127
|
showSearch: true,
|
|
|
@@ -128,8 +171,8 @@
|
|
128
|
171
|
departList: [],
|
|
129
|
172
|
candidates: [],
|
|
130
|
173
|
candidatesDesignate: [],
|
|
131
|
|
- hosptalList:[],
|
|
132
|
|
- auto:[],
|
|
|
174
|
+ hosptalList: [],
|
|
|
175
|
+ auto: [],
|
|
133
|
176
|
// 校验规则
|
|
134
|
177
|
rules: {
|
|
135
|
178
|
WorkOrderCategory: {
|
|
|
@@ -204,7 +247,8 @@
|
|
204
|
247
|
this.ApplicantData = res
|
|
205
|
248
|
this.orderApplicantData = data
|
|
206
|
249
|
this.valiFormData.Applicant = uni.getStorageSync("userCode")
|
|
207
|
|
- this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, uni.getStorageSync("userCode"))
|
|
|
250
|
+ this.valiFormData.ApplicantName = this.$mHelper.findUserName(this.ApplicantData, uni
|
|
|
251
|
+ .getStorageSync("userCode"))
|
|
208
|
252
|
const user = this.orderApplicantData.find((o) => {
|
|
209
|
253
|
return o.usercode === this.valiFormData.Applicant.toString()
|
|
210
|
254
|
})
|
|
|
@@ -236,14 +280,28 @@
|
|
236
|
280
|
}
|
|
237
|
281
|
},
|
|
238
|
282
|
methods: {
|
|
|
283
|
+ getOldList() {
|
|
|
284
|
+ const params = {
|
|
|
285
|
+ pageindex: 1,
|
|
|
286
|
+ pagesise: 10000,
|
|
|
287
|
+ time: 1,
|
|
|
288
|
+ loweltype: this.valiFormData.WorkOrderCategory,
|
|
|
289
|
+ deptid: this.valiFormData.ApplicationDept.split('_')[1]
|
|
|
290
|
+ }
|
|
|
291
|
+ this.$http.get("WorkCommon/GetComList", params).then((res) => {
|
|
|
292
|
+ if (res.state.toLowerCase() === "success") {
|
|
|
293
|
+ this.listData = res.rows
|
|
|
294
|
+ }
|
|
|
295
|
+ })
|
|
|
296
|
+ },
|
|
239
|
297
|
// 获取院区数据
|
|
240
|
298
|
getHosptallist() {
|
|
241
|
299
|
const params = {
|
|
242
|
300
|
pageindex: 1,
|
|
243
|
301
|
pagesise: 10000
|
|
244
|
302
|
}
|
|
245
|
|
- this.$http.get("Worepair/GetListyqRepairlist",params).then((res)=>{
|
|
246
|
|
- if(res.state.toLowerCase() ==="success"){
|
|
|
303
|
+ this.$http.get("Worepair/GetListyqRepairlist", params).then((res) => {
|
|
|
304
|
+ if (res.state.toLowerCase() === "success") {
|
|
247
|
305
|
this.hosptalList = res.rows
|
|
248
|
306
|
}
|
|
249
|
307
|
})
|
|
|
@@ -252,7 +310,7 @@
|
|
252
|
310
|
getHosptalId(name) {
|
|
253
|
311
|
let id = 0;
|
|
254
|
312
|
this.hosptalList.forEach(v => {
|
|
255
|
|
- if(v.T_Woname == name){
|
|
|
313
|
+ if (v.T_Woname == name) {
|
|
256
|
314
|
id = v.T_Woid
|
|
257
|
315
|
}
|
|
258
|
316
|
})
|
|
|
@@ -276,11 +334,12 @@
|
|
276
|
334
|
this.orderInf = inf
|
|
277
|
335
|
}
|
|
278
|
336
|
this.valiFormData.WorkOrderCategory = e
|
|
|
337
|
+ this.getOldList()
|
|
279
|
338
|
// if(this.auto){
|
|
280
|
339
|
// this.getAuto()
|
|
281
|
340
|
// }
|
|
282
|
341
|
},
|
|
283
|
|
- getAuto(){
|
|
|
342
|
+ getAuto() {
|
|
284
|
343
|
//清空
|
|
285
|
344
|
this.valiFormData.MaintenanceDept = ''
|
|
286
|
345
|
this.candidatesDesignate = []
|
|
|
@@ -288,27 +347,30 @@
|
|
288
|
347
|
this.valiFormData.Maintenancer = ''
|
|
289
|
348
|
this.valiFormData.MaintenancerName = ''
|
|
290
|
349
|
//申请人院区
|
|
291
|
|
- const applyHos = this.getHosptalId(this.$mHelper.findParents(this.departList,this.valiFormData.ApplicationDept.split('_')[1]).split('/')[0])
|
|
292
|
|
- console.log(applyHos,'院区')
|
|
293
|
|
- if(applyHos == 0){
|
|
|
350
|
+ const applyHos = this.getHosptalId(this.$mHelper.findParents(this.departList, this.valiFormData
|
|
|
351
|
+ .ApplicationDept.split('_')[1]).split('/')[0])
|
|
|
352
|
+ console.log(applyHos, '院区')
|
|
|
353
|
+ if (applyHos == 0) {
|
|
294
|
354
|
return
|
|
295
|
355
|
}
|
|
296
|
356
|
//遍历
|
|
297
|
357
|
for (var i = 0; i < this.auto.length; i++) {
|
|
298
|
358
|
if (this.auto[i].autoyq == applyHos) {
|
|
299
|
359
|
var aotocode = this.auto[i].autousercode
|
|
300
|
|
- this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i].autodept)
|
|
|
360
|
+ this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i]
|
|
|
361
|
+ .autodept)
|
|
301
|
362
|
.split('/').length + '_' + this.auto[i].autodept
|
|
302
|
363
|
pageData.getApplicant(this.auto[i].autodept, (res, data, candidates) => {
|
|
303
|
364
|
this.candidatesDesignate = candidates
|
|
304
|
365
|
this.MaintenancerData = res
|
|
305
|
|
- this.valiFormData.MaintenancerName = this.getTextByCode(aotocode)
|
|
306
|
|
- this.valiFormData.Maintenancer = aotocode
|
|
307
|
|
- })
|
|
|
366
|
+ this.valiFormData.MaintenancerName = this.getTextByCode(aotocode)
|
|
|
367
|
+ this.valiFormData.Maintenancer = aotocode
|
|
|
368
|
+ })
|
|
308
|
369
|
return
|
|
309
|
|
- } else if (this.auto[i].autoyq == '0' && applyHos =='0') {
|
|
|
370
|
+ } else if (this.auto[i].autoyq == '0' && applyHos == '0') {
|
|
310
|
371
|
var aotocode = this.auto[i].autousercode
|
|
311
|
|
- this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i].autodept)
|
|
|
372
|
+ this.valiFormData.MaintenanceDept = this.$mHelper.findParents(this.departList, this.auto[i]
|
|
|
373
|
+ .autodept)
|
|
312
|
374
|
.split('/').length + '_' + this.auto[i].autodept
|
|
313
|
375
|
pageData.getApplicant(this.auto[i].autodept, (res, data, candidates) => {
|
|
314
|
376
|
this.candidatesDesignate = candidates
|
|
|
@@ -316,20 +378,20 @@
|
|
316
|
378
|
this.valiFormData.MaintenancerName = this.getTextByCode(aotocode)
|
|
317
|
379
|
this.valiFormData.Maintenancer = aotocode
|
|
318
|
380
|
})
|
|
319
|
|
-
|
|
|
381
|
+
|
|
320
|
382
|
}
|
|
321
|
383
|
}
|
|
322
|
384
|
},
|
|
323
|
|
- getTextByCode(code){
|
|
324
|
|
- for(var i = 0;i<this.MaintenancerData.length;i++){
|
|
325
|
|
- if(this.MaintenancerData[i].value == code){
|
|
|
385
|
+ getTextByCode(code) {
|
|
|
386
|
+ for (var i = 0; i < this.MaintenancerData.length; i++) {
|
|
|
387
|
+ if (this.MaintenancerData[i].value == code) {
|
|
326
|
388
|
return this.MaintenancerData[i].text
|
|
327
|
389
|
}
|
|
328
|
390
|
}
|
|
329
|
391
|
},
|
|
330
|
392
|
// 申请部门
|
|
331
|
393
|
deptNodeclick(e) {
|
|
332
|
|
- if (e) {
|
|
|
394
|
+ if (e) {
|
|
333
|
395
|
console.log(e)
|
|
334
|
396
|
this.valiFormData.ApplicationDept = e.value
|
|
335
|
397
|
pageData.getApplicant(e.value.split('_')[1], (res, data, candidates) => {
|
|
|
@@ -342,6 +404,7 @@
|
|
342
|
404
|
this.valiFormData.ApplicantName = ''
|
|
343
|
405
|
this.valiFormData.Phone = ''
|
|
344
|
406
|
this.getDeptLocation(e.value.split('_')[1])
|
|
|
407
|
+ this.getOldList()
|
|
345
|
408
|
// this.getAuto()
|
|
346
|
409
|
}
|
|
347
|
410
|
},
|
|
|
@@ -510,11 +573,72 @@
|
|
510
|
573
|
<style lang="scss" scoped>
|
|
511
|
574
|
@import '@/common/addFormDeep.scss';
|
|
512
|
575
|
|
|
|
576
|
+ page {
|
|
|
577
|
+ // display: flex;
|
|
|
578
|
+ // flex-direction: column;
|
|
|
579
|
+ // box-sizing: border-box;
|
|
|
580
|
+ background-color: #efeff4;
|
|
|
581
|
+ // min-height: 100%;
|
|
|
582
|
+ // height: auto;
|
|
|
583
|
+ }
|
|
|
584
|
+
|
|
|
585
|
+ /deep/ .uni-title-sub {
|
|
|
586
|
+ font-size: 1rem;
|
|
|
587
|
+ }
|
|
|
588
|
+
|
|
|
589
|
+ /deep/ .uni-note {
|
|
|
590
|
+ font-size: 1rem;
|
|
|
591
|
+ }
|
|
|
592
|
+
|
|
|
593
|
+ .oldtitle {
|
|
|
594
|
+ text-align: center;
|
|
|
595
|
+ margin: 20px 0 10px 0;
|
|
|
596
|
+ background-color: #aaaaaa;
|
|
|
597
|
+ padding: 10px 0;
|
|
|
598
|
+ border-radius: 5px;
|
|
|
599
|
+ }
|
|
|
600
|
+
|
|
|
601
|
+ .uni-list-box {
|
|
|
602
|
+ position: relative;
|
|
|
603
|
+ padding: 10px;
|
|
|
604
|
+ border-bottom: 1px solid #DCDFE6;
|
|
|
605
|
+ // .textState {
|
|
|
606
|
+ // position: absolute;
|
|
|
607
|
+ // right: -5px;
|
|
|
608
|
+ // bottom: 0px;
|
|
|
609
|
+ // font-size: 1rem;
|
|
|
610
|
+ // background: #ffffff;
|
|
|
611
|
+ // border: 1px solid #52C41A;
|
|
|
612
|
+ // padding: 2px 5px;
|
|
|
613
|
+ // color: #52C41A;
|
|
|
614
|
+ // // background-color: rgba(195, 239, 161, 0.2);
|
|
|
615
|
+ // border-radius: 5px
|
|
|
616
|
+ // }
|
|
|
617
|
+ }
|
|
|
618
|
+
|
|
513
|
619
|
.wrapper {
|
|
514
|
620
|
padding: 10px 15px;
|
|
515
|
621
|
background-color: #fff;
|
|
516
|
622
|
|
|
517
|
623
|
.form {}
|
|
518
|
624
|
|
|
|
625
|
+ .tableWrapper {
|
|
|
626
|
+ margin: 0px 0 0 0;
|
|
|
627
|
+
|
|
|
628
|
+ .tableList {
|
|
|
629
|
+ color: #b6b6b6;
|
|
|
630
|
+ // background-color: #ececec;
|
|
|
631
|
+ margin-bottom: 10px;
|
|
|
632
|
+ padding-bottom: 10px;
|
|
|
633
|
+
|
|
|
634
|
+ .textLeft {
|
|
|
635
|
+ width: 300px;
|
|
|
636
|
+ white-space: nowrap;
|
|
|
637
|
+ overflow: hidden;
|
|
|
638
|
+ text-overflow: ellipsis;
|
|
|
639
|
+ }
|
|
|
640
|
+ }
|
|
|
641
|
+ }
|
|
|
642
|
+
|
|
519
|
643
|
}
|
|
520
|
644
|
</style>
|