--插入其它入库单_主表界面格式
--delete System_ModuleFormat where module='Stock_OtherIn_Header'
if(select count(1) from System_ModuleFormat where module='Stock_OtherIn_Header' and field='io_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Header' as module,'order_number' as field,
	'入库单号' as field_name,'入库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Header' as module,'new_date' as field,
	'入库日期' as field_name,'入库日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'iot_id' as field,
	'收发类型ID' as field_name,'收发类型ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Header' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'ele_id' as field,
	'员工ID' as field_name,'员工ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'ele_name' as field,
	'员工' as field_name,'员工' as title,
	98 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,250 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

end
/**/GO

--插入其它入库单_编辑界面格式
--delete System_ModuleFormat where module='Stock_OtherIn_Input'
if(select count(1) from System_ModuleFormat where module='Stock_OtherIn_Input' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,115 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,116 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,117 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,118 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_OtherIn_Input' as module,'unit_price' as field,
	'本币无税单价' as field_name,'无税单价' as title,
	120 as width,205 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_OtherIn_ViewPrice' as auth_view,
	'Stock_OtherIn_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherIn_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_OtherIn_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	120 as width,235 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_OtherIn_ViewPrice' as auth_view,
	'Stock_OtherIn_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherIn_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	120 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	120 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	120 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	120 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	120 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	120 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	120 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	120 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherIn_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	120 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO

--插入其它出库单_主表界面格式
--delete System_ModuleFormat where module='Stock_OtherOut_Header'
if(select count(1) from System_ModuleFormat where module='Stock_OtherOut_Header' and field='io_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Header' as module,'order_number' as field,
	'出库单号' as field_name,'出库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Header' as module,'new_date' as field,
	'出库日期' as field_name,'出库日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'iot_id' as field,
	'收发类型ID' as field_name,'收发类型ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Header' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'ele_id' as field,
	'员工ID' as field_name,'员工ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'ele_name' as field,
	'员工' as field_name,'员工' as title,
	98 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,250 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;
end

--插入其它出库单_编辑界面格式
--delete System_ModuleFormat where module='Stock_OtherOut_Input'
if(select count(1) from System_ModuleFormat where module='Stock_OtherOut_Input' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'ios_id' as field,
	'出库单子表ID' as field_name,'出库单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,115 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,116 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,117 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,118 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	120 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_OtherOut_Input' as module,'unit_price' as field,
	'本币无税单价' as field_name,'无税单价' as title,
	120 as width,205 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_OtherOut_ViewPrice' as auth_view,
	'Stock_OtherOut_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_OtherOut_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	120 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_OtherOut_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	120 as width,235 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_OtherOut_ViewPrice' as auth_view,
	'Stock_OtherOut_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_OtherOut_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_OtherOut_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end

--插入材料出库单_主表界面格式
--delete System_ModuleFormat where module='Stock_MaterialOut_Header'
if(select count(1) from System_ModuleFormat where module='Stock_MaterialOut_Header' and field='io_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Header' as module,'order_number' as field,
	'出库单号' as field_name,'出库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Header' as module,'new_date' as field,
	'出库日期' as field_name,'出库日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'iot_id' as field,
	'收发类型ID' as field_name,'收发类型ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Header' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'dep_id' as field,
	'领料车间ID' as field_name,'领料车间ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'dep_name' as field,
	'领料车间' as field_name,'领料车间' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'ele_id' as field,
	'员工ID' as field_name,'员工ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'ele_name' as field,
	'员工' as field_name,'员工' as title,
	98 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,250 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;
end
/**/GO

--插入材料出库单_编辑界面格式
--delete System_ModuleFormat where module='Stock_MaterialOut_Input'
if(select count(1) from System_ModuleFormat where module='Stock_MaterialOut_Input' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'ios_id' as field,
	'出库单子表ID' as field_name,'出库单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'io_id' as field,
	'出库单主表ID' as field_name,'出库单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,115 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,116 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,117 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,118 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	120 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_MaterialOut_Input' as module,'unit_price' as field,
	'本币无税单价' as field_name,'无税单价' as title,
	120 as width,205 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_MaterialOut_ViewPrice' as auth_view,
	'Stock_MaterialOut_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_MaterialOut_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	120 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_MaterialOut_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	120 as width,235 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_MaterialOut_ViewPrice' as auth_view,
	'Stock_MaterialOut_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_MaterialOut_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_MaterialOut_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO


--插入产成品入库单_主表界面格式
--delete System_ModuleFormat where module='Stock_ProductIn_Header'
if(select count(1) from System_ModuleFormat where module='Stock_ProductIn_Header' and field='io_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Header' as module,'order_number' as field,
	'入库单号' as field_name,'入库单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Header' as module,'new_date' as field,
	'入库日期' as field_name,'入库日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'iot_id' as field,
	'收发类型ID' as field_name,'收发类型ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Header' as module,'iot_name' as field,
	'收发类型' as field_name,'收发类型' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'ele_id' as field,
	'员工ID' as field_name,'员工ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'ele_name' as field,
	'员工' as field_name,'员工' as title,
	98 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,250 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;
end
/**/GO

--插入产成品入库单_编辑界面格式
--delete System_ModuleFormat where module='Stock_ProductIn_Input'
if(select count(1) from System_ModuleFormat where module='Stock_ProductIn_Input' and field='ios_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'io_id' as field,
	'入库单主表ID' as field_name,'入库单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,160 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,190 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	120 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,240 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_ProductIn_Input' as module,'unit_price' as field,
	'本币无税单价' as field_name,'无税单价' as title,
	120 as width,205 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_ProductIn_ViewPrice' as auth_view,
	'Stock_ProductIn_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_ProductIn_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	120 as width,250 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	120 as width,260 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	120 as width,270 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_ProductIn_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	120 as width,235 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_ProductIn_ViewPrice' as auth_view,
	'Stock_ProductIn_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_ProductIn_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	80 as width,3010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	80 as width,3020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	80 as width,3030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	80 as width,3040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	80 as width,3050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	80 as width,3110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	80 as width,3120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	80 as width,3130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	80 as width,3140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_ProductIn_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	80 as width,3150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO


--插入调拨单_主表界面格式
--delete System_ModuleFormat where module='Stock_Transfer_Header'
if(select count(1) from System_ModuleFormat where module='Stock_Transfer_Header' and field='ts_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'ts_id' as field,
	'调拨单主表ID' as field_name,'调拨单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'order_number' as field,
	'调拨单号' as field_name,'调拨单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'new_date' as field,
	'制单日期' as field_name,'制单日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'wh_id_out' as field,
	'转出仓库ID' as field_name,'转出仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'wh_name_out' as field,
	'转出仓库' as field_name,'转出仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'wh_id_in' as field,
	'转入仓库ID' as field_name,'转入仓库ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'wh_name_in' as field,
	'转入仓库' as field_name,'转入仓库' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'iot_id_out' as field,
	'出库类型ID' as field_name,'出库类型ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'iot_name_out' as field,
	'出库类型' as field_name,'出库类型' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'iot_id_in' as field,
	'入库类型ID' as field_name,'入库类型ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Header' as module,'iot_name_in' as field,
	'入库类型' as field_name,'入库类型' as title,
	98 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'dep_id_out' as field,
	'转出部门ID' as field_name,'转出部门ID' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'dep_name_out' as field,
	'转出部门' as field_name,'转出部门' as title,
	98 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'dep_id_in' as field,
	'转入部门ID' as field_name,'转入部门ID' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'dep_name_in' as field,
	'转入部门' as field_name,'转入部门' as title,
	98 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,320 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

end
/**/GO

--插入其它调拨单_编辑界面格式
--delete System_ModuleFormat where module='Stock_Transfer_Input'
if(select count(1) from System_ModuleFormat where module='Stock_Transfer_Input' and field='tss_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'tss_id' as field,
	'调拨单子表ID' as field_name,'调拨单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'ts_id' as field,
	'调拨单主表ID' as field_name,'调拨单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Input' as module,'oh_quantity_out' as field,
	'转出仓现存量' as field_name,'转出仓现存量' as title,
	80 as width,215 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'green' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_Transfer_Input' as module,'oh_quantity_in' as field,
	'转入仓现存量' as field_name,'转入仓现存量' as title,
	80 as width,215 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'green' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_Transfer_Input' as module,'unit_price' as field,
	'本币无税单价' as field_name,'无税单价' as title,
	120 as width,240 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Stock_Transfer_ViewPrice' as auth_view,
	'Stock_Transfer_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Stock_Transfer_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	120 as width,250 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Stock_Transfer_ViewPrice' as auth_view,
	'Stock_Transfer_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_Transfer_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	120 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	120 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	120 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	120 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	120 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	120 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	120 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	120 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_Transfer_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	120 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

end
/**/GO

--插入盘点单_主表界面格式
--delete System_ModuleFormat where module='Stock_StockCount_Header'
if(select count(1) from System_ModuleFormat where module='Stock_StockCount_Header' and field='sc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'sc_id' as field,
	'盘点单主表ID' as field_name,'盘点单主表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Header' as module,'order_number' as field,
	'盘点单号' as field_name,'盘点单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Header' as module,'new_date' as field,
	'盘点日期' as field_name,'盘点日期' as title,
	120 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'iot_id_in' as field,
	'入库类型ID' as field_name,'入库类型ID' as title,
	120 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Header' as module,'iot_name_in' as field,
	'入库类型' as field_name,'入库类型' as title,
	98 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'iot_id_out' as field,
	'出库类型ID' as field_name,'出库类型ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Header' as module,'iot_name_out' as field,
	'出库类型' as field_name,'出库类型' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'ele_id' as field,
	'经手人ID' as field_name,'经手人ID' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'ele_name' as field,
	'经手人' as field_name,'经手人' as title,
	98 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,300 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,320 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,330 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,340 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;
end
/**/GO


--插入盘点单_编辑界面格式
--delete System_ModuleFormat where module='Stock_StockCount_Input'
if(select count(1) from System_ModuleFormat where module='Stock_StockCount_Input' and field='scs_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'scs_id' as field,
	'盘点单子表ID' as field_name,'盘点单子表ID' as title,
	120 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'sc_id' as field,
	'盘点单主表ID' as field_name,'盘点单主表ID' as title,
	120 as width,110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,150 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'batch' as field,
	'批次' as field_name,'批次' as title,
	103 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'num_zm' as field,
	'账面件数' as field_name,'账面件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'num' as field,
	'盘点件数' as field_name,'盘点件数' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Input' as module,'quantity_zm' as field,
	'账面数量' as field_name,'账面数量' as title,
	60 as width,240 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,'green' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Stock_StockCount_Input' as module,'quantity' as field,
	'盘点数量' as field_name,'盘点数量' as title,
	60 as width,250 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,260 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	103 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	103 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	103 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	103 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	103 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	103 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	103 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	103 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Stock_StockCount_Input' as module,'d_ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	103 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_sdefine1' as field,
	'存货字符自定义项1' as field_name,'存货字符自定义项1' as title,
	120 as width,2010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_sdefine2' as field,
	'存货字符自定义项2' as field_name,'存货字符自定义项2' as title,
	120 as width,2020 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_sdefine3' as field,
	'存货字符自定义项3' as field_name,'存货字符自定义项3' as title,
	120 as width,2030 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_sdefine4' as field,
	'存货字符自定义项4' as field_name,'存货字符自定义项4' as title,
	120 as width,2040 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_sdefine5' as field,
	'存货字符自定义项5' as field_name,'存货字符自定义项5' as title,
	120 as width,2050 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_ndefine1' as field,
	'存货数值自定义项1' as field_name,'存货数值自定义项1' as title,
	120 as width,2110 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_ndefine2' as field,
	'存货数值自定义项2' as field_name,'存货数值自定义项2' as title,
	120 as width,2120 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_ndefine3' as field,
	'存货数值自定义项3' as field_name,'存货数值自定义项3' as title,
	120 as width,2130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_ndefine4' as field,
	'存货数值自定义项4' as field_name,'存货数值自定义项4' as title,
	120 as width,2140 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Stock_StockCount_Input' as module,'d_inv_ndefine5' as field,
	'存货数值自定义项5' as field_name,'存货数值自定义项5' as title,
	120 as width,2150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO
