maotao 9 månader sedan
förälder
incheckning
ac2ef865c8

+ 1 - 1
http/api.js

@@ -281,7 +281,7 @@ export function api_getCount(data){
281
  * 报修端-保存个人信息
281
  * 报修端-保存个人信息
282
  */
282
  */
283
 export function api_userSave(data){
283
 export function api_userSave(data){
284
-  return post("/user/data/addData/user", data);
284
+  return post("/user/data/updData/user", data);
285
 }
285
 }
286
 
286
 
287
 /**
287
 /**

+ 1 - 0
interceptor/routeInterceptor.js

@@ -5,6 +5,7 @@ let repaireRouterList = [
5
     "/pages/homePage/homePage", //登录页
5
     "/pages/homePage/homePage", //登录页
6
     "/pages/initBind/initBind", //绑定工号
6
     "/pages/initBind/initBind", //绑定工号
7
     "/pages/repairEntrance/repairEntrance", //报修入口页
7
     "/pages/repairEntrance/repairEntrance", //报修入口页
8
+		"/pages/repository/repository", //报修入口页
8
   ]
9
   ]
9
   let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
10
   let list = ["navigateTo", "redirectTo", "reLaunch", "switchTab"];
10
   //用遍历的方式分别为uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
11
   //用遍历的方式分别为uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器

+ 3 - 2
manifest.json

@@ -62,8 +62,9 @@
62
         "devServer" : {
62
         "devServer" : {
63
             "proxy" : {
63
             "proxy" : {
64
                 "/service" : {
64
                 "/service" : {
65
-                    // "target" : "http://192.168.3.108", //请求的目标域名
66
-										"target" : "http://192.168.4.105", //宋程玉本地
65
+                    "target" : "http://192.168.3.108", //请求的目标域名
66
+										// "target" : "http://192.168.4.163", //宋程玉本地
67
+										// "target" : "http://192.168.4.105", //程肖本地
67
                     "changeOrigin" : true, //是否跨域
68
                     "changeOrigin" : true, //是否跨域
68
                     "secure" : false
69
                     "secure" : false
69
                 },
70
                 },

+ 11 - 16
pages/repair/config.vue

@@ -100,12 +100,12 @@
100
   
100
   
101
   // 保存
101
   // 保存
102
   function addInfo(){
102
   function addInfo(){
103
-    isSubmit.value = true
104
 		uni.showLoading({
103
 		uni.showLoading({
105
 		  title: "加载中",
104
 		  title: "加载中",
106
 		  mask: true,
105
 		  mask: true,
107
 		});
106
 		});
108
-		userData.branch.id = dataForm.branch
107
+    isSubmit.value = true
108
+		userData.currentHospital.id = dataForm.branch
109
 		userData.commonDeptName = commonDeptName.value
109
 		userData.commonDeptName = commonDeptName.value
110
 		userData.dept={
110
 		userData.dept={
111
 			id:dataForm.dept
111
 			id:dataForm.dept
@@ -148,16 +148,11 @@
148
 	  });
148
 	  });
149
 	  let postData = {
149
 	  let postData = {
150
 			department: {
150
 			department: {
151
-			  branch: '',
151
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
152
 			},
152
 			},
153
 			idx:0,
153
 			idx:0,
154
 			sum:9999
154
 			sum:9999
155
 		}
155
 		}
156
-		if(loginUserStore.loginUser.user.duty){
157
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
158
-		}else if(loginUserStore.loginUser.user.branch){
159
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
160
-		}
161
 	  api_department(postData).then(res => {
156
 	  api_department(postData).then(res => {
162
 	    uni.hideLoading();
157
 	    uni.hideLoading();
163
 			getBranch()
158
 			getBranch()
@@ -172,15 +167,15 @@
172
 	// 获取院区列表
167
 	// 获取院区列表
173
 	function getBranch(){
168
 	function getBranch(){
174
 		let postData = {
169
 		let postData = {
175
-			branch:'',
170
+			// hosId:loginUserStore.loginUser.user.currentHospital.id,
176
 			idx:0,
171
 			idx:0,
177
 			sum:9999
172
 			sum:9999
178
 		}
173
 		}
179
-		if(loginUserStore.loginUser.user.duty){
180
-		  postData.branch = loginUserStore.loginUser.user.duty.id;
181
-		}else if(loginUserStore.loginUser.user.branch){
182
-		  postData.branch = loginUserStore.loginUser.user.branch.id;
183
-		}
174
+		// if(loginUserStore.loginUser.user.duty){
175
+		//   postData.branch = loginUserStore.loginUser.user.currentHospital.id;
176
+		// }else if(loginUserStore.loginUser.user.branch){
177
+		//   postData.branch = loginUserStore.loginUser.user.branch.id;
178
+		// }
184
 		api_branch(postData).then(res => {
179
 		api_branch(postData).then(res => {
185
 		  uni.hideLoading();
180
 		  uni.hideLoading();
186
 		  res = res.list || [];
181
 		  res = res.list || [];
@@ -197,7 +192,7 @@
197
 		let data = commonDeptData.value ? 
192
 		let data = commonDeptData.value ? 
198
 		commonDeptData.value : loginUserStore.loginUser.user.commonDept
193
 		commonDeptData.value : loginUserStore.loginUser.user.commonDept
199
 		if(!data){
194
 		if(!data){
200
-			data = null
195
+			data = 'none'
201
 		}
196
 		}
202
 		uni.navigateTo({
197
 		uni.navigateTo({
203
 		  url: '/pages/repair/deptSelect?data='+JSON.stringify(data)
198
 		  url: '/pages/repair/deptSelect?data='+JSON.stringify(data)
@@ -220,7 +215,7 @@
220
 		}else{
215
 		}else{
221
 			let user = loginUserStore.loginUser.user
216
 			let user = loginUserStore.loginUser.user
222
 			if(user){
217
 			if(user){
223
-				dataForm.branch = user.branch.id
218
+				dataForm.branch = user.currentHospital.id
224
 				dataForm.dept = user.dept.id
219
 				dataForm.dept = user.dept.id
225
 				if(user.commonDeptDTO){
220
 				if(user.commonDeptDTO){
226
 					let dept = user.commonDeptDTO.map(i=>{
221
 					let dept = user.commonDeptDTO.map(i=>{

+ 8 - 7
pages/repair/deptSelect.vue

@@ -78,16 +78,16 @@
78
 	  });
78
 	  });
79
 	  let postData = {
79
 	  let postData = {
80
 			department: {
80
 			department: {
81
-			  branch: '',
81
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
82
 			},
82
 			},
83
 			idx:0,
83
 			idx:0,
84
 			sum:9999
84
 			sum:9999
85
 		}
85
 		}
86
-		if(loginUserStore.loginUser.user.duty){
87
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
88
-		}else if(loginUserStore.loginUser.user.branch){
89
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
90
-		}
86
+		// if(loginUserStore.loginUser.user.duty){
87
+		//   postData.department.branch = loginUserStore.loginUser.user.duty.id;
88
+		// }else if(loginUserStore.loginUser.user.branch){
89
+		//   postData.department.branch = loginUserStore.loginUser.user.branch.id;
90
+		// }
91
 	  api_department(postData).then(res => {
91
 	  api_department(postData).then(res => {
92
 	    uni.hideLoading();
92
 	    uni.hideLoading();
93
 	    res = res.list || [];
93
 	    res = res.list || [];
@@ -138,7 +138,8 @@
138
   }
138
   }
139
   
139
   
140
   onLoad((option) => {
140
   onLoad((option) => {
141
-		if(option.data!=null){
141
+		console.log(888,option)
142
+		if(option.data!='none'){
142
 			let data = JSON.parse(option.data).split(',')
143
 			let data = JSON.parse(option.data).split(',')
143
 			optionData.value = data
144
 			optionData.value = data
144
 		}
145
 		}

+ 5 - 5
pages/repair/home.vue

@@ -22,18 +22,18 @@
22
 		  <view class="content">
22
 		  <view class="content">
23
 				<view>
23
 				<view>
24
 					<view class="con-title">处理中</view>
24
 					<view class="con-title">处理中</view>
25
-					<view class="con-value">{{repairData.userCloseCount}}</view>
25
+					<view class="con-value">{{repairData.userHandlerCount}}</view>
26
 				</view>
26
 				</view>
27
 				<view>
27
 				<view>
28
 					<view class="con-title">待评价</view>
28
 					<view class="con-title">待评价</view>
29
-					<view class="con-value">{{repairData.userHandlerCount}}</view>
29
+					<view class="con-value">{{repairData.userCloseCount}}</view>
30
 				</view>
30
 				</view>
31
 		  </view>
31
 		  </view>
32
 		</view>
32
 		</view>
33
-		<view class="home_item">
33
+<!-- 		<view class="home_item">
34
 			<uni-notice-bar show-icon scrollable background-color="#ffffff" color="#000"
34
 			<uni-notice-bar show-icon scrollable background-color="#ffffff" color="#000"
35
 			:text="noticeData" />
35
 			:text="noticeData" />
36
-		</view>
36
+		</view> -->
37
 		<view class="home_item home-disp">
37
 		<view class="home_item home-disp">
38
 			<view class="bottom-left" @click="addRepairs">
38
 			<view class="bottom-left" @click="addRepairs">
39
 				<view class="bottom-left-box">
39
 				<view class="bottom-left-box">
@@ -99,7 +99,7 @@
99
 			}
99
 			}
100
 		}).then(res=>{
100
 		}).then(res=>{
101
 			uni.hideLoading();
101
 			uni.hideLoading();
102
-			getHtml(res.list[0])
102
+			// getHtml(res.list[0])
103
 		})
103
 		})
104
 	}
104
 	}
105
 	
105
 	

+ 43 - 56
pages/repair/rapidRepNext.vue

@@ -93,7 +93,7 @@
93
   import NumberModal from '@/components/NumberModal.vue';
93
   import NumberModal from '@/components/NumberModal.vue';
94
   import { onLoad } from '@dcloudio/uni-app'
94
   import { onLoad } from '@dcloudio/uni-app'
95
   import { generateNumberArray } from '@/utils/index.js'
95
   import { generateNumberArray } from '@/utils/index.js'
96
-  import { api_getDictionary, api_sj,api_request, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
96
+  import { api_getDictionary, api_sj,api_request, getFetchDataList, api_place, api_getSolution, api_area, api_user, api_incidentTask, api_branch, api_dutyDepartment, api_department, api_querySummaryDoc, api_addSummaryDoc } from "@/http/api.js"
97
   import { defaultColor } from '@/static/js/theme.js'
97
   import { defaultColor } from '@/static/js/theme.js'
98
   import { useSetTitle } from '@/share/useSetTitle.js'
98
   import { useSetTitle } from '@/share/useSetTitle.js'
99
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
99
   import { useMakePhoneCall } from '@/share/useMakePhoneCall.js'
@@ -260,7 +260,7 @@
260
 		
260
 		
261
 		let user = loginUserStore.loginUser.user
261
 		let user = loginUserStore.loginUser.user
262
 		if(user){
262
 		if(user){
263
-			dataInfo.branch = user.branch.id
263
+			dataInfo.branch = user.currentHospital.id
264
 			dataInfo.contacts = user.name
264
 			dataInfo.contacts = user.name
265
 			dataInfo.contactsInformation = user.phone
265
 			dataInfo.contactsInformation = user.phone
266
 			dataInfo.department = user.dept.id
266
 			dataInfo.department = user.dept.id
@@ -280,15 +280,9 @@
280
 	// 获取院区列表
280
 	// 获取院区列表
281
 	function getBranch(){
281
 	function getBranch(){
282
 		let postData = {
282
 		let postData = {
283
-			branch:'',
284
 			idx:0,
283
 			idx:0,
285
 			sum:9999
284
 			sum:9999
286
 		}
285
 		}
287
-		if(loginUserStore.loginUser.user.duty){
288
-		  postData.branch = loginUserStore.loginUser.user.duty.id;
289
-		}else if(loginUserStore.loginUser.user.branch){
290
-		  postData.branch = loginUserStore.loginUser.user.branch.id;
291
-		}
292
 		api_branch(postData).then(res => {
286
 		api_branch(postData).then(res => {
293
 		  uni.hideLoading();
287
 		  uni.hideLoading();
294
 		  res = res.list || [];
288
 		  res = res.list || [];
@@ -307,16 +301,11 @@
307
     });
301
     });
308
     let postData = {
302
     let postData = {
309
 			department: {
303
 			department: {
310
-			  branch: '',
304
+			  hospital: loginUserStore.loginUser.user.currentHospital.id,
311
 			},
305
 			},
312
 			idx:0,
306
 			idx:0,
313
 			sum:9999
307
 			sum:9999
314
 		}
308
 		}
315
-		if(loginUserStore.loginUser.user.duty){
316
-		  postData.department.branch = loginUserStore.loginUser.user.duty.id;
317
-		}else if(loginUserStore.loginUser.user.branch){
318
-		  postData.department.branch = loginUserStore.loginUser.user.branch.id;
319
-		}
320
     api_department(postData).then(res => {
309
     api_department(postData).then(res => {
321
       uni.hideLoading();
310
       uni.hideLoading();
322
       res = res.list || [];
311
       res = res.list || [];
@@ -333,27 +322,22 @@
333
       title: "加载中",
322
       title: "加载中",
334
       mask: true,
323
       mask: true,
335
     });
324
     });
336
-    let postData = {
337
-      idx: 0,
338
-      sum: 9999,
339
-      area: {
340
-        branch: '',
341
-      }
342
-    };
343
-		if(loginUserStore.loginUser.user.duty){
344
-		  postData.area.branch = loginUserStore.loginUser.user.duty.id;
345
-		}else if(loginUserStore.loginUser.user.branch){
346
-		  postData.area.branch = loginUserStore.loginUser.user.branch.id;
347
-		}
348
-    api_area(postData).then(res => {
349
-			// getPlaceList()
350
-			 uni.hideLoading();
351
-      res = res.list || [];
352
-      dataInfo.buildingTypeList = res.map(v => ({
353
-        text: v.area,
354
-        value: v.id
355
-      }));
356
-    })
325
+		let postData = {
326
+		  idx: 0,
327
+		  sum: 9999,
328
+			building:{
329
+				hosId: loginUserStore.loginUser.user.currentHospital.id,
330
+			}
331
+		};
332
+		getFetchDataList("simple/data", "building", postData)
333
+		  .then((res) => {
334
+				uni.hideLoading();
335
+		    res = res.list || [];
336
+		    dataInfo.buildingTypeList = res.map(v => ({
337
+		      text: v.buildingName,
338
+		      value: v.id
339
+		    }));
340
+		  });
357
   }
341
   }
358
   
342
   
359
 	function areaChange(e){
343
 	function areaChange(e){
@@ -365,22 +349,21 @@
365
 	  let postData = {
349
 	  let postData = {
366
 	    idx: 0,
350
 	    idx: 0,
367
 	    sum: 9999,
351
 	    sum: 9999,
368
-			place: {
369
-			  area: {id: e },
352
+			floor: {
353
+			  buildId:e,
354
+				hosId:loginUserStore.loginUser.user.currentHospital.id
370
 			}
355
 			}
371
 	  };
356
 	  };
372
-		// if(loginUserStore.loginUser.user.duty){
373
-		//   postData.area.branch = loginUserStore.loginUser.user.duty.id;
374
-		// }else if(loginUserStore.loginUser.user.branch){
375
-		//   postData.area.branch = loginUserStore.loginUser.user.branch.id;
376
-		// }
377
-	  api_place(postData).then(res => {
378
-	    res = res.list || [];
379
-	    dataInfo.placeTypeList = res.map(v => ({
380
-	      text: v.place,
381
-	      value: v.id
382
-	    }));
383
-	  })
357
+		
358
+		getFetchDataList("simple/data", "floor", postData)
359
+		  .then((res) => {
360
+				uni.hideLoading();
361
+		    res = res.list || [];
362
+		    dataInfo.placeTypeList = res.map(v => ({
363
+		      text: v.floorName,
364
+		      value: v.id
365
+		    }));
366
+		  });
384
 	}
367
 	}
385
 	
368
 	
386
   // 提交
369
   // 提交
@@ -410,20 +393,24 @@
410
 			delete postData.serverId 
393
 			delete postData.serverId 
411
 		}
394
 		}
412
     postData.incident.assetId = dataInfo.assetId;
395
     postData.incident.assetId = dataInfo.assetId;
413
-		postData.incident.address = dataInfo.address;
396
+		postData.incident.houseNumber = dataInfo.address;
414
 		postData.incident.contacts = dataInfo.contacts;
397
 		postData.incident.contacts = dataInfo.contacts;
415
 		postData.incident.contactsInformation = dataInfo.contactsInformation;
398
 		postData.incident.contactsInformation = dataInfo.contactsInformation;
416
-		postData.incident.branch = dataInfo.branch;
417
-		postData.incident.areaId = dataInfo.areaId; //areaId:楼栋   
418
-    postData.incident.placeId = dataInfo.placeId;//placeId:楼层
399
+		postData.incident.hosId = dataInfo.branch;
400
+		postData.incident.place = {}
401
+		postData.incident.place.id = dataInfo.placeId;
402
+		// postData.incident.buildId = dataInfo.areaId; //areaId:楼栋   
403
+  //   postData.incident.floorId = dataInfo.placeId;//placeId:楼层
404
+		// buildId
405
+		// floorId
419
 		api_getDictionary({
406
 		api_getDictionary({
420
 			key: "incident_source",
407
 			key: "incident_source",
421
 			type: "list"
408
 			type: "list"
422
 		}).then(res1=>{
409
 		}).then(res1=>{
423
 				let incidentSourceList = res1 || [];
410
 				let incidentSourceList = res1 || [];
424
 			  let im = incidentSourceList.find(v => v.value === 'im');
411
 			  let im = incidentSourceList.find(v => v.value === 'im');
425
-				api_sj().then(res2=>{
426
-					postData.incident.incidentsign = res2.data;
412
+				// api_sj().then(res2=>{
413
+					// postData.incident.incidentsign = res2.data;
427
 					postData.incident.source = im;
414
 					postData.incident.source = im;
428
 					postData.incident.fromWx = true;
415
 					postData.incident.fromWx = true;
429
 					postData.incident.requester = loginUserStore.loginUser.user;
416
 					postData.incident.requester = loginUserStore.loginUser.user;
@@ -484,7 +471,7 @@
484
 						  });
471
 						  });
485
 						}
472
 						}
486
 					})
473
 					})
487
-				})
474
+				// })
488
 		})
475
 		})
489
 
476
 
490
   }
477
   }

+ 2 - 2
pages/repair/repairsDetail.vue

@@ -55,7 +55,7 @@
55
           </view>
55
           </view>
56
           <view class="deital_item">
56
           <view class="deital_item">
57
             <text class="name">详细地址:</text>
57
             <text class="name">详细地址:</text>
58
-            <text class="value" v-if="dataInfo.incidentData.place || dataInfo.incidentData.houseNumber">{{dataInfo.incidentData.place ? (dataInfo.incidentData.place.area.area + dataInfo.incidentData.place.place) : ''}}{{dataInfo.incidentData.houseNumber || ''}}</text>
58
+            <text class="value" v-if="dataInfo.incidentData.place || dataInfo.incidentData.houseNumber">{{dataInfo.incidentData.place ? (dataInfo.incidentData.place.building.buildingName + dataInfo.incidentData.place.floorName) : ''}}{{dataInfo.incidentData.houseNumber || ''}}</text>
59
             <text class="value" v-else>无</text>
59
             <text class="value" v-else>无</text>
60
           </view>
60
           </view>
61
           <view class="deital_item">
61
           <view class="deital_item">
@@ -371,7 +371,7 @@
371
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
371
         dataInfo.callbackLogs = logs.filter(v => v.logType.value == 'callback').slice(0, 1);
372
 
372
 
373
         // 维修汇总单
373
         // 维修汇总单
374
-        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
374
+        if(dataInfo.incidentData.state.value == 'close' && dataInfo.incidentData.duty && dataInfo.incidentData.duty.addSummary == 1 && dataInfo.incidentData.summaryId){
375
           let flag = dataInfo.tabs.some(v => v.value === '2');
375
           let flag = dataInfo.tabs.some(v => v.value === '2');
376
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
376
           !flag && dataInfo.tabs.splice(1, 0, {id: 2, name: '维修汇总单', value: '2', num: ''});
377
         }
377
         }

+ 3 - 3
pages/repair/repairsList.vue

@@ -16,10 +16,10 @@
16
 
16
 
17
         <view class="body_item_content">
17
         <view class="body_item_content">
18
 					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
18
 					<view class="body_item_content_p" v-if="data.place || data.houseNumber">
19
-					  <text class="name ellipsis">详细地址:{{data.place ? data.place.area.area : ''}}{{data.place ? data.place.place : ''}}{{data.houseNumber}}</text>
19
+					  <text class="name ellipsis">详细地址:{{data.place ? data.place.building.buildingName : ''}}{{data.place ? data.place.floorName : ''}}{{data.houseNumber}}</text>
20
 					</view>
20
 					</view>
21
-          <view class="body_item_content_p" v-if="data.rsprice">
22
-            <text class="name ellipsis">维修总价:{{data.rsprice}}</text>
21
+          <view class="body_item_content_p" v-if="data.rsPrice">
22
+            <text class="name ellipsis">维修总价:{{data.rsPrice}}</text>
23
             <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
23
             <view class="status" :style="stateStyle(data.state)">{{data.state ? data.state.name : ''}}</view>
24
           </view>
24
           </view>
25
           <view class="body_item_content_p">
25
           <view class="body_item_content_p">

+ 7 - 1
share/useWechatAuth.js

@@ -1,4 +1,4 @@
1
-import { api_wechatAuth } from "@/http/api.js"
1
+import { api_wechatAuth, api_systemConfiguration} from "@/http/api.js"
2
 import { useLoginSuccess } from '@/share/useLoginSuccess.js'
2
 import { useLoginSuccess } from '@/share/useLoginSuccess.js'
3
 const { loginSuccess } = useLoginSuccess()
3
 const { loginSuccess } = useLoginSuccess()
4
 export function useWechatAuth() {
4
 export function useWechatAuth() {
@@ -18,6 +18,12 @@ export function useWechatAuth() {
18
         window.location.href = res.url;
18
         window.location.href = res.url;
19
       } else {
19
       } else {
20
         loginSuccess(res.user);
20
         loginSuccess(res.user);
21
+				api_systemConfiguration({
22
+					idx: 0,
23
+					sum: 9999,
24
+				}).then(res2=>{
25
+					uni.setStorageSync('sysData',JSON.stringify(res2.list))
26
+				})
21
       }
27
       }
22
     });
28
     });
23
   }
29
   }