Quellcode durchsuchen

电子和人工督察单合二为一并加推送页面

ming vor 3 Jahren
Ursprung
Commit
25bb9b9d0b

+ 1 - 1
manifest.json

@@ -129,7 +129,7 @@
         "title" : "智慧消防",
         "router" : {
             "mode" : "hash",
-            "base" : ""
+            "base" : "/work/"
         },
         "devServer" : {
             "https" : false,

+ 34 - 16
pages.json

@@ -313,16 +313,16 @@
             }
         }
 		
-        ,{
-            "path" : "pages/inspectList/processedDetail/processedDetail",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "消防支队人工督查单详情",
-                "enablePullDownRefresh": false
+    //     ,{
+    //         "path" : "pages/inspectList/processedDetail/processedDetail",
+    //         "style" :                                                                                    
+    //         {
+    //             "navigationBarTitleText": "消防支队人工督查单详情",
+    //             "enablePullDownRefresh": false
 				
-            }
+    //         }
             
-        }
+    //     }
         ,{
             "path" : "pages/xunJian/xunJian",
             "style" :                                                                                    
@@ -614,15 +614,15 @@
             
         }
         
-        ,{
-            "path" : "pages/inspectList/unprocessDetail/unprocessDetail",
-            "style" :                                                                                    
-            {
-                "navigationBarTitleText": "消防支队人工督察单详情页",
-                "enablePullDownRefresh": false
-            }
+        // ,{
+        //     "path" : "pages/inspectList/unprocessDetail/unprocessDetail",
+        //     "style" :                                                                                    
+        //     {
+        //         "navigationBarTitleText": "消防支队人工督察单详情页",
+        //         "enablePullDownRefresh": false
+        //     }
             
-        }
+        // }
         ,{
             "path" : "pages/xunJian/planInnerList/planInnerList",
             "style" :                                                                                    
@@ -687,6 +687,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/inspectList/processDetailEle/processDetailEle",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/inspectList/processDetailEle1/processDetailEle1",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	
 	

+ 29 - 2
pages/inspectList/unprocessDetail/unprocessDetail.vue → pages/inspectList/processDetailEle/processDetailEle.vue

@@ -2,7 +2,8 @@
 	<view>
 		<view class="timeBox flex justify-between align-center padding-lr-sm">
 			<view class="time">{{this.getData.cl_time}}</view>
-			<button class="cu-btn radius bg-green sm">{{this.getData.wtype}}</button>
+			<button class="cu-btn radius sm" :class="[this.clzt=='1'?'bg-green':'bg-red']" >{{this.clzt=='1'?'已处理':'未处理'}}</button>
+			
 		</view>
 		<view >
 			<!-- 基本信息start -->
@@ -23,7 +24,7 @@
 			<!-- 基本信息end -->
 			
 			<!-- 处理信息start -->
-			<view class="processStatus">
+			<view class="processStatus" v-if="this.clzt=='0'">
 				<view class="info-tit margin-left-xs">
 					<text class="cuIcon-titles margin-right-xs"></text>
 					处理内容
@@ -54,6 +55,30 @@
 				</view>
 			</view>
 			<!-- 处理状态end -->
+			
+			<!-- 处理信息start -->
+			<view class="processStatus" v-else>
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					处理信息
+				</view>
+				<view class="info-content">
+					<view class="info-one-info ">
+						<text style="width:140px!important">处理账号/电话:</text>
+						<text>{{this.getData.clr_phone}}</text>
+					</view>
+					<view>
+						<text>处理时间:</text>
+						<text>{{this.getData.cl_time}}</text>
+					</view>
+					
+					<view>
+						<text>处理内容:</text>
+						<text>{{this.getData.clnr}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 处理状态end -->
 		</view>
 	</view>
 </template>
@@ -68,6 +93,7 @@
 				msg: '',
 				getData:{},
 				radioOne: 0,
+				clzt:0
 			}
 		},
 		onLoad: function(option) {
@@ -132,6 +158,7 @@
 					showLoading: true
 				})
 				this.getData = res.data.data[0];
+				this.clzt=this.getData.clzt
 				console.log(this.getData)
 			},
 			inputReason(e) {

+ 204 - 0
pages/inspectList/processDetailEle1/processDetailEle1.vue

@@ -0,0 +1,204 @@
+<template>
+	<view>
+		<view class="timeBox flex justify-between align-center padding-lr-sm">
+			<view class="time">{{this.getData.cl_time}}</view>
+			<button class="cu-btn radius sm" :class="[this.clzt=='1'?'bg-green':'bg-red']" >{{this.clzt=='1'?'已处理':'未处理'}}</button>
+			
+		</view>
+		<view >
+			<!-- 基本信息start -->
+			<view class="basic-info">
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					基本信息
+				</view>
+				<view class="info-content">
+					<view class="info-one-info ">
+						<text style="width:100%!important">{{type==1?this.getData.artificial_code:this.getData.supervise_code}}:</text>  
+					
+						<text  style="width:100%!important">{{this.getData.content}}</text>
+					</view>
+				
+				</view>
+			</view>
+			<!-- 基本信息end -->
+			
+			<!-- 处理信息start -->
+			<view class="processStatus" v-if="this.clzt=='0'">
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					处理内容
+				</view>
+				<view class="padding-lr padding-bottom-lg">
+					<form action="">
+						<radio-group name="gender" class=""  @change="RadioChange">
+							<label class="margin-right">
+								<radio value="0"  checked /><text>单个处理</text>
+							</label>
+							<label>
+								<radio value="1" /><text>批量处理</text>
+							</label>
+						</radio-group>
+						<view class="cu-form-group">
+							<textarea class="JTxtArea lg" 
+							:maxlength="50" 
+							 v-model="msg"
+							:data-maxnum="reason.length+'/50'"   placeholder="备注信息,最多可输入50个字..."
+							auto-height
+							@input="inputReason"
+							:name="reason"></textarea>
+						</view>
+						<view class="btn-area">
+							<button class="bg-blue round  margin-top" @click="$noMultipleClicks(powerSubmit)">提 交 </button>
+						</view>
+					</form>
+				</view>
+			</view>
+			<!-- 处理状态end -->
+			
+			<!-- 处理信息start -->
+			<view class="processStatus" v-else>
+				<view class="info-tit margin-left-xs">
+					<text class="cuIcon-titles margin-right-xs"></text>
+					处理信息
+				</view>
+				<view class="info-content">
+					<view class="info-one-info ">
+						<text style="width:140px!important">处理账号/电话:</text>
+						<text>{{this.getData.clr_phone}}</text>
+					</view>
+					<view>
+						<text>处理时间:</text>
+						<text>{{this.getData.cl_time}}</text>
+					</view>
+					
+					<view>
+						<text>处理内容:</text>
+						<text>{{this.getData.clnr}}</text>
+					</view>
+				</view>
+			</view>
+			<!-- 处理状态end -->
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				noClick:true,
+				reason: '',
+				type: 0,
+				msg: '',
+				getData:{},
+				radioOne: 0,
+				clzt:0
+			}
+		},
+		onLoad: function(option) {
+			this.type=option.type;
+			if(option.type==1){
+				uni.setNavigationBarTitle({
+					title: "消防支队人工督察单详情页",
+				});
+			}else{
+				uni.setNavigationBarTitle({
+					title: "消防支队电子督察单详情页",
+				});
+			}
+			this.getDetailData({
+				"id": option.id,
+				"company_code": uni.getStorageSync('selectedCode')
+			})
+		},
+		mounted(){
+					document.querySelector('.uni-page-head-hd').style.display = 'none'
+				},
+		methods: {
+			RadioChange(e) {
+				this.radioOne = e.detail.value;
+				console.log(this.radioOne)
+			},
+			powerSubmit() {
+				if(!this.msg.replace(/^\s*/g,'')){
+					uni.showToast({
+						title: "请输入处理内容",
+						icon:"none"
+					});
+				}else{
+					this.powerSubmitRes({
+						"id": this.getData.id,
+						"company_code":this.getData.company_code,
+						"plcl": this.radioOne,
+						"artificial_code": this.type==1?this.getData.artificial_id:this.getData.supervise_id,
+						"clnr": this.msg,
+					})
+				}
+			},
+			async powerSubmitRes(params = {}) {
+				const res = await this.$myRequest({
+					url: this.type==1?'FireInspector/setManualInspector':'FireInspector/setElectronicInspector',
+					data: params
+				})
+			   if(res.data.flag){
+				  uni.showToast({
+				  	title: "提交成功",
+				  });
+				  setTimeout(() => {
+				  	uni.navigateTo({
+				  		url: '/pages/inspectList/processList/processList?type='+this.type,
+				  	});
+				  }, 1000);
+			   }
+			},
+			
+			//回显信息
+			async getDetailData(params = {}) {
+				const res = await this.$myRequest({
+					url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
+					data: params,
+					showLoading: true
+				})
+				this.getData = res.data.data[0];
+				this.clzt=this.getData.clzt
+				console.log(this.getData)
+			},
+			inputReason(e) {
+				this.reason = e.detail.value;
+			},
+			textareaAInput(e) {
+				this.textareaAValue = e.detail.value
+			},
+		}
+	}
+</script>
+
+<style lang="scss">
+	.timeBox {
+		height: 88rpx;
+		background: #EFF4FF;
+		line-height: 88rpx;
+		.time {
+			color: #333
+		}
+	}
+	.info-tit {
+		color: #4074E7;
+		line-height: 90rpx;
+		height: 90rpx;
+	}
+
+	// 基本信息
+	.info-content>view {
+		margin-left: 24rpx;
+		border-bottom: 1px solid #EDEDED;
+		line-height: 92rpx;
+		color: #666;
+	}
+
+	.info-content view text:first-child {
+		width: 160rpx;
+		display: inline-block
+	}
+</style>

+ 2 - 2
pages/inspectList/processList/processList.vue

@@ -208,7 +208,7 @@
 			// 页面跳转
 			goUnprocessDetail(item) {
 				uni.navigateTo({
-					url: '/pages/inspectList/unprocessDetail/unprocessDetail?id='+item.id+'&type='+this.type,
+					url: '/pages/inspectList/processDetailEle/processDetailEle?id='+item.id+'&type='+this.type,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}
@@ -217,7 +217,7 @@
 
 			goProcessedDetail(item) {
 				uni.navigateTo({
-					url: '/pages/inspectList/processedDetail/processedDetail?id='+item.id+'&type='+this.type,
+					url: '/pages/inspectList/processDetailEle/processDetailEle?id='+item.id+'&type='+this.type,
 					success: res => {},
 					fail: () => {},
 					complete: () => {}

+ 0 - 135
pages/inspectList/processedDetail/processedDetail.vue

@@ -1,135 +0,0 @@
-<template>
-	<view>
-		<view class="timeBox flex justify-between align-center padding-lr-sm">
-			<view class="time">{{this.getData.cl_time}}</view>
-			<button class="cu-btn radius bg-green sm">{{this.getData.wtype}}</button>
-		</view>
-		<view >
-			<!-- 基本信息start -->
-			<view class="basic-info">
-				<view class="info-tit margin-left-xs">
-					<text class="cuIcon-titles margin-right-xs"></text>
-					基本信息
-				</view>
-				<view class="info-content">
-					<view class="info-one-info " style="display:block">
-						<text style="width:auto!important">{{type==1?this.getData.artificial_code:this.getData.supervise_code}}:</text>  
-						
-					
-						<text>{{this.getData.content}}</text>
-					</view>
-					<!-- <view>
-						
-					</view> -->
-				</view>
-			</view>
-			<!-- 基本信息end -->
-			
-			<!-- 处理信息start -->
-			<view class="processStatus">
-				<view class="info-tit margin-left-xs">
-					<text class="cuIcon-titles margin-right-xs"></text>
-					处理信息
-				</view>
-				<view class="info-content">
-					<view class="info-one-info ">
-						<text style="width:140px!important">处理账号/电话:</text>
-						<text>{{this.getData.clr_phone}}</text>
-					</view>
-					<view>
-						<text>处理时间:</text>
-						<text>{{this.getData.cl_time}}</text>
-					</view>
-					
-					<view>
-						<text>处理内容:</text>
-						<text>{{this.getData.clnr}}</text>
-					</view>
-				</view>
-			</view>
-			<!-- 处理状态end -->
-		</view>
-	</view>
-</template>
-
-<script>
-	export default {
-		data() {
-			return {
-				radio: 'A',
-				radio: 'B',
-				modalName: null,
-				type: 0,
-				getData:{},
-				detailMessage2:{},
-			}
-		},
-		onLoad: function(option) {
-			this.type=option.type;
-			if(option.type==1){
-				uni.setNavigationBarTitle({
-					title: "消防支队人工督察单详情页",
-				});
-			}else{
-				uni.setNavigationBarTitle({
-					title: "消防支队电子督察单详情页",
-				});
-			}
-			this.getDetailData({
-				"id": option.id,
-				"company_code": uni.getStorageSync('selectedCode')
-			})
-		},
-		methods: {
-			async getDetailData(params = {}) {
-				const res = await this.$myRequest({
-					url: this.type==1?'FireInspector/getManualInspectorDetails':'FireInspector/getElectronicInspectorDetails',
-					data: params,
-					showLoading: true
-				})
-				this.getData = res.data.data[0];
-				console.log(this.getData)
-			},
-			submit() {
-				uni.makePhoneCall({
-					phoneNumber: '15122423833' //仅为示例
-				});
-			},
-			RadioChange(e) {
-				this.radio = e.detail.value
-			},
-			textareaAInput(e) {
-				this.textareaAValue = e.detail.value
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	.timeBox {
-		height: 88rpx;
-		background: #EFF4FF;
-		line-height: 88rpx;
-		.time {
-			color: #333
-		}
-	}
-	.info-tit {
-		color: #4074E7;
-		line-height: 90rpx;
-		height: 90rpx;
-	}
-
-	// 基本信息
-	.info-content>view {
-		margin-left: 24rpx;
-		border-bottom: 1px solid #EDEDED;
-		line-height: 92rpx;
-		color: #666;
-	}
-
-	.info-content view text:first-child {
-		width: 160rpx;
-		display: inline-block
-	}
-</style>