--插入套餐_编辑界面格式
--delete System_ModuleFormat where module='Sale_GoodsCombos_Input'
if(select count(1) from System_ModuleFormat where module='Sale_GoodsCombos_Input' and field='gcs_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Sale_GoodsCombos_Input' as module,'gcs_id' as field,
	'套餐子表ID' as field_name,'套餐子表ID' as title,
	60 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 'Sale_GoodsCombos_Input' as module,'gc_id' as field,
	'套餐主表ID' as field_name,'套餐主表ID' as title,
	60 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)
	select 'Sale_GoodsCombos_Input' as module,'i_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 'Sale_GoodsCombos_Input' as module,'i_code' 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 'Sale_GoodsCombos_Input' as module,'i_name' 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 'Sale_GoodsCombos_Input' as module,'standard' 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 'Sale_GoodsCombos_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,161 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 'Sale_GoodsCombos_Input' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计单位' as title,
	60 as width,162 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 'Sale_GoodsCombos_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,170 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 'Sale_GoodsCombos_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,175 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 'Sale_GoodsCombos_Input' as module,'tax_unit_price' as field,
	'含税单价' as field_name,'含税单价' as title,
	60 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Sale_GoodsCombos_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 'Sale_GoodsCombos_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 'Sale_GoodsCombos_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,color)
	select 'Sale_GoodsCombos_Input' as module,'tax_total_price' 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,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 'Sale_GoodsCombos_Input' as module,'is_main' as field,
	'主商品' as field_name,'主商品' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Sale_GoodsCombos_Input' as module,'d_remark' as field,
	'产品备注' as field_name,'产品备注' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--插入套餐_编辑界面格式
--delete System_ModuleFormat where module='Sale_GoodsCombos_Input'
if(select count(1) from System_ModuleFormat where module='Sale_GoodsCombos_Input' and field='gcs_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Sale_GoodsCombos_Input' as module,'gcs_id' as field,
	'套餐子表ID' as field_name,'套餐子表ID' as title,
	60 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 'Sale_GoodsCombos_Input' as module,'gc_id' as field,
	'套餐主表ID' as field_name,'套餐主表ID' as title,
	60 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)
	select 'Sale_GoodsCombos_Input' as module,'i_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 'Sale_GoodsCombos_Input' as module,'i_code' 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 'Sale_GoodsCombos_Input' as module,'i_name' 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 'Sale_GoodsCombos_Input' as module,'standard' 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 'Sale_GoodsCombos_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 as width,161 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 'Sale_GoodsCombos_Input' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计单位' as title,
	60 as width,162 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 'Sale_GoodsCombos_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,170 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 'Sale_GoodsCombos_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,175 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 'Sale_GoodsCombos_Input' as module,'tax_unit_price' as field,
	'含税单价' as field_name,'含税单价' as title,
	60 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'' as auth_view,'' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Sale_GoodsCombos_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 'Sale_GoodsCombos_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 'Sale_GoodsCombos_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,color)
	select 'Sale_GoodsCombos_Input' as module,'tax_total_price' 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,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 'Sale_GoodsCombos_Input' as module,'is_main' as field,
	'主商品' as field_name,'主商品' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Sale_GoodsCombos_Input' as module,'d_remark' as field,
	'产品备注' as field_name,'产品备注' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO
