Procházet zdrojové kódy

1、质量安全检查列表接口的实现
2、质量安全检查列表页面的实现
3、质量安全检查明细页面接口的实现
4、质量安全检查明细页面前端的实现

shengxuefei před 4 roky
rodič
revize
eff165900b

+ 0 - 69
WebAPIBase.NetCore/WebAPIBase.NetCore.BusinessCore/BaseCore/DictionaryNameManager.cs

@@ -25,77 +25,8 @@ public class DictionaryNameManager : DbContext<DictionaryName>
         return DictionaryItemDb.GetList(mbox => mbox.dnCode == dncode);
     }
 
-    #region 教学方法
-    /// <summary>
-    /// 如果DbContext中的增删查改方法满足不了你,你可以看下具体用法
-    /// </summary>
-    public void Study()
-    {
-
-        /*********查询*********/
-
-        var data1 = DictionaryNameDb.GetById(1);//根据ID查询
-        var data2 = DictionaryNameDb.GetList();//查询所有
-        var data3 = DictionaryNameDb.GetList(it => 1 == 1);  //根据条件查询  
-        //var data4 = DictionaryNameDb.GetSingle(it => 1 == 1);//根据条件查询一条,如果超过一条会报错
-
-        var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 分页查询
-        var data5 = DictionaryNameDb.GetPageList(it => 1 == 1, p);
-        Console.Write(p.PageCount);//返回总数
-
-        var data6 = DictionaryNameDb.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 分页查询加排序
-        Console.Write(p.PageCount);//返回总数
-
-        List<IConditionalModel> conModels = new List<IConditionalModel>(); //组装条件查询作为条件实现 分页查询加排序
-        conModels.Add(new ConditionalModel() { FieldName = typeof(DictionaryName).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
-        var data7 = DictionaryNameDb.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc);
-
-        DictionaryNameDb.AsQueryable().Where(x => 1 == 1).ToList();//支持了转换成queryable,我们可以用queryable实现复杂功能
-
-        //我要用事务
-        var result = Db.Ado.UseTran(() =>
-         {
-             //写事务代码
-         });
-        if (result.IsSuccess)
-        {
-            //事务成功
-        }
-
-        //多表查询地址 http://www.codeisbug.com/Doc/8/1124
 
 
 
-        /*********插入*********/
-        var insertData = new DictionaryName() { };//测试参数
-        var insertArray = new DictionaryName[] { insertData };
-        DictionaryNameDb.Insert(insertData);//插入
-        DictionaryNameDb.InsertRange(insertArray);//批量插入
-        var id = DictionaryNameDb.InsertReturnIdentity(insertData);//插入返回自增列
-        DictionaryNameDb.AsInsertable(insertData).ExecuteCommand();//我们可以转成 Insertable实现复杂插入
-
-
-
-        /*********更新*********/
-        var updateData = new DictionaryName() { };//测试参数
-        var updateArray = new DictionaryName[] { updateData };//测试参数
-        DictionaryNameDb.Update(updateData);//根据实体更新
-        DictionaryNameDb.UpdateRange(updateArray);//批量更新
-        //DictionaryNameDb.Update(it => new DictionaryName() { Name = "a", CreateTime = DateTime.Now }, it => it.id==1);// 只更新Name列和CreateTime列,其它列不更新,条件id=1
-        DictionaryNameDb.AsUpdateable(updateData).ExecuteCommand();
-
-
-
-        /*********删除*********/
-        var deldata = new DictionaryName() { };//测试参数
-        DictionaryNameDb.Delete(deldata);//根据实体删除
-        DictionaryNameDb.DeleteById(1);//根据主键删除
-        DictionaryNameDb.DeleteById(new int[] { 1, 2 });//根据主键数组删除
-        DictionaryNameDb.Delete(it => 1 == 2);//根据条件删除
-        DictionaryNameDb.AsDeleteable().Where(it => 1 == 2).ExecuteCommand();//转成Deleteable实现复杂的操作
-    }
-    #endregion
-
-
 
 }

+ 44 - 65
WebAPIBase.NetCore/WebAPIBase.NetCore.BusinessCore/BaseCore/SafeQualityCheckManager.cs

@@ -2,85 +2,64 @@
 using SqlSugar;
 using System;
 using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+using WebAPIBase.Utils;
 public class SafeQualityCheckManager : DbContext<SafeQualityCheck>
 {
- 
+
     //当前类已经继承了 DbContext增、删、查、改的方法
 
     //这里面写的代码不会给覆盖,如果要重新生成请删除 SafeQualityCheckManager.cs
 
 
-    #region 教学方法
     /// <summary>
-    /// 如果DbContext中的增删查改方法满足不了你,你可以看下具体用法
+    /// 质量安全检查列表获取
     /// </summary>
-    public void Study()
+    /// <param name="checkType">检查类型</param>
+    /// <param name="searchValue">搜索条件</param>
+    /// <returns></returns>
+    public List<SafeQualityCheckDTO> GetSafeQualityCheckDTOs(string checkType, string searchValue)
     {
-	     
-	   /*********查询*********/
-
-        var data1 = SafeQualityCheckDb.GetById(1);//根据ID查询
-        var data2 = SafeQualityCheckDb.GetList();//查询所有
-        var data3 = SafeQualityCheckDb.GetList(it => 1 == 1);  //根据条件查询  
-        //var data4 = SafeQualityCheckDb.GetSingle(it => 1 == 1);//根据条件查询一条,如果超过一条会报错
-
-        var p = new PageModel() { PageIndex = 1, PageSize = 2 };// 分页查询
-        var data5 = SafeQualityCheckDb.GetPageList(it => 1 == 1, p);
-        Console.Write(p.PageCount);//返回总数
-
-        var data6 = SafeQualityCheckDb.GetPageList(it => 1 == 1, p, it => SqlFunc.GetRandom(), OrderByType.Asc);// 分页查询加排序
-        Console.Write(p.PageCount);//返回总数
-     
-        List<IConditionalModel> conModels = new List<IConditionalModel>(); //组装条件查询作为条件实现 分页查询加排序
-        conModels.Add(new ConditionalModel() { FieldName = typeof(SafeQualityCheck).GetProperties()[0].Name, ConditionalType = ConditionalType.Equal, FieldValue = "1" });//id=1
-        var data7 = SafeQualityCheckDb.GetPageList(conModels, p, it => SqlFunc.GetRandom(), OrderByType.Asc);
-
-        SafeQualityCheckDb.AsQueryable().Where(x => 1 == 1).ToList();//支持了转换成queryable,我们可以用queryable实现复杂功能
 
-        //我要用事务
-        var result = Db.Ado.UseTran(() =>
-         {
-            //写事务代码
-        });
-        if (result.IsSuccess)
+        List<SafeQualityCheckDTO> list;
+        var sql = $"select * from SafeQualityCheck where 1=1";
+        if (searchValue.IsNullOrEmpty())
         {
-            //事务成功
+            sql += $" and checktype='{checkType}' order by checktype desc";
+            list = Db.Ado.SqlQuery<SafeQualityCheckDTO>(sql);
         }
+        else
+        {
+            sql += $" and checktype='{checkType}' and projectname like '%{searchValue}%' order by checktype desc";
+            list = Db.Ado.SqlQuery<SafeQualityCheckDTO>(sql);
+        }
+        return list;
+    }
 
-        //多表查询地址 http://www.codeisbug.com/Doc/8/1124
-
-
-
-        /*********插入*********/
-        var insertData = new SafeQualityCheck() { };//测试参数
-        var insertArray = new SafeQualityCheck[] { insertData };
-        SafeQualityCheckDb.Insert(insertData);//插入
-        SafeQualityCheckDb.InsertRange(insertArray);//批量插入
-        var id = SafeQualityCheckDb.InsertReturnIdentity(insertData);//插入返回自增列
-        SafeQualityCheckDb.AsInsertable(insertData).ExecuteCommand();//我们可以转成 Insertable实现复杂插入
-
-
-
-		/*********更新*********/
-	    var updateData = new SafeQualityCheck() {  };//测试参数
-        var updateArray = new SafeQualityCheck[] { updateData };//测试参数
-        SafeQualityCheckDb.Update(updateData);//根据实体更新
-        SafeQualityCheckDb.UpdateRange(updateArray);//批量更新
-        //SafeQualityCheckDb.Update(it => new SafeQualityCheck() { Name = "a", CreateTime = DateTime.Now }, it => it.id==1);// 只更新Name列和CreateTime列,其它列不更新,条件id=1
-        SafeQualityCheckDb.AsUpdateable(updateData).ExecuteCommand();
-
+    /// <summary>
+    /// 获取质量安全检查实例通过主键
+    /// </summary>
+    /// <param name="checkCode"></param>
+    /// <returns></returns>
+    public SafeQualityCheckDTO GetSafeQualityCheckDTO(string checkCode)
+    {
+        var sql = $"select * from SafeQualityCheck where checkcode='{checkCode}'";
+        var entity = Db.Ado.SqlQuerySingle<SafeQualityCheckDTO>(sql);
+        return entity;
+    }
 
+    /// <summary>
+    /// 获取质量安全明细列表
+    /// </summary>
+    /// <param name="checkCode"></param>
+    /// <returns></returns>
+    public List<SafeQualityCheckItem> GetSafeQualityCheckItems(string checkCode)
+    {
+        var sql = $"select * from SafeQualityCheckItem where checkcode='{checkCode}'";
+        var list = Db.Ado.SqlQuery<SafeQualityCheckItem>(sql);
+        return list;
+    }
 
-		/*********删除*********/
-	    var deldata = new SafeQualityCheck() {  };//测试参数
-        SafeQualityCheckDb.Delete(deldata);//根据实体删除
-        SafeQualityCheckDb.DeleteById(1);//根据主键删除
-        SafeQualityCheckDb.DeleteById(new int[] { 1,2});//根据主键数组删除
-        SafeQualityCheckDb.Delete(it=>1==2);//根据条件删除
-        SafeQualityCheckDb.AsDeleteable().Where(it=>1==2).ExecuteCommand();//转成Deleteable实现复杂的操作
-    } 
-    #endregion
 
- 
- 
-}
+}

+ 117 - 0
WebAPIBase.NetCore/WebAPIBase.NetCore.Enties/DTO/SafeQualityCheckDTO.cs

@@ -0,0 +1,117 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Sugar.Enties
+{
+    public class SafeQualityCheckDTO
+    {
+        /// <summary>
+        /// 主键
+        /// Default:
+        /// Nullable:False
+        /// </summary>           
+
+        public string CheckCode { get; set; }
+
+        /// <summary>
+        /// 检查类型  QualityCheck  SafeCheck
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string CheckType { get; set; }
+
+        /// <summary>
+        /// Desc:工程名称
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string ProjectName { get; set; }
+
+        /// <summary>
+        /// Desc:项目编号
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string ProjectCode { get; set; }
+
+
+        /// <summary>
+        /// Desc:审核日期
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public DateTime? CheckDate
+        {
+            get; set;
+        }
+        public string CheckDateStr
+        {
+            get
+            {
+                return CheckDate?.ToShortDateString();
+            }
+        }
+        /// <summary>
+        /// Desc:审核用户代码
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string CheckUserCode { get; set; }
+
+        /// <summary>
+        /// Desc:状态  0:申请  1:审核中 2:审核通过
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public int Status { get; set; }
+
+        /// <summary>
+        /// 状态名
+        /// </summary>
+        public string StatusName
+        {
+            get
+            {
+                var name = "";
+                switch (Status)
+                {
+                    case 0:
+                        name = "申请";
+                        break;
+                    case 1:
+                        name = "审核中";
+                        break;
+                    case 2:
+                        name = "审核通过";
+                        break;
+                }
+                return name;
+            }
+
+        }
+
+        /// <summary>
+        /// Desc:流程审核日期
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public DateTime? WorkFlowCheckDate { get; set; }
+
+        /// <summary>
+        /// Desc:审核编号
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string CheckID { get; set; }
+
+        /// <summary>
+        /// Desc:审核意见
+        /// Default:
+        /// Nullable:True
+        /// </summary>           
+        public string CheckOpinion { get; set; }
+    }
+}

+ 73 - 0
WebAPIBase.NetCore/WebAPIBase.NetCore/Controllers/SafeQualityCheckController.cs

@@ -0,0 +1,73 @@
+using NLog;
+using Org.BouncyCastle.Bcpg;
+using System;
+using WebAPIBase.API.Requests;
+using WebAPIBase.Service.Interface;
+using Newtonsoft.Json;
+using System.Net.Http;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using System.Net;
+using Sugar.Enties;
+using System.Text;
+using WebAPIBase.Utils;
+using Microsoft.Extensions.Configuration;
+using System.IO;
+using System.Collections.Specialized;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Caching.Memory;
+using Microsoft.AspNetCore.Authorization;
+using System.Drawing;
+using Microsoft.AspNetCore.Http;
+using System.Linq.Expressions;
+
+namespace WebAPIBase.API.Controllers
+{
+    [Produces("application/json;charset=UTF-8")]
+    [Route("api/SafeQualityCheck")]
+    public class SafeQualityCheckController : BaseController
+    {
+        /// <summary>
+        /// 质量安全检查列表获取
+        /// </summary>
+        /// <param name="checkType">检查类型</param>
+        /// <param name="searchValue">搜索条件</param>
+        /// <returns></returns>
+        [HttpGet]
+        [Route("GetSafeQualityCheckDTOs")]
+        public ActionResult GetSafeQualityCheckDTOs(int type, string searchValue)
+        {
+            var manager = new SafeQualityCheckManager();
+            string checkType = "QualityCheck";
+            if (type == 1)
+            {
+                checkType = "SafeCheck";
+            }
+            var list = manager.GetSafeQualityCheckDTOs(checkType, searchValue);
+            return Json(list);
+        }
+
+        /// <summary>
+        /// 获取质量安全检查实例及明细
+        /// </summary>
+        /// <param name="checkCode"></param>
+        /// <returns></returns>
+        [HttpGet]
+        [Route("GetSafeQualityCheckDTO")]
+        public ActionResult GetSafeQualityCheckDTO(string checkCode)
+        {
+            var manager = new SafeQualityCheckManager();
+
+            var entity = manager.GetSafeQualityCheckDTO(checkCode);
+            var list = manager.GetSafeQualityCheckItems(checkCode);
+            var attachments = new RequisitionManager().GetAttachMents(checkCode, entity.CheckType);
+            var data = new
+            {
+                entity = entity,
+                list = list,
+                attachments = attachments
+            };
+            return Json(data);
+        }
+    }
+}

+ 21 - 0
uni-app-front/common/api/SafeQualityCheckApi.js

@@ -0,0 +1,21 @@
+import request from '@/common/axiosHelper.js'
+
+ 
+ /* 质量安全检查列表获取*/
+ export function GetSafeQualityCheckDTOs(type, searchValue) {
+   return request({
+ 	url: '/SafeQualityCheck/GetSafeQualityCheckDTOs',
+ 	method: 'get',
+ 	params:{type:type,searchValue:searchValue}
+   })
+ }
+ 
+ /* 质量安全检查列表获取*/
+ export function GetSafeQualityCheckDTO(checkcode) {
+   return request({
+ 	url: '/SafeQualityCheck/GetSafeQualityCheckDTO',
+ 	method: 'get',
+ 	params:{checkcode:checkcode}
+   })
+ }
+ 

+ 18 - 0
uni-app-front/pages.json

@@ -248,6 +248,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/template/GetSafeQualityCheckDTOs/GetSafeQualityCheckDTOs",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "质量检查",
+                "enablePullDownRefresh": true
+            }
+            
+        }
+        ,{
+            "path" : "pages/template/GetSafeQualityCheckDTO/GetSafeQualityCheckDTO",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "质量检查明细",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",

+ 19 - 0
uni-app-front/pages/index/index.vue

@@ -41,6 +41,25 @@
 						</view>
 						</navigator>
 					</uni-grid-item>
+					<uni-grid-item>
+						<navigator url="../template/GetSafeQualityCheckDTOs/GetSafeQualityCheckDTOs?type=0">
+						<view class="grid-item-box pointer" >
+							<uni-icons type="close" size="20"></uni-icons>
+							<text class="text">质量检查</text>
+						</view>
+						</navigator>
+					</uni-grid-item>
+				</uni-grid>
+				<uni-grid :column="3" :square="false" :highlight="false">
+					 
+					<uni-grid-item>
+						<navigator url="../template/GetSafeQualityCheckDTOs/GetSafeQualityCheckDTOs?type=1">
+						<view class="grid-item-box pointer" >
+							<uni-icons type="close" size="20"></uni-icons>
+							<text class="text">安全检查</text>
+						</view>
+						</navigator>
+					</uni-grid-item>
 					<uni-grid-item>
 						<view class="grid-item-box pointer" @click="logout">
 							<uni-icons type="close" size="20"></uni-icons>

+ 129 - 0
uni-app-front/pages/template/GetSafeQualityCheckDTO/GetSafeQualityCheckDTO.vue

@@ -0,0 +1,129 @@
+<template>
+	<view>		
+		<view style="margin:10px 100px;position: fixed;z-index: 50;opacity:0.7;" v-show="isShow">
+			<button type="primary" style="border-radius: 5px;" class="mini-btn" size="mini" @click="modify">修改</button>
+		</view>
+		<uni-list>
+			<uni-list-item v-if="listData.entity">
+				<view slot="body" class="slot-box">
+					<view class="row">
+						<view class="column-left">工程名称:</view>
+						<view class="column-right">{{listData.entity.projectName}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">编号:</view>
+						<view class="column-right">{{listData.entity.checkCode}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">检查日期:</view>
+						<view class="column-right">{{listData.entity.checkDateStr}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">审核状态:</view>
+						<view class="column-right">{{listData.entity.statusName}}</view>
+					</view>
+					
+					<view class="row">
+						<view class="column-left">附件:</view>
+						<view class="column-right">
+							<view v-for="(item,index) in listData.attachments" :key="index">								
+								<a :href="'/api/common/ShowImg?code='+item.attachMentCode">{{item.fileName}}</a>
+							</view>
+						</view>
+					</view>
+				</view>
+			</uni-list-item>
+		</uni-list>
+		 
+		
+		<uni-section title="检查项目明细"  type="line"></uni-section>
+		<uni-list>
+			<uni-list-item v-if="listData.list"  v-for="(item, index) in listData.list"  :key="index">
+				<view slot="body" class="slot-box">
+					<view class="row">
+						<view class="column-left">检查项目:</view>
+						<view class="column-right">{{item.checkContent}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">检查结果:</view>
+						<view class="column-right">{{item.checkResult}}</view>
+					</view>
+					</view> 
+			</uni-list-item>
+		</uni-list>
+	</view>
+</template>
+
+<script>
+	import {
+		 GetSafeQualityCheckDTO
+	} from "@/common/api/SafeQualityCheckApi.js";
+	import {
+		Decimal
+	} from 'decimal.js';
+	export default {
+		data() {
+			return {
+				listData: {},
+				isShow:false
+			}
+		},
+		onLoad() {
+			//console.info("当前登录状态:" + this.$store.state.isLogin);
+			//console.info(this);
+			this.$util.persistLogin(this);
+			let type=this.$util.getQuery("type")-0;
+			if(type==1){
+				uni.setNavigationBarTitle({
+					title:'安全检查明细'
+				});
+			}
+			else{
+				uni.setNavigationBarTitle({
+					title:'质量检查明细'
+				});
+			}
+		},
+		created: function() {
+			this.getDetail(this.$util.getQuery("id"));
+		},
+		mounted:function(){
+			
+		},
+		methods: {
+			getDetail(id) {
+				let that = this;
+				GetSafeQualityCheckDTO(id).then((res) => {
+					console.info('GetSafeQualityCheckDTO',res);
+					
+					
+					that.listData=res;
+					 
+					//console.info(that.listData);
+				});
+			},
+			 
+			 modify: function() { //跳转到修改页面
+			 	let id = this.$util.getQuery("id");
+			 	uni.navigateTo({
+			 		url: '/pages/template/viseedit/viseedit?id=' + id
+			 	});
+			 }
+		}
+	}
+</script>
+
+<style>
+  /deep/ .uni-section__content-title{
+	  font-size:15px;
+	  font-weight: 600;
+  }
+  
+ /deep/ .uni-list-item{
+	  background-color: #f8f8f8;
+  }
+  .slot-box{
+	  background-color: #fff;
+	  padding: 5px 8px;
+  }
+</style>

+ 130 - 0
uni-app-front/pages/template/GetSafeQualityCheckDTOs/GetSafeQualityCheckDTOs.vue

@@ -0,0 +1,130 @@
+<template>
+	<view>
+		<view>
+			<uni-search-bar :radius="100" @confirm="search" @input="input" @cancel="cancel"></uni-search-bar>
+		</view>
+		<uni-list>
+			<uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.checkCode)" clickable >
+				<view slot="body" class="slot-box">
+					<view class="row">
+						<view class="column-left">编号:</view>
+						<view class="column-right">{{item.checkCode}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">工程名称:</view>
+						<view class="column-right">{{item.projectName}}</view>
+					</view>
+					<view class="row">
+						<view class="column-left">日期:</view>
+						<view class="column-right">{{item.checkDateStr}}</view>
+					</view>					
+					<view class="row">
+						<view class="column-left">状态:</view>
+						<view class="column-right">{{item.statusName}}</view>
+					</view>
+				</view>
+			</uni-list-item>
+		</uni-list>
+		<view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
+			<router-link to="/pages/template/viseadd/viseadd" style="text-decoration: none;" title="质量检查添加">
+				<uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
+			</router-link>
+		</view>
+		<uni-load-more :status="status" :icon-size="16" :content-text="contentText" />
+	</view>
+</template>
+
+<script>
+	import {
+		GetSafeQualityCheckDTOs
+	} from "@/common/api/SafeQualityCheckApi.js";
+	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
+	 
+	export default {
+		components: {
+			uniLoadMore
+		},
+		data() {
+			return {
+				listData: [],
+				searchvalue:'',
+				last_id: '',
+				reload: false,
+				status: 'more',
+
+				contentText: {
+					contentdown: '上拉加载更多',
+					contentrefresh: '加载中',
+					contentnomore: '没有更多'
+				}
+			};
+		},
+		onLoad() {
+			console.info("当前登录状态:" + this.$store.state.isLogin);
+			//console.info(this);
+			this.$util.persistLogin(this);
+			let type=this.$util.getQuery("type")-0;
+			if(type==1){
+				uni.setNavigationBarTitle({
+					title:'安全检查'
+				});
+			}
+			else{
+				uni.setNavigationBarTitle({
+					title:'质量检查'
+				});
+			}
+		},
+		onPullDownRefresh() {
+			this.reload = true;
+			this.last_id = '';
+
+			this.getList();
+		},
+		onReachBottom() {
+			this.status = 'more';
+			this.getList();
+		},
+		created: function() {
+			this.getList();
+		},
+		methods: {
+			getList() {
+				let that = this;
+				let type = this.$util.getQuery("type")-0;				
+				let search = this.searchvalue;
+				
+				GetSafeQualityCheckDTOs(type, search).then((res) => {
+					console.info(res);
+					that.listData=[];
+					res.forEach(function(item, index, array) {
+						that.$set(that.listData, index, item);
+					});
+					console.info(that.listData);
+				});
+			},
+			goDetail: function(id) {
+				console.info('检查godetail',id);
+				uni.navigateTo({					
+					url: '/pages/template/GetSafeQualityCheckDTO/GetSafeQualityCheckDTO?type='+this.$util.getQuery("type")+'&id=' + id
+				});
+			},
+            search(res) { //回车搜索
+            	this.searchvalue = res.value; //赋值
+            	
+            	this.getList(); //调用搜索方法
+            },
+            input(res) {
+            	this.searchVal = res.value
+            },
+            cancel(res) {
+            	console.info('点击取消,输入值为:' + res.value);
+            	
+            }
+		}
+	};
+</script>
+
+<style scoped>
+	
+</style>