| | |
| | | } |
| | | #endregion |
| | | |
| | | #region 客户列表修改按钮方法添加审核人 |
| | | /// <summary> |
| | | /// 客户列表修改按钮方法 |
| | | ///参数:string sql。 |
| | | ///返回值:object。 |
| | | /// </summary> |
| | | [Route("Gy_Customer/xg_extendCheckEmp")] |
| | | [HttpGet] |
| | | public object xg_extendCheckEmp(long HInterID) |
| | | { |
| | | try |
| | | { |
| | | string sql = string.Format(@"select c.HItemID,c.HNumber 客户代码,c.HName 客户名称,c.HHelpCode 助记码,c.HShortName 简称,c.HAddress 地址,c.HLinkMan 联系人,c.HLinkPhone 联系电话 |
| | | ,c.HMobilePhone 手机,c.HFax 传真,c.HPostalCode 邮编,c.HEmail 电子邮件,c.HCorMan 法人代表,c.HBank 开户银行,c.HBankAccount 银行账号,c.HMateOutEmp 领用人, |
| | | c.HTaxNum 税务登记号,c.HTaxRate 增值税率,c.HEnglishName 英文名称,c.HEngLishAddress 英文地址,c.HCountry 国家,c.HCusStatus 客户状态 |
| | | ,c.HStopflag 禁用标志,c.HRemark 备注,c.HAreaID 地区ID,a.HName 地区名称,c.HCurID 默认货币ID,r.HName 默认货币, |
| | | c.HSSID 结算方式ID,s.HName 结算方式,c.HCusTypeID 客户分类ID,t.HName 客户分类, c.HCheckEmp 审核人 from Gy_Customer c |
| | | left join Gy_AreaSet a on c.HAreaID=a.HItemID |
| | | left join Gy_Currency r on c.HCurID=r.HItemID |
| | | left join Gy_SettleStyle s on c.HSSID=s.HItemID |
| | | left join Gy_CusType t on c.HCusTypeID=t.HItemID |
| | | where c.HItemID='" + HInterID + "'"); |
| | | ds = oCN.RunProcReturn(sql, "Gy_Customer"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = ""; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exception!" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 获取当前最大的客户代码 |
| | | [Route("Gy_Customer/getMaxCusNumber")] |
| | | [HttpGet] |
| | |
| | | ",HEmpID,HCreditDate,HCreditRatingDate,HMaxCreditRatingDate" + |
| | | ",HMonthUseQty,HForecastCreditRating,HCreditLevelID,HCountAccrualRating" + |
| | | ",HSubsidyAccrualRating,HCreditRating,HMaxCreditRating" + |
| | | ",HCusTypeID) " + |
| | | ",HCusTypeID,HERPItemID,HUseOrgID,HCreateOrgID) " + |
| | | " Values('" + lsmain[0].HItemID + "','" + lsmain[0].HNumber + "','" + lsmain[0].HName + "','" + lsmain[0].HHelpCode + "','" + lsmain[0].HShortNumber + "'," + lsmain[0].HParentID + |
| | | ", " + lsmain[0].HLevel + ",0,'" + lsmain[0].HStopFlag + "','" + lsmain[0].HRemark + "'" + |
| | | ",'" + lsmain[0].HShortName + "','" + lsmain[0].HAddress + "','" + lsmain[0].HLinkMan + "','" + lsmain[0].HLinkPhone + "','" + lsmain[0].HMobilePhone + "'" + |
| | |
| | | "," + lsmain[0].HEmpID + "," + lsmain[0].HCreditDate + "," + lsmain[0].HCreditRatingDate + "," + lsmain[0].HMaxCreditRatingDate + |
| | | "," + lsmain[0].HMonthUseQty + "," + lsmain[0].HForecastCreditRating + "," + lsmain[0].HCreditLevelID + "," + lsmain[0].HCountAccrualRating + |
| | | "," + lsmain[0].HSubsidyAccrualRating + "," + lsmain[0].HCreditRating + "," + lsmain[0].HMaxCreditRating + |
| | | ", " + lsmain[0].HCusTypeID + ")"); |
| | | ", " + lsmain[0].HCusTypeID + "," + lsmain[0].HItemID + ",'" + lsmain[0].HUSEORGID + "','" + lsmain[0].HCREATEORGID + "')"); |
| | | //主表_客户 |
| | | oCN.RunProc("Insert into Gy_Customer " + |
| | | " (HItemID,HNumber,HName,HHelpCode,HShortNumber,HParentID" + |
| | |
| | | ",HEmpID,HCreditDate,HCreditRatingDate,HMaxCreditRatingDate" + |
| | | ",HMonthUseQty,HForecastCreditRating,HCreditLevelID,HCountAccrualRating" + |
| | | ",HSubsidyAccrualRating,HCreditRating,HMaxCreditRating" + |
| | | ",HCusTypeID,HERPItemID) " + |
| | | ",HCusTypeID,HERPItemID,HUseOrgID,HCreateOrgID) " + |
| | | " Values('" + lsmain[0].HItemID + "','" + lsmain[0].HNumber + "','" + lsmain[0].HName + "','" + lsmain[0].HHelpCode + "','" + lsmain[0].HShortNumber + "'," + lsmain[0].HParentID + |
| | | ", " + lsmain[0].HLevel + ",0,'" + lsmain[0].HStopFlag + "','" + lsmain[0].HRemark + "'" + |
| | | ",'" + lsmain[0].HShortName + "','" + lsmain[0].HAddress + "','" + lsmain[0].HLinkMan + "','" + lsmain[0].HLinkPhone + "','" + lsmain[0].HMobilePhone + "'" + |
| | |
| | | "," + lsmain[0].HEmpID + "," + lsmain[0].HCreditDate + "," + lsmain[0].HCreditRatingDate + "," + lsmain[0].HMaxCreditRatingDate + |
| | | "," + lsmain[0].HMonthUseQty + "," + lsmain[0].HForecastCreditRating + "," + lsmain[0].HCreditLevelID + "," + lsmain[0].HCountAccrualRating + |
| | | "," + lsmain[0].HSubsidyAccrualRating + "," + lsmain[0].HCreditRating + "," + lsmain[0].HMaxCreditRating + |
| | | ", " + lsmain[0].HCusTypeID + "," + lsmain[0].HItemID + ")"); |
| | | ", " + lsmain[0].HCusTypeID + "," + lsmain[0].HItemID + ",'" + lsmain[0].HUSEORGID + "','" + lsmain[0].HCREATEORGID + "')"); |
| | | sql = "set identity_insert gy_Customer off"; |
| | | oCN.RunProc(sql); |
| | | //客户_交货地点 |