3 Commits f5bf1c16d2 ... 811601b03b

Autore SHA1 Messaggio Data
  maotao 811601b03b 解决冲突 3 settimane fa
  maotao 4972c116a8 拉取代码 3 settimane fa
  maotao eb43c20cba 工时优化 1 mese fa

+ 73 - 4
pages/myRepair/myRepair.vue

@@ -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);//星级
@@ -417,7 +431,55 @@
417 431
 	function knowAttachment(){
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
+		recallValue.value = null
480
+		inputDialog.value.open()
481
+	}
482
+	
421 483
 	// 评价
422 484
 	function handler(type, data){
423 485
 		rowData.value = data
@@ -993,6 +1055,13 @@
993 1055
 	page{
994 1056
 	  height: calc(100vh - var(--window-bottom));
995 1057
 	}
1058
+	.ch-class{
1059
+		text-align: center;
1060
+		font-size: 32rpx;
1061
+	}
1062
+	.popup-content{
1063
+		padding: 40rpx;
1064
+	}
996 1065
 	.incidentList{
997 1066
 	  display: flex;
998 1067
 	  flex-direction: column;

+ 73 - 4
pages/repair/listHome.vue

@@ -37,7 +37,8 @@
37 37
           </view>
38 38
           <view class="btns">
39 39
             <button v-if="!data.wxdegree && (data.state.name=='待评价'|| data.state.name=='已关闭')" @click.stop="handler('changeUser', data)" type="default" class="primaryButton btn">评价</button>
40
-          </view>
40
+						<button v-if="data.state.value=='accept'" @click.stop="recall(data)" type="default" class="primaryButton btn">撤销</button>
41
+					</view>
41 42
         </view>
42 43
 				<div class="sign-style" v-if="deptRepair && publicRepair">
43 44
 					<view class="img-box" v-if="data.repairIncidentType && data.repairIncidentType.name=='科室报修'">
@@ -72,6 +73,17 @@
72 73
 			  <button @click="submit" type="default" class="primaryButton btn">提交</button>
73 74
 			</view>
74 75
 		</uni-popup>
76
+		
77
+		<uni-popup ref="inputDialog" background-color="#fff" type="center" :before-close="true">
78
+			<view class="ch-class">撤销原因</view>
79
+			<view class="popup-content">
80
+				<input type="text" focus placeholder="请输入撤销原因" v-model="recallValue">
81
+			</view>
82
+			<view class="foot_common_btns">
83
+				<button @click="closeDialog" size="mini" type="default" class="primaryButton btn">取消</button>
84
+			  <button @click="dialogInputConfirm" size="mini" type="default" class="primaryButton btn">确定</button>
85
+			</view>
86
+		</uni-popup>
75 87
 	</view>
76 88
 </template>
77 89
 
@@ -81,7 +93,7 @@
81 93
   import { startOfDay, endOfDay, format, add } from 'date-fns'
82 94
   import { ref, reactive, computed } from 'vue'
83 95
   import { onLoad, onShow, onHide, onPullDownRefresh, onReachBottom, onTabItemTap } from '@dcloudio/uni-app'
84
-  import { api_getDictionary, api_incident, api_incident_count, api_systemConfiguration, api_incidentTask, api_taskresolve } from "@/http/api.js"
96
+  import { api_getDictionary, api_incident, api_incident_count, api_systemConfiguration, api_incidentTask, api_taskresolve, api_repairCancel } from "@/http/api.js"
85 97
   import { filterFormatDate } from '@/filters/filterFormatDate.js'
86 98
   import { computedPriorityStyle } from '@/filters/computedPriorityStyle.js'
87 99
   import { computedStateStyle } from '@/filters/computedStateStyle.js'
@@ -115,7 +127,9 @@
115 127
   const qiangdan = ref(false);//接单权限
116 128
 	const deptRepair = ref({});//科内报修
117 129
 	const publicRepair = ref({});//公共报修
118
-
130
+	const recallValue = ref(null) //撤销原因
131
+	const inputDialog = ref(null)
132
+	const dataItem = ref(null)
119 133
 	const degreeDictionary = ref(null); //星级字典
120 134
 	const rowData = ref(null); //选择的数据
121 135
 	const isSubmit = ref(false);
@@ -231,7 +245,55 @@
231 245
   function knowAttachment(){
232 246
     dataInfo.isAttachment = false;
233 247
   }
234
-
248
+	
249
+	// 关闭撤销
250
+	function closeDialog(){
251
+		recallValue.value = null
252
+		inputDialog.value.close()
253
+	}
254
+	
255
+	// 确定撤销
256
+	function dialogInputConfirm(){
257
+		if(!recallValue.value){
258
+			uni.showToast({
259
+				icon: 'none',
260
+			  title: '撤销原因不能为空'
261
+			});
262
+			return
263
+		}
264
+		uni.showLoading({
265
+		  title: "加载中",
266
+		  mask: true,
267
+		});
268
+		let query={
269
+			incident: {...dataItem.value, ...{cancelRemark: recallValue.value}}
270
+		}
271
+		api_repairCancel(query).then(res=>{
272
+			uni.hideLoading();
273
+			if(res.state==200){
274
+				inputDialog.value.close()
275
+				recallValue.value = null
276
+				uni.showToast({
277
+					icon: 'none',
278
+				  title: '撤销成功'
279
+				});
280
+				getList(0);
281
+			}else{
282
+				uni.showToast({
283
+					icon: 'none',
284
+				  title: res.msg
285
+				});
286
+			}
287
+		})
288
+	}
289
+	
290
+	// 撤销
291
+	function recall(data){
292
+		dataItem.value = data
293
+		recallValue.value = null
294
+		inputDialog.value.open()
295
+	}
296
+	
235 297
   // 评价
236 298
   function handler(type, data){
237 299
 		rowData.value = data
@@ -451,6 +513,13 @@
451 513
 page{
452 514
   height: calc(100vh - var(--window-bottom));
453 515
 }
516
+.ch-class{
517
+	text-align: center;
518
+	font-size: 32rpx;
519
+}
520
+.popup-content{
521
+	padding: 40rpx;
522
+}
454 523
 .incidentList{
455 524
   display: flex;
456 525
   flex-direction: column;

+ 1 - 1
pages/repair/repairsDetail.vue

@@ -179,7 +179,7 @@
179 179
     </scroll-view>
180 180
     <view class="foot_common_btns">
181 181
       <button @click="goBack" type="default" class="primaryButton btn">返回</button>
182
-			<button v-if="stateId==20413" @click="recall" type="default" class="primaryButton btn">撤销</button>
182
+			<button v-if="dataInfo.incidentData.state.value=='accept'" @click="recall" type="default" class="primaryButton btn">撤销</button>
183 183
 		</view>
184 184
     <IncidentAttachment v-if="dataInfo.isAttachment" @knowEmit="knowAttachment" :incidentData="dataInfo.incidentData"></IncidentAttachment>
185 185
 

+ 1 - 1
pages/workHourManagementOne/workHourManagementOne.vue

@@ -5,7 +5,7 @@
5 5
     </view>
6 6
     <view class="body" v-if="dataInfo.list.length">
7 7
       <view class="body_item ellipsis" v-for="data in dataInfo.list" :key="data.id" @click="toWorkHourManagementTwo(data)">
8
-        {{data.workName}}
8
+				{{ data.workName }} - {{data.workUnit}} - {{data.wage}}元 - {{data.integral.value}}分 
9 9
       </view>
10 10
     </view>
11 11
     <view class="zanwu" v-else>

+ 3 - 6
pages/workHourManagementTwo/workHourManagementTwo.vue

@@ -147,13 +147,10 @@
147 147
       uni.stopPullDownRefresh();
148 148
       if(res.status == 200){
149 149
         let list = res.list || [];
150
+				for(let i of list){
151
+					i.workName =  i.workName + '-' + i.workUnit + '-' + i.wage + '元' + '-' + i.integral.value + '分'
152
+				}
150 153
 				dataInfo.list = list
151
-        // if(list.length){
152
-        //   dataInfo.hasMore = true;
153
-        //   dataInfo.list = dataInfo.idx === 0 ? list : dataInfo.list.concat(list);
154
-        // }else{
155
-        //   dataInfo.hasMore = false;
156
-        // }
157 154
       }else{
158 155
         uni.showToast({
159 156
           icon: 'none',