JS :FR.remoteEvaluate('=SQL("DMHR","call fhwx",1,1)') 存储过程:fhwx alter PROCEDURE [dbo].[fhwx] as begin UPDATE DM_003 SET KHDFXJ=F.XJ FROM (select KHFL AS FL,SUM(KHDF*BL) AS XJ from dm_003 GROUP BY KHFL) F WHERE DM_003.KHFL=F.FL update dm_003 set jjje=je*gsxy*bl*khdf/isnull(khdfxj,0) where isnull(khdfxj,0)>0 AND khfl in ('仓管','车间','机修','后勤') update dm_003 set jjje=je*gsxy*bl*0.8 where khfl in ('财务','总经办','市场文秘') update dm_003 set jjje=je*(gsxy*bl*0.5+khdf/khdfxj*0.5)*0.8 where isnull(khdfxj,0)>0 AND khfl in ('试化验') select 1 end GO |