Washington — If Pentagon budgetry were a military battle, the Reagan administration might well declare a star-spangled victory this Fourth of July week. During his 31/2 years in office, the President has gotten just about everything he wanted.
Defense Secretary Caspar W. Weinberger grumbles about the trims made by Congress. But he also points with pride to the increases in United States weaponry that have occurred on his watch: 2,360 M-1 tanks, 804 jet fighters for the Air Force and Navy, 46 more combat ships. Even such controversial items as the B-1 bomber and MX missile are rolling off the production lines.
Not counting inflation, annual military spending has climbed 32 percent over what it was in 1980. And because of the emphasis on weapons procurement, the Defense Department has accumulated a record-breaking stockpile of money waiting to be spent.
Funding for operating all the new hardware has been overshadowed by investment (new weapons procurement, research and development, and military construction), but there have been increases here as well. Flying hours for pilots and steaming time for ships are up.
Observers across the political spectrum agree that the administration has met most of its ''rearm America'' goals.
''They have really been remarkably successful at getting the bulk of their programs through Congress unscathed,'' says Jo Husbands, deputy director of the Committee for National Security, a private research group generally critical of the recent Pentagon buildup.
''There's no question that they succeeded in getting increases and succeeded in changing the debate,'' says David Trachtenberg, senior defense analyst with the Committee on the Present Danger, a conservative group that still finds the administration's military efforts inadequate.
Mr. Trachtenberg and others argue that the administration's military-spending pattern is not too much different from what the Carter administration was projecting before being turned out of office. But the key difference, most observers agree, is that Mr. Reagan has been more tenacious in fighting congressional opposition than his predecessor would have been.
''I don't think the Carter administration would have been persuaded of the continued Soviet threat that drives the Reagan administration,'' Dr. Husbands says.
The Reagan plan (assuming the President is reelected) has been to keep the annual rate of increase close to 10 percent through 1986, then ask for more modest hikes of about 4 percent a year.
By then, officials figure, most of the necessary buildup - including substantial down payments on major items like aircraft carrier battle groups - will have occurred and the focus can shift to operating and maintaining the force.
But Congress has already begun to flatten the rate of increase in defense budgets, and this could present problems during a second Reagan term. For the current fiscal year, lawmakers granted an 8.8 percent real growth in defense outlays (money to be spent in 1984), but held the rate of increase in budget authority (outlays plus funds obligated for future years) to just 3.7 percent.
For the Reagan administration (if it wins a second term), this portends increased congressional confrontation over defense spending. For the military services, it could mean leaner days if the Democrats retake the White House.
What concerns many defense experts is that Congress - unable to face the heat of cutting politically popular weapons programs - will be inclined to look for savings in areas that are more immediately vulnerable and less tied to local economies: operations and maintenance.
''Cutting production is a lot more difficult and causes a great deal more dislocation than not undertaking the process in the first place,'' Dr. Husbands of the Committee for National Security says.
''If not this year or next, then by the end of the decade there are going to be serious problems from that emphasis on rapid procurement of those weapons systems,'' she predicts. ''They're likely to have severe problems with finding the capacity to operate and maintain all of those systems, either through getting the funding through Congress or having the trained manpower to keep things up to snuff.''