| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取供应商编辑查看 视图 |
| | | /// <summary> |
| | | /// 供应商列表修改按钮方法 |
| | | ///参数:string sql。 |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取供应商编辑查看 视图 扩展制单信息 |
| | | /// <summary> |
| | | /// 供应商列表修改按钮方法 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Gy_Supplier/xg_ExpendBillMake")] |
| | | [HttpGet] |
| | | public object xg_ExpendBillMake(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | string sql = string.Format(@"select * from h_v_Gy_SupplierEdit_ExpendBillMake where HItemID='" + HInterID + "'"); |
| | | ds = oCN.RunProcReturn(sql, "h_v_Gy_SupplierEdit_ExpendBillMake"); |
| | | DataSet cs = oCN.RunProcReturn("select * from Gy_Supplier_PayPlan where HSupID = '" + HInterID + "'", "Gy_Supplier_PayPlan"); |
| | | DataSet cs1 = oCN.RunProcReturn("select * from Gy_Supplier_Link where HSupID = '" + HInterID + "'", "Gy_Supplier_Link"); |
| | | List<Object> list = new List<object>(); |
| | | list.Add(cs); |
| | | list.Add(cs1); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = list; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 单据保存结合复制功能 |
| | | /// <summary> |
| | | /// 新增单据-保存按钮 |
| | | ///参数:string sql。 |
| | |
| | | string HMaterClass = list[0].HMaterClass; |
| | | long HPSStyleID = list[0].HPSStyleID; |
| | | long HSupTypeID = list[0].HSupTypeID; |
| | | string HMaker = list[0].HMaker; |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |
| | |
| | | } |
| | | //若MAINDI重复则重新获取 |
| | | oCN.BeginTran(); |
| | | // 若在新增和复制中存在相同组织,则返回错误信息 |
| | | DataSet ds_check = oCN.RunProcReturn(@"select * from Gy_Supplier where HNumber ='" + HNumber + "'" + "and HUSEORGID = '" + HUseOrgID + "'", "Gy_Supplier"); |
| | | if (ds_check.Tables[0].Rows.Count != 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "相同组织下不能存在相同供应商代码!"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | //主表 |
| | | oCN.RunProc("Insert Into Gy_Supplier " + |
| | | "(HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | |
| | | ",HShortName,HAddress,HLinkMan,HLinkPhone,HMobilePhone" + |
| | | ",HFax,HPostalCode,HEmail,HBank,HBankAccount" + |
| | | ",HTaxNum,HTaxRate,HCountry,HCorMan,HEnglishName" + |
| | | ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass,HUSEORGID,HCREATEORGID,HPSStyleID,HSupTypeID) " + |
| | | ",HEnglishAddress,HCurID,HSSID,HAreaID,HMaterClass,HUSEORGID,HCREATEORGID,HPSStyleID,HSupTypeID,HMaker) " + |
| | | " values('" + HNumber + "','" + HName + "','" + HHelpCode + "','" + HShortNumber + "','" + HParentID + "'" + |
| | | "," + HLevel + ",1,'" + HStopflag + "','" + HRemark + "'" + |
| | | ",'" + HShortName + "','" + HAddress + "','" + HLinkMan + "','" + HLinkPhone + "','" + HMobilePhone + "'" + |
| | | ",'" + HFax + "','" + HPostalCode + "','" + HEmail + "','" + HBank + "','" + HBankAccount + "'" + |
| | | ",'" + HTaxNum + "','" + HTaxRate + "','" + HCountry + "','" + HCorMan + "','" + HEnglishName + "'" + |
| | | ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID +" ,'" + HMaterClass + " ','" + HUseOrgID + "' ,'" + HCreateOrgID + "' ,'" + HPSStyleID+ "' ,'" + HSupTypeID + |
| | | ",'" + HEnglishAddress + "'," + HCurID + "," + HSSID + "," + HAreaID +" ,'" + HMaterClass + " ','" + HUseOrgID + "' ,'" + HCreateOrgID + "' ,'" + HPSStyleID+ "' ,'" + HSupTypeID + "' ,'" + HMaker + |
| | | "') "); |
| | | //修改上级为非末级代码 |
| | | oCN.RunProc("Update Gy_Supplier set HEndflag=0 where HItemID=" + HParentID, ref DBUtility.ClsPub.sExeReturnInfo); |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | [Route("Gy_Supplier/SaveGy_SupplierListApi")] |
| | | [HttpPost] |
| | |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | |
| | | [Route("Gy_Supplier/AddBill1")] |
| | | [HttpPost] |
| | | public object AddBill1([FromBody] JObject oMain) |
| | |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if(HItemID == 0) // 使用新增函数 |
| | | { |
| | | |
| | | } |
| | | |
| | | if (!DBUtility.ClsPub.AllowNumber(HNumber)) |
| | | { |