--delete System_ModuleFormat where module='Base_Department_List'
--插入部门_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_Department_List' and field='dep_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'dep_id' as field,
	'部门ID' as field_name,'部门ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'dep_code' as field,
	'部门编码' as field_name,'部门编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'dep_name' as field,
	'部门名称' as field_name,'部门名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'parent_name' as field,
	'上级部门' as field_name,'上级部门' as title,
	80 as width,210 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'is_workshop_name' as field,
	'是否车间' as field_name,'是否车间' as title,
	80 as width,300 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Department_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入部门_录入界面格式
--delete System_ModuleFormat where module='Base_Department_Input'
if(select count(1) from System_ModuleFormat where module='Base_Department_Input' and field='dep_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Department_Input' as module,'dep_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 'Base_Department_Input' as module,'dep_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Department_Input' as module,'dep_name' as field,
	'部门名称' as field_name,'部门名称' as title,
	120 as width,120 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 'Base_Department_Input' as module,'parent_id' as field,
	'上级部门id' 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_select,can_edit)
	select 'Base_Department_Input' as module,'parent_name' as field,
	'上级部门名称' as field_name,'上级部门' as title,
	103 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Department_Input' as module,'is_workshop' as field,
	'是否车间' as field_name,'是否车间' as title,
	120 as width,300 as sort,0 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 'Base_Department_Input' as module,'is_stop' as field,
	'停用' as field_name,'停用' as title,
	120 as width,310 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 'Base_Department_Input' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_Department_Input' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_Department_Input' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_Department_Input' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_Department_Input' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_Department_Input' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_Department_Input' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_Department_Input' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_Department_Input' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_Department_Input' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--插入部门_录入界面格式
if(select count(1) from System_ModuleFormat where module='Base_Department_Input' and field='dep_wh_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Department_Input' as module,'dep_wh_id' as field,
	'部门仓库id' as field_name,'部门仓库id' 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,can_select)
	select 'Base_Department_Input' as module,'dep_wh_name' as field,
	'部门仓库' as field_name,'部门仓库' as title,
	98 as width,330 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;
end
/**/GO


if(select count(1) from System_ModuleFormat where module='Base_Department_List' and field='dep_wh_name')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Base_Department_List' as module,'dep_wh_name' as field,
	'部门仓库' as field_name,'部门仓库' as title,
	80 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;
end
/**/GO

--delete System_ModuleFormat where module='Base_Warehouse_List'
--插入仓库_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_Warehouse_List' and field='wh_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Warehouse_List' as module,'wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Warehouse_List' as module,'wh_code' as field,
	'仓库编码' as field_name,'仓库编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Warehouse_List' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入仓库_录入界面格式
--delete System_ModuleFormat where module='Base_Warehouse_Input'
if(select count(1) from System_ModuleFormat where module='Base_Warehouse_Input' and field='wh_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Warehouse_Input' as module,'wh_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 'Base_Warehouse_Input' as module,'wh_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Warehouse_Input' as module,'wh_name' as field,
	'仓库名称' as field_name,'仓库名称' as title,
	120 as width,120 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 'Base_Warehouse_Input' as module,'is_control_stock' as field,
	'禁止负库存' as field_name,'禁止负库存' as title,
	120 as width,300 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 'Base_Warehouse_Input' as module,'is_stop' as field,
	'停用' as field_name,'停用' as title,
	120 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

--插入员工_列表界面格式
--delete System_ModuleFormat where module='Base_Employee_List'
if(select count(1) from System_ModuleFormat where module='Base_Employee_List' and field='ele_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ele_id' as field,
	'员工ID' as field_name,'员工ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ele_code' as field,
	'员工编码' as field_name,'员工编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ele_name' as field,
	'员工名称' as field_name,'员工名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'dep_name' as field,
	'所属部门' as field_name,'所属部门' as title,
	80 as width,130 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'username' as field,
	'登陆用户' as field_name,'登陆用户' as title,
	80 as width,135 as sort,1 as show,0 as hidden,0 as sum_field;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'entry_date' as field,
	'入职日期' as field_name,'入职日期' as title,
	80 as width,140 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'exit_date' as field,
	'离职日期' as field_name,'离职日期' as title,
	80 as width,141 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'position' as field,
	'职务' as field_name,'职务' as title,
	80 as width,150 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'birthday' as field,
	'出生年月' as field_name,'出生年月' as title,
	80 as width,160 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sex_name' as field,
	'性别' as field_name,'性别' as title,
	80 as width,170 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'native_place' as field,
	'籍贯' as field_name,'籍贯' as title,
	80 as width,180 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'degree' as field,
	'学历' as field_name,'学历' as title,
	80 as width,190 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'id_card_no' as field,
	'身份证' as field_name,'身份证' as title,
	80 as width,200 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'office_phone' as field,
	'办公电话' as field_name,'办公电话' as title,
	80 as width,210 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	80 as width,220 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'home_phone' as field,
	'家庭电话' as field_name,'家庭电话' as title,
	80 as width,230 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'Email' as field,
	'email' as field_name,'email' as title,
	80 as width,240 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'qq' as field,
	'qq' as field_name,'QQ' as title,
	80 as width,250 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'address' as field,
	'address' as field_name,'地址' as title,
	80 as width,260 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field;
end
/**/GO
--员工列表增加部门编码
--delete System_ModuleFormat where module='Base_Employee_List'
if(select count(1) from System_ModuleFormat where module='Base_Employee_List' and field='dep_code')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_List' as module,'dep_code' as field,
	'部门编码' as field_name,'部门编码' as title,
	50 as width,128 as sort,0 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入员工_录入界面格式
--delete System_ModuleFormat where module='Base_Employee_Input'
if(select count(1) from System_ModuleFormat where module='Base_Employee_Input' and field='ele_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'ele_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 'Base_Employee_Input' as module,'ele_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'ele_name' as field,
	'员工名称' as field_name,'员工名称' as title,
	120 as width,120 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 'Base_Employee_Input' as module,'dep_id' as field,
	'所属部门ID' as field_name,'所属部门ID' as title,
	120 as width,121 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 'Base_Employee_Input' as module,'dep_name' as field,
	'所属部门' as field_name,'所属部门' as title,
	103 as width,130 as sort,1 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 'Base_Employee_Input' as module,'uid' as field,
	'登陆用户ID' as field_name,'登陆用户ID' as title,
	120 as width,134 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 'Base_Employee_Input' as module,'username' as field,
	'登陆用户' as field_name,'登陆用户' as title,
	98 as width,135 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'entry_date' as field,
	'入职日期' as field_name,'入职日期' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'exit_date' as field,
	'离职日期' as field_name,'离职日期' as title,
	120 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'position' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'birthday' as field,
	'出生年月' as field_name,'出生年月' as title,
	120 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'sex' as field,
	'性别' as field_name,'性别' as title,
	120 as width,170 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 'Base_Employee_Input' as module,'native_place' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'degree' as field,
	'学历' as field_name,'学历' as title,
	120 as width,190 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 'Base_Employee_Input' as module,'id_card_no' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'office_phone' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Employee_Input' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	120 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 'Base_Employee_Input' as module,'home_phone' as field,
	'家庭电话' as field_name,'家庭电话' as title,
	120 as width,230 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 'Base_Employee_Input' as module,'email' as field,
	'email' as field_name,'Email' 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)
	select 'Base_Employee_Input' as module,'qq' as field,
	'qq' as field_name,'QQ' 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)
	select 'Base_Employee_Input' as module,'address' as field,
	'address' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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 'Base_Employee_Input' 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='Base_Employee_Input'
if(select count(1) from System_ModuleFormat where module='Base_Employee_Input' and field='kl')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Base_Employee_Input' as module,'kl' as field,
	'折扣率' as field_name,'折扣率' as title,
	120 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Base_Employee_List' as module,'kl' as field,
	'折扣率' as field_name,'折扣率' as title,
	80 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;
end
/**/GO

--插入下级_列表界面格式
--delete System_ModuleFormat where module='Base_Employee_Child_List'
if(select count(1) from System_ModuleFormat where module='Base_Employee_Child_List' and field='ec_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_Child_List' as module,'ec_id' as field,
	'主键ID' as field_name,'主键ID' as title,
	50 as width,50 as sort,0 as show,0 as hidden,0 as sum_field;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_Child_List' as module,'child_ele_id' as field,
	'下级ID' as field_name,'下级ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_Child_List' as module,'child_ele_code' as field,
	'下级员工编码' as field_name,'下级员工编码' as title,
	100 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_Child_List' as module,'child_ele_name' as field,
	'下级员工名称' as field_name,'下级员工名称' as title,
	100 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Employee_Child_List' as module,'child_dep_name' as field,
	'所属部门' as field_name,'所属部门' as title,
	100 as width,130 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO


--插入存货分类_录入界面格式
--delete System_ModuleFormat where module='Base_InventoryClass_Input'
if(select count(1) from System_ModuleFormat where module='Base_InventoryClass_Input' and field='ic_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_InventoryClass_Input' as module,'ic_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 'Base_InventoryClass_Input' as module,'ic_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_InventoryClass_Input' as module,'ic_name' as field,
	'分类名称' as field_name,'分类名称' as title,
	120 as width,120 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 'Base_InventoryClass_Input' as module,'parent_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_select,can_edit)
	select 'Base_InventoryClass_Input' as module,'parent_name' as field,
	'上级分类名称' as field_name,'上级分类' as title,
	103 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;
end
/**/GO

--插入客户分类_录入界面格式
--delete System_ModuleFormat where module='Base_CustomerClass_Input'
if(select count(1) from System_ModuleFormat where module='Base_CustomerClass_Input' and field='cc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CustomerClass_Input' as module,'cc_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 'Base_CustomerClass_Input' as module,'cc_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CustomerClass_Input' as module,'cc_name' as field,
	'分类名称' as field_name,'分类名称' as title,
	120 as width,120 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 'Base_CustomerClass_Input' as module,'parent_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_select,can_edit)
	select 'Base_CustomerClass_Input' as module,'parent_name' as field,
	'上级分类名称' as field_name,'上级分类' as title,
	103 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;
end
/**/GO

--插入客户_列表界面格式
--delete System_ModuleFormat where module='Base_Customer_List'
if(select count(1) from System_ModuleFormat where module='Base_Customer_List' and field='cus_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'cus_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 'Base_Customer_List' as module,'cus_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	120 as width,120 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 'Base_Customer_List' as module,'cus_full_name' as field,
	'客户全称' as field_name,'客户全称' as title,
	120 as width,130 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 'Base_Customer_List' as module,'cc_name' as field,
	'所属分类' as field_name,'所属分类' as title,
	103 as width,150 as sort,1 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 'Base_Customer_List' as module,'is_stop_name' as field,
	'是否停用' as field_name,'是否停用' as title,
	60 as width,160 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,can_select)
	select 'Base_Customer_List' as module,'ele_name' as field,
	'专管业务员' as field_name,'专管业务员' as title,
	98 as width,166 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'address' as field,
	'公司地址' as field_name,'公司地址' as title,
	120 as width,170 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 'Base_Customer_List' as module,'ship_address' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'contact' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'legal_person' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'phone' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	120 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 'Base_Customer_List' as module,'fax' as field,
	'传真' as field_name,'传真' as title,
	120 as width,230 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 'Base_Customer_List' as module,'email' as field,
	'email' as field_name,'Email' 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)
	select 'Base_Customer_List' as module,'qq' as field,
	'qq' as field_name,'QQ号' 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)
	select 'Base_Customer_List' as module,'bank_of_deposit' 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)
	select 'Base_Customer_List' as module,'banking_account' as field,
	'银号账号' as field_name,'银号账号' as title,
	120 as width,270 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 'Base_Customer_List' as module,'uid' as field,
	'所属登录用户ID' as field_name,'所属登录用户ID' as title,
	98 as width,166 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_Customer_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_Customer_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_Customer_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_Customer_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_Customer_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_Customer_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_Customer_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_Customer_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_Customer_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--插入客户_录入界面格式
--delete System_ModuleFormat where module='Base_Customer_Input'
if(select count(1) from System_ModuleFormat where module='Base_Customer_Input' and field='cus_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'cus_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 'Base_Customer_Input' as module,'cus_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	120 as width,120 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 'Base_Customer_Input' as module,'cus_full_name' as field,
	'客户全称' as field_name,'客户全称' as title,
	120 as width,130 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 'Base_Customer_Input' as module,'cc_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,can_select)
	select 'Base_Customer_Input' as module,'cc_name' as field,
	'所属分类' as field_name,'所属分类' as title,
	103 as width,150 as sort,1 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 'Base_Customer_Input' as module,'is_stop' as field,
	'是否停用' as field_name,'是否停用' as title,
	120 as width,160 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 'Base_Customer_Input' as module,'ele_id' as field,
	'专管业务员ID' as field_name,'专管业务员ID' as title,
	120 as width,165 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 'Base_Customer_Input' as module,'ele_name' as field,
	'专管业务员' as field_name,'专管业务员' as title,
	98 as width,166 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'address' as field,
	'公司地址' as field_name,'公司地址' as title,
	120 as width,170 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 'Base_Customer_Input' as module,'ship_address' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'contact' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'legal_person' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'phone' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_Input' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	120 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 'Base_Customer_Input' as module,'fax' as field,
	'传真' as field_name,'传真' as title,
	120 as width,230 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 'Base_Customer_Input' as module,'email' as field,
	'email' as field_name,'Email' 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)
	select 'Base_Customer_Input' as module,'qq' as field,
	'qq' as field_name,'QQ号' 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)
	select 'Base_Customer_Input' as module,'bank_of_deposit' 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)
	select 'Base_Customer_Input' as module,'banking_account' as field,
	'银号账号' as field_name,'银号账号' as title,
	120 as width,270 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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 'Base_Customer_Input' 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

--插入客户_界面格式
if(select count(1) from System_ModuleFormat where module='Base_Customer_Input' and field='bao_bei')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_List' as module,'bao_bei_name' as field,
	'只作报备' as field_name,'只作报备' as title,
	50 as width,155 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 'Base_Customer_Input' as module,'bao_bei' as field,
	'只作报备' as field_name,'只作报备' as title,
	120 as width,155 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

--插入供应商分类_录入界面格式
--delete System_ModuleFormat where module='Base_VendorClass_Input'
if(select count(1) from System_ModuleFormat where module='Base_VendorClass_Input' and field='vc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_VendorClass_Input' as module,'vc_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 'Base_VendorClass_Input' as module,'vc_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_VendorClass_Input' as module,'vc_name' as field,
	'分类名称' as field_name,'分类名称' as title,
	120 as width,120 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 'Base_VendorClass_Input' as module,'parent_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_select,can_edit)
	select 'Base_VendorClass_Input' as module,'parent_name' as field,
	'上级分类名称' as field_name,'上级分类' as title,
	103 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;
end
/**/GO

--插入供应商_列表界面格式
--delete System_ModuleFormat where module='Base_Vendor_List'
if(select count(1) from System_ModuleFormat where module='Base_Vendor_List' and field='vd_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'vd_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 'Base_Vendor_List' as module,'vd_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	120 as width,120 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 'Base_Vendor_List' as module,'vd_full_name' as field,
	'供应商全称' as field_name,'供应商全称' as title,
	120 as width,130 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 'Base_Vendor_List' as module,'vc_name' as field,
	'所属分类' as field_name,'所属分类' as title,
	103 as width,150 as sort,1 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 'Base_Vendor_List' as module,'is_stop_name' as field,
	'是否停用' as field_name,'是否停用' as title,
	60 as width,160 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,can_select)
	select 'Base_Vendor_List' as module,'ele_name' as field,
	'专管业务员' as field_name,'专管业务员' as title,
	98 as width,166 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'address' as field,
	'公司地址' as field_name,'公司地址' as title,
	120 as width,170 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 'Base_Vendor_List' as module,'arrive_address' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'contact' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'legal_person' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'phone' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_List' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	120 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 'Base_Vendor_List' as module,'fax' as field,
	'传真' as field_name,'传真' as title,
	120 as width,230 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 'Base_Vendor_List' as module,'email' as field,
	'email' as field_name,'Email' 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)
	select 'Base_Vendor_List' as module,'qq' as field,
	'qq' as field_name,'QQ号' 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)
	select 'Base_Vendor_List' as module,'bank_of_deposit' 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)
	select 'Base_Vendor_List' as module,'banking_account' as field,
	'银号账号' as field_name,'银号账号' as title,
	120 as width,270 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 'Base_Vendor_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_Vendor_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_Vendor_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_Vendor_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_Vendor_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_Vendor_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_Vendor_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_Vendor_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_Vendor_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_Vendor_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--插入供应商_录入界面格式
--delete System_ModuleFormat where module='Base_Vendor_Input'
if(select count(1) from System_ModuleFormat where module='Base_Vendor_Input' and field='vd_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'vd_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 'Base_Vendor_Input' as module,'vd_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	120 as width,120 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 'Base_Vendor_Input' as module,'vd_full_name' as field,
	'供应商全称' as field_name,'供应商全称' as title,
	120 as width,130 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 'Base_Vendor_Input' as module,'vc_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,can_select)
	select 'Base_Vendor_Input' as module,'vc_name' as field,
	'所属分类' as field_name,'所属分类' as title,
	103 as width,150 as sort,1 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 'Base_Vendor_Input' as module,'is_stop' as field,
	'是否停用' as field_name,'是否停用' as title,
	120 as width,160 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 'Base_Vendor_Input' as module,'ele_id' as field,
	'专管业务员ID' as field_name,'专管业务员ID' as title,
	120 as width,165 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 'Base_Vendor_Input' as module,'ele_name' as field,
	'专管业务员' as field_name,'专管业务员' as title,
	98 as width,166 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'address' as field,
	'公司地址' as field_name,'公司地址' as title,
	120 as width,170 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 'Base_Vendor_Input' as module,'arrive_address' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'contact' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'legal_person' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'phone' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Vendor_Input' as module,'cellphone' as field,
	'手机' as field_name,'手机' as title,
	120 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 'Base_Vendor_Input' as module,'fax' as field,
	'传真' as field_name,'传真' as title,
	120 as width,230 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 'Base_Vendor_Input' as module,'email' as field,
	'email' as field_name,'Email' 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)
	select 'Base_Vendor_Input' as module,'qq' as field,
	'qq' as field_name,'QQ号' 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)
	select 'Base_Vendor_Input' as module,'bank_of_deposit' 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)
	select 'Base_Vendor_Input' as module,'banking_account' as field,
	'银号账号' as field_name,'银号账号' as title,
	120 as width,270 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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 'Base_Vendor_Input' 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='Base_SaleType_List'
--插入销售类型_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_SaleType_List' and field='st_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SaleType_List' as module,'st_id' as field,
	'销售类型ID' as field_name,'销售类型ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SaleType_List' as module,'st_code' as field,
	'销售类型编码' as field_name,'销售类型编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SaleType_List' as module,'st_name' as field,
	'销售类型名称' as field_name,'销售类型名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SaleType_List' as module,'is_default_name' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入销售类型_录入界面格式
--delete System_ModuleFormat where module='Base_SaleType_Input'
if(select count(1) from System_ModuleFormat where module='Base_SaleType_Input' and field='st_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_SaleType_Input' as module,'st_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 'Base_SaleType_Input' as module,'st_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_SaleType_Input' as module,'st_name' as field,
	'销售类型名称' as field_name,'销售类型名称' as title,
	120 as width,120 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 'Base_SaleType_Input' as module,'is_default' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

--delete System_ModuleFormat where module='Base_PurchaseType_List'
--插入采购类型_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_PurchaseType_List' and field='pt_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_PurchaseType_List' as module,'pt_id' as field,
	'采购类型ID' as field_name,'采购类型ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_PurchaseType_List' as module,'pt_code' as field,
	'采购类型编码' as field_name,'采购类型编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_PurchaseType_List' as module,'pt_name' as field,
	'采购类型名称' as field_name,'采购类型名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_PurchaseType_List' as module,'is_default_name' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入采购类型_录入界面格式
--delete System_ModuleFormat where module='Base_PurchaseType_Input'
if(select count(1) from System_ModuleFormat where module='Base_PurchaseType_Input' and field='pt_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_PurchaseType_Input' as module,'pt_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 'Base_PurchaseType_Input' as module,'pt_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_PurchaseType_Input' as module,'pt_name' as field,
	'采购类型名称' as field_name,'采购类型名称' as title,
	120 as width,120 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 'Base_PurchaseType_Input' as module,'is_default' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

--插入收发类型_录入界面格式
--delete System_ModuleFormat where module='Base_IOType_Input'
if(select count(1) from System_ModuleFormat where module='Base_IOType_Input' and field='iot_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_IOType_Input' as module,'iot_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 'Base_IOType_Input' as module,'iot_flag' as field,
	'收发标志' as field_name,'收发标志' as title,
	120 as width,120 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 'Base_IOType_Input' as module,'iot_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_IOType_Input' as module,'iot_name' as field,
	'类型名称' as field_name,'类型名称' as title,
	120 as width,120 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 'Base_IOType_Input' as module,'parent_id' as field,
	'上级类型id' 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_select,can_edit)
	select 'Base_IOType_Input' as module,'parent_name' as field,
	'上级类型名称' as field_name,'上级类型' as title,
	103 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;
end
/**/GO

--插入收发类型_列表界面格式
--delete System_ModuleFormat where module='Base_IOType_List'
if(select count(1) from System_ModuleFormat where module='Base_IOType_List' and field='iot_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_IOType_List' as module,'iot_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 'Base_IOType_List' as module,'iot_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_IOType_List' as module,'iot_name' as field,
	'类型名称' as field_name,'类型名称' as title,
	120 as width,120 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 'Base_IOType_List' as module,'parent_id' as field,
	'上级类型id' 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_select,can_edit)
	select 'Base_IOType_List' as module,'parent_name' as field,
	'上级类型名称' as field_name,'上级类型' as title,
	103 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_select,can_edit)
	select 'Base_IOType_List' as module,'iot_flag_name' as field,
	'收发标志' as field_name,'收发标志' as title,
	103 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;
end
/**/GO

--delete System_ModuleFormat where module='Base_SettleStyle_List'
--插入结算方式_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_SettleStyle_List' and field='ss_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SettleStyle_List' as module,'ss_id' as field,
	'结算方式ID' as field_name,'结算方式ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SettleStyle_List' as module,'ss_code' as field,
	'结算方式编码' as field_name,'结算方式编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SettleStyle_List' as module,'ss_name' as field,
	'结算方式名称' as field_name,'结算方式名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_SettleStyle_List' as module,'is_default_name' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入结算方式_录入界面格式
--delete System_ModuleFormat where module='Base_SettleStyle_Input'
if(select count(1) from System_ModuleFormat where module='Base_SettleStyle_Input' and field='ss_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_SettleStyle_Input' as module,'ss_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 'Base_SettleStyle_Input' as module,'ss_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_SettleStyle_Input' as module,'ss_name' as field,
	'结算方式名称' as field_name,'结算方式名称' as title,
	120 as width,120 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 'Base_SettleStyle_Input' as module,'is_default' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO
--插入币种_录入界面格式
--delete System_ModuleFormat where module='Base_Currency_Input'
if(select count(1) from System_ModuleFormat where module='Base_Currency_Input' and field='crc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Currency_Input' as module,'crc_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 'Base_Currency_Input' as module,'crc_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Currency_Input' as module,'crc_name' as field,
	'币种名称' as field_name,'币种名称' as title,
	120 as width,120 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 'Base_Currency_Input' as module,'is_standard' as field,
	'是否本位币' as field_name,'是否本位币' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,0 as can_edit;
end
/**/GO

--插入币种_列表界面格式
--delete System_ModuleFormat where module='Base_Currency_List'
if(select count(1) from System_ModuleFormat where module='Base_Currency_List' and field='crc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Currency_List' as module,'crc_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 'Base_Currency_List' as module,'crc_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Currency_List' as module,'crc_name' as field,
	'币种名称' as field_name,'币种名称' as title,
	120 as width,120 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 'Base_Currency_List' as module,'is_standard_name' as field,
	'是否本位币' as field_name,'是否本位币' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,0 as can_edit;
end
/**/GO

--插入汇率_列表界面格式
--delete System_ModuleFormat where module='Base_CurrencyRate_List'
if(select count(1) from System_ModuleFormat where module='Base_CurrencyRate_List' and field='crc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CurrencyRate_List' as module,'rate_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 'Base_CurrencyRate_List' as module,'crc_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 'Base_CurrencyRate_List' as module,'crc_year' as field,
	'年份' as field_name,'年份' as title,
	120 as width,120 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 'Base_CurrencyRate_List' as module,'crc_month' as field,
	'月份' as field_name,'月份' as title,
	120 as width,130 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 'Base_CurrencyRate_List' as module,'exchange_rate' 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,1 as can_edit;
end
/**/GO

--插入汇率_录入界面格式
--delete System_ModuleFormat where module='Base_CurrencyRate_Input'
if(select count(1) from System_ModuleFormat where module='Base_CurrencyRate_Input' and field='crc_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CurrencyRate_Input' as module,'rate_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 'Base_CurrencyRate_Input' as module,'crc_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 'Base_CurrencyRate_Input' as module,'crc_year' as field,
	'年份' as field_name,'年份' as title,
	120 as width,120 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 'Base_CurrencyRate_Input' as module,'crc_month' as field,
	'月份' as field_name,'月份' as title,
	120 as width,130 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 'Base_CurrencyRate_Input' as module,'exchange_rate' 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,1 as can_edit;
end
/**/GO

--插入存货_录入界面格式
--delete System_ModuleFormat where module='Base_Inventory_Input'
if(select count(1) from System_ModuleFormat where module='Base_Inventory_Input' and field='i_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_Input' as module,'i_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 'Base_Inventory_Input' as module,'i_code' 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 'Base_Inventory_Input' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,120 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 'Base_Inventory_Input' as module,'ic_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,can_select,color)
	select 'Base_Inventory_Input' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	103 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color,can_select)
	select 'Base_Inventory_Input' as module,'munit' as field,
	'主计量单位' as field_name,'主计量单位' as title,
	103 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,1 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Base_Inventory_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' 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)
	select 'Base_Inventory_Input' as module,'convert_rate' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_Input' as module,'vd_id' as field,
	'默认供应商id' as field_name,'默认供应商id' as title,
	120 as width,180 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 'Base_Inventory_Input' as module,'vd_name' as field,
	'默认供应商' as field_name,'默认供应商' as title,
	98 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_Input' as module,'wh_id' as field,
	'默认仓库id' as field_name,'默认仓库id' as title,
	120 as width,200 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 'Base_Inventory_Input' as module,'wh_name' as field,
	'默认仓库' as field_name,'默认仓库' as title,
	98 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_Input' as module,'on_free1' as field,
	'启用自由项1' as field_name,'启用自由项1' as title,
	120 as width,230 as sort,0 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 'Base_Inventory_Input' as module,'on_free2' as field,
	'启用自由项2' as field_name,'启用自由项2' as title,
	120 as width,240 as sort,0 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 'Base_Inventory_Input' as module,'on_batch' as field,
	'启用批次控制' as field_name,'启用批次控制' as title,
	120 as width,250 as sort,0 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 'Base_Inventory_Input' as module,'valuation' as field,
	'计价方式' as field_name,'计价方式' as title,
	120 as width,270 as sort,0 as show,1 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,auth_view,auth_edit)
	select 'Base_Inventory_Input' as module,'new_tax_unit_price' 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,
	'Base_Inventory_List_ViewPrice' as auth_view,
	'Base_Inventory_List_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 'Base_Inventory_Input' as module,'new_nat_unit_price' as field,
	'采购成本' as field_name,'采购成本' as title,
	120 as width,290 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Base_Inventory_List_ViewPrice' as auth_view,
	'Base_Inventory_List_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_Input' as module,'is_sale' as field,
	'是否销售' as field_name,'是否销售' as title,
	120 as width,300 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 'Base_Inventory_Input' as module,'is_purchase' as field,
	'是否外购' as field_name,'是否外购' as title,
	120 as width,310 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 'Base_Inventory_Input' as module,'is_service' as field,
	'是否劳务费' as field_name,'是否劳务费' as title,
	120 as width,315 as sort,0 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 'Base_Inventory_Input' as module,'is_self' as field,
	'是否自制' as field_name,'是否自制' as title,
	120 as width,320 as sort,0 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 'Base_Inventory_Input' as module,'is_outsource' as field,
	'是否委外' as field_name,'是否委外' as title,
	120 as width,330 as sort,0 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 'Base_Inventory_Input' as module,'safety_stock' as field,
	'安全库存' as field_name,'安全库存' as title,
	120 as width,340 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 'Base_Inventory_Input' as module,'min_stock' as field,
	'最低库存' as field_name,'最低库存' as title,
	120 as width,350 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 'Base_Inventory_Input' as module,'max_stock' as field,
	'最高库存' as field_name,'最高库存' as title,
	120 as width,370 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 'Base_Inventory_Input' as module,'purchase_batch' as field,
	'采购批量' as field_name,'采购批量' as title,
	120 as width,380 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 'Base_Inventory_Input' as module,'add_date' as field,
	'建档日期' as field_name,'建档日期' as title,
	120 as width,500 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 'Base_Inventory_Input' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	120 as width,510 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 'Base_Inventory_Input' as module,'updater_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,520 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 'Base_Inventory_Input' as module,'stop_date' as field,
	'停用日期' as field_name,'停用日期' as title,
	120 as width,530 as sort,1 as show,0 as hidden,0 as sum_field,'date' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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 'Base_Inventory_Input' 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='Base_Inventory_List'
if(select count(1) from System_ModuleFormat where module='Base_Inventory_List' and field='i_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'i_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 'Base_Inventory_List' as module,'i_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	120 as width,120 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 'Base_Inventory_List' as module,'ic_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,can_select)
	select 'Base_Inventory_List' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	103 as width,140 as sort,1 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 'Base_Inventory_List' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'munit' as field,
	'主计量单位' as field_name,'主计量单位' as title,
	80 as width,160 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 'Base_Inventory_List' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	80 as width,170 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 'Base_Inventory_List' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	80 as width,170 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 'Base_Inventory_List' as module,'on_free1_name' as field,
	'启用自由项1' as field_name,'启用自由项1' as title,
	80 as width,190 as sort,0 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 'Base_Inventory_List' as module,'on_free2_name' as field,
	'启用自由项2' as field_name,'启用自由项2' as title,
	80 as width,200 as sort,0 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 'Base_Inventory_List' as module,'on_batch_name' as field,
	'启用批次控制' as field_name,'启用批次控制' as title,
	80 as width,210 as sort,0 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 'Base_Inventory_List' as module,'is_sale_name' as field,
	'是否销售' as field_name,'是否销售' as title,
	60 as width,220 as sort,0 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 'Base_Inventory_List' as module,'is_purchase_name' as field,
	'是否外购' as field_name,'是否外购' as title,
	60 as width,230 as sort,0 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 'Base_Inventory_List' as module,'is_service_name' as field,
	'是否劳务费' as field_name,'是否劳务费' as title,
	60 as width,235 as sort,0 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 'Base_Inventory_List' as module,'is_self_name' as field,
	'是否自制' as field_name,'是否自制' as title,
	60 as width,240 as sort,0 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 'Base_Inventory_List' as module,'is_outsource_name' as field,
	'是否委外' as field_name,'是否委外' as title,
	60 as width,250 as sort,0 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 'Base_Inventory_List' as module,'vd_id' as field,
	'默认供应商id' as field_name,'默认供应商id' as title,
	80 as width,260 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 'Base_Inventory_List' as module,'vd_name' as field,
	'默认供应商' as field_name,'默认供应商' as title,
	80 as width,270 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 'Base_Inventory_List' as module,'wh_id' as field,
	'默认仓库id' as field_name,'默认仓库id' as title,
	80 as width,280 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 'Base_Inventory_List' as module,'wh_name' as field,
	'默认仓库' as field_name,'默认仓库' as title,
	80 as width,290 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 'Base_Inventory_List' as module,'safety_stock' as field,
	'安全库存' as field_name,'安全库存' as title,
	80 as width,300 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 'Base_Inventory_List' as module,'min_stock' 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,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'max_stock' as field,
	'最高库存' as field_name,'最高库存' as title,
	80 as width,320 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 'Base_Inventory_List' as module,'purchase_batch' as field,
	'采购批量' as field_name,'采购批量' as title,
	80 as width,330 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 'Base_Inventory_List' as module,'vm_name' as field,
	'计价方式' as field_name,'计价方式' as title,
	80 as width,400 as sort,0 as show,1 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,auth_view)
	select 'Base_Inventory_List' as module,'new_tax_unit_price' as field,
	'销售报价' as field_name,'销售报价' as title,
	80 as width,410 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Base_Inventory_List_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view)
	select 'Base_Inventory_List' as module,'new_nat_unit_price' as field,
	'采购成本' as field_name,'采购成本' as title,
	80 as width,420 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Base_Inventory_List_ViewPrice' as auth_view;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'add_date' as field,
	'建档日期' as field_name,'建档日期' as title,
	80 as width,500 as sort,0 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'update_date' as field,
	'修改日期' as field_name,'修改日期' as title,
	80 as width,510 as sort,0 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'stop_date' as field,
	'停用日期' as field_name,'停用日期' as title,
	80 as width,520 as sort,0 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Inventory_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_Inventory_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_Inventory_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_Inventory_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_Inventory_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_Inventory_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_Inventory_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_Inventory_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_Inventory_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_Inventory_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
/**/GO

--delete System_ModuleFormat where module='Base_Cost_List'
--插入费用_列表界面格式
/*
if(select count(1) from System_ModuleFormat where module='Base_Cost_List' and field='cst_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'cst_id' as field,
	'费用ID' as field_name,'费用ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'cst_code' as field,
	'费用编码' as field_name,'费用编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'cst_name' as field,
	'费用名称' as field_name,'费用名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'parent_name' as field,
	'上级费用' as field_name,'上级费用' as title,
	80 as width,210 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	80 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	80 as width,1020 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	80 as width,1030 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	80 as width,1040 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	80 as width,1050 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	80 as width,1110 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	80 as width,1120 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	80 as width,1130 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	80 as width,1140 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_Cost_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	80 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field;
end
*/
/**/GO

--插入费用_录入界面格式
--delete System_ModuleFormat where module='Base_Cost_Input'
/*
if(select count(1) from System_ModuleFormat where module='Base_Cost_Input' and field='cst_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Cost_Input' as module,'cst_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 'Base_Cost_Input' as module,'cst_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Cost_Input' as module,'cst_name' as field,
	'费用名称' as field_name,'费用名称' as title,
	120 as width,120 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 'Base_Cost_Input' as module,'parent_id' as field,
	'上级费用id' 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_select,can_edit)
	select 'Base_Cost_Input' as module,'parent_name' as field,
	'上级费用名称' as field_name,'上级费用' as title,
	103 as width,210 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,1 as can_edit;

  insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Cost_Input' as module,'is_stop' as field,
	'停用' as field_name,'停用' as title,
	120 as width,310 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 'Base_Cost_Input' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_Cost_Input' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_Cost_Input' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_Cost_Input' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_Cost_Input' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_Cost_Input' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_Cost_Input' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_Cost_Input' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_Cost_Input' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_Cost_Input' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
end
*/
/**/GO

--delete System_ModuleFormat where module='Base_ShipWay_List'
--插入运输方式_列表界面格式
if(select count(1) from System_ModuleFormat where module='Base_ShipWay_List' and field='sw_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_ShipWay_List' as module,'sw_id' as field,
	'运输方式ID' as field_name,'运输方式ID' as title,
	50 as width,100 as sort,0 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_ShipWay_List' as module,'sw_code' as field,
	'运输方式编码' as field_name,'运输方式编码' as title,
	80 as width,110 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_ShipWay_List' as module,'sw_name' as field,
	'运输方式名称' as field_name,'运输方式名称' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field)
	select 'Base_ShipWay_List' as module,'is_default_name' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	80 as width,120 as sort,1 as show,0 as hidden,0 as sum_field;
end
/**/GO

--插入运输方式_录入界面格式
--delete System_ModuleFormat where module='Base_ShipWay_Input'
if(select count(1) from System_ModuleFormat where module='Base_ShipWay_Input' and field='sw_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_ShipWay_Input' as module,'sw_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 'Base_ShipWay_Input' as module,'sw_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_ShipWay_Input' as module,'sw_name' as field,
	'运输方式名称' as field_name,'运输方式名称' as title,
	120 as width,120 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 'Base_ShipWay_Input' as module,'is_default' as field,
	'是否默认值' as field_name,'是否默认值' as title,
	120 as width,130 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

/*
--插入其它物料清单_主表界面格式
--delete System_ModuleFormat where module='Base_BOM_Header'
if(select count(1) from System_ModuleFormat where module='Base_BOM_Header' and field='bo_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_Header' as module,'bo_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 'Base_BOM_Header' as module,'new_date' as field,
	'编制日期' as field_name,'编制日期' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_Header' as module,'p_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)
	select 'Base_BOM_Header' as module,'p_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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_Header' as module,'p_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 'Base_BOM_Header' as module,'p_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 'Base_BOM_Header' as module,'p_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 'Base_BOM_Header' as module,'wh_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 'Base_BOM_Header' as module,'wh_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 'Base_BOM_Header' as module,'dep_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 'Base_BOM_Header' as module,'dep_name' 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;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_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 'Base_BOM_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 'Base_BOM_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 'Base_BOM_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 'Base_BOM_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)
	select 'Base_BOM_Header' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_BOM_Header' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_BOM_Header' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_BOM_Header' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_BOM_Header' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_BOM_Header' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_BOM_Header' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_BOM_Header' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_BOM_Header' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_BOM_Header' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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 'Base_BOM_Header' as module,'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='Base_BOMs_Input'
if(select count(1) from System_ModuleFormat where module='Base_BOMs_Input' and field='bos_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOMs_Input' as module,'bos_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 'Base_BOMs_Input' as module,'bo_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 'Base_BOMs_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)
	select 'Base_BOMs_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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_Input' as module,'munit' 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,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOMs_Input' as module,'aunit' 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,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOMs_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' 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 'Base_BOMs_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' 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)
	select 'Base_BOMs_Input' as module,'bo_quantity' as field,
	'单件用量' as field_name,'单件用量' as title,
	70 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 'Base_BOMs_Input' as module,'bo_num' as field,
	'件数' as field_name,'件数' as title,
	70 as width,250 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 'Base_BOMs_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	70 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 'Base_BOMs_Input' as module,'att_rate' as field,
	'损耗率' as field_name,'损耗率' as title,
	70 as width,270 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 'Base_BOMs_Input' as module,'d_wh_id' as field,
	'仓库ID' as field_name,'仓库ID' as title,
	120 as width,300 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 'Base_BOMs_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,310 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 'Base_BOMs_Input' as module,'d_dep_id' as field,
	'部门ID' as field_name,'部门ID' 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 'Base_BOMs_Input' as module,'d_dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,330 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 'Base_BOMs_Input' as module,'d_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)
	select 'Base_BOMs_Input' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_BOMs_Input' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_BOMs_Input' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_BOMs_Input' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_BOMs_Input' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_BOMs_Input' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_BOMs_Input' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_BOMs_Input' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_BOMs_Input' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_BOMs_Input' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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 'Base_BOMs_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='Base_BOM_List'
if(select count(1) from System_ModuleFormat where module='Base_BOM_List' and field='bo_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_List' as module,'bo_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 'Base_BOM_List' as module,'new_date' as field,
	'编制日期' as field_name,'编制日期' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'date' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_List' as module,'p_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)
	select 'Base_BOM_List' as module,'p_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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_BOM_List' as module,'p_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 'Base_BOM_List' as module,'p_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 'Base_BOM_List' as module,'p_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 'Base_BOM_List' as module,'ic_name' as field,
	'存货分类' as field_name,'存货分类' as title,
	120 as width,170 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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)
	select 'Base_BOM_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	120 as width,1010 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 'Base_BOM_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	120 as width,1020 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 'Base_BOM_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	120 as width,1030 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 'Base_BOM_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	120 as width,1040 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 'Base_BOM_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	120 as width,1050 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 'Base_BOM_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	120 as width,1110 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 'Base_BOM_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	120 as width,1120 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 'Base_BOM_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	120 as width,1130 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 'Base_BOM_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	120 as width,1140 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 'Base_BOM_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	120 as width,1150 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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 'Base_BOM_List' 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='Base_Account_Input'
if(select count(1) from System_ModuleFormat where module='Base_Account_Input' and field='ac_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Account_Input' as module,'ac_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 'Base_Account_Input' as module,'ac_code' 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 'Base_Account_Input' as module,'ac_name' as field,
	'账户名称' as field_name,'账户名称' as title,
	120 as width,120 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 'Base_Account_Input' as module,'bank_name' as field,
	'开户银行' as field_name,'开户银行' as title,
	120 as width,130 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 'Base_Account_Input' as module,'bank_no' 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,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Account_Input' as module,'balance' 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 'Base_Account_Input' as module,'is_stop' as field,
	'停用' as field_name,'停用' as title,
	120 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO
--插入结算账户_列表界面格式
--delete System_ModuleFormat where module='Base_Account_List'
if(select count(1) from System_ModuleFormat where module='Base_Account_List' and field='ac_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Account_List' as module,'ac_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 'Base_Account_List' as module,'ac_code' 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;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Account_List' as module,'ac_name' as field,
	'账户名称' as field_name,'账户名称' as title,
	120 as width,120 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 'Base_Account_List' as module,'bank_name' as field,
	'开户银行' as field_name,'开户银行' as title,
	120 as width,130 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 'Base_Account_List' as module,'bank_no' 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,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Account_List' as module,'balance' 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 'Base_Account_List' as module,'is_stop_name' as field,
	'停用' as field_name,'停用' as title,
	60 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'list' as type,1 as can_edit;
end
/**/GO

--插入客户产品表_列表界面格式
--delete System_ModuleFormat where module='Base_CusInv_List'
if(select count(1) from System_ModuleFormat where module='Base_CusInv_List' and field='ci_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CusInv_List' as module,'ci_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 'Base_CusInv_List' as module,'cus_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 'Base_CusInv_List' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	60 as width,130 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 'Base_CusInv_List' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	60 as width,130 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 'Base_CusInv_List' as module,'cus_code' as field,
	'客户编码' as field_name,'客户编码' as title,
	80 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 'Base_CusInv_List' as module,'cus_full_name' as field,
	'客户全称' as field_name,'客户全称' as title,
	100 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 'Base_CusInv_List' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	100 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 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 'Base_CusInv_List' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	100 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 'Base_CusInv_List' as module,'i_name' as field,
	'存货名称' as field_name,'存货名称' as title,
	100 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 'Base_CusInv_List' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	100 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,can_select)
	select 'Base_CusInv_List' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	100 as width,195 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 'Base_CusInv_List' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	100 as width,196 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 'Base_CusInv_List' as module,'cus_i_name' as field,
	'存货别名' as field_name,'存货别名' as title,
	80 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,color,auth_view,auth_edit)
	select 'Base_CusInv_List' as module,'cus_price' as field,
	'客户报价' as field_name,'客户报价' as title,
	80 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color,
	'Base_CusInv_ViewPrice' as auth_view,
	'Base_CusInv_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CusInv_List' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	60 as width,230 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 'Base_CusInv_List' as module,'tax_rate' as field,
	'税率' as field_name,'税率' as title,
	60 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 'Base_CusInv_List' as module,'ele_id' as field,
	'专管业务员ID' as field_name,'专管业务员ID' as title,
	80 as width,249 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 'Base_CusInv_List' as module,'ele_name' as field,
	'专管业务员' as field_name,'专管业务员' as title,
	80 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)
	select 'Base_CusInv_List' as module,'sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	80 as width,1010 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 'Base_CusInv_List' as module,'sdefine2' as field,
	'字符自定义项2' as field_name,'字符自定义项2' as title,
	80 as width,1020 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 'Base_CusInv_List' as module,'sdefine3' as field,
	'字符自定义项3' as field_name,'字符自定义项3' as title,
	80 as width,1030 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 'Base_CusInv_List' as module,'sdefine4' as field,
	'字符自定义项4' as field_name,'字符自定义项4' as title,
	80 as width,1040 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 'Base_CusInv_List' as module,'sdefine5' as field,
	'字符自定义项5' as field_name,'字符自定义项5' as title,
	80 as width,1050 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 'Base_CusInv_List' as module,'ndefine1' as field,
	'数值自定义项1' as field_name,'数值自定义项1' as title,
	80 as width,1110 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 'Base_CusInv_List' as module,'ndefine2' as field,
	'数值自定义项2' as field_name,'数值自定义项2' as title,
	80 as width,1120 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 'Base_CusInv_List' as module,'ndefine3' as field,
	'数值自定义项3' as field_name,'数值自定义项3' as title,
	80 as width,1130 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 'Base_CusInv_List' as module,'ndefine4' as field,
	'数值自定义项4' as field_name,'数值自定义项4' as title,
	80 as width,1140 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 'Base_CusInv_List' as module,'ndefine5' as field,
	'数值自定义项5' as field_name,'数值自定义项5' as title,
	80 as width,1150 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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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 'Base_CusInv_List' as module,'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='Base_CusInv_Input'
if(select count(1) from System_ModuleFormat where module='Base_CusInv_Input' and field='ci_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CusInv_Input' as module,'ci_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 'Base_CusInv_Input' as module,'cus_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 'Base_CusInv_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	60 as width,130 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 'Base_CusInv_Input' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	60 as width,130 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 'Base_CusInv_Input' as module,'cus_code' as field,
	'客户编码' as field_name,'客户编码' 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,color)
	select 'Base_CusInv_Input' as module,'cus_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,color)
	select 'Base_CusInv_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 'Base_CusInv_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 'Base_CusInv_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,can_select)
	select 'Base_CusInv_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,195 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 'Base_CusInv_Input' as module,'free2' as field,
	'自由项2' as field_name,'自由项2' as title,
	103 as width,196 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 'Base_CusInv_Input' as module,'cus_i_name' 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,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,auth_view,auth_edit)
	select 'Base_CusInv_Input' as module,'cus_price' as field,
	'客户报价' as field_name,'客户报价' as title,
	120 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color,
	'Base_CusInv_ViewPrice' as auth_view,
	'Base_CusInv_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_CusInv_Input' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,230 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 'Base_CusInv_Input' as module,'tax_rate' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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 'Base_CusInv_Input' 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='Base_Customer_FollowUp_List'
if(select count(1) from System_ModuleFormat where module='Base_Customer_FollowUp_List' and field='cfu_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_FollowUp_List' as module,'cfu_id' as field,
	'cfu_id' as field_name,'cfu_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 'Base_Customer_FollowUp_List' as module,'fu_date' as field,
	'跟进日期' as field_name,'跟进日期' as title,
	90 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Base_Customer_FollowUp_List' as module,'fu_user' as field,
	'跟进人' as field_name,'跟进人' as title,
	80 as width,170 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Base_Customer_FollowUp_List' as module,'remark' as field,
	'跟进内容' as field_name,'跟进内容' as title,
	600 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
end
/**/GO
