Pārlūkot izejas kodu

2、浩德项目申请单修改,删除,提交,通过,退回功能的实现
3、浩德项目以管理员身份查看供应商提交的申请列表及明细页面实现

shengxuefei 3 gadi atpakaļ
vecāks
revīzija
cf84743c18

+ 64 - 1
WebAPIBase.NetCore/WebAPIBase.NetCore.BusinessCore/BaseCore/zzSupplierExManager.cs

@@ -20,13 +20,76 @@ public  class zzSupplierExManager : DbContext<zzSupplierEx>
         var list = Db.Ado.SqlQuery<Project>(sql);
         return list;
     }
-
+    /// <summary>
+    /// 获取zzSupplierExDTO列表
+    /// </summary>
+    /// <param name="supplierCode"></param>
+    /// <returns></returns>
     public List<zzSupplierExDTO> GetzzSupplierExDTOList(string supplierCode)
     {
         var sql = $"SELECT a.*,b.ProjectName FROM dbo.zzSupplierEx a INNER JOIN dbo.Project b ON a.ProjectCode=b.ProjectCode where a.supplierCode='{supplierCode}' order by a.createdate desc  ";
         var list = Db.Ado.SqlQuery<zzSupplierExDTO>(sql);
         return list;
     }
+    /// <summary>
+    /// 根据项目编号获取供应商申请列表
+    /// </summary>
+    /// <param name="projectCode"></param>
+    /// <returns></returns>
+    public List<zzSupplierExDTO> GetzzSupplierExListByProject(string projectCode)
+    {
+        var sql = $"SELECT a.*,b.ProjectName FROM dbo.zzSupplierEx a INNER JOIN dbo.Project b ON a.ProjectCode=b.ProjectCode where a.projectcode='{projectCode}' and state>=1 order by a.createdate desc  ";
+        var list = Db.Ado.SqlQuery<zzSupplierExDTO>(sql);
+        return list;
+    }
+
+    /// <summary>
+    /// 获取zzSupplierExDTO实体
+    /// </summary>
+    /// <param name="id"></param>
+    /// <returns></returns>
+    public zzSupplierExDTO GetzzSupplierExDTO(int id)
+    {
+        var sql = $"SELECT a.*,b.ProjectName FROM dbo.zzSupplierEx a INNER JOIN dbo.Project b ON a.ProjectCode=b.ProjectCode where a.id={id} ";
+        var entity = Db.Ado.SqlQuerySingle<zzSupplierExDTO>(sql);
+        return entity;
+    }
+    /// <summary>
+    /// 审核提交的信息
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    public bool AuditzzSupplierEx(zzSupplierEx dto)
+    {
+        var sql = $"update zzSupplierEx set checkperson='{dto.CheckPerson}',checkdate=getdate(),state={dto.State} where id={dto.ID} and projectcode='{dto.ProjectCode}'";
+        var row = Db.Ado.ExecuteCommand(sql);
+        if(row>0)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
+    /// <summary>
+    /// 提交
+    /// </summary>
+    /// <param name="dto"></param>
+    /// <returns></returns>
+    public bool SubmitzzSupplierEx(zzSupplierEx dto)
+    {
+        var sql = $"update zzSupplierEx set state=1 where id={dto.ID} and suppliercode='{dto.SupplierCode}'";
+        var row = Db.Ado.ExecuteCommand(sql);
+        if (row > 0)
+        {
+            return true;
+        }
+        else
+        {
+            return false;
+        }
+    }
 
 }
  

+ 2 - 0
WebAPIBase.NetCore/WebAPIBase.NetCore/Controllers/CommonController.cs

@@ -212,6 +212,7 @@ namespace WebAPIBase.API.Controllers
         /// </summary>
         /// <param name="code"></param>
         /// <returns></returns>
+        [AllowAnonymous]
         [HttpGet]
         [Route("ShowImg")]
         public FileResult ShowImg(string code)
@@ -244,6 +245,7 @@ namespace WebAPIBase.API.Controllers
                 {
                     filePath += $"/{creatDate}/{filename}";
                 }
+                logger.Info($"附件保存路径:{filePath}");
                 if (!System.IO.File.Exists(filePath))
                 {
                     RedirectToAction("NotFound");

+ 1 - 246
WebAPIBase.NetCore/WebAPIBase.NetCore/Controllers/RequisitionController.cs

@@ -213,251 +213,6 @@ namespace WebAPIBase.API.Controllers
             return Json(list);
         }
 
-        #region 供应商扩展信息
-        /// <summary>
-        /// 根据供应商编码获取供应商扩展信息
-        /// </summary>
-        /// <param name="supplierCode">供应商编号</param>
-        /// <returns></returns>
-        [HttpGet]
-        [Route("GetzzSupplierExList")]
-        public JsonResult GetzzSupplierExList(string supplierCode)
-        {
-           
-            if (supplierCode.IsNullOrEmpty())
-            {
-
-                return Json("-1");
-            }
-            try
-            {
-                var service = new zzSupplierExManager();
-                var list = service.GetzzSupplierExDTOList(supplierCode);
-               
-                return Json(list);
-            }
-            catch(Exception ex)
-            {
-                logger.Error(ex);
-                return Json("-2");
-            }
-        }
-
-        /// <summary>
-        /// 根据项目获取供应商申请的信息
-        /// </summary>
-        /// <param name="projectCode"></param>
-        /// <returns></returns>
-        [HttpGet]
-        [Route("GetzzSupplierExListByProject")]
-        public JsonResult GetzzSupplierExListByProject(string projectCode)
-        {
-            ApiResponse res = new ApiResponse
-            {
-                IsSuccess = false,
-                ErrMsg = "",
-                Code = 50,
-                TnToken = null
-            };
-            if (projectCode.IsNullOrEmpty())
-            {
-                res.ErrMsg = "参数错误";
-                return Json(res);
-            }
-            try
-            {
-                var service = new zzSupplierExManager();
-                var list = service.GetList(m => m.ProjectCode == projectCode);
-                res.IsSuccess = true;
-                res.Code = 200;
-                res.Data = list;
-                return Json(res);
-            }
-            catch (Exception ex)
-            {
-                res.IsSuccess = false;
-                res.ErrMsg = ex.Message + "\r\n" + ex.StackTrace;
-                res.Code = 500;
-                return Json(res);
-            }
-        }
-
-        /// <summary>
-        /// 获取供应商扩展实例信息
-        /// </summary>
-        /// <param name="id"></param>
-        /// <returns></returns>
-        [HttpGet]
-        [Route("GetzzSupplierEx")]
-        public JsonResult GetzzSupplierEx(int id)
-        {
-            ApiResponse res = new ApiResponse
-            {
-                IsSuccess = false,
-                ErrMsg = "",
-                Code = 50,
-                TnToken = null
-            };
-            if (id.IsNullOrEmpty())
-            {
-                res.ErrMsg = "参数错误";
-                return Json(res);
-            }
-            try
-            {
-                var service = new zzSupplierExManager();
-                var entity = service.GetById(id);
-                res.IsSuccess = true;
-                res.Code = 200;
-                res.Data = entity;
-                return Json(res);
-            }
-            catch (Exception ex)
-            {
-                res.IsSuccess = false;
-                res.ErrMsg = ex.Message + "\r\n" + ex.StackTrace;
-                res.Code = 500;
-                return Json(res);
-            }
-        }
-
-        /// <summary>
-        /// 供应商扩展信息添加
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [Route("InsertzzSupplierEx")]
-        public JsonResult InsertzzSupplierEx([FromBody] zzSupplierEx dto)
-        {
-            logger.Info($"【InsertzzSupplierEx】dto:{JsonConvert.SerializeObject(dto)}");
-           
-            if(dto.Title.IsNullOrEmpty())
-            {
-               
-                return Json("标题不能为空");
-            }
-            if (dto.Title.Length>200)
-            {               
-                return Json("标题不能超过200字");
-            }
-            if (dto.Reason.IsNullOrEmpty())
-            {
-                 
-                return Json("原因不能为空");
-            }
-            if (dto.Reason.Length>500)
-            {
-                
-                return Json("原因不能超过500字");
-            }
-            try
-            {
-                dto.CheckDate = null;
-                dto.CheckPerson = "";
-                var service = new zzSupplierExManager();
-                var id = service.Db.Insertable(dto).ExecuteReturnIdentity();
-                if(id>0)
-                {
-                  
-                    return Json(id);
-                }
-                else
-                {
-                    
-                    return Json("插入失败");
-                }
-            }
-            catch (Exception ex)
-            {
-                logger.Error(ex);
-               
-                return Json(ex.Message);
-            }
-
-        }
-        /// <summary>
-        /// 更改状态
-        /// </summary>
-        /// <param name="dto"></param>
-        /// <returns></returns>
-        [HttpPost]
-        [Route("UpdatezzSupplierEx")]
-        public JsonResult UpdatezzSupplierEx([FromBody] zzSupplierEx dto)
-        {
-            ApiResponse res = new ApiResponse
-            {
-                IsSuccess = false,
-                ErrMsg = "",
-                Code = 50,
-                TnToken = null
-            };
-            if (dto.ID.IsNullOrEmpty())
-            {
-                res.ErrMsg = "参数错误,不能审核";
-                return Json(res);
-            }
-           
-            try
-            {
-                var service = new zzSupplierExManager();
-                var row = service.Db.Updateable(dto).UpdateColumns(m => new { m.State, m.CheckPerson, m.CheckDate }).ExecuteCommand();
-                if (row>0)
-                {
-                    res.IsSuccess = true;
-                    if(dto.State==2)
-                    {
-                        res.ErrMsg = "审核通过";
-                    }
-                    else
-                    {
-                        res.ErrMsg = "退回成功";
-                    }
-                    
-                    return Json(res);
-                }
-                else
-                {
-                    res.ErrMsg = "插入失败";
-                    return Json(res);
-                }
-            }
-            catch (Exception ex)
-            {
-                res.IsSuccess = false;
-                res.ErrMsg = ex.Message + "\r\n" + ex.StackTrace;
-                res.Code = 500;
-                return Json(res);
-            }
-
-        }
-
-        /// <summary>
-        /// 根据供应商编号获取其对应所有项目
-        /// </summary>
-        /// <param name="supplierCode"></param>
-        /// <returns></returns>
-        [HttpGet]
-        [Route("GetProjectBySupplierCode")]
-        public JsonResult GetProjectBySupplierCode(string supplierCode)
-        {
-           
-            if (supplierCode.IsNullOrEmpty())
-            {             
-                return Json("请输入供应商编号");
-            }
-            try
-            {
-                var service = new zzSupplierExManager();
-                var list = service.GetProjectBySupplierCode(supplierCode);
-                logger.Info($"【GetProjectBySupplierCode】list:" + JsonConvert.SerializeObject(list));
-                return Json(list);
-            }
-            catch (Exception ex)
-            {
-                return Json(ex.Message + "\r\n" + ex.StackTrace);
-            }
-        }
-        #endregion
+        
     }
 }

+ 68 - 41
WebAPIBase.NetCore/WebAPIBase.NetCore/WebAPIBase.API.xml

@@ -490,100 +490,127 @@
             <param name="requisitionCode"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.GetzzSupplierExList(System.String)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetSafeQualityCheckDTOs(System.Int32,System.String,System.String)">
             <summary>
-            根据供应商编码获取供应商扩展信息
+            质量安全检查列表获取
             </summary>
-            <param name="supplierCode">供应商编号</param>
+            <param name="checkType">检查类型</param>
+            <param name="searchValue">搜索条件</param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.GetzzSupplierExListByProject(System.String)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetSafeQualityCheckDTO(System.String)">
             <summary>
-            根据项目获取供应商申请的信息
+            获取质量安全检查实例及明细
             </summary>
-            <param name="projectCode"></param>
+            <param name="checkCode"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.GetzzSupplierEx(System.Int32)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.InsertSafeQualityCheck(WebAPIBase.API.Controllers.PostData)">
             <summary>
-            获取供应商扩展实例信息
+            插入质量安全检查
             </summary>
-            <param name="id"></param>
+            <param name="sc"></param>
+            <param name="si"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.InsertzzSupplierEx(Sugar.Enties.zzSupplierEx)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.UpdateSafeQualityCheck(WebAPIBase.API.Controllers.PostData)">
             <summary>
-            供应商扩展信息添加
+            更新质量安全检查
             </summary>
-            <param name="dto"></param>
+            <param name="sc"></param>
+            <param name="si"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.UpdatezzSupplierEx(Sugar.Enties.zzSupplierEx)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetZRelationSafeQualityCheckMaterialDTOs(System.String)">
             <summary>
-            更改状态
+            质量检测表中材料检查关联的材料项列表
             </summary>
-            <param name="dto"></param>
+            <param name="safeQualityCheckCode"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.RequisitionController.GetProjectBySupplierCode(System.String)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.InsertZRelationSafeQualityCheckMaterial(Sugar.Enties.ZRelationSafeQualityCheckMaterial)">
             <summary>
-            根据供应商编号获取其对应所有项目
+            插入质量检测表中材料检查关联的材料项
             </summary>
-            <param name="supplierCode"></param>
+            <param name="zRelationSafeQualityCheckMaterial"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetSafeQualityCheckDTOs(System.Int32,System.String,System.String)">
+        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.DeleteZRelationSafeQualityCheckMaterial(System.Int32)">
             <summary>
-            质量安全检查列表获取
+            删除质量检测表中材料检查关联的材料项
             </summary>
-            <param name="checkType">检查类型</param>
-            <param name="searchValue">搜索条件</param>
+            <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetSafeQualityCheckDTO(System.String)">
+        <member name="T:WebAPIBase.API.Controllers.SupplierApplyController">
             <summary>
-            获取质量安全检查实例及明细
+            供应商申请相关
             </summary>
-            <param name="checkCode"></param>
+        </member>
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.GetzzSupplierExList(System.String)">
+            <summary>
+            根据供应商编码获取供应商扩展信息
+            </summary>
+            <param name="supplierCode">供应商编号</param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.InsertSafeQualityCheck(WebAPIBase.API.Controllers.PostData)">
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.GetzzSupplierExListByProject(System.String)">
             <summary>
-            插入质量安全检查
+            根据项目获取供应商申请的信息
             </summary>
-            <param name="sc"></param>
-            <param name="si"></param>
+            <param name="projectCode"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.UpdateSafeQualityCheck(WebAPIBase.API.Controllers.PostData)">
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.GetzzSupplierEx(System.Int32)">
             <summary>
-            更新质量安全检查
+            获取供应商扩展实例信息
             </summary>
-            <param name="sc"></param>
-            <param name="si"></param>
+            <param name="id"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.GetZRelationSafeQualityCheckMaterialDTOs(System.String)">
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.InsertzzSupplierEx(Sugar.Enties.zzSupplierEx)">
             <summary>
-            质量检测表中材料检查关联的材料项列表
+            供应商扩展信息添加
             </summary>
-            <param name="safeQualityCheckCode"></param>
+            <param name="dto"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.InsertZRelationSafeQualityCheckMaterial(Sugar.Enties.ZRelationSafeQualityCheckMaterial)">
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.UpdatezzSupplierEx(Sugar.Enties.zzSupplierEx)">
             <summary>
-            插入质量检测表中材料检查关联的材料项
+            更新供应商申请
             </summary>
-            <param name="zRelationSafeQualityCheckMaterial"></param>
+            <param name="dto"></param>
             <returns></returns>
         </member>
-        <member name="M:WebAPIBase.API.Controllers.SafeQualityCheckController.DeleteZRelationSafeQualityCheckMaterial(System.Int32)">
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.AuditzzSupplierEx(Sugar.Enties.zzSupplierEx)">
             <summary>
-            删除质量检测表中材料检查关联的材料项
+            管理员审核供应商提交的信息
             </summary>
+            <param name="dto"></param>
+            <returns></returns>
+        </member>
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.SubmitzzSupplierEx(Sugar.Enties.zzSupplierEx)">
+            <summary>
+            提交供应商申请信息
+            </summary>
+            <param name="dto"></param>
+            <returns></returns>
+        </member>
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.DeletezzSupplierEx(System.String,System.Int32)">
+            <summary>
+            删除供应商扩展信息
+            </summary>
+            <param name="suppliercode"></param>
             <param name="id"></param>
             <returns></returns>
         </member>
+        <member name="M:WebAPIBase.API.Controllers.SupplierApplyController.GetProjectBySupplierCode(System.String)">
+            <summary>
+            根据供应商编号获取其对应所有项目
+            </summary>
+            <param name="supplierCode"></param>
+            <returns></returns>
+        </member>
         <member name="F:WebAPIBase.API.Controllers.TokenController.tokenHelper">
             <summary>
             令牌获取和验证类

+ 33 - 7
uni-app-front/common/api/requisitionApi.js

@@ -77,7 +77,7 @@ export function GetRelationRequistionContract(projectCode) {
 /*根据供应商编码获取供应商扩展信息*/
 export function GetzzSupplierExList(supplierCode) { 
   return request({
-		url: '/Requisition/GetzzSupplierExList',
+		url: '/SupplierApply/GetzzSupplierExList',
 		method: 'get',
 		params:{supplierCode:supplierCode}
   });
@@ -86,7 +86,7 @@ export function GetzzSupplierExList(supplierCode) {
 /*根据供应商编码获取供应商扩展信息*/
 export function GetzzSupplierExListByProject(projectCode) { 
   return request({
-		url: '/Requisition/GetzzSupplierExListByProject',
+		url: '/SupplierApply/GetzzSupplierExListByProject',
 		method: 'get',
 		params:{projectCode:projectCode}
   });
@@ -95,7 +95,7 @@ export function GetzzSupplierExListByProject(projectCode) {
 /*获取供应商扩展实例信息*/
 export function GetzzSupplierEx(id) { 
   return request({
-		url: '/Requisition/GetzzSupplierEx',
+		url: '/SupplierApply/GetzzSupplierEx',
 		method: 'get',
 		params:{id:id}
   });
@@ -104,27 +104,53 @@ export function GetzzSupplierEx(id) {
 /* 供应商扩展信息添加 */
 export function InsertzzSupplierEx(data) { 
   return request({
-		url: '/Requisition/InsertzzSupplierEx',
+		url: '/SupplierApply/InsertzzSupplierEx',
 		method: 'POST',
 		data:data
   });
 }
 
 
-/* 更改供应商提交信息状态 */
+/* 更改供应商申请信息 */
 export function UpdatezzSupplierEx(data) { 
   return request({
-		url: '/Requisition/UpdatezzSupplierEx',
+		url: '/SupplierApply/UpdatezzSupplierEx',
 		method: 'POST',
 		data:data
   });
 }
 
+/* 管理员审核供应商提交的信息 */
+export function AuditzzSupplierEx(data) { 
+  return request({
+		url: '/SupplierApply/AuditzzSupplierEx',
+		method: 'POST',
+		data:data
+  });
+}
+
+/* 提交供应商申请信息 */
+export function SubmitzzSupplierEx(data) { 
+  return request({
+		url: '/SupplierApply/SubmitzzSupplierEx',
+		method: 'POST',
+		data:data
+  });
+}
 /*根据供应商编号获取其对应所有项目*/
 export function GetProjectBySupplierCode(supplierCode) { 
   return request({
-		url: '/Requisition/GetProjectBySupplierCode',
+		url: '/SupplierApply/GetProjectBySupplierCode',
 		method: 'get',
 		params:{supplierCode:supplierCode}
   });
+}
+
+/*删除供应商扩展信息*/
+export function DeletezzSupplierEx(suppliercode,id) { 
+  return request({
+		url: '/SupplierApply/DeletezzSupplierEx',
+		method: 'get',
+		params:{suppliercode:suppliercode,id:id}
+  });
 }

+ 35 - 25
uni-app-front/common/axiosHelper.js

@@ -32,10 +32,27 @@ service.interceptors.request.use(
 		//console.info(mget.getters);
 		//console.info(store);
 		if (store.state.isLogin) {
-			// let each request carry token
-			// ['X-Token'] is a custom headers key
-			// please modify it according to the actual situation
-			config.headers['X-Token'] = store.state.token.tokenStr;
+			if(store.state.token)
+			{
+				// let each request carry token
+				// ['X-Token'] is a custom headers key
+				// please modify it according to the actual situation
+				config.headers['X-Token'] = store.state.token.tokenStr;
+			}
+			else{
+				if(store.state.user.userCode==-undefined){
+					uni.navigateTo({
+						url:"/pages/LoginSupplier/LoginSupplier"
+					});
+				}
+				else{
+					uni.navigateTo({
+						url:"/"
+					});
+				}
+				
+				return config;
+			}
 		}
 		console.info('axioshelper request config',config);
 		return config;
@@ -64,14 +81,14 @@ service.interceptors.response.use(
 		console.info('axioshelper应答原始数据', response);
 
 		const res = response.data;
-		console.info('axioshelper应答response.data', res);
+		//console.info('axioshelper应答response.data', res);
 		if (res.code == 500) {
 			uni.showModal({
 				title: '系统错误',
 				content: res.message,
 				showCancel: false
 			});
-			return;
+			return res;
 		}
 		if(res.isSuccess==false&&(res.code==201||res.code==202||res.code==205)){
 			uni.showModal({
@@ -80,32 +97,25 @@ service.interceptors.response.use(
 				showCancel: false,
 				success:function(ret){
 					if(ret.confirm){
-						uni.navigateTo({
-							url:'/pages/login/login'
-						});
+						if(store.state.user.userCode==-undefined){
+							uni.navigateTo({
+								url:"/pages/LoginSupplier/LoginSupplier"
+							});
+						}
+						else{
+							uni.navigateTo({
+								url:"/"
+							});
+						}						
 					}
 				}
 			});
-			return;
+			return res;
 		}
 		//console.info(res);
 		return res;
 		
-		// if the custom code is not 20000, it is judged as an error.
-		// if (!res) {
-		// 	uni.showModal({
-		// 		content: "登录超时,请重新登录",
-		// 		showCancel: false
-		// 	});
-
-		// 	// 50008: Illegal token; 50012: Other clients logged in; 50014: Token expired;
-
-		// 	console.info("message:" + res.message);
-		// 	return Promise.reject(new Error(res.message || 'Error'))
-		// } else {
-		// 	console.info("正常登录");
-		// 	return res;
-		// }
+		
 	},
 	error => {
 		console.log('axioshelper 应答error' + error) // for debug

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

@@ -511,6 +511,24 @@
             }
             
         }
+        ,{
+            "path" : "pages/template/zzSupplierExDetail/zzSupplierExDetail",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "我的申请明细",
+                "enablePullDownRefresh": false
+            }
+            
+        }
+        ,{
+            "path" : "pages/template/UpdatezzSupplierEx/UpdatezzSupplierEx",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "修改申请",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "white",

+ 11 - 0
uni-app-front/pages/LoginSupplier/LoginSupplier.vue

@@ -47,6 +47,17 @@
 				src: '/static/haode.png'
 			}
 		},
+		created: function() {
+			
+			var abc=1;
+			if(typeof abc=='string'){
+				console.info(typeof abc);
+				console.info(abc);
+			}
+			else{
+				console.info(typeof abc,abc);
+			}
+		},
 		methods: {		
 			onInput1:function(){
 				console.info("oninput1");

+ 8 - 1
uni-app-front/pages/index/index.vue

@@ -99,7 +99,14 @@
 			     			</view>
 			     		</navigator>
 			     	</uni-grid-item>
-			     	
+			     	<uni-grid-item>
+			     		<navigator :url="'../template/SupplierList/SupplierList?projectCode='+$store.state.projectCode">
+			     			<view class="grid-item-box pointer">
+			     				<image class="img" mode="aspectFit" src="/static/icon/audit.svg" />
+			     				<text class="text">供应商申请</text>
+			     			</view>
+			     		</navigator>
+			     	</uni-grid-item>
 			     	<uni-grid-item>
 			     		<view class="grid-item-box pointer" @click="logout">
 			     			<image class="img" mode="aspectFit" src="/static/icon/logout.svg" />

+ 59 - 21
uni-app-front/pages/template/SupplierList/SupplierList.vue

@@ -1,7 +1,7 @@
 <template>
 	<view> 
 		<uni-list>
-			<uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.requisitionCode)" clickable>
+			<uni-list-item v-for="(item, index) in listData" :key="index" @click="goDetail(item.id)" clickable>
 				<view slot="body" class="slot-box">
 					<view class="row">
 						<view class="column-left">编号:</view>
@@ -30,7 +30,7 @@
 				</view>
 			</uni-list-item>
 		</uni-list>
-		<view style="bottom: 15px;right:10px;position: fixed;z-index: 50;">
+		<view style="bottom: 15px;right:10px;position: fixed;z-index: 50;"  v-show="isAdd">
 			<router-link :to="'/pages/template/InsertzzSupplierEx/InsertzzSupplierEx'" style="text-decoration: none;" title="申请添加">
 				<uni-icons type="plus-filled" size="80" color="#5678FE"></uni-icons>
 			</router-link>
@@ -44,7 +44,7 @@
 	
 	import uniLoadMore from '@/components/uni-load-more/uni-load-more.vue';
 	import {
-		GetzzSupplierExList
+		GetzzSupplierExList,GetzzSupplierExListByProject
 	} from "@/common/api/requisitionApi.js";
 
 	export default {
@@ -59,6 +59,7 @@
 				status: 'more',
 				adpid: '',
 				type:0,
+				isAdd:true,
 				contentText: {
 					contentdown: '上拉加载更多',
 					contentrefresh: '加载中',
@@ -85,46 +86,83 @@
 			this.getList();
 		},
 		created: function() {
-			
+			if(!this.$util.isEmpty(this.$util.getQuery("projectCode")))
+			{
+				uni.setNavigationBarTitle({
+					title:"供应商申请"
+				});
+			}
+			else{
+				uni.setNavigationBarTitle({
+					title:"我提交的信息"
+				});
+			}
 			this.getList();
+			//console.info("usercode",this.$store.state.user.userCode);
+			console.info("aa");
 		},
 		methods: {
 
 			getList() {
 				let that = this;
 				let supplierCode=this.$util.getState(this,'user').supplierCode;
-				//let type=this.$util.getQuery("type")-0;
-				GetzzSupplierExList(supplierCode).then((res) => {
+				let projectCode=this.$util.getQuery("projectCode");
+				console.info('projectCode',projectCode);
+				if(!this.$util.isEmpty(projectCode))
+				{
+					this.isAdd=false;
+					GetzzSupplierExListByProject(projectCode).then((res) => {
 					console.info(res);
-					if(res=="-1"){
+					if(typeof res=="string"){
 						uni.showToast({
-							title:'供应商编号不能为空',
-							duration:4000,
-							icon:'none'
-						});
-						return;
-					}
-					if(res=="-2"){
-						uni.showToast({
-							title:'执行过程中出现系统错误,执行中断',
+							title:res,
 							duration:4000,
 							icon:'none'
 						});
 						return;
 					}
+					
 					res.forEach(function(item, index, array) {
 						that.$set(that.listData, index, item);
 					});
 					console.info(that.listData);
-				});
+					});
+				}
+				else{
+					this.isAdd=true;
+					//let type=this.$util.getQuery("type")-0;
+					GetzzSupplierExList(supplierCode).then((res) => {
+						console.info(res);
+						if(res=="-1"){
+							uni.showToast({
+								title:'供应商编号不能为空',
+								duration:4000,
+								icon:'none'
+							});
+							return;
+						}
+						if(res=="-2"){
+							uni.showToast({
+								title:'执行过程中出现系统错误,执行中断',
+								duration:4000,
+								icon:'none'
+							});
+							return;
+						}
+						res.forEach(function(item, index, array) {
+							that.$set(that.listData, index, item);
+						});
+						console.info(that.listData);
+					});
+				}
+				
 			},
 			goDetail: function(id) {
-				console.info('godetail');
-				console.info(id);
-			    let type=this.$util.getQuery("type");
+				console.info('godetail',id);
+				//console.info(id);			    
 				uni.navigateTo({
 					// requisitiondetail
-					url: '../requisitiondetail/requisitiondetail?id=' + id
+					url: '../zzSupplierExDetail/zzSupplierExDetail?id=' + id
 				});
 			},