--插入采购订单_主表界面格式
--delete System_ModuleFormat where module='Purchase_PurchaseOrder_Header'
--delete System_ModuleFormat where module='Purchase_PurchaseOrders_Input'
if(select count(1) from System_ModuleFormat where module='Purchase_PurchaseOrder_Header' and field='po_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'po_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 'Purchase_PurchaseOrder_Header' as module,'order_number' as field,
	'订单号' as field_name,'订单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_PurchaseOrder_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'pt_id' as field,
	'采购类型ID' as field_name,'采购类型ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_PurchaseOrder_Header' as module,'pt_name' as field,
	'采购类型' as field_name,'采购类型' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'dep_id' as field,
	'采购部门ID' as field_name,'采购部门ID' as title,
	120 as width,170 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_PurchaseOrder_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrder_Header' as module,'exchange_rate' 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 'Purchase_PurchaseOrder_Header' 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)
	select 'Purchase_PurchaseOrder_Header' as module,'sw_id' as field,
	'运输方式ID' as field_name,'运输方式ID' as title,
	120 as width,250 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 'Purchase_PurchaseOrder_Header' as module,'sw_name' as field,
	'运输方式' as field_name,'运输方式' as title,
	98 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 'Purchase_PurchaseOrder_Header' as module,'contact' 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 'Purchase_PurchaseOrder_Header' as module,'phone' as field,
	'电话' as field_name,'电话' as title,
	120 as width,280 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Purchase_PurchaseOrder_Header' as module,'vd_sdefine1' as field,
	'供应商字符自定义项1' as field_name,'供应商字符自定义项1' as title,
	103 as width,2010 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 'Purchase_PurchaseOrder_Header' as module,'vd_sdefine2' as field,
	'供应商字符自定义项2' as field_name,'供应商字符自定义项2' as title,
	103 as width,2020 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 'Purchase_PurchaseOrder_Header' as module,'vd_sdefine3' as field,
	'供应商字符自定义项3' as field_name,'供应商字符自定义项3' as title,
	103 as width,2030 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 'Purchase_PurchaseOrder_Header' as module,'vd_sdefine4' as field,
	'供应商字符自定义项4' as field_name,'供应商字符自定义项4' as title,
	103 as width,2040 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 'Purchase_PurchaseOrder_Header' as module,'vd_sdefine5' as field,
	'供应商字符自定义项5' as field_name,'供应商字符自定义项5' as title,
	103 as width,2050 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 'Purchase_PurchaseOrder_Header' as module,'vd_ndefine1' as field,
	'供应商数值自定义项1' as field_name,'供应商数值自定义项1' as title,
	103 as width,2110 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 'Purchase_PurchaseOrder_Header' as module,'vd_ndefine2' as field,
	'供应商数值自定义项2' as field_name,'供应商数值自定义项2' as title,
	103 as width,2120 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 'Purchase_PurchaseOrder_Header' as module,'vd_ndefine3' as field,
	'供应商数值自定义项3' as field_name,'供应商数值自定义项3' as title,
	103 as width,2130 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 'Purchase_PurchaseOrder_Header' as module,'vd_ndefine4' as field,
	'供应商数值自定义项4' as field_name,'供应商数值自定义项4' as title,
	103 as width,2140 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 'Purchase_PurchaseOrder_Header' as module,'vd_ndefine5' as field,
	'供应商数值自定义项5' as field_name,'供应商数值自定义项5' as title,
	103 as width,2150 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='Purchase_PurchaseOrders_Input' and field='pos_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'pos_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 'Purchase_PurchaseOrders_Input' as module,'po_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 'Purchase_PurchaseOrders_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 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 'Purchase_PurchaseOrders_Input' as module,'aunit' as field,
	'辅计量单位' as field_name,'辅计量单位' as title,
	60 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 'Purchase_PurchaseOrders_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'tax_unit_price' as field,
	'含税单价' as field_name,'含税单价' as title,
	60 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_PurchaseOrders_Input' as module,'quantity' as field,
	'数量' as field_name,'数量' as title,
	60 as width,230 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,240 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'acc_in_quantity' as field,
	'累计入库数量' as field_name,'累计入库数量' as title,
	60 as width,250 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'acc_in_num' as field,
	'累计入库件数' as field_name,'累计入库件数' as title,
	60 as width,260 as sort,0 as show,0 as hidden,1 as sum_field,'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 'Purchase_PurchaseOrders_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,270 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,280 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'tax_total_price' as field,
	'含税金额' as field_name,'含税金额' as title,
	60 as width,290 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'tax' as field,
	'税额' as field_name,'税额' as title,
	60 as width,310 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'nat_unit_price' as field,
	'本币单价' as field_name,'本币单价' as title,
	60 as width,320 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'nat_total_price' as field,
	'本币金额' as field_name,'本币金额' as title,
	60 as width,330 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'nat_tax_unit_price' as field,
	'本币含税单价' as field_name,'本币含税单价' as title,
	60 as width,340 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'nat_tax_total_price' as field,
	'本币含税金额' as field_name,'本币含税金额' as title,
	60 as width,350 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_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 'Purchase_PurchaseOrders_Input' as module,'nat_tax' as field,
	'本币税额' as field_name,'本币税额' as title,
	60 as width,360 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseOrder_ViewPrice' as auth_view,
	'Purchase_PurchaseOrder_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseOrders_Input' as module,'d_tax_rate' as field,
	'税率' as field_name,'税率' as title,
	60 as width,370 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 'Purchase_PurchaseOrders_Input' as module,'arrive_date' as field,
	'预到货日期' as field_name,'预到货日期' as title,
	70 as width,380 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 'Purchase_PurchaseOrders_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,390 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 'Purchase_PurchaseOrders_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end

/**/GO

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,150 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_PurchaseIn_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,160 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'iot_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,color)
	select 'Purchase_PurchaseIn_Header' as module,'iot_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,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_Header' as module,'pt_id' as field,
	'采购类型ID' as field_name,'采购类型ID' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'pt_name' as field,
	'采购类型' as field_name,'采购类型' as title,
	98 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Header' as module,'tax_rate' as field,
	'税率' as field_name,'税率' as title,
	120 as width,245 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 'Purchase_PurchaseIn_Header' as module,'new_user' 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,0 as can_edit;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end
/**/GO

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'pos_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_select,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'po_order_number' as field,
	'采购订单号' as field_name,'采购订单号' as title,
	103 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,0 as can_edit;

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'i_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,color)
	select 'Purchase_PurchaseIn_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,180 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'i_name' 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 'Purchase_PurchaseIn_Input' as module,'standard' as field,
	'规格型号' as field_name,'规格型号' as title,
	120 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'munit' as field,
	'单位' as field_name,'单位' as title,
	60 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 'Purchase_PurchaseIn_Input' as module,'aunit' as field,
	'辅计单位' as field_name,'辅计量单位' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Purchase_PurchaseIn_Input' as module,'free1' as field,
	'自由项1' as field_name,'自由项1' as title,
	103 as width,180 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'po_order_quantity' as field,
	'订单数量' as field_name,'订单数量' as title,
	60 as width,260 as sort,1 as show,0 as hidden,1 as sum_field,'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 'Purchase_PurchaseIn_Input' as module,'quantity' as field,
	'入库数量' as field_name,'入库数量' as title,
	60 as width,270 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'num' as field,
	'件数' as field_name,'件数' as title,
	60 as width,280 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Purchase_PurchaseIn_Input' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,300 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseIn_ViewPrice' as auth_view,
	'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_Input' as module,'tax_unit_price' as field,
	'本币含税单价' as field_name,'含税单价' as title,
	60 as width,310 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseIn_ViewPrice' as auth_view,
	'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_Input' as module,'total_price' as field,
	'本币无税金额' as field_name,'无税金额' as title,
	60 as width,320 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseIn_ViewPrice' as auth_view,
	'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_Input' as module,'tax_total_price' as field,
	'本币含税金额' as field_name,'含税金额' as title,
	60 as width,330 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Purchase_PurchaseIn_ViewPrice' as auth_view,
	'Purchase_PurchaseIn_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 'Purchase_PurchaseIn_Input' as module,'tax' as field,
	'本币税额' as field_name,'税额' as title,
	60 as width,340 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'Purchase_PurchaseIn_ViewPrice' as auth_view,
	'Purchase_PurchaseIn_EditPrice' as auth_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_PurchaseIn_Input' as module,'d_tax_rate' as field,
	'税率' as field_name,'税率' as title,
	60 as width,350 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 'Purchase_PurchaseIn_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end
/**/GO



--插入采购对账单_主表界面格式
--delete System_ModuleFormat where module='Purchase_CheckAccount_Header'
if(select count(1) from System_ModuleFormat where module='Purchase_CheckAccount_Header' and field='ca_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'ca_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 'Purchase_CheckAccount_Header' as module,'order_number' as field,
	'采购对账单号' as field_name,'采购对账单号' as title,
	120 as width,110 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'vd_id' as field,
	'供应商ID' as field_name,'供应商ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_CheckAccount_Header' as module,'vd_name' as field,
	'供应商名称' as field_name,'供应商名称' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'cus_id' as field,
	'客户ID' as field_name,'客户ID' as title,
	120 as width,130 as sort,0 as show,1 as hidden,0 as sum_field,'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 'Purchase_CheckAccount_Header' as module,'cus_name' as field,
	'客户名称' as field_name,'客户名称' as title,
	98 as width,140 as sort,0 as show,1 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 'Purchase_CheckAccount_Header' as module,'invoice_no' 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 'Purchase_CheckAccount_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 'Purchase_CheckAccount_Header' as module,'wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,180 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 'Purchase_CheckAccount_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 'Purchase_CheckAccount_Header' as module,'dep_name' as field,
	'部门' as field_name,'部门' as title,
	98 as width,200 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'ele_id' as field,
	'业务员ID' as field_name,'业务员ID' as title,
	120 as width,210 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'ele_name' as field,
	'业务员' as field_name,'业务员' as title,
	98 as width,220 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
		
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'crc_id' as field,
	'币种ID' as field_name,'币种ID' as title,
	120 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_CheckAccount_Header' as module,'crc_name' as field,
	'币种' as field_name,'币种' as title,
	98 as width,240 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'exchange_rate' 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 'Purchase_CheckAccount_Header' as module,'tax_rate' 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 'Purchase_CheckAccount_Header' as module,'new_user' as field,
	'新增人' as field_name,'新增人' as title,
	120 as width,320 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 'Purchase_CheckAccount_Header' as module,'update_user' as field,
	'修改人' as field_name,'修改人' as title,
	120 as width,330 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 'Purchase_CheckAccount_Header' as module,'update_date' 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,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccount_Header' as module,'verify_user' as field,
	'审核人' as field_name,'审核人' as title,
	120 as width,350 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 'Purchase_CheckAccount_Header' as module,'remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,360 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;

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

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

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

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

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

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Purchase_CheckAccount_Header' as module,'vd_sdefine1' as field,
	'供应商字符自定义项1' as field_name,'供应商字符自定义项1' as title,
	103 as width,2010 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 'Purchase_CheckAccount_Header' as module,'vd_sdefine2' as field,
	'供应商字符自定义项2' as field_name,'供应商字符自定义项2' as title,
	103 as width,2020 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 'Purchase_CheckAccount_Header' as module,'vd_sdefine3' as field,
	'供应商字符自定义项3' as field_name,'供应商字符自定义项3' as title,
	103 as width,2030 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 'Purchase_CheckAccount_Header' as module,'vd_sdefine4' as field,
	'供应商字符自定义项4' as field_name,'供应商字符自定义项4' as title,
	103 as width,2040 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 'Purchase_CheckAccount_Header' as module,'vd_sdefine5' as field,
	'供应商字符自定义项5' as field_name,'供应商字符自定义项5' as title,
	103 as width,2050 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 'Purchase_CheckAccount_Header' as module,'vd_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,0 as can_select;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,can_select)
	select 'Purchase_CheckAccount_Header' as module,'vd_ndefine2' as field,
	'供应商数值自定义项2' as field_name,'供应商数值自定义项2' as title,
	103 as width,2120 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 'Purchase_CheckAccount_Header' as module,'vd_ndefine3' as field,
	'供应商数值自定义项3' as field_name,'供应商数值自定义项3' as title,
	103 as width,2130 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 'Purchase_CheckAccount_Header' as module,'vd_ndefine4' as field,
	'供应商数值自定义项4' as field_name,'供应商数值自定义项4' as title,
	103 as width,2140 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 'Purchase_CheckAccount_Header' as module,'vd_ndefine5' as field,
	'供应商数值自定义项5' as field_name,'供应商数值自定义项5' as title,
	103 as width,2150 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='Purchase_CheckAccounts_Input'
if(select count(1) from System_ModuleFormat where module='Purchase_CheckAccounts_Input' and field='cas_id')=0
begin
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'cas_id' as field,
	'采购对账单子表ID' as field_name,'采购对账单子表ID' as title,
	60 as width,100 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'ca_id' as field,
	'采购对账单主表ID' as field_name,'采购对账单主表ID' as title,
	60 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 'Purchase_CheckAccounts_Input' as module,'ios_id' as field,
	'入库单子表ID' as field_name,'入库单子表ID' as title,
	120 as width,115 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'i_id' as field,
	'存货ID' as field_name,'存货ID' as title,
	120 as width,130 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_select,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'io_order_number' as field,
	'入库单号' as field_name,'入库单号' as title,
	103 as width,120 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_select,0 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_CheckAccounts_Input' as module,'d_wh_name' as field,
	'仓库' as field_name,'仓库' as title,
	98 as width,126 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 'Purchase_CheckAccounts_Input' as module,'i_code' as field,
	'存货编码' as field_name,'存货编码' as title,
	98 as width,140 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,'blue' as color;

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

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

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

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

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

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Purchase_CheckAccounts_Input' as module,'unit_price' as field,
	'无税单价' as field_name,'无税单价' as title,
	60 as width,190 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'tax_unit_price' as field,
	'含税单价' as field_name,'含税单价' as title,
	60 as width,200 as sort,1 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'io_quantity' as field,
	'入库数量' as field_name,'入库数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit;

	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,color)
	select 'Purchase_CheckAccounts_Input' as module,'quantity' as field,
	'对账数量' as field_name,'对账数量' as title,
	60 as width,210 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,'blue' as color;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'num' as field,
	'对账件数' as field_name,'对账件数' as title,
	60 as width,220 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'convert_rate' as field,
	'换算率' as field_name,'换算率' as title,
	60 as width,230 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit,auth_view,auth_edit)
	select 'Purchase_CheckAccounts_Input' as module,'total_price' as field,
	'无税金额' as field_name,'无税金额' as title,
	60 as width,260 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'tax_total_price' as field,
	'含税金额' as field_name,'含税金额' as title,
	60 as width,270 as sort,1 as show,0 as hidden,1 as sum_field,'text' as type,1 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'tax' as field,
	'税额' as field_name,'税额' as title,
	60 as width,280 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'nat_unit_price' as field,
	'本币单价' as field_name,'本币单价' as title,
	60 as width,290 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'nat_total_price' as field,
	'本币金额' as field_name,'本币金额' as title,
	60 as width,300 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'nat_tax_unit_price' 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,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'nat_tax_total_price' as field,
	'本币含税金额' as field_name,'本币含税金额' as title,
	80 as width,320 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_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 'Purchase_CheckAccounts_Input' as module,'nat_tax' as field,
	'本币税额' as field_name,'本币税额' as title,
	60 as width,330 as sort,0 as show,0 as hidden,1 as sum_field,'text' as type,0 as can_edit,
	'Purchase_CheckAccount_ViewPrice' as auth_view,
	'Purchase_CheckAccount_EditPrice' as auth_edit;
	
	insert System_ModuleFormat(module,field,field_name,
	title,width,sort,show,hidden,sum_field,type,can_edit)
	select 'Purchase_CheckAccounts_Input' as module,'d_tax_rate' as field,
	'税率' as field_name,'税率' as title,
	60 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 'Purchase_CheckAccounts_Input' as module,'po_order_number' as field,
	'订单号' as field_name,'订单号' as title,
	100 as width,370 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 'Purchase_CheckAccounts_Input' as module,'d_remark' as field,
	'备注' as field_name,'备注' as title,
	120 as width,500 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 'Purchase_CheckAccounts_Input' as module,'d_sdefine1' as field,
	'字符自定义项1' as field_name,'字符自定义项1' as title,
	103 as width,1010 as sort,0 as show,0 as hidden,0 as sum_field,'text' as type,1 as can_edit,1 as can_select;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

end
/**/GO

