|
@@ -38,7 +38,8 @@
|
38
|
38
|
</view>
|
39
|
39
|
<view class="btns">
|
40
|
40
|
<button v-if="!data.wxdegree && (data.state.name=='待评价'|| data.state.name=='已关闭')" @click.stop="handler('changeUser', data)" type="default" class="primaryButton btn">评价</button>
|
41
|
|
- </view>
|
|
41
|
+ <button v-if="data.state.value=='accept'" @click.stop="recall(data)" type="default" class="primaryButton btn">撤销</button>
|
|
42
|
+ </view>
|
42
|
43
|
</view>
|
43
|
44
|
<div class="sign-style" v-if="deptRepair && publicRepair">
|
44
|
45
|
<view class="img-box" v-if="data.repairIncidentType && data.repairIncidentType.name=='科室报修'">
|
|
@@ -74,6 +75,17 @@
|
74
|
75
|
<button @click="submit" type="default" class="primaryButton btn">提交</button>
|
75
|
76
|
</view>
|
76
|
77
|
</uni-popup>
|
|
78
|
+ <!-- 撤销 -->
|
|
79
|
+ <uni-popup ref="inputDialog" background-color="#fff" type="center" :before-close="true">
|
|
80
|
+ <view class="ch-class">撤销原因</view>
|
|
81
|
+ <view class="popup-content">
|
|
82
|
+ <input type="text" focus placeholder="请输入撤销原因" v-model="recallValue">
|
|
83
|
+ </view>
|
|
84
|
+ <view class="foot_common_btns">
|
|
85
|
+ <button @click="closeDialog" size="mini" type="default" class="primaryButton btn">取消</button>
|
|
86
|
+ <button @click="dialogInputConfirm" size="mini" type="default" class="primaryButton btn">确定</button>
|
|
87
|
+ </view>
|
|
88
|
+ </uni-popup>
|
77
|
89
|
</view>
|
78
|
90
|
|
79
|
91
|
<view v-if="tabsIndex0==1">
|
|
@@ -204,7 +216,7 @@
|
204
|
216
|
|
205
|
217
|
<script setup>
|
206
|
218
|
import { SM } from "@/http/http.js"
|
207
|
|
- import { api_getDictionary, api_incident, api_incident_count, api_incidentTask, api_taskresolve, api_systemConfiguration, api_userSave, api_user, api_department, api_repairScanCode, api_getNotice, api_getCount } from "@/http/api.js"
|
|
219
|
+ import { api_getDictionary, api_incident, api_incident_count, api_incidentTask, api_taskresolve, api_systemConfiguration, api_userSave, api_user, api_department, api_repairScanCode, api_getNotice, api_getCount, api_repairCancel } from "@/http/api.js"
|
208
|
220
|
import repairsFilter from '@/components/repairsFilter.vue';
|
209
|
221
|
import IncidentAttachment from '@/components/IncidentAttachment.vue';
|
210
|
222
|
import { startOfDay, endOfDay, format, add } from 'date-fns'
|
|
@@ -239,7 +251,9 @@
|
239
|
251
|
const assignFlag = ref(false);//指派权限
|
240
|
252
|
const qiangdan = ref(false);//接单权限
|
241
|
253
|
const publicRepair = ref({});//公共报修
|
242
|
|
-
|
|
254
|
+ const recallValue = ref(null) //撤销原因
|
|
255
|
+ const inputDialog = ref(null)
|
|
256
|
+ const dataItem = ref(null)
|
243
|
257
|
const degreeDictionary = ref(null); //星级字典
|
244
|
258
|
const rowData = ref(null); //选择的数据
|
245
|
259
|
const rate = ref(3);//星级
|
|
@@ -418,6 +432,53 @@
|
418
|
432
|
dataInfo.isAttachment = false;
|
419
|
433
|
}
|
420
|
434
|
|
|
435
|
+ // 关闭撤销
|
|
436
|
+ function closeDialog(){
|
|
437
|
+ recallValue.value = null
|
|
438
|
+ inputDialog.value.close()
|
|
439
|
+ }
|
|
440
|
+
|
|
441
|
+ // 确定撤销
|
|
442
|
+ function dialogInputConfirm(){
|
|
443
|
+ if(!recallValue.value){
|
|
444
|
+ uni.showToast({
|
|
445
|
+ icon: 'none',
|
|
446
|
+ title: '撤销原因不能为空'
|
|
447
|
+ });
|
|
448
|
+ return
|
|
449
|
+ }
|
|
450
|
+ uni.showLoading({
|
|
451
|
+ title: "加载中",
|
|
452
|
+ mask: true,
|
|
453
|
+ });
|
|
454
|
+ let query={
|
|
455
|
+ incident: {...dataItem.value, ...{cancelRemark: recallValue.value}}
|
|
456
|
+ }
|
|
457
|
+ api_repairCancel(query).then(res=>{
|
|
458
|
+ uni.hideLoading();
|
|
459
|
+ if(res.state==200){
|
|
460
|
+ inputDialog.value.close()
|
|
461
|
+ recallValue.value = null
|
|
462
|
+ uni.showToast({
|
|
463
|
+ icon: 'none',
|
|
464
|
+ title: '撤销成功'
|
|
465
|
+ });
|
|
466
|
+ getList(0);
|
|
467
|
+ }else{
|
|
468
|
+ uni.showToast({
|
|
469
|
+ icon: 'none',
|
|
470
|
+ title: res.msg
|
|
471
|
+ });
|
|
472
|
+ }
|
|
473
|
+ })
|
|
474
|
+ }
|
|
475
|
+
|
|
476
|
+ // 撤销
|
|
477
|
+ function recall(data){
|
|
478
|
+ dataItem.value = data
|
|
479
|
+ inputDialog.value.open()
|
|
480
|
+ }
|
|
481
|
+
|
421
|
482
|
// 评价
|
422
|
483
|
function handler(type, data){
|
423
|
484
|
rowData.value = data
|
|
@@ -993,6 +1054,13 @@
|
993
|
1054
|
page{
|
994
|
1055
|
height: calc(100vh - var(--window-bottom));
|
995
|
1056
|
}
|
|
1057
|
+ .ch-class{
|
|
1058
|
+ text-align: center;
|
|
1059
|
+ font-size: 32rpx;
|
|
1060
|
+ }
|
|
1061
|
+ .popup-content{
|
|
1062
|
+ padding: 40rpx;
|
|
1063
|
+ }
|
996
|
1064
|
.incidentList{
|
997
|
1065
|
display: flex;
|
998
|
1066
|
flex-direction: column;
|