更新销售合同/提成/业绩、精工工序工价/生产审核/工时统计、仓储盘点/库存/补货/入库/库房管理,新增提成设置/销售业绩/库房管理/入库单移动端等模块及SQL脚本

This commit is contained in:
Developer
2026-08-05 08:13:08 +08:00
parent 33549c3787
commit fd84f9d3ca
94 changed files with 14531 additions and 345 deletions

View File

@@ -0,0 +1,116 @@
USE [ERPTOOL_JY_20250826Back]
GO
ALTER PROCEDURE [dbo].[_查询数据_分页]
@_check bit = null,
@ nvarchar(50) = null,
@_check bit = null,
@ nvarchar(50) = null,
@_check bit = null,
@ nvarchar(50) = null,
@_check bit = null,
@ int = null,
@_check bit = null,
@ nvarchar(50) = null,
@ nvarchar(50) = null,
@ int =null,
@ int =null,
@_check bit = null,
@ int = null,
@_check bit = null, -- 修改人:Ld 修改时间:2026-08-03 07:55:23; 支持前端切换查看启用/禁用物料
@ bit = null, -- 修改人:Ld 修改时间:2026-08-03 07:55:23; 1 查询禁用物料0 查询启用物料
@PageCurrent int=1, --
@PageSize int = 20, --()
@PageCount int = '1111' OUTPUT, --
@ItemCount int = '1111' OUTPUT --
AS
declare @selectStrWhere nvarchar(4000)
set @selectStrWhere = '1=1 ' -- 修改人:Ld 修改时间:2026-08-03 07:55:23; 默认条件改为可拼接启用状态
if (ISNULL(@_check, 0) = 1) -- 修改人:Ld 修改时间:2026-08-03 07:55:23; 按按钮传入状态筛选禁用/启用物料
set @selectStrWhere = @selectStrWhere + ' and 是否禁用 = ' + str(ISNULL(@, 0))
else
set @selectStrWhere = @selectStrWhere + ' and 是否禁用=0 '
--if(@_check = 1)
-- set @selectStrWhere = @selectStrWhere+' and 名称 like + ''%'' + @物料名称 + ''%'' '
--if(@_check = 1)
-- set @selectStrWhere = @selectStrWhere+' and 修改日期 >=@开始时间 and 修改日期 <=@结束时间 '
--if(@_check = 1)
-- set @selectStrWhere = @selectStrWhere+' and 代号 like + ''%'' + @图号 + ''%'' '
--if(@_check = 1)
-- set @selectStrWhere = @selectStrWhere+' and 类型 = @类型 '
if (@_check = 1)
if(@ is not null)
set @selectStrWhere = @selectStrWhere+' and 名称 like '+N'''%'+@+N'%'''
if (@_check = 1)
if(@ is not null)
set @selectStrWhere = @selectStrWhere+' and 物料编码 like '+N'''%'+@+N'%'''
if (@_check = 1)
if(@ is not null and @ is not null)
set @selectStrWhere = @selectStrWhere+' and ' + N''''+@+N'''' + '<=修改日期' + ' and '+ N''''+@+N'''' + '>=修改日期'
if (@_check = 1)
if(@ is not null)
set @selectStrWhere = @selectStrWhere+' and 代号 like '+N'''%'+@+N'%'''
if (@_check = 1)
if(@ is not null)
set @selectStrWhere = @selectStrWhere+' and 类型 = '+str(@)
---if (@_check = 1)
-- if(@物料库 is not null)
-- set @selectStrWhere = @selectStrWhere+' and 物料库流水号 = '+ str(@物料库)
declare @tbname sysname --
declare @fieldkey sysname --(),
declare @where nvarchar(4000) --
declare @fieldshow nvarchar(1000) --,,
declare @fieldOrder nvarchar(1000) ----,DESC/ASC --
set @tbname = '物料视图'
set @fieldkey = '物料流水号'
set @where = @selectStrWhere
set @fieldshow =' [代号], [修改人], [修改日期], [单位], [单位流水号],[名称], [库位], [货位流水号], [操作日期],[文件内容],[文件后缀], [物料类型],[物料库流水号],
[是否启用], [是否禁用], [材料], [材料流水号],
[物料流水号], [物料编码], [类型], [类型名称], [物料说明],[规格],[曾用物料编码],[Expr1]' -- 修改人:Ld 修改时间:2026-08-03 07:55:23; 保持原输出字段并继续返回是否禁用状态
if @ = 1
begin
if @ = 1
begin
set @fieldOrder ='名称 DESC'
end
else
begin
set @fieldOrder = '名称 ASC'
end
end
else if @ = 2
begin
if @ = 1
begin
set @fieldOrder = '代号 DESC'
end
else
begin
set @fieldOrder = '代号 ASC'
end
end
else
begin
set @fieldOrder = '操作日期 DESC'
end
exec sp_xt_pagesplit @tbname,@fieldkey,@where,@fieldshow,@fieldOrder,'',@PageCurrent,@PageSize,@PageCount out,@ItemCount out
GO