瀏覽代碼

工时优化

maotao 1 月之前
父節點
當前提交
eb43c20cba

+ 71 - 3
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);//星级
@@ -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;

+ 70 - 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,52 @@
231 245
   function knowAttachment(){
232 246
     dataInfo.isAttachment = false;
233 247
   }
234
-
248
+	
249
+	// 关闭撤销
250
+	function closeDialog(){
251
+		inputDialog.value.close()
252
+	}
253
+	
254
+	// 确定撤销
255
+	function dialogInputConfirm(){
256
+		if(!recallValue.value){
257
+			uni.showToast({
258
+				icon: 'none',
259
+			  title: '撤销原因不能为空'
260
+			});
261
+			return
262
+		}
263
+		uni.showLoading({
264
+		  title: "加载中",
265
+		  mask: true,
266
+		});
267
+		let query={
268
+			incident: {...dataItem.value, ...{cancelRemark: recallValue.value}}
269
+		}
270
+		api_repairCancel(query).then(res=>{
271
+			uni.hideLoading();
272
+			if(res.state==200){
273
+				inputDialog.value.close()
274
+				uni.showToast({
275
+					icon: 'none',
276
+				  title: '撤销成功'
277
+				});
278
+				getList(0);
279
+			}else{
280
+				uni.showToast({
281
+					icon: 'none',
282
+				  title: res.msg
283
+				});
284
+			}
285
+		})
286
+	}
287
+	
288
+	// 撤销
289
+	function recall(data){
290
+		dataItem.value = data
291
+		inputDialog.value.open()
292
+	}
293
+	
235 294
   // 评价
236 295
   function handler(type, data){
237 296
 		rowData.value = data
@@ -451,6 +510,13 @@
451 510
 page{
452 511
   height: calc(100vh - var(--window-bottom));
453 512
 }
513
+.ch-class{
514
+	text-align: center;
515
+	font-size: 32rpx;
516
+}
517
+.popup-content{
518
+	padding: 40rpx;
519
+}
454 520
 .incidentList{
455 521
   display: flex;
456 522
   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',