检查登记 新问题 提示语 检查区域 触底加载
This commit is contained in:
		
							parent
							
								
									b97c69b499
								
							
						
					
					
						commit
						fb531d17ba
					
				@ -92,7 +92,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup"
 | 
							<query-selector :multiple="selectorInfo.isMultiple" :show="selectorInfo.showPopup"
 | 
				
			||||||
			:defaultChecked="selectorInfo.defaultChecked" :title="selectorInfo.title" :lists="selectorInfo.dataLists"
 | 
								:defaultChecked="selectorInfo.defaultChecked" :title="selectorInfo.title" :lists="selectorInfo.dataLists"
 | 
				
			||||||
			@search="handleShowSheet" @select="handleSelected" @close="selectorInfo.showPopup=false" />
 | 
								@search="handleShowSheet" @select="handleSelected" @close="selectorInfo.showPopup=false"
 | 
				
			||||||
 | 
								:total="selectorInfo.totalCount" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<view class="bottom-button">
 | 
							<view class="bottom-button">
 | 
				
			||||||
			<button type="primary" @click="FullCheckUpdate">提交</button>
 | 
								<button type="primary" @click="FullCheckUpdate">提交</button>
 | 
				
			||||||
@ -117,8 +118,8 @@
 | 
				
			|||||||
		AddCheckRecord,
 | 
							AddCheckRecord,
 | 
				
			||||||
		CheckTypeOrderPaged,
 | 
							CheckTypeOrderPaged,
 | 
				
			||||||
		CheckTypeLevelOrderPaged,
 | 
							CheckTypeLevelOrderPaged,
 | 
				
			||||||
		OrderPagedAreaMineType,
 | 
							OrderPagedAreaMineType2,
 | 
				
			||||||
		CheckProjectOrderPaged,
 | 
							CheckProjectOrderPaged2,
 | 
				
			||||||
		OrderPagedProjectCategory,
 | 
							OrderPagedProjectCategory,
 | 
				
			||||||
		OrderPagedSafeCheckDetail,
 | 
							OrderPagedSafeCheckDetail,
 | 
				
			||||||
		OrderPagedSuitAll,
 | 
							OrderPagedSuitAll,
 | 
				
			||||||
@ -193,6 +194,7 @@
 | 
				
			|||||||
				},
 | 
									},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				selectorInfo: {
 | 
									selectorInfo: {
 | 
				
			||||||
 | 
										totalCount: 0,
 | 
				
			||||||
					showPopup: false,
 | 
										showPopup: false,
 | 
				
			||||||
					isMultiple: false,
 | 
										isMultiple: false,
 | 
				
			||||||
					title: '隐患原因',
 | 
										title: '隐患原因',
 | 
				
			||||||
@ -209,6 +211,12 @@
 | 
				
			|||||||
				showPopup: false,
 | 
									showPopup: false,
 | 
				
			||||||
				showDelModalIndex: undefined,
 | 
									showDelModalIndex: undefined,
 | 
				
			||||||
				rules: {
 | 
									rules: {
 | 
				
			||||||
 | 
										'RiskAreaNAME': {
 | 
				
			||||||
 | 
											type: 'string',
 | 
				
			||||||
 | 
											required: true,
 | 
				
			||||||
 | 
											trigger: ['blur', 'change'],
 | 
				
			||||||
 | 
											message: '请选择检查区域'
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
					'CHECKOBJECT_DESCRIPTION': {
 | 
										'CHECKOBJECT_DESCRIPTION': {
 | 
				
			||||||
						type: 'string',
 | 
											type: 'string',
 | 
				
			||||||
						required: true,
 | 
											required: true,
 | 
				
			||||||
@ -217,7 +225,8 @@
 | 
				
			|||||||
					'CHECKCONTENT': {
 | 
										'CHECKCONTENT': {
 | 
				
			||||||
						type: 'string',
 | 
											type: 'string',
 | 
				
			||||||
						required: true,
 | 
											required: true,
 | 
				
			||||||
						trigger: ['blur', 'change']
 | 
											trigger: ['blur', 'change'],
 | 
				
			||||||
 | 
											message: '请填写检查内容'
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@ -295,10 +304,32 @@
 | 
				
			|||||||
				const ele = this.$refs
 | 
									const ele = this.$refs
 | 
				
			||||||
				if (this.model.Nav_ListCheckDetail == null || this.model.Nav_ListCheckDetail.length < 1) {
 | 
									if (this.model.Nav_ListCheckDetail == null || this.model.Nav_ListCheckDetail.length < 1) {
 | 
				
			||||||
					uni.$showErrorInfo('请新增检查信息后再提交');
 | 
										uni.$showErrorInfo('请新增检查信息后再提交');
 | 
				
			||||||
				} else if (this.model.Nav_ListCheckDetail[0].DESCREPTION == '' || this.model.Nav_ListCheckDetail[0]
 | 
									}
 | 
				
			||||||
					.DEMAND == '') {
 | 
									// else if (this.model.Nav_ListCheckDetail[0].DESCREPTION == '' || this.model.Nav_ListCheckDetail[0]
 | 
				
			||||||
					uni.$showErrorInfo('请完善检查信息');
 | 
									// 	.DEMAND == '') {
 | 
				
			||||||
				} else {
 | 
									// 	uni.$showErrorInfo('请完善检查信息');
 | 
				
			||||||
 | 
									// }
 | 
				
			||||||
 | 
									var isOK = true
 | 
				
			||||||
 | 
									this.model.Nav_ListCheckDetail.forEach(e => {
 | 
				
			||||||
 | 
										if (!e.Nav_CheckProject.NAME || e.Nav_CheckProject.NAME.length < 1) {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('请选择检查项目' + e.ROW_NO)
 | 
				
			||||||
 | 
											isOK = false
 | 
				
			||||||
 | 
										} else if (!e.DESCREPTION || e.DESCREPTION.length < 1) {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('请填写检查问题描述' + e.ROW_NO)
 | 
				
			||||||
 | 
											isOK = false
 | 
				
			||||||
 | 
										} else if (!e.DEMAND || e.DEMAND.length < 1) {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('请填写整改建议与措施' + e.ROW_NO)
 | 
				
			||||||
 | 
											isOK = false
 | 
				
			||||||
 | 
										} else if (!e.QUESTION_LEVEL_SHOW || e.QUESTION_LEVEL_SHOW.length < 1) {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('请选择问题等级' + e.ROW_NO)
 | 
				
			||||||
 | 
											isOK = false
 | 
				
			||||||
 | 
										} else if (!e.ADDRESS || e.ADDRESS.length < 1) {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('请填写隐患地点' + e.ROW_NO)
 | 
				
			||||||
 | 
											isOK = false
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
									if (!isOK)
 | 
				
			||||||
 | 
										return false
 | 
				
			||||||
				ele['wForm'].validate().then(res => {
 | 
									ele['wForm'].validate().then(res => {
 | 
				
			||||||
					this.model.Nav_ListCheckDetail.forEach(e => {
 | 
										this.model.Nav_ListCheckDetail.forEach(e => {
 | 
				
			||||||
						e.Nav_CheckProject = null;
 | 
											e.Nav_CheckProject = null;
 | 
				
			||||||
@ -321,18 +352,22 @@
 | 
				
			|||||||
						}, 'success', 1000)
 | 
											}, 'success', 1000)
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				}).catch(err => {
 | 
									}).catch(err => {
 | 
				
			||||||
						console.log('校验失败', err)
 | 
										if (err.length > 0) {
 | 
				
			||||||
					})
 | 
											uni.$showErrorInfo(err[0].message)
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											uni.$showErrorInfo('校验失败!')
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			// 下拉数据加载
 | 
								// 下拉数据加载
 | 
				
			||||||
			async handleShowSheet(p) {
 | 
								async handleShowSheet(p, pageIndex) {
 | 
				
			||||||
				if (p.name == undefined) {
 | 
									if (p.name == undefined) {
 | 
				
			||||||
					// 搜索
 | 
										// 搜索
 | 
				
			||||||
					var val = p
 | 
										var val = p
 | 
				
			||||||
					p = this.selectorInfo
 | 
										p = this.selectorInfo
 | 
				
			||||||
					p.val = val
 | 
										p.val = val
 | 
				
			||||||
 | 
										p.pageIndex = pageIndex
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				const orgId = uni.getStorageSync('orgId')
 | 
									const orgId = uni.getStorageSync('orgId')
 | 
				
			||||||
@ -345,6 +380,11 @@
 | 
				
			|||||||
					if (p.val) {
 | 
										if (p.val) {
 | 
				
			||||||
						extendRule(json, 'NAME', 9, p.val);
 | 
											extendRule(json, 'NAME', 9, p.val);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
 | 
										json.Limit = 20
 | 
				
			||||||
 | 
										if (p.pageIndex) {
 | 
				
			||||||
 | 
											json.Start = (p.pageIndex - 1) * json.Limit;
 | 
				
			||||||
 | 
											json.PageIndex = p.pageIndex
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
					// this.selectorInfo.isMultiple = true
 | 
										// this.selectorInfo.isMultiple = true
 | 
				
			||||||
					json.FilterGroup.Groups.push({
 | 
										json.FilterGroup.Groups.push({
 | 
				
			||||||
						'IsAnd': false,
 | 
											'IsAnd': false,
 | 
				
			||||||
@ -356,14 +396,15 @@
 | 
				
			|||||||
					})
 | 
										})
 | 
				
			||||||
					json.Sort = 'NAME'
 | 
										json.Sort = 'NAME'
 | 
				
			||||||
					// extendRule(json, 'CHECKOBJECT', 1, this.model.CHECKOBJECT);
 | 
										// extendRule(json, 'CHECKOBJECT', 1, this.model.CHECKOBJECT);
 | 
				
			||||||
					dataSelect = await OrderPagedAreaMineType(json).then(res => {
 | 
										dataSelect = await OrderPagedAreaMineType2(json).then(res => {
 | 
				
			||||||
						if (res != undefined && res.length > 0) {
 | 
											this.selectorInfo.totalCount = res.TotalCount
 | 
				
			||||||
							for (let i = 0; i < res.length; i++) {
 | 
											if (res != undefined && res.Data.length > 0) {
 | 
				
			||||||
								res[i].name = res[i].NAME
 | 
												for (let i = 0; i < res.Data.length; i++) {
 | 
				
			||||||
 | 
													res.Data[i].name = res.Data[i].NAME
 | 
				
			||||||
								// res[i].code = res[i].CODE
 | 
													// res[i].code = res[i].CODE
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						return res
 | 
											return res.Data
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				} else if (p.name == 'CheckProjectNAME') {
 | 
									} else if (p.name == 'CheckProjectNAME') {
 | 
				
			||||||
					this.selectorInfo.isMultiple = false
 | 
										this.selectorInfo.isMultiple = false
 | 
				
			||||||
@ -372,14 +413,20 @@
 | 
				
			|||||||
					if (p.val) {
 | 
										if (p.val) {
 | 
				
			||||||
						extendRule(json, 'NAME', 9, p.val);
 | 
											extendRule(json, 'NAME', 9, p.val);
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					dataSelect = await CheckProjectOrderPaged(json).then(res => {
 | 
										json.Limit = 20
 | 
				
			||||||
						if (res != undefined && res.length > 0) {
 | 
										if (p.pageIndex) {
 | 
				
			||||||
							for (let i = 0; i < res.length; i++) {
 | 
											json.Start = (p.pageIndex - 1) * json.Limit;
 | 
				
			||||||
								res[i].name = res[i].NAME,
 | 
											json.PageIndex = p.pageIndex
 | 
				
			||||||
									res[i].code = res[i].CODE
 | 
										}
 | 
				
			||||||
 | 
										dataSelect = await CheckProjectOrderPaged2(json).then(res => {
 | 
				
			||||||
 | 
											this.selectorInfo.totalCount = res.TotalCount
 | 
				
			||||||
 | 
											if (res != undefined && res.Data.length > 0) {
 | 
				
			||||||
 | 
												for (let i = 0; i < res.Data.length; i++) {
 | 
				
			||||||
 | 
													res.Data[i].name = res.Data[i].NAME
 | 
				
			||||||
 | 
													res.Data[i].code = res.Data[i].CODE
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
						return res
 | 
											return res.Data
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				} else if (p.name == 'CheckProjectCategoryNAME') {
 | 
									} else if (p.name == 'CheckProjectCategoryNAME') {
 | 
				
			||||||
					if (this.model.CHECKOBJECT == null || this.model.CHECKOBJECT.length < 1) {
 | 
										if (this.model.CHECKOBJECT == null || this.model.CHECKOBJECT.length < 1) {
 | 
				
			||||||
@ -431,6 +478,7 @@
 | 
				
			|||||||
					defaultChecked = []
 | 
										defaultChecked = []
 | 
				
			||||||
				if (dataSelect.length) {
 | 
									if (dataSelect.length) {
 | 
				
			||||||
					this.selectorInfo = {
 | 
										this.selectorInfo = {
 | 
				
			||||||
 | 
											totalCount: this.selectorInfo.totalCount,
 | 
				
			||||||
						itemData: p.itemData,
 | 
											itemData: p.itemData,
 | 
				
			||||||
						isMultiple: this.selectorInfo.isMultiple,
 | 
											isMultiple: this.selectorInfo.isMultiple,
 | 
				
			||||||
						showPopup: true,
 | 
											showPopup: true,
 | 
				
			||||||
 | 
				
			|||||||
@ -235,6 +235,17 @@ export function OrderPagedAreaMineType(params) {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					export function OrderPagedAreaMineType2(params) {
 | 
				
			||||||
 | 
						return new Promise((resolve, reject) => {
 | 
				
			||||||
 | 
							request.post("/BS/BSSafeCheck/OrderPagedAreaMineType", params).then((result) => {
 | 
				
			||||||
 | 
								if (result.IsSuccessful) {
 | 
				
			||||||
 | 
									resolve(result);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}).catch((error) => {
 | 
				
			||||||
 | 
								reject(error)
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//获取检查项目
 | 
					//获取检查项目
 | 
				
			||||||
export function CheckProjectOrderPaged(params) {
 | 
					export function CheckProjectOrderPaged(params) {
 | 
				
			||||||
@ -248,6 +259,17 @@ export function CheckProjectOrderPaged(params) {
 | 
				
			|||||||
		})
 | 
							})
 | 
				
			||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					export function CheckProjectOrderPaged2(params) {
 | 
				
			||||||
 | 
						return new Promise((resolve, reject) => {
 | 
				
			||||||
 | 
							request.post("/BS/BSCheckProject/OrderPagedSTATUS", params).then((result) => {
 | 
				
			||||||
 | 
								if (result.IsSuccessful) {
 | 
				
			||||||
 | 
									resolve(result);
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}).catch((error) => {
 | 
				
			||||||
 | 
								reject(error)
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//获取检查项目分类
 | 
					//获取检查项目分类
 | 
				
			||||||
export function OrderPagedProjectCategory(params) {
 | 
					export function OrderPagedProjectCategory(params) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user